STM32G030_CRSF_TO_PWM.list 668 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902
  1. STM32G030_CRSF_TO_PWM.elf: file format elf32-littlearm
  2. Sections:
  3. Idx Name Size VMA LMA File off Algn
  4. 0 .isr_vector 000000b8 08000000 08000000 00001000 2**0
  5. CONTENTS, ALLOC, LOAD, READONLY, DATA
  6. 1 .text 00005fa8 080000b8 080000b8 000010b8 2**3
  7. CONTENTS, ALLOC, LOAD, READONLY, CODE
  8. 2 .rodata 000000e0 08006060 08006060 00007060 2**2
  9. CONTENTS, ALLOC, LOAD, READONLY, DATA
  10. 3 .ARM.extab 00000000 08006140 08006140 00008194 2**0
  11. CONTENTS
  12. 4 .ARM 00000000 08006140 08006140 00008194 2**0
  13. CONTENTS
  14. 5 .preinit_array 00000000 08006140 08006140 00008194 2**0
  15. CONTENTS, ALLOC, LOAD, DATA
  16. 6 .init_array 00000004 08006140 08006140 00007140 2**2
  17. CONTENTS, ALLOC, LOAD, DATA
  18. 7 .fini_array 00000004 08006144 08006144 00007144 2**2
  19. CONTENTS, ALLOC, LOAD, DATA
  20. 8 .data 00000194 20000000 08006148 00008000 2**2
  21. CONTENTS, ALLOC, LOAD, CODE
  22. 9 .bss 0000039c 20000194 080062dc 00008194 2**2
  23. ALLOC
  24. 10 ._user_heap_stack 00000600 20000530 080062dc 00008530 2**0
  25. ALLOC
  26. 11 .ARM.attributes 00000028 00000000 00000000 00008194 2**0
  27. CONTENTS, READONLY
  28. 12 .debug_info 0001565c 00000000 00000000 000081bc 2**0
  29. CONTENTS, READONLY, DEBUGGING, OCTETS
  30. 13 .debug_abbrev 00003551 00000000 00000000 0001d818 2**0
  31. CONTENTS, READONLY, DEBUGGING, OCTETS
  32. 14 .debug_aranges 000012d8 00000000 00000000 00020d70 2**3
  33. CONTENTS, READONLY, DEBUGGING, OCTETS
  34. 15 .debug_rnglists 00000ea9 00000000 00000000 00022048 2**0
  35. CONTENTS, READONLY, DEBUGGING, OCTETS
  36. 16 .debug_macro 00017018 00000000 00000000 00022ef1 2**0
  37. CONTENTS, READONLY, DEBUGGING, OCTETS
  38. 17 .debug_line 00016a5d 00000000 00000000 00039f09 2**0
  39. CONTENTS, READONLY, DEBUGGING, OCTETS
  40. 18 .debug_str 0009113f 00000000 00000000 00050966 2**0
  41. CONTENTS, READONLY, DEBUGGING, OCTETS
  42. 19 .comment 00000043 00000000 00000000 000e1aa5 2**0
  43. CONTENTS, READONLY
  44. 20 .debug_frame 00004368 00000000 00000000 000e1ae8 2**2
  45. CONTENTS, READONLY, DEBUGGING, OCTETS
  46. 21 .debug_line_str 00000050 00000000 00000000 000e5e50 2**0
  47. CONTENTS, READONLY, DEBUGGING, OCTETS
  48. Disassembly of section .text:
  49. 080000b8 <__do_global_dtors_aux>:
  50. 80000b8: b510 push {r4, lr}
  51. 80000ba: 4c06 ldr r4, [pc, #24] @ (80000d4 <__do_global_dtors_aux+0x1c>)
  52. 80000bc: 7823 ldrb r3, [r4, #0]
  53. 80000be: 2b00 cmp r3, #0
  54. 80000c0: d107 bne.n 80000d2 <__do_global_dtors_aux+0x1a>
  55. 80000c2: 4b05 ldr r3, [pc, #20] @ (80000d8 <__do_global_dtors_aux+0x20>)
  56. 80000c4: 2b00 cmp r3, #0
  57. 80000c6: d002 beq.n 80000ce <__do_global_dtors_aux+0x16>
  58. 80000c8: 4804 ldr r0, [pc, #16] @ (80000dc <__do_global_dtors_aux+0x24>)
  59. 80000ca: e000 b.n 80000ce <__do_global_dtors_aux+0x16>
  60. 80000cc: bf00 nop
  61. 80000ce: 2301 movs r3, #1
  62. 80000d0: 7023 strb r3, [r4, #0]
  63. 80000d2: bd10 pop {r4, pc}
  64. 80000d4: 20000194 .word 0x20000194
  65. 80000d8: 00000000 .word 0x00000000
  66. 80000dc: 08006038 .word 0x08006038
  67. 080000e0 <frame_dummy>:
  68. 80000e0: 4b04 ldr r3, [pc, #16] @ (80000f4 <frame_dummy+0x14>)
  69. 80000e2: b510 push {r4, lr}
  70. 80000e4: 2b00 cmp r3, #0
  71. 80000e6: d003 beq.n 80000f0 <frame_dummy+0x10>
  72. 80000e8: 4903 ldr r1, [pc, #12] @ (80000f8 <frame_dummy+0x18>)
  73. 80000ea: 4804 ldr r0, [pc, #16] @ (80000fc <frame_dummy+0x1c>)
  74. 80000ec: e000 b.n 80000f0 <frame_dummy+0x10>
  75. 80000ee: bf00 nop
  76. 80000f0: bd10 pop {r4, pc}
  77. 80000f2: 46c0 nop @ (mov r8, r8)
  78. 80000f4: 00000000 .word 0x00000000
  79. 80000f8: 20000198 .word 0x20000198
  80. 80000fc: 08006038 .word 0x08006038
  81. 08000100 <__udivsi3>:
  82. 8000100: 2200 movs r2, #0
  83. 8000102: 0843 lsrs r3, r0, #1
  84. 8000104: 428b cmp r3, r1
  85. 8000106: d374 bcc.n 80001f2 <__udivsi3+0xf2>
  86. 8000108: 0903 lsrs r3, r0, #4
  87. 800010a: 428b cmp r3, r1
  88. 800010c: d35f bcc.n 80001ce <__udivsi3+0xce>
  89. 800010e: 0a03 lsrs r3, r0, #8
  90. 8000110: 428b cmp r3, r1
  91. 8000112: d344 bcc.n 800019e <__udivsi3+0x9e>
  92. 8000114: 0b03 lsrs r3, r0, #12
  93. 8000116: 428b cmp r3, r1
  94. 8000118: d328 bcc.n 800016c <__udivsi3+0x6c>
  95. 800011a: 0c03 lsrs r3, r0, #16
  96. 800011c: 428b cmp r3, r1
  97. 800011e: d30d bcc.n 800013c <__udivsi3+0x3c>
  98. 8000120: 22ff movs r2, #255 @ 0xff
  99. 8000122: 0209 lsls r1, r1, #8
  100. 8000124: ba12 rev r2, r2
  101. 8000126: 0c03 lsrs r3, r0, #16
  102. 8000128: 428b cmp r3, r1
  103. 800012a: d302 bcc.n 8000132 <__udivsi3+0x32>
  104. 800012c: 1212 asrs r2, r2, #8
  105. 800012e: 0209 lsls r1, r1, #8
  106. 8000130: d065 beq.n 80001fe <__udivsi3+0xfe>
  107. 8000132: 0b03 lsrs r3, r0, #12
  108. 8000134: 428b cmp r3, r1
  109. 8000136: d319 bcc.n 800016c <__udivsi3+0x6c>
  110. 8000138: e000 b.n 800013c <__udivsi3+0x3c>
  111. 800013a: 0a09 lsrs r1, r1, #8
  112. 800013c: 0bc3 lsrs r3, r0, #15
  113. 800013e: 428b cmp r3, r1
  114. 8000140: d301 bcc.n 8000146 <__udivsi3+0x46>
  115. 8000142: 03cb lsls r3, r1, #15
  116. 8000144: 1ac0 subs r0, r0, r3
  117. 8000146: 4152 adcs r2, r2
  118. 8000148: 0b83 lsrs r3, r0, #14
  119. 800014a: 428b cmp r3, r1
  120. 800014c: d301 bcc.n 8000152 <__udivsi3+0x52>
  121. 800014e: 038b lsls r3, r1, #14
  122. 8000150: 1ac0 subs r0, r0, r3
  123. 8000152: 4152 adcs r2, r2
  124. 8000154: 0b43 lsrs r3, r0, #13
  125. 8000156: 428b cmp r3, r1
  126. 8000158: d301 bcc.n 800015e <__udivsi3+0x5e>
  127. 800015a: 034b lsls r3, r1, #13
  128. 800015c: 1ac0 subs r0, r0, r3
  129. 800015e: 4152 adcs r2, r2
  130. 8000160: 0b03 lsrs r3, r0, #12
  131. 8000162: 428b cmp r3, r1
  132. 8000164: d301 bcc.n 800016a <__udivsi3+0x6a>
  133. 8000166: 030b lsls r3, r1, #12
  134. 8000168: 1ac0 subs r0, r0, r3
  135. 800016a: 4152 adcs r2, r2
  136. 800016c: 0ac3 lsrs r3, r0, #11
  137. 800016e: 428b cmp r3, r1
  138. 8000170: d301 bcc.n 8000176 <__udivsi3+0x76>
  139. 8000172: 02cb lsls r3, r1, #11
  140. 8000174: 1ac0 subs r0, r0, r3
  141. 8000176: 4152 adcs r2, r2
  142. 8000178: 0a83 lsrs r3, r0, #10
  143. 800017a: 428b cmp r3, r1
  144. 800017c: d301 bcc.n 8000182 <__udivsi3+0x82>
  145. 800017e: 028b lsls r3, r1, #10
  146. 8000180: 1ac0 subs r0, r0, r3
  147. 8000182: 4152 adcs r2, r2
  148. 8000184: 0a43 lsrs r3, r0, #9
  149. 8000186: 428b cmp r3, r1
  150. 8000188: d301 bcc.n 800018e <__udivsi3+0x8e>
  151. 800018a: 024b lsls r3, r1, #9
  152. 800018c: 1ac0 subs r0, r0, r3
  153. 800018e: 4152 adcs r2, r2
  154. 8000190: 0a03 lsrs r3, r0, #8
  155. 8000192: 428b cmp r3, r1
  156. 8000194: d301 bcc.n 800019a <__udivsi3+0x9a>
  157. 8000196: 020b lsls r3, r1, #8
  158. 8000198: 1ac0 subs r0, r0, r3
  159. 800019a: 4152 adcs r2, r2
  160. 800019c: d2cd bcs.n 800013a <__udivsi3+0x3a>
  161. 800019e: 09c3 lsrs r3, r0, #7
  162. 80001a0: 428b cmp r3, r1
  163. 80001a2: d301 bcc.n 80001a8 <__udivsi3+0xa8>
  164. 80001a4: 01cb lsls r3, r1, #7
  165. 80001a6: 1ac0 subs r0, r0, r3
  166. 80001a8: 4152 adcs r2, r2
  167. 80001aa: 0983 lsrs r3, r0, #6
  168. 80001ac: 428b cmp r3, r1
  169. 80001ae: d301 bcc.n 80001b4 <__udivsi3+0xb4>
  170. 80001b0: 018b lsls r3, r1, #6
  171. 80001b2: 1ac0 subs r0, r0, r3
  172. 80001b4: 4152 adcs r2, r2
  173. 80001b6: 0943 lsrs r3, r0, #5
  174. 80001b8: 428b cmp r3, r1
  175. 80001ba: d301 bcc.n 80001c0 <__udivsi3+0xc0>
  176. 80001bc: 014b lsls r3, r1, #5
  177. 80001be: 1ac0 subs r0, r0, r3
  178. 80001c0: 4152 adcs r2, r2
  179. 80001c2: 0903 lsrs r3, r0, #4
  180. 80001c4: 428b cmp r3, r1
  181. 80001c6: d301 bcc.n 80001cc <__udivsi3+0xcc>
  182. 80001c8: 010b lsls r3, r1, #4
  183. 80001ca: 1ac0 subs r0, r0, r3
  184. 80001cc: 4152 adcs r2, r2
  185. 80001ce: 08c3 lsrs r3, r0, #3
  186. 80001d0: 428b cmp r3, r1
  187. 80001d2: d301 bcc.n 80001d8 <__udivsi3+0xd8>
  188. 80001d4: 00cb lsls r3, r1, #3
  189. 80001d6: 1ac0 subs r0, r0, r3
  190. 80001d8: 4152 adcs r2, r2
  191. 80001da: 0883 lsrs r3, r0, #2
  192. 80001dc: 428b cmp r3, r1
  193. 80001de: d301 bcc.n 80001e4 <__udivsi3+0xe4>
  194. 80001e0: 008b lsls r3, r1, #2
  195. 80001e2: 1ac0 subs r0, r0, r3
  196. 80001e4: 4152 adcs r2, r2
  197. 80001e6: 0843 lsrs r3, r0, #1
  198. 80001e8: 428b cmp r3, r1
  199. 80001ea: d301 bcc.n 80001f0 <__udivsi3+0xf0>
  200. 80001ec: 004b lsls r3, r1, #1
  201. 80001ee: 1ac0 subs r0, r0, r3
  202. 80001f0: 4152 adcs r2, r2
  203. 80001f2: 1a41 subs r1, r0, r1
  204. 80001f4: d200 bcs.n 80001f8 <__udivsi3+0xf8>
  205. 80001f6: 4601 mov r1, r0
  206. 80001f8: 4152 adcs r2, r2
  207. 80001fa: 4610 mov r0, r2
  208. 80001fc: 4770 bx lr
  209. 80001fe: e7ff b.n 8000200 <__udivsi3+0x100>
  210. 8000200: b501 push {r0, lr}
  211. 8000202: 2000 movs r0, #0
  212. 8000204: f000 f806 bl 8000214 <__aeabi_idiv0>
  213. 8000208: bd02 pop {r1, pc}
  214. 800020a: 46c0 nop @ (mov r8, r8)
  215. 0800020c <__aeabi_uidivmod>:
  216. 800020c: 2900 cmp r1, #0
  217. 800020e: d0f7 beq.n 8000200 <__udivsi3+0x100>
  218. 8000210: e776 b.n 8000100 <__udivsi3>
  219. 8000212: 4770 bx lr
  220. 08000214 <__aeabi_idiv0>:
  221. 8000214: 4770 bx lr
  222. 8000216: 46c0 nop @ (mov r8, r8)
  223. 08000218 <ADC_Init>:
  224. extern ADC_HandleTypeDef hadc1;
  225. #define ADC_REGULAR_BUF_LEN 1
  226. uint32_t ADCRegular[ADC_REGULAR_BUF_LEN]; // ADC regular conventions
  227. void ADC_Init(void) {
  228. 8000218: b580 push {r7, lr}
  229. 800021a: af00 add r7, sp, #0
  230. ADC_Enable(&hadc1);
  231. 800021c: 4b0a ldr r3, [pc, #40] @ (8000248 <ADC_Init+0x30>)
  232. 800021e: 0018 movs r0, r3
  233. 8000220: f002 f994 bl 800254c <ADC_Enable>
  234. // ADC Calibration
  235. if (HAL_ADCEx_Calibration_Start(&hadc1) != HAL_OK) {
  236. 8000224: 4b08 ldr r3, [pc, #32] @ (8000248 <ADC_Init+0x30>)
  237. 8000226: 0018 movs r0, r3
  238. 8000228: f002 fb9a bl 8002960 <HAL_ADCEx_Calibration_Start>
  239. 800022c: 1e03 subs r3, r0, #0
  240. 800022e: d001 beq.n 8000234 <ADC_Init+0x1c>
  241. Error_Handler();
  242. 8000230: f000 faf2 bl 8000818 <Error_Handler>
  243. }
  244. HAL_ADC_Start_DMA(&hadc1, ADCRegular, ADC_REGULAR_BUF_LEN);
  245. 8000234: 4905 ldr r1, [pc, #20] @ (800024c <ADC_Init+0x34>)
  246. 8000236: 4b04 ldr r3, [pc, #16] @ (8000248 <ADC_Init+0x30>)
  247. 8000238: 2201 movs r2, #1
  248. 800023a: 0018 movs r0, r3
  249. 800023c: f001 fe54 bl 8001ee8 <HAL_ADC_Start_DMA>
  250. }
  251. 8000240: 46c0 nop @ (mov r8, r8)
  252. 8000242: 46bd mov sp, r7
  253. 8000244: bd80 pop {r7, pc}
  254. 8000246: 46c0 nop @ (mov r8, r8)
  255. 8000248: 200001b4 .word 0x200001b4
  256. 800024c: 200001b0 .word 0x200001b0
  257. 08000250 <ADC_Start_Convertion>:
  258. void ADC_Start_Convertion(void) {
  259. 8000250: b580 push {r7, lr}
  260. 8000252: af00 add r7, sp, #0
  261. HAL_ADC_Stop_DMA(&hadc1);
  262. 8000254: 4b06 ldr r3, [pc, #24] @ (8000270 <ADC_Start_Convertion+0x20>)
  263. 8000256: 0018 movs r0, r3
  264. 8000258: f001 fed4 bl 8002004 <HAL_ADC_Stop_DMA>
  265. HAL_ADC_Start_DMA(&hadc1, ADCRegular, ADC_REGULAR_BUF_LEN);
  266. 800025c: 4905 ldr r1, [pc, #20] @ (8000274 <ADC_Start_Convertion+0x24>)
  267. 800025e: 4b04 ldr r3, [pc, #16] @ (8000270 <ADC_Start_Convertion+0x20>)
  268. 8000260: 2201 movs r2, #1
  269. 8000262: 0018 movs r0, r3
  270. 8000264: f001 fe40 bl 8001ee8 <HAL_ADC_Start_DMA>
  271. }
  272. 8000268: 46c0 nop @ (mov r8, r8)
  273. 800026a: 46bd mov sp, r7
  274. 800026c: bd80 pop {r7, pc}
  275. 800026e: 46c0 nop @ (mov r8, r8)
  276. 8000270: 200001b4 .word 0x200001b4
  277. 8000274: 200001b0 .word 0x200001b0
  278. 08000278 <ADC_GetVoltage>:
  279. uint16_t ADC_GetVoltage(void) {
  280. 8000278: b580 push {r7, lr}
  281. 800027a: b082 sub sp, #8
  282. 800027c: af00 add r7, sp, #0
  283. uint32_t adc_value;
  284. adc_value = ADC_REF_Voltage_mV * ADCRegular[0] / 4095;
  285. 800027e: 4b10 ldr r3, [pc, #64] @ (80002c0 <ADC_GetVoltage+0x48>)
  286. 8000280: 681b ldr r3, [r3, #0]
  287. 8000282: 4a10 ldr r2, [pc, #64] @ (80002c4 <ADC_GetVoltage+0x4c>)
  288. 8000284: 4353 muls r3, r2
  289. 8000286: 4910 ldr r1, [pc, #64] @ (80002c8 <ADC_GetVoltage+0x50>)
  290. 8000288: 0018 movs r0, r3
  291. 800028a: f7ff ff39 bl 8000100 <__udivsi3>
  292. 800028e: 0003 movs r3, r0
  293. 8000290: 607b str r3, [r7, #4]
  294. adc_value = (adc_value* (ADC_Voltage_R1 + ADC_Voltage_R2)) / ADC_Voltage_R2; // Milivolts
  295. 8000292: 687b ldr r3, [r7, #4]
  296. 8000294: 4a0d ldr r2, [pc, #52] @ (80002cc <ADC_GetVoltage+0x54>)
  297. 8000296: 4353 muls r3, r2
  298. 8000298: 490d ldr r1, [pc, #52] @ (80002d0 <ADC_GetVoltage+0x58>)
  299. 800029a: 0018 movs r0, r3
  300. 800029c: f7ff ff30 bl 8000100 <__udivsi3>
  301. 80002a0: 0003 movs r3, r0
  302. 80002a2: 607b str r3, [r7, #4]
  303. adc_value = adc_value / 100; // Volts * 10 It is need for telemetry
  304. 80002a4: 687b ldr r3, [r7, #4]
  305. 80002a6: 2164 movs r1, #100 @ 0x64
  306. 80002a8: 0018 movs r0, r3
  307. 80002aa: f7ff ff29 bl 8000100 <__udivsi3>
  308. 80002ae: 0003 movs r3, r0
  309. 80002b0: 607b str r3, [r7, #4]
  310. return adc_value;
  311. 80002b2: 687b ldr r3, [r7, #4]
  312. 80002b4: b29b uxth r3, r3
  313. }
  314. 80002b6: 0018 movs r0, r3
  315. 80002b8: 46bd mov sp, r7
  316. 80002ba: b002 add sp, #8
  317. 80002bc: bd80 pop {r7, pc}
  318. 80002be: 46c0 nop @ (mov r8, r8)
  319. 80002c0: 200001b0 .word 0x200001b0
  320. 80002c4: 00000ce4 .word 0x00000ce4
  321. 80002c8: 00000fff .word 0x00000fff
  322. 80002cc: 00003afc .word 0x00003afc
  323. 80002d0: 000013ec .word 0x000013ec
  324. 080002d4 <main>:
  325. /**
  326. * @brief The application entry point.
  327. * @retval int
  328. */
  329. int main(void)
  330. {
  331. 80002d4: b580 push {r7, lr}
  332. 80002d6: af00 add r7, sp, #0
  333. /* USER CODE END 1 */
  334. /* MCU Configuration--------------------------------------------------------*/
  335. /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  336. HAL_Init();
  337. 80002d8: f001 fa4a bl 8001770 <HAL_Init>
  338. /* USER CODE BEGIN Init */
  339. /* USER CODE END Init */
  340. /* Configure the system clock */
  341. SystemClock_Config();
  342. 80002dc: f000 f811 bl 8000302 <SystemClock_Config>
  343. /* USER CODE BEGIN SysInit */
  344. /* USER CODE END SysInit */
  345. /* Initialize all configured peripherals */
  346. MX_GPIO_Init();
  347. 80002e0: f000 fa5e bl 80007a0 <MX_GPIO_Init>
  348. MX_DMA_Init();
  349. 80002e4: f000 fa36 bl 8000754 <MX_DMA_Init>
  350. MX_TIM3_Init();
  351. 80002e8: f000 f994 bl 8000614 <MX_TIM3_Init>
  352. MX_ADC1_Init();
  353. 80002ec: f000 f864 bl 80003b8 <MX_ADC1_Init>
  354. MX_USART2_UART_Init();
  355. 80002f0: f000 f9fc bl 80006ec <MX_USART2_UART_Init>
  356. MX_TIM1_Init();
  357. 80002f4: f000 f8cc bl 8000490 <MX_TIM1_Init>
  358. /* USER CODE BEGIN 2 */
  359. USER_Init();
  360. 80002f8: f001 f876 bl 80013e8 <USER_Init>
  361. /* Infinite loop */
  362. /* USER CODE BEGIN WHILE */
  363. while (1)
  364. {
  365. USER_Main_Loop();
  366. 80002fc: f001 f924 bl 8001548 <USER_Main_Loop>
  367. 8000300: e7fc b.n 80002fc <main+0x28>
  368. 08000302 <SystemClock_Config>:
  369. /**
  370. * @brief System Clock Configuration
  371. * @retval None
  372. */
  373. void SystemClock_Config(void)
  374. {
  375. 8000302: b590 push {r4, r7, lr}
  376. 8000304: b093 sub sp, #76 @ 0x4c
  377. 8000306: af00 add r7, sp, #0
  378. RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  379. 8000308: 2414 movs r4, #20
  380. 800030a: 193b adds r3, r7, r4
  381. 800030c: 0018 movs r0, r3
  382. 800030e: 2334 movs r3, #52 @ 0x34
  383. 8000310: 001a movs r2, r3
  384. 8000312: 2100 movs r1, #0
  385. 8000314: f005 fe64 bl 8005fe0 <memset>
  386. RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  387. 8000318: 1d3b adds r3, r7, #4
  388. 800031a: 0018 movs r0, r3
  389. 800031c: 2310 movs r3, #16
  390. 800031e: 001a movs r2, r3
  391. 8000320: 2100 movs r1, #0
  392. 8000322: f005 fe5d bl 8005fe0 <memset>
  393. /** Configure the main internal regulator output voltage
  394. */
  395. HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);
  396. 8000326: 2380 movs r3, #128 @ 0x80
  397. 8000328: 009b lsls r3, r3, #2
  398. 800032a: 0018 movs r0, r3
  399. 800032c: f003 fad8 bl 80038e0 <HAL_PWREx_ControlVoltageScaling>
  400. /** Initializes the RCC Oscillators according to the specified parameters
  401. * in the RCC_OscInitTypeDef structure.
  402. */
  403. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
  404. 8000330: 193b adds r3, r7, r4
  405. 8000332: 2202 movs r2, #2
  406. 8000334: 601a str r2, [r3, #0]
  407. RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  408. 8000336: 193b adds r3, r7, r4
  409. 8000338: 2280 movs r2, #128 @ 0x80
  410. 800033a: 0052 lsls r2, r2, #1
  411. 800033c: 60da str r2, [r3, #12]
  412. RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;
  413. 800033e: 0021 movs r1, r4
  414. 8000340: 187b adds r3, r7, r1
  415. 8000342: 2200 movs r2, #0
  416. 8000344: 611a str r2, [r3, #16]
  417. RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
  418. 8000346: 187b adds r3, r7, r1
  419. 8000348: 2240 movs r2, #64 @ 0x40
  420. 800034a: 615a str r2, [r3, #20]
  421. RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  422. 800034c: 187b adds r3, r7, r1
  423. 800034e: 2202 movs r2, #2
  424. 8000350: 61da str r2, [r3, #28]
  425. RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
  426. 8000352: 187b adds r3, r7, r1
  427. 8000354: 2202 movs r2, #2
  428. 8000356: 621a str r2, [r3, #32]
  429. RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1;
  430. 8000358: 187b adds r3, r7, r1
  431. 800035a: 2200 movs r2, #0
  432. 800035c: 625a str r2, [r3, #36] @ 0x24
  433. RCC_OscInitStruct.PLL.PLLN = 8;
  434. 800035e: 187b adds r3, r7, r1
  435. 8000360: 2208 movs r2, #8
  436. 8000362: 629a str r2, [r3, #40] @ 0x28
  437. RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  438. 8000364: 187b adds r3, r7, r1
  439. 8000366: 2280 movs r2, #128 @ 0x80
  440. 8000368: 0292 lsls r2, r2, #10
  441. 800036a: 62da str r2, [r3, #44] @ 0x2c
  442. RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
  443. 800036c: 187b adds r3, r7, r1
  444. 800036e: 2280 movs r2, #128 @ 0x80
  445. 8000370: 0592 lsls r2, r2, #22
  446. 8000372: 631a str r2, [r3, #48] @ 0x30
  447. if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  448. 8000374: 187b adds r3, r7, r1
  449. 8000376: 0018 movs r0, r3
  450. 8000378: f003 fafe bl 8003978 <HAL_RCC_OscConfig>
  451. 800037c: 1e03 subs r3, r0, #0
  452. 800037e: d001 beq.n 8000384 <SystemClock_Config+0x82>
  453. {
  454. Error_Handler();
  455. 8000380: f000 fa4a bl 8000818 <Error_Handler>
  456. }
  457. /** Initializes the CPU, AHB and APB buses clocks
  458. */
  459. RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
  460. 8000384: 1d3b adds r3, r7, #4
  461. 8000386: 2207 movs r2, #7
  462. 8000388: 601a str r2, [r3, #0]
  463. |RCC_CLOCKTYPE_PCLK1;
  464. RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  465. 800038a: 1d3b adds r3, r7, #4
  466. 800038c: 2202 movs r2, #2
  467. 800038e: 605a str r2, [r3, #4]
  468. RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  469. 8000390: 1d3b adds r3, r7, #4
  470. 8000392: 2200 movs r2, #0
  471. 8000394: 609a str r2, [r3, #8]
  472. RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
  473. 8000396: 1d3b adds r3, r7, #4
  474. 8000398: 2200 movs r2, #0
  475. 800039a: 60da str r2, [r3, #12]
  476. if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
  477. 800039c: 1d3b adds r3, r7, #4
  478. 800039e: 2102 movs r1, #2
  479. 80003a0: 0018 movs r0, r3
  480. 80003a2: f003 fdf9 bl 8003f98 <HAL_RCC_ClockConfig>
  481. 80003a6: 1e03 subs r3, r0, #0
  482. 80003a8: d001 beq.n 80003ae <SystemClock_Config+0xac>
  483. {
  484. Error_Handler();
  485. 80003aa: f000 fa35 bl 8000818 <Error_Handler>
  486. }
  487. }
  488. 80003ae: 46c0 nop @ (mov r8, r8)
  489. 80003b0: 46bd mov sp, r7
  490. 80003b2: b013 add sp, #76 @ 0x4c
  491. 80003b4: bd90 pop {r4, r7, pc}
  492. ...
  493. 080003b8 <MX_ADC1_Init>:
  494. * @brief ADC1 Initialization Function
  495. * @param None
  496. * @retval None
  497. */
  498. static void MX_ADC1_Init(void)
  499. {
  500. 80003b8: b580 push {r7, lr}
  501. 80003ba: b084 sub sp, #16
  502. 80003bc: af00 add r7, sp, #0
  503. /* USER CODE BEGIN ADC1_Init 0 */
  504. /* USER CODE END ADC1_Init 0 */
  505. ADC_ChannelConfTypeDef sConfig = {0};
  506. 80003be: 1d3b adds r3, r7, #4
  507. 80003c0: 0018 movs r0, r3
  508. 80003c2: 230c movs r3, #12
  509. 80003c4: 001a movs r2, r3
  510. 80003c6: 2100 movs r1, #0
  511. 80003c8: f005 fe0a bl 8005fe0 <memset>
  512. /* USER CODE END ADC1_Init 1 */
  513. /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
  514. */
  515. hadc1.Instance = ADC1;
  516. 80003cc: 4b2d ldr r3, [pc, #180] @ (8000484 <MX_ADC1_Init+0xcc>)
  517. 80003ce: 4a2e ldr r2, [pc, #184] @ (8000488 <MX_ADC1_Init+0xd0>)
  518. 80003d0: 601a str r2, [r3, #0]
  519. hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2;
  520. 80003d2: 4b2c ldr r3, [pc, #176] @ (8000484 <MX_ADC1_Init+0xcc>)
  521. 80003d4: 2280 movs r2, #128 @ 0x80
  522. 80003d6: 05d2 lsls r2, r2, #23
  523. 80003d8: 605a str r2, [r3, #4]
  524. hadc1.Init.Resolution = ADC_RESOLUTION_12B;
  525. 80003da: 4b2a ldr r3, [pc, #168] @ (8000484 <MX_ADC1_Init+0xcc>)
  526. 80003dc: 2200 movs r2, #0
  527. 80003de: 609a str r2, [r3, #8]
  528. hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
  529. 80003e0: 4b28 ldr r3, [pc, #160] @ (8000484 <MX_ADC1_Init+0xcc>)
  530. 80003e2: 2200 movs r2, #0
  531. 80003e4: 60da str r2, [r3, #12]
  532. hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE;
  533. 80003e6: 4b27 ldr r3, [pc, #156] @ (8000484 <MX_ADC1_Init+0xcc>)
  534. 80003e8: 2200 movs r2, #0
  535. 80003ea: 611a str r2, [r3, #16]
  536. hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
  537. 80003ec: 4b25 ldr r3, [pc, #148] @ (8000484 <MX_ADC1_Init+0xcc>)
  538. 80003ee: 2204 movs r2, #4
  539. 80003f0: 615a str r2, [r3, #20]
  540. hadc1.Init.LowPowerAutoWait = DISABLE;
  541. 80003f2: 4b24 ldr r3, [pc, #144] @ (8000484 <MX_ADC1_Init+0xcc>)
  542. 80003f4: 2200 movs r2, #0
  543. 80003f6: 761a strb r2, [r3, #24]
  544. hadc1.Init.LowPowerAutoPowerOff = DISABLE;
  545. 80003f8: 4b22 ldr r3, [pc, #136] @ (8000484 <MX_ADC1_Init+0xcc>)
  546. 80003fa: 2200 movs r2, #0
  547. 80003fc: 765a strb r2, [r3, #25]
  548. hadc1.Init.ContinuousConvMode = DISABLE;
  549. 80003fe: 4b21 ldr r3, [pc, #132] @ (8000484 <MX_ADC1_Init+0xcc>)
  550. 8000400: 2200 movs r2, #0
  551. 8000402: 769a strb r2, [r3, #26]
  552. hadc1.Init.NbrOfConversion = 1;
  553. 8000404: 4b1f ldr r3, [pc, #124] @ (8000484 <MX_ADC1_Init+0xcc>)
  554. 8000406: 2201 movs r2, #1
  555. 8000408: 61da str r2, [r3, #28]
  556. hadc1.Init.DiscontinuousConvMode = ENABLE;
  557. 800040a: 4b1e ldr r3, [pc, #120] @ (8000484 <MX_ADC1_Init+0xcc>)
  558. 800040c: 2220 movs r2, #32
  559. 800040e: 2101 movs r1, #1
  560. 8000410: 5499 strb r1, [r3, r2]
  561. hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
  562. 8000412: 4b1c ldr r3, [pc, #112] @ (8000484 <MX_ADC1_Init+0xcc>)
  563. 8000414: 2200 movs r2, #0
  564. 8000416: 625a str r2, [r3, #36] @ 0x24
  565. hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
  566. 8000418: 4b1a ldr r3, [pc, #104] @ (8000484 <MX_ADC1_Init+0xcc>)
  567. 800041a: 2200 movs r2, #0
  568. 800041c: 629a str r2, [r3, #40] @ 0x28
  569. hadc1.Init.DMAContinuousRequests = DISABLE;
  570. 800041e: 4b19 ldr r3, [pc, #100] @ (8000484 <MX_ADC1_Init+0xcc>)
  571. 8000420: 222c movs r2, #44 @ 0x2c
  572. 8000422: 2100 movs r1, #0
  573. 8000424: 5499 strb r1, [r3, r2]
  574. hadc1.Init.Overrun = ADC_OVR_DATA_PRESERVED;
  575. 8000426: 4b17 ldr r3, [pc, #92] @ (8000484 <MX_ADC1_Init+0xcc>)
  576. 8000428: 2200 movs r2, #0
  577. 800042a: 631a str r2, [r3, #48] @ 0x30
  578. hadc1.Init.SamplingTimeCommon1 = ADC_SAMPLETIME_7CYCLES_5;
  579. 800042c: 4b15 ldr r3, [pc, #84] @ (8000484 <MX_ADC1_Init+0xcc>)
  580. 800042e: 2202 movs r2, #2
  581. 8000430: 635a str r2, [r3, #52] @ 0x34
  582. hadc1.Init.SamplingTimeCommon2 = ADC_SAMPLETIME_7CYCLES_5;
  583. 8000432: 4b14 ldr r3, [pc, #80] @ (8000484 <MX_ADC1_Init+0xcc>)
  584. 8000434: 2202 movs r2, #2
  585. 8000436: 639a str r2, [r3, #56] @ 0x38
  586. hadc1.Init.OversamplingMode = DISABLE;
  587. 8000438: 4b12 ldr r3, [pc, #72] @ (8000484 <MX_ADC1_Init+0xcc>)
  588. 800043a: 223c movs r2, #60 @ 0x3c
  589. 800043c: 2100 movs r1, #0
  590. 800043e: 5499 strb r1, [r3, r2]
  591. hadc1.Init.TriggerFrequencyMode = ADC_TRIGGER_FREQ_HIGH;
  592. 8000440: 4b10 ldr r3, [pc, #64] @ (8000484 <MX_ADC1_Init+0xcc>)
  593. 8000442: 2200 movs r2, #0
  594. 8000444: 64da str r2, [r3, #76] @ 0x4c
  595. if (HAL_ADC_Init(&hadc1) != HAL_OK)
  596. 8000446: 4b0f ldr r3, [pc, #60] @ (8000484 <MX_ADC1_Init+0xcc>)
  597. 8000448: 0018 movs r0, r3
  598. 800044a: f001 fba5 bl 8001b98 <HAL_ADC_Init>
  599. 800044e: 1e03 subs r3, r0, #0
  600. 8000450: d001 beq.n 8000456 <MX_ADC1_Init+0x9e>
  601. {
  602. Error_Handler();
  603. 8000452: f000 f9e1 bl 8000818 <Error_Handler>
  604. }
  605. /** Configure Regular Channel
  606. */
  607. sConfig.Channel = ADC_CHANNEL_4;
  608. 8000456: 1d3b adds r3, r7, #4
  609. 8000458: 4a0c ldr r2, [pc, #48] @ (800048c <MX_ADC1_Init+0xd4>)
  610. 800045a: 601a str r2, [r3, #0]
  611. sConfig.Rank = ADC_REGULAR_RANK_1;
  612. 800045c: 1d3b adds r3, r7, #4
  613. 800045e: 2200 movs r2, #0
  614. 8000460: 605a str r2, [r3, #4]
  615. sConfig.SamplingTime = ADC_SAMPLINGTIME_COMMON_1;
  616. 8000462: 1d3b adds r3, r7, #4
  617. 8000464: 2200 movs r2, #0
  618. 8000466: 609a str r2, [r3, #8]
  619. if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
  620. 8000468: 1d3a adds r2, r7, #4
  621. 800046a: 4b06 ldr r3, [pc, #24] @ (8000484 <MX_ADC1_Init+0xcc>)
  622. 800046c: 0011 movs r1, r2
  623. 800046e: 0018 movs r0, r3
  624. 8000470: f001 fe52 bl 8002118 <HAL_ADC_ConfigChannel>
  625. 8000474: 1e03 subs r3, r0, #0
  626. 8000476: d001 beq.n 800047c <MX_ADC1_Init+0xc4>
  627. {
  628. Error_Handler();
  629. 8000478: f000 f9ce bl 8000818 <Error_Handler>
  630. }
  631. /* USER CODE BEGIN ADC1_Init 2 */
  632. /* USER CODE END ADC1_Init 2 */
  633. }
  634. 800047c: 46c0 nop @ (mov r8, r8)
  635. 800047e: 46bd mov sp, r7
  636. 8000480: b004 add sp, #16
  637. 8000482: bd80 pop {r7, pc}
  638. 8000484: 200001b4 .word 0x200001b4
  639. 8000488: 40012400 .word 0x40012400
  640. 800048c: 10000010 .word 0x10000010
  641. 08000490 <MX_TIM1_Init>:
  642. * @brief TIM1 Initialization Function
  643. * @param None
  644. * @retval None
  645. */
  646. static void MX_TIM1_Init(void)
  647. {
  648. 8000490: b580 push {r7, lr}
  649. 8000492: b098 sub sp, #96 @ 0x60
  650. 8000494: af00 add r7, sp, #0
  651. /* USER CODE BEGIN TIM1_Init 0 */
  652. /* USER CODE END TIM1_Init 0 */
  653. TIM_MasterConfigTypeDef sMasterConfig = {0};
  654. 8000496: 2354 movs r3, #84 @ 0x54
  655. 8000498: 18fb adds r3, r7, r3
  656. 800049a: 0018 movs r0, r3
  657. 800049c: 230c movs r3, #12
  658. 800049e: 001a movs r2, r3
  659. 80004a0: 2100 movs r1, #0
  660. 80004a2: f005 fd9d bl 8005fe0 <memset>
  661. TIM_OC_InitTypeDef sConfigOC = {0};
  662. 80004a6: 2338 movs r3, #56 @ 0x38
  663. 80004a8: 18fb adds r3, r7, r3
  664. 80004aa: 0018 movs r0, r3
  665. 80004ac: 231c movs r3, #28
  666. 80004ae: 001a movs r2, r3
  667. 80004b0: 2100 movs r1, #0
  668. 80004b2: f005 fd95 bl 8005fe0 <memset>
  669. TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
  670. 80004b6: 1d3b adds r3, r7, #4
  671. 80004b8: 0018 movs r0, r3
  672. 80004ba: 2334 movs r3, #52 @ 0x34
  673. 80004bc: 001a movs r2, r3
  674. 80004be: 2100 movs r1, #0
  675. 80004c0: f005 fd8e bl 8005fe0 <memset>
  676. /* USER CODE BEGIN TIM1_Init 1 */
  677. /* USER CODE END TIM1_Init 1 */
  678. htim1.Instance = TIM1;
  679. 80004c4: 4b50 ldr r3, [pc, #320] @ (8000608 <MX_TIM1_Init+0x178>)
  680. 80004c6: 4a51 ldr r2, [pc, #324] @ (800060c <MX_TIM1_Init+0x17c>)
  681. 80004c8: 601a str r2, [r3, #0]
  682. htim1.Init.Prescaler = 63;
  683. 80004ca: 4b4f ldr r3, [pc, #316] @ (8000608 <MX_TIM1_Init+0x178>)
  684. 80004cc: 223f movs r2, #63 @ 0x3f
  685. 80004ce: 605a str r2, [r3, #4]
  686. htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
  687. 80004d0: 4b4d ldr r3, [pc, #308] @ (8000608 <MX_TIM1_Init+0x178>)
  688. 80004d2: 2200 movs r2, #0
  689. 80004d4: 609a str r2, [r3, #8]
  690. htim1.Init.Period = 20000;
  691. 80004d6: 4b4c ldr r3, [pc, #304] @ (8000608 <MX_TIM1_Init+0x178>)
  692. 80004d8: 4a4d ldr r2, [pc, #308] @ (8000610 <MX_TIM1_Init+0x180>)
  693. 80004da: 60da str r2, [r3, #12]
  694. htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
  695. 80004dc: 4b4a ldr r3, [pc, #296] @ (8000608 <MX_TIM1_Init+0x178>)
  696. 80004de: 2200 movs r2, #0
  697. 80004e0: 611a str r2, [r3, #16]
  698. htim1.Init.RepetitionCounter = 0;
  699. 80004e2: 4b49 ldr r3, [pc, #292] @ (8000608 <MX_TIM1_Init+0x178>)
  700. 80004e4: 2200 movs r2, #0
  701. 80004e6: 615a str r2, [r3, #20]
  702. htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
  703. 80004e8: 4b47 ldr r3, [pc, #284] @ (8000608 <MX_TIM1_Init+0x178>)
  704. 80004ea: 2280 movs r2, #128 @ 0x80
  705. 80004ec: 619a str r2, [r3, #24]
  706. if (HAL_TIM_PWM_Init(&htim1) != HAL_OK)
  707. 80004ee: 4b46 ldr r3, [pc, #280] @ (8000608 <MX_TIM1_Init+0x178>)
  708. 80004f0: 0018 movs r0, r3
  709. 80004f2: f004 f821 bl 8004538 <HAL_TIM_PWM_Init>
  710. 80004f6: 1e03 subs r3, r0, #0
  711. 80004f8: d001 beq.n 80004fe <MX_TIM1_Init+0x6e>
  712. {
  713. Error_Handler();
  714. 80004fa: f000 f98d bl 8000818 <Error_Handler>
  715. }
  716. sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
  717. 80004fe: 2154 movs r1, #84 @ 0x54
  718. 8000500: 187b adds r3, r7, r1
  719. 8000502: 2200 movs r2, #0
  720. 8000504: 601a str r2, [r3, #0]
  721. sMasterConfig.MasterOutputTrigger2 = TIM_TRGO2_RESET;
  722. 8000506: 187b adds r3, r7, r1
  723. 8000508: 2200 movs r2, #0
  724. 800050a: 605a str r2, [r3, #4]
  725. sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  726. 800050c: 187b adds r3, r7, r1
  727. 800050e: 2200 movs r2, #0
  728. 8000510: 609a str r2, [r3, #8]
  729. if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
  730. 8000512: 187a adds r2, r7, r1
  731. 8000514: 4b3c ldr r3, [pc, #240] @ (8000608 <MX_TIM1_Init+0x178>)
  732. 8000516: 0011 movs r1, r2
  733. 8000518: 0018 movs r0, r3
  734. 800051a: f004 fc7b bl 8004e14 <HAL_TIMEx_MasterConfigSynchronization>
  735. 800051e: 1e03 subs r3, r0, #0
  736. 8000520: d001 beq.n 8000526 <MX_TIM1_Init+0x96>
  737. {
  738. Error_Handler();
  739. 8000522: f000 f979 bl 8000818 <Error_Handler>
  740. }
  741. sConfigOC.OCMode = TIM_OCMODE_PWM1;
  742. 8000526: 2138 movs r1, #56 @ 0x38
  743. 8000528: 187b adds r3, r7, r1
  744. 800052a: 2260 movs r2, #96 @ 0x60
  745. 800052c: 601a str r2, [r3, #0]
  746. sConfigOC.Pulse = 0;
  747. 800052e: 187b adds r3, r7, r1
  748. 8000530: 2200 movs r2, #0
  749. 8000532: 605a str r2, [r3, #4]
  750. sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
  751. 8000534: 187b adds r3, r7, r1
  752. 8000536: 2200 movs r2, #0
  753. 8000538: 609a str r2, [r3, #8]
  754. sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
  755. 800053a: 187b adds r3, r7, r1
  756. 800053c: 2200 movs r2, #0
  757. 800053e: 60da str r2, [r3, #12]
  758. sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
  759. 8000540: 187b adds r3, r7, r1
  760. 8000542: 2200 movs r2, #0
  761. 8000544: 611a str r2, [r3, #16]
  762. sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
  763. 8000546: 187b adds r3, r7, r1
  764. 8000548: 2200 movs r2, #0
  765. 800054a: 615a str r2, [r3, #20]
  766. sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
  767. 800054c: 187b adds r3, r7, r1
  768. 800054e: 2200 movs r2, #0
  769. 8000550: 619a str r2, [r3, #24]
  770. if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
  771. 8000552: 1879 adds r1, r7, r1
  772. 8000554: 4b2c ldr r3, [pc, #176] @ (8000608 <MX_TIM1_Init+0x178>)
  773. 8000556: 2200 movs r2, #0
  774. 8000558: 0018 movs r0, r3
  775. 800055a: f004 f845 bl 80045e8 <HAL_TIM_PWM_ConfigChannel>
  776. 800055e: 1e03 subs r3, r0, #0
  777. 8000560: d001 beq.n 8000566 <MX_TIM1_Init+0xd6>
  778. {
  779. Error_Handler();
  780. 8000562: f000 f959 bl 8000818 <Error_Handler>
  781. }
  782. if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
  783. 8000566: 2338 movs r3, #56 @ 0x38
  784. 8000568: 18f9 adds r1, r7, r3
  785. 800056a: 4b27 ldr r3, [pc, #156] @ (8000608 <MX_TIM1_Init+0x178>)
  786. 800056c: 2204 movs r2, #4
  787. 800056e: 0018 movs r0, r3
  788. 8000570: f004 f83a bl 80045e8 <HAL_TIM_PWM_ConfigChannel>
  789. 8000574: 1e03 subs r3, r0, #0
  790. 8000576: d001 beq.n 800057c <MX_TIM1_Init+0xec>
  791. {
  792. Error_Handler();
  793. 8000578: f000 f94e bl 8000818 <Error_Handler>
  794. }
  795. if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
  796. 800057c: 2338 movs r3, #56 @ 0x38
  797. 800057e: 18f9 adds r1, r7, r3
  798. 8000580: 4b21 ldr r3, [pc, #132] @ (8000608 <MX_TIM1_Init+0x178>)
  799. 8000582: 220c movs r2, #12
  800. 8000584: 0018 movs r0, r3
  801. 8000586: f004 f82f bl 80045e8 <HAL_TIM_PWM_ConfigChannel>
  802. 800058a: 1e03 subs r3, r0, #0
  803. 800058c: d001 beq.n 8000592 <MX_TIM1_Init+0x102>
  804. {
  805. Error_Handler();
  806. 800058e: f000 f943 bl 8000818 <Error_Handler>
  807. }
  808. sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
  809. 8000592: 1d3b adds r3, r7, #4
  810. 8000594: 2200 movs r2, #0
  811. 8000596: 601a str r2, [r3, #0]
  812. sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
  813. 8000598: 1d3b adds r3, r7, #4
  814. 800059a: 2200 movs r2, #0
  815. 800059c: 605a str r2, [r3, #4]
  816. sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
  817. 800059e: 1d3b adds r3, r7, #4
  818. 80005a0: 2200 movs r2, #0
  819. 80005a2: 609a str r2, [r3, #8]
  820. sBreakDeadTimeConfig.DeadTime = 0;
  821. 80005a4: 1d3b adds r3, r7, #4
  822. 80005a6: 2200 movs r2, #0
  823. 80005a8: 60da str r2, [r3, #12]
  824. sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
  825. 80005aa: 1d3b adds r3, r7, #4
  826. 80005ac: 2200 movs r2, #0
  827. 80005ae: 611a str r2, [r3, #16]
  828. sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
  829. 80005b0: 1d3b adds r3, r7, #4
  830. 80005b2: 2280 movs r2, #128 @ 0x80
  831. 80005b4: 0192 lsls r2, r2, #6
  832. 80005b6: 615a str r2, [r3, #20]
  833. sBreakDeadTimeConfig.BreakFilter = 0;
  834. 80005b8: 1d3b adds r3, r7, #4
  835. 80005ba: 2200 movs r2, #0
  836. 80005bc: 619a str r2, [r3, #24]
  837. sBreakDeadTimeConfig.BreakAFMode = TIM_BREAK_AFMODE_INPUT;
  838. 80005be: 1d3b adds r3, r7, #4
  839. 80005c0: 2200 movs r2, #0
  840. 80005c2: 61da str r2, [r3, #28]
  841. sBreakDeadTimeConfig.Break2State = TIM_BREAK2_DISABLE;
  842. 80005c4: 1d3b adds r3, r7, #4
  843. 80005c6: 2200 movs r2, #0
  844. 80005c8: 621a str r2, [r3, #32]
  845. sBreakDeadTimeConfig.Break2Polarity = TIM_BREAK2POLARITY_HIGH;
  846. 80005ca: 1d3b adds r3, r7, #4
  847. 80005cc: 2280 movs r2, #128 @ 0x80
  848. 80005ce: 0492 lsls r2, r2, #18
  849. 80005d0: 625a str r2, [r3, #36] @ 0x24
  850. sBreakDeadTimeConfig.Break2Filter = 0;
  851. 80005d2: 1d3b adds r3, r7, #4
  852. 80005d4: 2200 movs r2, #0
  853. 80005d6: 629a str r2, [r3, #40] @ 0x28
  854. sBreakDeadTimeConfig.Break2AFMode = TIM_BREAK_AFMODE_INPUT;
  855. 80005d8: 1d3b adds r3, r7, #4
  856. 80005da: 2200 movs r2, #0
  857. 80005dc: 62da str r2, [r3, #44] @ 0x2c
  858. sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
  859. 80005de: 1d3b adds r3, r7, #4
  860. 80005e0: 2200 movs r2, #0
  861. 80005e2: 631a str r2, [r3, #48] @ 0x30
  862. if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK)
  863. 80005e4: 1d3a adds r2, r7, #4
  864. 80005e6: 4b08 ldr r3, [pc, #32] @ (8000608 <MX_TIM1_Init+0x178>)
  865. 80005e8: 0011 movs r1, r2
  866. 80005ea: 0018 movs r0, r3
  867. 80005ec: f004 fc74 bl 8004ed8 <HAL_TIMEx_ConfigBreakDeadTime>
  868. 80005f0: 1e03 subs r3, r0, #0
  869. 80005f2: d001 beq.n 80005f8 <MX_TIM1_Init+0x168>
  870. {
  871. Error_Handler();
  872. 80005f4: f000 f910 bl 8000818 <Error_Handler>
  873. }
  874. /* USER CODE BEGIN TIM1_Init 2 */
  875. /* USER CODE END TIM1_Init 2 */
  876. HAL_TIM_MspPostInit(&htim1);
  877. 80005f8: 4b03 ldr r3, [pc, #12] @ (8000608 <MX_TIM1_Init+0x178>)
  878. 80005fa: 0018 movs r0, r3
  879. 80005fc: f000 fa9c bl 8000b38 <HAL_TIM_MspPostInit>
  880. }
  881. 8000600: 46c0 nop @ (mov r8, r8)
  882. 8000602: 46bd mov sp, r7
  883. 8000604: b018 add sp, #96 @ 0x60
  884. 8000606: bd80 pop {r7, pc}
  885. 8000608: 20000274 .word 0x20000274
  886. 800060c: 40012c00 .word 0x40012c00
  887. 8000610: 00004e20 .word 0x00004e20
  888. 08000614 <MX_TIM3_Init>:
  889. * @brief TIM3 Initialization Function
  890. * @param None
  891. * @retval None
  892. */
  893. static void MX_TIM3_Init(void)
  894. {
  895. 8000614: b580 push {r7, lr}
  896. 8000616: b08a sub sp, #40 @ 0x28
  897. 8000618: af00 add r7, sp, #0
  898. /* USER CODE BEGIN TIM3_Init 0 */
  899. /* USER CODE END TIM3_Init 0 */
  900. TIM_MasterConfigTypeDef sMasterConfig = {0};
  901. 800061a: 231c movs r3, #28
  902. 800061c: 18fb adds r3, r7, r3
  903. 800061e: 0018 movs r0, r3
  904. 8000620: 230c movs r3, #12
  905. 8000622: 001a movs r2, r3
  906. 8000624: 2100 movs r1, #0
  907. 8000626: f005 fcdb bl 8005fe0 <memset>
  908. TIM_OC_InitTypeDef sConfigOC = {0};
  909. 800062a: 003b movs r3, r7
  910. 800062c: 0018 movs r0, r3
  911. 800062e: 231c movs r3, #28
  912. 8000630: 001a movs r2, r3
  913. 8000632: 2100 movs r1, #0
  914. 8000634: f005 fcd4 bl 8005fe0 <memset>
  915. /* USER CODE BEGIN TIM3_Init 1 */
  916. /* USER CODE END TIM3_Init 1 */
  917. htim3.Instance = TIM3;
  918. 8000638: 4b29 ldr r3, [pc, #164] @ (80006e0 <MX_TIM3_Init+0xcc>)
  919. 800063a: 4a2a ldr r2, [pc, #168] @ (80006e4 <MX_TIM3_Init+0xd0>)
  920. 800063c: 601a str r2, [r3, #0]
  921. htim3.Init.Prescaler = 63;
  922. 800063e: 4b28 ldr r3, [pc, #160] @ (80006e0 <MX_TIM3_Init+0xcc>)
  923. 8000640: 223f movs r2, #63 @ 0x3f
  924. 8000642: 605a str r2, [r3, #4]
  925. htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
  926. 8000644: 4b26 ldr r3, [pc, #152] @ (80006e0 <MX_TIM3_Init+0xcc>)
  927. 8000646: 2200 movs r2, #0
  928. 8000648: 609a str r2, [r3, #8]
  929. htim3.Init.Period = 20000;
  930. 800064a: 4b25 ldr r3, [pc, #148] @ (80006e0 <MX_TIM3_Init+0xcc>)
  931. 800064c: 4a26 ldr r2, [pc, #152] @ (80006e8 <MX_TIM3_Init+0xd4>)
  932. 800064e: 60da str r2, [r3, #12]
  933. htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
  934. 8000650: 4b23 ldr r3, [pc, #140] @ (80006e0 <MX_TIM3_Init+0xcc>)
  935. 8000652: 2200 movs r2, #0
  936. 8000654: 611a str r2, [r3, #16]
  937. htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
  938. 8000656: 4b22 ldr r3, [pc, #136] @ (80006e0 <MX_TIM3_Init+0xcc>)
  939. 8000658: 2280 movs r2, #128 @ 0x80
  940. 800065a: 619a str r2, [r3, #24]
  941. if (HAL_TIM_PWM_Init(&htim3) != HAL_OK)
  942. 800065c: 4b20 ldr r3, [pc, #128] @ (80006e0 <MX_TIM3_Init+0xcc>)
  943. 800065e: 0018 movs r0, r3
  944. 8000660: f003 ff6a bl 8004538 <HAL_TIM_PWM_Init>
  945. 8000664: 1e03 subs r3, r0, #0
  946. 8000666: d001 beq.n 800066c <MX_TIM3_Init+0x58>
  947. {
  948. Error_Handler();
  949. 8000668: f000 f8d6 bl 8000818 <Error_Handler>
  950. }
  951. sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
  952. 800066c: 211c movs r1, #28
  953. 800066e: 187b adds r3, r7, r1
  954. 8000670: 2200 movs r2, #0
  955. 8000672: 601a str r2, [r3, #0]
  956. sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  957. 8000674: 187b adds r3, r7, r1
  958. 8000676: 2200 movs r2, #0
  959. 8000678: 609a str r2, [r3, #8]
  960. if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK)
  961. 800067a: 187a adds r2, r7, r1
  962. 800067c: 4b18 ldr r3, [pc, #96] @ (80006e0 <MX_TIM3_Init+0xcc>)
  963. 800067e: 0011 movs r1, r2
  964. 8000680: 0018 movs r0, r3
  965. 8000682: f004 fbc7 bl 8004e14 <HAL_TIMEx_MasterConfigSynchronization>
  966. 8000686: 1e03 subs r3, r0, #0
  967. 8000688: d001 beq.n 800068e <MX_TIM3_Init+0x7a>
  968. {
  969. Error_Handler();
  970. 800068a: f000 f8c5 bl 8000818 <Error_Handler>
  971. }
  972. sConfigOC.OCMode = TIM_OCMODE_PWM1;
  973. 800068e: 003b movs r3, r7
  974. 8000690: 2260 movs r2, #96 @ 0x60
  975. 8000692: 601a str r2, [r3, #0]
  976. sConfigOC.Pulse = 0;
  977. 8000694: 003b movs r3, r7
  978. 8000696: 2200 movs r2, #0
  979. 8000698: 605a str r2, [r3, #4]
  980. sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
  981. 800069a: 003b movs r3, r7
  982. 800069c: 2200 movs r2, #0
  983. 800069e: 609a str r2, [r3, #8]
  984. sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
  985. 80006a0: 003b movs r3, r7
  986. 80006a2: 2200 movs r2, #0
  987. 80006a4: 611a str r2, [r3, #16]
  988. if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
  989. 80006a6: 0039 movs r1, r7
  990. 80006a8: 4b0d ldr r3, [pc, #52] @ (80006e0 <MX_TIM3_Init+0xcc>)
  991. 80006aa: 2200 movs r2, #0
  992. 80006ac: 0018 movs r0, r3
  993. 80006ae: f003 ff9b bl 80045e8 <HAL_TIM_PWM_ConfigChannel>
  994. 80006b2: 1e03 subs r3, r0, #0
  995. 80006b4: d001 beq.n 80006ba <MX_TIM3_Init+0xa6>
  996. {
  997. Error_Handler();
  998. 80006b6: f000 f8af bl 8000818 <Error_Handler>
  999. }
  1000. if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
  1001. 80006ba: 0039 movs r1, r7
  1002. 80006bc: 4b08 ldr r3, [pc, #32] @ (80006e0 <MX_TIM3_Init+0xcc>)
  1003. 80006be: 2204 movs r2, #4
  1004. 80006c0: 0018 movs r0, r3
  1005. 80006c2: f003 ff91 bl 80045e8 <HAL_TIM_PWM_ConfigChannel>
  1006. 80006c6: 1e03 subs r3, r0, #0
  1007. 80006c8: d001 beq.n 80006ce <MX_TIM3_Init+0xba>
  1008. {
  1009. Error_Handler();
  1010. 80006ca: f000 f8a5 bl 8000818 <Error_Handler>
  1011. }
  1012. /* USER CODE BEGIN TIM3_Init 2 */
  1013. /* USER CODE END TIM3_Init 2 */
  1014. HAL_TIM_MspPostInit(&htim3);
  1015. 80006ce: 4b04 ldr r3, [pc, #16] @ (80006e0 <MX_TIM3_Init+0xcc>)
  1016. 80006d0: 0018 movs r0, r3
  1017. 80006d2: f000 fa31 bl 8000b38 <HAL_TIM_MspPostInit>
  1018. }
  1019. 80006d6: 46c0 nop @ (mov r8, r8)
  1020. 80006d8: 46bd mov sp, r7
  1021. 80006da: b00a add sp, #40 @ 0x28
  1022. 80006dc: bd80 pop {r7, pc}
  1023. 80006de: 46c0 nop @ (mov r8, r8)
  1024. 80006e0: 200002c0 .word 0x200002c0
  1025. 80006e4: 40000400 .word 0x40000400
  1026. 80006e8: 00004e20 .word 0x00004e20
  1027. 080006ec <MX_USART2_UART_Init>:
  1028. * @brief USART2 Initialization Function
  1029. * @param None
  1030. * @retval None
  1031. */
  1032. static void MX_USART2_UART_Init(void)
  1033. {
  1034. 80006ec: b580 push {r7, lr}
  1035. 80006ee: af00 add r7, sp, #0
  1036. /* USER CODE END USART2_Init 0 */
  1037. /* USER CODE BEGIN USART2_Init 1 */
  1038. /* USER CODE END USART2_Init 1 */
  1039. huart2.Instance = USART2;
  1040. 80006f0: 4b15 ldr r3, [pc, #84] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1041. 80006f2: 4a16 ldr r2, [pc, #88] @ (800074c <MX_USART2_UART_Init+0x60>)
  1042. 80006f4: 601a str r2, [r3, #0]
  1043. huart2.Init.BaudRate = 420000;
  1044. 80006f6: 4b14 ldr r3, [pc, #80] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1045. 80006f8: 4a15 ldr r2, [pc, #84] @ (8000750 <MX_USART2_UART_Init+0x64>)
  1046. 80006fa: 605a str r2, [r3, #4]
  1047. huart2.Init.WordLength = UART_WORDLENGTH_8B;
  1048. 80006fc: 4b12 ldr r3, [pc, #72] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1049. 80006fe: 2200 movs r2, #0
  1050. 8000700: 609a str r2, [r3, #8]
  1051. huart2.Init.StopBits = UART_STOPBITS_1;
  1052. 8000702: 4b11 ldr r3, [pc, #68] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1053. 8000704: 2200 movs r2, #0
  1054. 8000706: 60da str r2, [r3, #12]
  1055. huart2.Init.Parity = UART_PARITY_NONE;
  1056. 8000708: 4b0f ldr r3, [pc, #60] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1057. 800070a: 2200 movs r2, #0
  1058. 800070c: 611a str r2, [r3, #16]
  1059. huart2.Init.Mode = UART_MODE_TX_RX;
  1060. 800070e: 4b0e ldr r3, [pc, #56] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1061. 8000710: 220c movs r2, #12
  1062. 8000712: 615a str r2, [r3, #20]
  1063. huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  1064. 8000714: 4b0c ldr r3, [pc, #48] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1065. 8000716: 2200 movs r2, #0
  1066. 8000718: 619a str r2, [r3, #24]
  1067. huart2.Init.OverSampling = UART_OVERSAMPLING_16;
  1068. 800071a: 4b0b ldr r3, [pc, #44] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1069. 800071c: 2200 movs r2, #0
  1070. 800071e: 61da str r2, [r3, #28]
  1071. huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
  1072. 8000720: 4b09 ldr r3, [pc, #36] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1073. 8000722: 2200 movs r2, #0
  1074. 8000724: 621a str r2, [r3, #32]
  1075. huart2.Init.ClockPrescaler = UART_PRESCALER_DIV1;
  1076. 8000726: 4b08 ldr r3, [pc, #32] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1077. 8000728: 2200 movs r2, #0
  1078. 800072a: 625a str r2, [r3, #36] @ 0x24
  1079. huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
  1080. 800072c: 4b06 ldr r3, [pc, #24] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1081. 800072e: 2200 movs r2, #0
  1082. 8000730: 629a str r2, [r3, #40] @ 0x28
  1083. if (HAL_UART_Init(&huart2) != HAL_OK)
  1084. 8000732: 4b05 ldr r3, [pc, #20] @ (8000748 <MX_USART2_UART_Init+0x5c>)
  1085. 8000734: 0018 movs r0, r3
  1086. 8000736: f004 fc6b bl 8005010 <HAL_UART_Init>
  1087. 800073a: 1e03 subs r3, r0, #0
  1088. 800073c: d001 beq.n 8000742 <MX_USART2_UART_Init+0x56>
  1089. {
  1090. Error_Handler();
  1091. 800073e: f000 f86b bl 8000818 <Error_Handler>
  1092. }
  1093. /* USER CODE BEGIN USART2_Init 2 */
  1094. /* USER CODE END USART2_Init 2 */
  1095. }
  1096. 8000742: 46c0 nop @ (mov r8, r8)
  1097. 8000744: 46bd mov sp, r7
  1098. 8000746: bd80 pop {r7, pc}
  1099. 8000748: 2000030c .word 0x2000030c
  1100. 800074c: 40004400 .word 0x40004400
  1101. 8000750: 000668a0 .word 0x000668a0
  1102. 08000754 <MX_DMA_Init>:
  1103. /**
  1104. * Enable DMA controller clock
  1105. */
  1106. static void MX_DMA_Init(void)
  1107. {
  1108. 8000754: b580 push {r7, lr}
  1109. 8000756: b082 sub sp, #8
  1110. 8000758: af00 add r7, sp, #0
  1111. /* DMA controller clock enable */
  1112. __HAL_RCC_DMA1_CLK_ENABLE();
  1113. 800075a: 4b10 ldr r3, [pc, #64] @ (800079c <MX_DMA_Init+0x48>)
  1114. 800075c: 6b9a ldr r2, [r3, #56] @ 0x38
  1115. 800075e: 4b0f ldr r3, [pc, #60] @ (800079c <MX_DMA_Init+0x48>)
  1116. 8000760: 2101 movs r1, #1
  1117. 8000762: 430a orrs r2, r1
  1118. 8000764: 639a str r2, [r3, #56] @ 0x38
  1119. 8000766: 4b0d ldr r3, [pc, #52] @ (800079c <MX_DMA_Init+0x48>)
  1120. 8000768: 6b9b ldr r3, [r3, #56] @ 0x38
  1121. 800076a: 2201 movs r2, #1
  1122. 800076c: 4013 ands r3, r2
  1123. 800076e: 607b str r3, [r7, #4]
  1124. 8000770: 687b ldr r3, [r7, #4]
  1125. /* DMA interrupt init */
  1126. /* DMA1_Channel2_3_IRQn interrupt configuration */
  1127. HAL_NVIC_SetPriority(DMA1_Channel2_3_IRQn, 0, 0);
  1128. 8000772: 2200 movs r2, #0
  1129. 8000774: 2100 movs r1, #0
  1130. 8000776: 200a movs r0, #10
  1131. 8000778: f002 fa9a bl 8002cb0 <HAL_NVIC_SetPriority>
  1132. HAL_NVIC_EnableIRQ(DMA1_Channel2_3_IRQn);
  1133. 800077c: 200a movs r0, #10
  1134. 800077e: f002 faac bl 8002cda <HAL_NVIC_EnableIRQ>
  1135. /* DMA1_Ch4_5_DMAMUX1_OVR_IRQn interrupt configuration */
  1136. HAL_NVIC_SetPriority(DMA1_Ch4_5_DMAMUX1_OVR_IRQn, 0, 0);
  1137. 8000782: 2200 movs r2, #0
  1138. 8000784: 2100 movs r1, #0
  1139. 8000786: 200b movs r0, #11
  1140. 8000788: f002 fa92 bl 8002cb0 <HAL_NVIC_SetPriority>
  1141. HAL_NVIC_EnableIRQ(DMA1_Ch4_5_DMAMUX1_OVR_IRQn);
  1142. 800078c: 200b movs r0, #11
  1143. 800078e: f002 faa4 bl 8002cda <HAL_NVIC_EnableIRQ>
  1144. }
  1145. 8000792: 46c0 nop @ (mov r8, r8)
  1146. 8000794: 46bd mov sp, r7
  1147. 8000796: b002 add sp, #8
  1148. 8000798: bd80 pop {r7, pc}
  1149. 800079a: 46c0 nop @ (mov r8, r8)
  1150. 800079c: 40021000 .word 0x40021000
  1151. 080007a0 <MX_GPIO_Init>:
  1152. * @brief GPIO Initialization Function
  1153. * @param None
  1154. * @retval None
  1155. */
  1156. static void MX_GPIO_Init(void)
  1157. {
  1158. 80007a0: b590 push {r4, r7, lr}
  1159. 80007a2: b089 sub sp, #36 @ 0x24
  1160. 80007a4: af00 add r7, sp, #0
  1161. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1162. 80007a6: 240c movs r4, #12
  1163. 80007a8: 193b adds r3, r7, r4
  1164. 80007aa: 0018 movs r0, r3
  1165. 80007ac: 2314 movs r3, #20
  1166. 80007ae: 001a movs r2, r3
  1167. 80007b0: 2100 movs r1, #0
  1168. 80007b2: f005 fc15 bl 8005fe0 <memset>
  1169. /* GPIO Ports Clock Enable */
  1170. __HAL_RCC_GPIOB_CLK_ENABLE();
  1171. 80007b6: 4b16 ldr r3, [pc, #88] @ (8000810 <MX_GPIO_Init+0x70>)
  1172. 80007b8: 6b5a ldr r2, [r3, #52] @ 0x34
  1173. 80007ba: 4b15 ldr r3, [pc, #84] @ (8000810 <MX_GPIO_Init+0x70>)
  1174. 80007bc: 2102 movs r1, #2
  1175. 80007be: 430a orrs r2, r1
  1176. 80007c0: 635a str r2, [r3, #52] @ 0x34
  1177. 80007c2: 4b13 ldr r3, [pc, #76] @ (8000810 <MX_GPIO_Init+0x70>)
  1178. 80007c4: 6b5b ldr r3, [r3, #52] @ 0x34
  1179. 80007c6: 2202 movs r2, #2
  1180. 80007c8: 4013 ands r3, r2
  1181. 80007ca: 60bb str r3, [r7, #8]
  1182. 80007cc: 68bb ldr r3, [r7, #8]
  1183. __HAL_RCC_GPIOA_CLK_ENABLE();
  1184. 80007ce: 4b10 ldr r3, [pc, #64] @ (8000810 <MX_GPIO_Init+0x70>)
  1185. 80007d0: 6b5a ldr r2, [r3, #52] @ 0x34
  1186. 80007d2: 4b0f ldr r3, [pc, #60] @ (8000810 <MX_GPIO_Init+0x70>)
  1187. 80007d4: 2101 movs r1, #1
  1188. 80007d6: 430a orrs r2, r1
  1189. 80007d8: 635a str r2, [r3, #52] @ 0x34
  1190. 80007da: 4b0d ldr r3, [pc, #52] @ (8000810 <MX_GPIO_Init+0x70>)
  1191. 80007dc: 6b5b ldr r3, [r3, #52] @ 0x34
  1192. 80007de: 2201 movs r2, #1
  1193. 80007e0: 4013 ands r3, r2
  1194. 80007e2: 607b str r3, [r7, #4]
  1195. 80007e4: 687b ldr r3, [r7, #4]
  1196. /*Configure GPIO pins : SET_DEFAULT_Pin SET_FAILSAFE_Pin */
  1197. GPIO_InitStruct.Pin = SET_DEFAULT_Pin|SET_FAILSAFE_Pin;
  1198. 80007e6: 193b adds r3, r7, r4
  1199. 80007e8: 22c0 movs r2, #192 @ 0xc0
  1200. 80007ea: 0092 lsls r2, r2, #2
  1201. 80007ec: 601a str r2, [r3, #0]
  1202. GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  1203. 80007ee: 193b adds r3, r7, r4
  1204. 80007f0: 2200 movs r2, #0
  1205. 80007f2: 605a str r2, [r3, #4]
  1206. GPIO_InitStruct.Pull = GPIO_PULLUP;
  1207. 80007f4: 193b adds r3, r7, r4
  1208. 80007f6: 2201 movs r2, #1
  1209. 80007f8: 609a str r2, [r3, #8]
  1210. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  1211. 80007fa: 193b adds r3, r7, r4
  1212. 80007fc: 4a05 ldr r2, [pc, #20] @ (8000814 <MX_GPIO_Init+0x74>)
  1213. 80007fe: 0019 movs r1, r3
  1214. 8000800: 0010 movs r0, r2
  1215. 8000802: f002 feeb bl 80035dc <HAL_GPIO_Init>
  1216. }
  1217. 8000806: 46c0 nop @ (mov r8, r8)
  1218. 8000808: 46bd mov sp, r7
  1219. 800080a: b009 add sp, #36 @ 0x24
  1220. 800080c: bd90 pop {r4, r7, pc}
  1221. 800080e: 46c0 nop @ (mov r8, r8)
  1222. 8000810: 40021000 .word 0x40021000
  1223. 8000814: 50000400 .word 0x50000400
  1224. 08000818 <Error_Handler>:
  1225. /**
  1226. * @brief This function is executed in case of error occurrence.
  1227. * @retval None
  1228. */
  1229. void Error_Handler(void)
  1230. {
  1231. 8000818: b580 push {r7, lr}
  1232. 800081a: af00 add r7, sp, #0
  1233. \details Disables IRQ interrupts by setting the I-bit in the CPSR.
  1234. Can only be executed in Privileged modes.
  1235. */
  1236. __STATIC_FORCEINLINE void __disable_irq(void)
  1237. {
  1238. __ASM volatile ("cpsid i" : : : "memory");
  1239. 800081c: b672 cpsid i
  1240. }
  1241. 800081e: 46c0 nop @ (mov r8, r8)
  1242. /* USER CODE BEGIN Error_Handler_Debug */
  1243. /* User can add his own implementation to report the HAL error return state */
  1244. __disable_irq();
  1245. while (1)
  1246. 8000820: 46c0 nop @ (mov r8, r8)
  1247. 8000822: e7fd b.n 8000820 <Error_Handler+0x8>
  1248. 08000824 <SettingsInit>:
  1249. #include "settings.h"
  1250. #include "stm32g0xx_hal_flash.h"
  1251. SettingsStruct Settings;
  1252. void SettingsInit(void) {
  1253. 8000824: b580 push {r7, lr}
  1254. 8000826: af00 add r7, sp, #0
  1255. SettingsLoad();
  1256. 8000828: f000 f87c bl 8000924 <SettingsLoad>
  1257. if (Settings.start[0] == 0xFFFF) { // Flash memory is clear
  1258. 800082c: 4b04 ldr r3, [pc, #16] @ (8000840 <SettingsInit+0x1c>)
  1259. 800082e: 881b ldrh r3, [r3, #0]
  1260. 8000830: 4a04 ldr r2, [pc, #16] @ (8000844 <SettingsInit+0x20>)
  1261. 8000832: 4293 cmp r3, r2
  1262. 8000834: d101 bne.n 800083a <SettingsInit+0x16>
  1263. SettinsDefault();
  1264. 8000836: f000 f807 bl 8000848 <SettinsDefault>
  1265. }
  1266. }
  1267. 800083a: 46c0 nop @ (mov r8, r8)
  1268. 800083c: 46bd mov sp, r7
  1269. 800083e: bd80 pop {r7, pc}
  1270. 8000840: 20000458 .word 0x20000458
  1271. 8000844: 0000ffff .word 0x0000ffff
  1272. 08000848 <SettinsDefault>:
  1273. void SettinsDefault(void) {
  1274. 8000848: b580 push {r7, lr}
  1275. 800084a: b082 sub sp, #8
  1276. 800084c: af00 add r7, sp, #0
  1277. // Default Value
  1278. unsigned int ch;
  1279. for(ch=0; ch<5; ch++) {
  1280. 800084e: 2300 movs r3, #0
  1281. 8000850: 607b str r3, [r7, #4]
  1282. 8000852: e010 b.n 8000876 <SettinsDefault+0x2e>
  1283. Settings.start[ch] = 1000;
  1284. 8000854: 4b0c ldr r3, [pc, #48] @ (8000888 <SettinsDefault+0x40>)
  1285. 8000856: 687a ldr r2, [r7, #4]
  1286. 8000858: 0052 lsls r2, r2, #1
  1287. 800085a: 21fa movs r1, #250 @ 0xfa
  1288. 800085c: 0089 lsls r1, r1, #2
  1289. 800085e: 52d1 strh r1, [r2, r3]
  1290. Settings.fail[ch] = 0;
  1291. 8000860: 4a09 ldr r2, [pc, #36] @ (8000888 <SettinsDefault+0x40>)
  1292. 8000862: 687b ldr r3, [r7, #4]
  1293. 8000864: 3304 adds r3, #4
  1294. 8000866: 005b lsls r3, r3, #1
  1295. 8000868: 18d3 adds r3, r2, r3
  1296. 800086a: 3302 adds r3, #2
  1297. 800086c: 2200 movs r2, #0
  1298. 800086e: 801a strh r2, [r3, #0]
  1299. for(ch=0; ch<5; ch++) {
  1300. 8000870: 687b ldr r3, [r7, #4]
  1301. 8000872: 3301 adds r3, #1
  1302. 8000874: 607b str r3, [r7, #4]
  1303. 8000876: 687b ldr r3, [r7, #4]
  1304. 8000878: 2b04 cmp r3, #4
  1305. 800087a: d9eb bls.n 8000854 <SettinsDefault+0xc>
  1306. }
  1307. SettingsSave();
  1308. 800087c: f000 f806 bl 800088c <SettingsSave>
  1309. }
  1310. 8000880: 46c0 nop @ (mov r8, r8)
  1311. 8000882: 46bd mov sp, r7
  1312. 8000884: b002 add sp, #8
  1313. 8000886: bd80 pop {r7, pc}
  1314. 8000888: 20000458 .word 0x20000458
  1315. 0800088c <SettingsSave>:
  1316. void SettingsSave(void) {
  1317. 800088c: b580 push {r7, lr}
  1318. 800088e: b08a sub sp, #40 @ 0x28
  1319. 8000890: af00 add r7, sp, #0
  1320. uint32_t PageError = 0;
  1321. 8000892: 2300 movs r3, #0
  1322. 8000894: 613b str r3, [r7, #16]
  1323. FLASH_EraseInitTypeDef EraseInitStruct;
  1324. HAL_FLASH_Unlock();
  1325. 8000896: f002 fd49 bl 800332c <HAL_FLASH_Unlock>
  1326. EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;
  1327. 800089a: 003b movs r3, r7
  1328. 800089c: 2202 movs r2, #2
  1329. 800089e: 601a str r2, [r3, #0]
  1330. EraseInitStruct.Page = 15; //FLASH_PAGE_NB - 1;
  1331. 80008a0: 003b movs r3, r7
  1332. 80008a2: 220f movs r2, #15
  1333. 80008a4: 609a str r2, [r3, #8]
  1334. EraseInitStruct.NbPages = 1;
  1335. 80008a6: 003b movs r3, r7
  1336. 80008a8: 2201 movs r2, #1
  1337. 80008aa: 60da str r2, [r3, #12]
  1338. if (HAL_FLASHEx_Erase(&EraseInitStruct, &PageError) == HAL_OK)
  1339. 80008ac: 2310 movs r3, #16
  1340. 80008ae: 18fa adds r2, r7, r3
  1341. 80008b0: 003b movs r3, r7
  1342. 80008b2: 0011 movs r1, r2
  1343. 80008b4: 0018 movs r0, r3
  1344. 80008b6: f002 fded bl 8003494 <HAL_FLASHEx_Erase>
  1345. 80008ba: 1e03 subs r3, r0, #0
  1346. 80008bc: d127 bne.n 800090e <SettingsSave+0x82>
  1347. {
  1348. // Write setting
  1349. uint64_t *source_addr = (void *)&Settings;
  1350. 80008be: 4b17 ldr r3, [pc, #92] @ (800091c <SettingsSave+0x90>)
  1351. 80008c0: 627b str r3, [r7, #36] @ 0x24
  1352. uint64_t dest_addr = (uint64_t) FLASH_SETTINGS_START_ADDR;
  1353. 80008c2: 4a17 ldr r2, [pc, #92] @ (8000920 <SettingsSave+0x94>)
  1354. 80008c4: 2300 movs r3, #0
  1355. 80008c6: 61ba str r2, [r7, #24]
  1356. 80008c8: 61fb str r3, [r7, #28]
  1357. for (uint16_t i=0; i<SETTINGS_WORDS; i++) {
  1358. 80008ca: 2316 movs r3, #22
  1359. 80008cc: 18fb adds r3, r7, r3
  1360. 80008ce: 2200 movs r2, #0
  1361. 80008d0: 801a strh r2, [r3, #0]
  1362. 80008d2: e017 b.n 8000904 <SettingsSave+0x78>
  1363. HAL_FLASH_Program(FLASH_CR_PG, dest_addr, *source_addr);
  1364. 80008d4: 69b9 ldr r1, [r7, #24]
  1365. 80008d6: 6a7b ldr r3, [r7, #36] @ 0x24
  1366. 80008d8: 681a ldr r2, [r3, #0]
  1367. 80008da: 685b ldr r3, [r3, #4]
  1368. 80008dc: 2001 movs r0, #1
  1369. 80008de: f002 fcd7 bl 8003290 <HAL_FLASH_Program>
  1370. source_addr++;
  1371. 80008e2: 6a7b ldr r3, [r7, #36] @ 0x24
  1372. 80008e4: 3308 adds r3, #8
  1373. 80008e6: 627b str r3, [r7, #36] @ 0x24
  1374. dest_addr = dest_addr + 8;
  1375. 80008e8: 69ba ldr r2, [r7, #24]
  1376. 80008ea: 69fb ldr r3, [r7, #28]
  1377. 80008ec: 2008 movs r0, #8
  1378. 80008ee: 2100 movs r1, #0
  1379. 80008f0: 1812 adds r2, r2, r0
  1380. 80008f2: 414b adcs r3, r1
  1381. 80008f4: 61ba str r2, [r7, #24]
  1382. 80008f6: 61fb str r3, [r7, #28]
  1383. for (uint16_t i=0; i<SETTINGS_WORDS; i++) {
  1384. 80008f8: 2116 movs r1, #22
  1385. 80008fa: 187b adds r3, r7, r1
  1386. 80008fc: 881a ldrh r2, [r3, #0]
  1387. 80008fe: 187b adds r3, r7, r1
  1388. 8000900: 3201 adds r2, #1
  1389. 8000902: 801a strh r2, [r3, #0]
  1390. 8000904: 2316 movs r3, #22
  1391. 8000906: 18fb adds r3, r7, r3
  1392. 8000908: 881b ldrh r3, [r3, #0]
  1393. 800090a: 2b04 cmp r3, #4
  1394. 800090c: d9e2 bls.n 80008d4 <SettingsSave+0x48>
  1395. }
  1396. }
  1397. HAL_FLASH_Lock();
  1398. 800090e: f002 fd31 bl 8003374 <HAL_FLASH_Lock>
  1399. }
  1400. 8000912: 46c0 nop @ (mov r8, r8)
  1401. 8000914: 46bd mov sp, r7
  1402. 8000916: b00a add sp, #40 @ 0x28
  1403. 8000918: bd80 pop {r7, pc}
  1404. 800091a: 46c0 nop @ (mov r8, r8)
  1405. 800091c: 20000458 .word 0x20000458
  1406. 8000920: 08007800 .word 0x08007800
  1407. 08000924 <SettingsLoad>:
  1408. void SettingsLoad(void) {
  1409. 8000924: b580 push {r7, lr}
  1410. 8000926: b084 sub sp, #16
  1411. 8000928: af00 add r7, sp, #0
  1412. uint32_t *source_addr = (uint32_t *)FLASH_SETTINGS_START_ADDR;
  1413. 800092a: 4b10 ldr r3, [pc, #64] @ (800096c <SettingsLoad+0x48>)
  1414. 800092c: 60fb str r3, [r7, #12]
  1415. uint32_t *dest_addr = (void *)&Settings;
  1416. 800092e: 4b10 ldr r3, [pc, #64] @ (8000970 <SettingsLoad+0x4c>)
  1417. 8000930: 60bb str r3, [r7, #8]
  1418. for (uint16_t i=0; i<SETTINGS_WORDS; i++) {
  1419. 8000932: 1dbb adds r3, r7, #6
  1420. 8000934: 2200 movs r2, #0
  1421. 8000936: 801a strh r2, [r3, #0]
  1422. 8000938: e00e b.n 8000958 <SettingsLoad+0x34>
  1423. *dest_addr = *(__IO uint32_t*)source_addr;
  1424. 800093a: 68fb ldr r3, [r7, #12]
  1425. 800093c: 681a ldr r2, [r3, #0]
  1426. 800093e: 68bb ldr r3, [r7, #8]
  1427. 8000940: 601a str r2, [r3, #0]
  1428. source_addr++;
  1429. 8000942: 68fb ldr r3, [r7, #12]
  1430. 8000944: 3304 adds r3, #4
  1431. 8000946: 60fb str r3, [r7, #12]
  1432. dest_addr++;
  1433. 8000948: 68bb ldr r3, [r7, #8]
  1434. 800094a: 3304 adds r3, #4
  1435. 800094c: 60bb str r3, [r7, #8]
  1436. for (uint16_t i=0; i<SETTINGS_WORDS; i++) {
  1437. 800094e: 1dbb adds r3, r7, #6
  1438. 8000950: 881a ldrh r2, [r3, #0]
  1439. 8000952: 1dbb adds r3, r7, #6
  1440. 8000954: 3201 adds r2, #1
  1441. 8000956: 801a strh r2, [r3, #0]
  1442. 8000958: 1dbb adds r3, r7, #6
  1443. 800095a: 881b ldrh r3, [r3, #0]
  1444. 800095c: 2b04 cmp r3, #4
  1445. 800095e: d9ec bls.n 800093a <SettingsLoad+0x16>
  1446. }
  1447. }
  1448. 8000960: 46c0 nop @ (mov r8, r8)
  1449. 8000962: 46c0 nop @ (mov r8, r8)
  1450. 8000964: 46bd mov sp, r7
  1451. 8000966: b004 add sp, #16
  1452. 8000968: bd80 pop {r7, pc}
  1453. 800096a: 46c0 nop @ (mov r8, r8)
  1454. 800096c: 08007800 .word 0x08007800
  1455. 8000970: 20000458 .word 0x20000458
  1456. 08000974 <HAL_MspInit>:
  1457. void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
  1458. /**
  1459. * Initializes the Global MSP.
  1460. */
  1461. void HAL_MspInit(void)
  1462. {
  1463. 8000974: b580 push {r7, lr}
  1464. 8000976: b082 sub sp, #8
  1465. 8000978: af00 add r7, sp, #0
  1466. /* USER CODE BEGIN MspInit 0 */
  1467. /* USER CODE END MspInit 0 */
  1468. __HAL_RCC_SYSCFG_CLK_ENABLE();
  1469. 800097a: 4b0f ldr r3, [pc, #60] @ (80009b8 <HAL_MspInit+0x44>)
  1470. 800097c: 6c1a ldr r2, [r3, #64] @ 0x40
  1471. 800097e: 4b0e ldr r3, [pc, #56] @ (80009b8 <HAL_MspInit+0x44>)
  1472. 8000980: 2101 movs r1, #1
  1473. 8000982: 430a orrs r2, r1
  1474. 8000984: 641a str r2, [r3, #64] @ 0x40
  1475. 8000986: 4b0c ldr r3, [pc, #48] @ (80009b8 <HAL_MspInit+0x44>)
  1476. 8000988: 6c1b ldr r3, [r3, #64] @ 0x40
  1477. 800098a: 2201 movs r2, #1
  1478. 800098c: 4013 ands r3, r2
  1479. 800098e: 607b str r3, [r7, #4]
  1480. 8000990: 687b ldr r3, [r7, #4]
  1481. __HAL_RCC_PWR_CLK_ENABLE();
  1482. 8000992: 4b09 ldr r3, [pc, #36] @ (80009b8 <HAL_MspInit+0x44>)
  1483. 8000994: 6bda ldr r2, [r3, #60] @ 0x3c
  1484. 8000996: 4b08 ldr r3, [pc, #32] @ (80009b8 <HAL_MspInit+0x44>)
  1485. 8000998: 2180 movs r1, #128 @ 0x80
  1486. 800099a: 0549 lsls r1, r1, #21
  1487. 800099c: 430a orrs r2, r1
  1488. 800099e: 63da str r2, [r3, #60] @ 0x3c
  1489. 80009a0: 4b05 ldr r3, [pc, #20] @ (80009b8 <HAL_MspInit+0x44>)
  1490. 80009a2: 6bda ldr r2, [r3, #60] @ 0x3c
  1491. 80009a4: 2380 movs r3, #128 @ 0x80
  1492. 80009a6: 055b lsls r3, r3, #21
  1493. 80009a8: 4013 ands r3, r2
  1494. 80009aa: 603b str r3, [r7, #0]
  1495. 80009ac: 683b ldr r3, [r7, #0]
  1496. /* System interrupt init*/
  1497. /* USER CODE BEGIN MspInit 1 */
  1498. /* USER CODE END MspInit 1 */
  1499. }
  1500. 80009ae: 46c0 nop @ (mov r8, r8)
  1501. 80009b0: 46bd mov sp, r7
  1502. 80009b2: b002 add sp, #8
  1503. 80009b4: bd80 pop {r7, pc}
  1504. 80009b6: 46c0 nop @ (mov r8, r8)
  1505. 80009b8: 40021000 .word 0x40021000
  1506. 080009bc <HAL_ADC_MspInit>:
  1507. * This function configures the hardware resources used in this example
  1508. * @param hadc: ADC handle pointer
  1509. * @retval None
  1510. */
  1511. void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
  1512. {
  1513. 80009bc: b590 push {r4, r7, lr}
  1514. 80009be: b091 sub sp, #68 @ 0x44
  1515. 80009c0: af00 add r7, sp, #0
  1516. 80009c2: 6078 str r0, [r7, #4]
  1517. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1518. 80009c4: 232c movs r3, #44 @ 0x2c
  1519. 80009c6: 18fb adds r3, r7, r3
  1520. 80009c8: 0018 movs r0, r3
  1521. 80009ca: 2314 movs r3, #20
  1522. 80009cc: 001a movs r2, r3
  1523. 80009ce: 2100 movs r1, #0
  1524. 80009d0: f005 fb06 bl 8005fe0 <memset>
  1525. RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
  1526. 80009d4: 2414 movs r4, #20
  1527. 80009d6: 193b adds r3, r7, r4
  1528. 80009d8: 0018 movs r0, r3
  1529. 80009da: 2318 movs r3, #24
  1530. 80009dc: 001a movs r2, r3
  1531. 80009de: 2100 movs r1, #0
  1532. 80009e0: f005 fafe bl 8005fe0 <memset>
  1533. if(hadc->Instance==ADC1)
  1534. 80009e4: 687b ldr r3, [r7, #4]
  1535. 80009e6: 681b ldr r3, [r3, #0]
  1536. 80009e8: 4a35 ldr r2, [pc, #212] @ (8000ac0 <HAL_ADC_MspInit+0x104>)
  1537. 80009ea: 4293 cmp r3, r2
  1538. 80009ec: d164 bne.n 8000ab8 <HAL_ADC_MspInit+0xfc>
  1539. /* USER CODE END ADC1_MspInit 0 */
  1540. /** Initializes the peripherals clocks
  1541. */
  1542. PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;
  1543. 80009ee: 193b adds r3, r7, r4
  1544. 80009f0: 2280 movs r2, #128 @ 0x80
  1545. 80009f2: 01d2 lsls r2, r2, #7
  1546. 80009f4: 601a str r2, [r3, #0]
  1547. PeriphClkInit.AdcClockSelection = RCC_ADCCLKSOURCE_SYSCLK;
  1548. 80009f6: 193b adds r3, r7, r4
  1549. 80009f8: 2200 movs r2, #0
  1550. 80009fa: 611a str r2, [r3, #16]
  1551. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
  1552. 80009fc: 193b adds r3, r7, r4
  1553. 80009fe: 0018 movs r0, r3
  1554. 8000a00: f003 fc74 bl 80042ec <HAL_RCCEx_PeriphCLKConfig>
  1555. 8000a04: 1e03 subs r3, r0, #0
  1556. 8000a06: d001 beq.n 8000a0c <HAL_ADC_MspInit+0x50>
  1557. {
  1558. Error_Handler();
  1559. 8000a08: f7ff ff06 bl 8000818 <Error_Handler>
  1560. }
  1561. /* Peripheral clock enable */
  1562. __HAL_RCC_ADC_CLK_ENABLE();
  1563. 8000a0c: 4b2d ldr r3, [pc, #180] @ (8000ac4 <HAL_ADC_MspInit+0x108>)
  1564. 8000a0e: 6c1a ldr r2, [r3, #64] @ 0x40
  1565. 8000a10: 4b2c ldr r3, [pc, #176] @ (8000ac4 <HAL_ADC_MspInit+0x108>)
  1566. 8000a12: 2180 movs r1, #128 @ 0x80
  1567. 8000a14: 0349 lsls r1, r1, #13
  1568. 8000a16: 430a orrs r2, r1
  1569. 8000a18: 641a str r2, [r3, #64] @ 0x40
  1570. 8000a1a: 4b2a ldr r3, [pc, #168] @ (8000ac4 <HAL_ADC_MspInit+0x108>)
  1571. 8000a1c: 6c1a ldr r2, [r3, #64] @ 0x40
  1572. 8000a1e: 2380 movs r3, #128 @ 0x80
  1573. 8000a20: 035b lsls r3, r3, #13
  1574. 8000a22: 4013 ands r3, r2
  1575. 8000a24: 613b str r3, [r7, #16]
  1576. 8000a26: 693b ldr r3, [r7, #16]
  1577. __HAL_RCC_GPIOA_CLK_ENABLE();
  1578. 8000a28: 4b26 ldr r3, [pc, #152] @ (8000ac4 <HAL_ADC_MspInit+0x108>)
  1579. 8000a2a: 6b5a ldr r2, [r3, #52] @ 0x34
  1580. 8000a2c: 4b25 ldr r3, [pc, #148] @ (8000ac4 <HAL_ADC_MspInit+0x108>)
  1581. 8000a2e: 2101 movs r1, #1
  1582. 8000a30: 430a orrs r2, r1
  1583. 8000a32: 635a str r2, [r3, #52] @ 0x34
  1584. 8000a34: 4b23 ldr r3, [pc, #140] @ (8000ac4 <HAL_ADC_MspInit+0x108>)
  1585. 8000a36: 6b5b ldr r3, [r3, #52] @ 0x34
  1586. 8000a38: 2201 movs r2, #1
  1587. 8000a3a: 4013 ands r3, r2
  1588. 8000a3c: 60fb str r3, [r7, #12]
  1589. 8000a3e: 68fb ldr r3, [r7, #12]
  1590. /**ADC1 GPIO Configuration
  1591. PA4 ------> ADC1_IN4
  1592. */
  1593. GPIO_InitStruct.Pin = ADC1_Pin;
  1594. 8000a40: 212c movs r1, #44 @ 0x2c
  1595. 8000a42: 187b adds r3, r7, r1
  1596. 8000a44: 2210 movs r2, #16
  1597. 8000a46: 601a str r2, [r3, #0]
  1598. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  1599. 8000a48: 187b adds r3, r7, r1
  1600. 8000a4a: 2203 movs r2, #3
  1601. 8000a4c: 605a str r2, [r3, #4]
  1602. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1603. 8000a4e: 187b adds r3, r7, r1
  1604. 8000a50: 2200 movs r2, #0
  1605. 8000a52: 609a str r2, [r3, #8]
  1606. HAL_GPIO_Init(ADC1_GPIO_Port, &GPIO_InitStruct);
  1607. 8000a54: 187a adds r2, r7, r1
  1608. 8000a56: 23a0 movs r3, #160 @ 0xa0
  1609. 8000a58: 05db lsls r3, r3, #23
  1610. 8000a5a: 0011 movs r1, r2
  1611. 8000a5c: 0018 movs r0, r3
  1612. 8000a5e: f002 fdbd bl 80035dc <HAL_GPIO_Init>
  1613. /* ADC1 DMA Init */
  1614. /* ADC1 Init */
  1615. hdma_adc1.Instance = DMA1_Channel3;
  1616. 8000a62: 4b19 ldr r3, [pc, #100] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1617. 8000a64: 4a19 ldr r2, [pc, #100] @ (8000acc <HAL_ADC_MspInit+0x110>)
  1618. 8000a66: 601a str r2, [r3, #0]
  1619. hdma_adc1.Init.Request = DMA_REQUEST_ADC1;
  1620. 8000a68: 4b17 ldr r3, [pc, #92] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1621. 8000a6a: 2205 movs r2, #5
  1622. 8000a6c: 605a str r2, [r3, #4]
  1623. hdma_adc1.Init.Direction = DMA_PERIPH_TO_MEMORY;
  1624. 8000a6e: 4b16 ldr r3, [pc, #88] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1625. 8000a70: 2200 movs r2, #0
  1626. 8000a72: 609a str r2, [r3, #8]
  1627. hdma_adc1.Init.PeriphInc = DMA_PINC_DISABLE;
  1628. 8000a74: 4b14 ldr r3, [pc, #80] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1629. 8000a76: 2200 movs r2, #0
  1630. 8000a78: 60da str r2, [r3, #12]
  1631. hdma_adc1.Init.MemInc = DMA_MINC_ENABLE;
  1632. 8000a7a: 4b13 ldr r3, [pc, #76] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1633. 8000a7c: 2280 movs r2, #128 @ 0x80
  1634. 8000a7e: 611a str r2, [r3, #16]
  1635. hdma_adc1.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
  1636. 8000a80: 4b11 ldr r3, [pc, #68] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1637. 8000a82: 2280 movs r2, #128 @ 0x80
  1638. 8000a84: 0052 lsls r2, r2, #1
  1639. 8000a86: 615a str r2, [r3, #20]
  1640. hdma_adc1.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
  1641. 8000a88: 4b0f ldr r3, [pc, #60] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1642. 8000a8a: 2280 movs r2, #128 @ 0x80
  1643. 8000a8c: 00d2 lsls r2, r2, #3
  1644. 8000a8e: 619a str r2, [r3, #24]
  1645. hdma_adc1.Init.Mode = DMA_NORMAL;
  1646. 8000a90: 4b0d ldr r3, [pc, #52] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1647. 8000a92: 2200 movs r2, #0
  1648. 8000a94: 61da str r2, [r3, #28]
  1649. hdma_adc1.Init.Priority = DMA_PRIORITY_LOW;
  1650. 8000a96: 4b0c ldr r3, [pc, #48] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1651. 8000a98: 2200 movs r2, #0
  1652. 8000a9a: 621a str r2, [r3, #32]
  1653. if (HAL_DMA_Init(&hdma_adc1) != HAL_OK)
  1654. 8000a9c: 4b0a ldr r3, [pc, #40] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1655. 8000a9e: 0018 movs r0, r3
  1656. 8000aa0: f002 f938 bl 8002d14 <HAL_DMA_Init>
  1657. 8000aa4: 1e03 subs r3, r0, #0
  1658. 8000aa6: d001 beq.n 8000aac <HAL_ADC_MspInit+0xf0>
  1659. {
  1660. Error_Handler();
  1661. 8000aa8: f7ff feb6 bl 8000818 <Error_Handler>
  1662. }
  1663. __HAL_LINKDMA(hadc,DMA_Handle,hdma_adc1);
  1664. 8000aac: 687b ldr r3, [r7, #4]
  1665. 8000aae: 4a06 ldr r2, [pc, #24] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1666. 8000ab0: 651a str r2, [r3, #80] @ 0x50
  1667. 8000ab2: 4b05 ldr r3, [pc, #20] @ (8000ac8 <HAL_ADC_MspInit+0x10c>)
  1668. 8000ab4: 687a ldr r2, [r7, #4]
  1669. 8000ab6: 629a str r2, [r3, #40] @ 0x28
  1670. /* USER CODE BEGIN ADC1_MspInit 1 */
  1671. /* USER CODE END ADC1_MspInit 1 */
  1672. }
  1673. }
  1674. 8000ab8: 46c0 nop @ (mov r8, r8)
  1675. 8000aba: 46bd mov sp, r7
  1676. 8000abc: b011 add sp, #68 @ 0x44
  1677. 8000abe: bd90 pop {r4, r7, pc}
  1678. 8000ac0: 40012400 .word 0x40012400
  1679. 8000ac4: 40021000 .word 0x40021000
  1680. 8000ac8: 20000218 .word 0x20000218
  1681. 8000acc: 40020030 .word 0x40020030
  1682. 08000ad0 <HAL_TIM_PWM_MspInit>:
  1683. * This function configures the hardware resources used in this example
  1684. * @param htim_pwm: TIM_PWM handle pointer
  1685. * @retval None
  1686. */
  1687. void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm)
  1688. {
  1689. 8000ad0: b580 push {r7, lr}
  1690. 8000ad2: b084 sub sp, #16
  1691. 8000ad4: af00 add r7, sp, #0
  1692. 8000ad6: 6078 str r0, [r7, #4]
  1693. if(htim_pwm->Instance==TIM1)
  1694. 8000ad8: 687b ldr r3, [r7, #4]
  1695. 8000ada: 681b ldr r3, [r3, #0]
  1696. 8000adc: 4a13 ldr r2, [pc, #76] @ (8000b2c <HAL_TIM_PWM_MspInit+0x5c>)
  1697. 8000ade: 4293 cmp r3, r2
  1698. 8000ae0: d10e bne.n 8000b00 <HAL_TIM_PWM_MspInit+0x30>
  1699. {
  1700. /* USER CODE BEGIN TIM1_MspInit 0 */
  1701. /* USER CODE END TIM1_MspInit 0 */
  1702. /* Peripheral clock enable */
  1703. __HAL_RCC_TIM1_CLK_ENABLE();
  1704. 8000ae2: 4b13 ldr r3, [pc, #76] @ (8000b30 <HAL_TIM_PWM_MspInit+0x60>)
  1705. 8000ae4: 6c1a ldr r2, [r3, #64] @ 0x40
  1706. 8000ae6: 4b12 ldr r3, [pc, #72] @ (8000b30 <HAL_TIM_PWM_MspInit+0x60>)
  1707. 8000ae8: 2180 movs r1, #128 @ 0x80
  1708. 8000aea: 0109 lsls r1, r1, #4
  1709. 8000aec: 430a orrs r2, r1
  1710. 8000aee: 641a str r2, [r3, #64] @ 0x40
  1711. 8000af0: 4b0f ldr r3, [pc, #60] @ (8000b30 <HAL_TIM_PWM_MspInit+0x60>)
  1712. 8000af2: 6c1a ldr r2, [r3, #64] @ 0x40
  1713. 8000af4: 2380 movs r3, #128 @ 0x80
  1714. 8000af6: 011b lsls r3, r3, #4
  1715. 8000af8: 4013 ands r3, r2
  1716. 8000afa: 60fb str r3, [r7, #12]
  1717. 8000afc: 68fb ldr r3, [r7, #12]
  1718. /* USER CODE BEGIN TIM3_MspInit 1 */
  1719. /* USER CODE END TIM3_MspInit 1 */
  1720. }
  1721. }
  1722. 8000afe: e010 b.n 8000b22 <HAL_TIM_PWM_MspInit+0x52>
  1723. else if(htim_pwm->Instance==TIM3)
  1724. 8000b00: 687b ldr r3, [r7, #4]
  1725. 8000b02: 681b ldr r3, [r3, #0]
  1726. 8000b04: 4a0b ldr r2, [pc, #44] @ (8000b34 <HAL_TIM_PWM_MspInit+0x64>)
  1727. 8000b06: 4293 cmp r3, r2
  1728. 8000b08: d10b bne.n 8000b22 <HAL_TIM_PWM_MspInit+0x52>
  1729. __HAL_RCC_TIM3_CLK_ENABLE();
  1730. 8000b0a: 4b09 ldr r3, [pc, #36] @ (8000b30 <HAL_TIM_PWM_MspInit+0x60>)
  1731. 8000b0c: 6bda ldr r2, [r3, #60] @ 0x3c
  1732. 8000b0e: 4b08 ldr r3, [pc, #32] @ (8000b30 <HAL_TIM_PWM_MspInit+0x60>)
  1733. 8000b10: 2102 movs r1, #2
  1734. 8000b12: 430a orrs r2, r1
  1735. 8000b14: 63da str r2, [r3, #60] @ 0x3c
  1736. 8000b16: 4b06 ldr r3, [pc, #24] @ (8000b30 <HAL_TIM_PWM_MspInit+0x60>)
  1737. 8000b18: 6bdb ldr r3, [r3, #60] @ 0x3c
  1738. 8000b1a: 2202 movs r2, #2
  1739. 8000b1c: 4013 ands r3, r2
  1740. 8000b1e: 60bb str r3, [r7, #8]
  1741. 8000b20: 68bb ldr r3, [r7, #8]
  1742. }
  1743. 8000b22: 46c0 nop @ (mov r8, r8)
  1744. 8000b24: 46bd mov sp, r7
  1745. 8000b26: b004 add sp, #16
  1746. 8000b28: bd80 pop {r7, pc}
  1747. 8000b2a: 46c0 nop @ (mov r8, r8)
  1748. 8000b2c: 40012c00 .word 0x40012c00
  1749. 8000b30: 40021000 .word 0x40021000
  1750. 8000b34: 40000400 .word 0x40000400
  1751. 08000b38 <HAL_TIM_MspPostInit>:
  1752. void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
  1753. {
  1754. 8000b38: b590 push {r4, r7, lr}
  1755. 8000b3a: b08b sub sp, #44 @ 0x2c
  1756. 8000b3c: af00 add r7, sp, #0
  1757. 8000b3e: 6078 str r0, [r7, #4]
  1758. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1759. 8000b40: 2414 movs r4, #20
  1760. 8000b42: 193b adds r3, r7, r4
  1761. 8000b44: 0018 movs r0, r3
  1762. 8000b46: 2314 movs r3, #20
  1763. 8000b48: 001a movs r2, r3
  1764. 8000b4a: 2100 movs r1, #0
  1765. 8000b4c: f005 fa48 bl 8005fe0 <memset>
  1766. if(htim->Instance==TIM1)
  1767. 8000b50: 687b ldr r3, [r7, #4]
  1768. 8000b52: 681b ldr r3, [r3, #0]
  1769. 8000b54: 4a3a ldr r2, [pc, #232] @ (8000c40 <HAL_TIM_MspPostInit+0x108>)
  1770. 8000b56: 4293 cmp r3, r2
  1771. 8000b58: d145 bne.n 8000be6 <HAL_TIM_MspPostInit+0xae>
  1772. {
  1773. /* USER CODE BEGIN TIM1_MspPostInit 0 */
  1774. /* USER CODE END TIM1_MspPostInit 0 */
  1775. __HAL_RCC_GPIOA_CLK_ENABLE();
  1776. 8000b5a: 4b3a ldr r3, [pc, #232] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1777. 8000b5c: 6b5a ldr r2, [r3, #52] @ 0x34
  1778. 8000b5e: 4b39 ldr r3, [pc, #228] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1779. 8000b60: 2101 movs r1, #1
  1780. 8000b62: 430a orrs r2, r1
  1781. 8000b64: 635a str r2, [r3, #52] @ 0x34
  1782. 8000b66: 4b37 ldr r3, [pc, #220] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1783. 8000b68: 6b5b ldr r3, [r3, #52] @ 0x34
  1784. 8000b6a: 2201 movs r2, #1
  1785. 8000b6c: 4013 ands r3, r2
  1786. 8000b6e: 613b str r3, [r7, #16]
  1787. 8000b70: 693b ldr r3, [r7, #16]
  1788. __HAL_RCC_GPIOB_CLK_ENABLE();
  1789. 8000b72: 4b34 ldr r3, [pc, #208] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1790. 8000b74: 6b5a ldr r2, [r3, #52] @ 0x34
  1791. 8000b76: 4b33 ldr r3, [pc, #204] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1792. 8000b78: 2102 movs r1, #2
  1793. 8000b7a: 430a orrs r2, r1
  1794. 8000b7c: 635a str r2, [r3, #52] @ 0x34
  1795. 8000b7e: 4b31 ldr r3, [pc, #196] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1796. 8000b80: 6b5b ldr r3, [r3, #52] @ 0x34
  1797. 8000b82: 2202 movs r2, #2
  1798. 8000b84: 4013 ands r3, r2
  1799. 8000b86: 60fb str r3, [r7, #12]
  1800. 8000b88: 68fb ldr r3, [r7, #12]
  1801. /**TIM1 GPIO Configuration
  1802. PA8 ------> TIM1_CH1
  1803. PA11 [PA9] ------> TIM1_CH4
  1804. PB3 ------> TIM1_CH2
  1805. */
  1806. GPIO_InitStruct.Pin = PWM3_Pin|PWM4_Pin;
  1807. 8000b8a: 193b adds r3, r7, r4
  1808. 8000b8c: 2290 movs r2, #144 @ 0x90
  1809. 8000b8e: 0112 lsls r2, r2, #4
  1810. 8000b90: 601a str r2, [r3, #0]
  1811. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  1812. 8000b92: 193b adds r3, r7, r4
  1813. 8000b94: 2202 movs r2, #2
  1814. 8000b96: 605a str r2, [r3, #4]
  1815. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1816. 8000b98: 193b adds r3, r7, r4
  1817. 8000b9a: 2200 movs r2, #0
  1818. 8000b9c: 609a str r2, [r3, #8]
  1819. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1820. 8000b9e: 193b adds r3, r7, r4
  1821. 8000ba0: 2200 movs r2, #0
  1822. 8000ba2: 60da str r2, [r3, #12]
  1823. GPIO_InitStruct.Alternate = GPIO_AF2_TIM1;
  1824. 8000ba4: 193b adds r3, r7, r4
  1825. 8000ba6: 2202 movs r2, #2
  1826. 8000ba8: 611a str r2, [r3, #16]
  1827. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  1828. 8000baa: 193a adds r2, r7, r4
  1829. 8000bac: 23a0 movs r3, #160 @ 0xa0
  1830. 8000bae: 05db lsls r3, r3, #23
  1831. 8000bb0: 0011 movs r1, r2
  1832. 8000bb2: 0018 movs r0, r3
  1833. 8000bb4: f002 fd12 bl 80035dc <HAL_GPIO_Init>
  1834. GPIO_InitStruct.Pin = PWM5_Pin;
  1835. 8000bb8: 0021 movs r1, r4
  1836. 8000bba: 187b adds r3, r7, r1
  1837. 8000bbc: 2208 movs r2, #8
  1838. 8000bbe: 601a str r2, [r3, #0]
  1839. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  1840. 8000bc0: 187b adds r3, r7, r1
  1841. 8000bc2: 2202 movs r2, #2
  1842. 8000bc4: 605a str r2, [r3, #4]
  1843. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1844. 8000bc6: 187b adds r3, r7, r1
  1845. 8000bc8: 2200 movs r2, #0
  1846. 8000bca: 609a str r2, [r3, #8]
  1847. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1848. 8000bcc: 187b adds r3, r7, r1
  1849. 8000bce: 2200 movs r2, #0
  1850. 8000bd0: 60da str r2, [r3, #12]
  1851. GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
  1852. 8000bd2: 187b adds r3, r7, r1
  1853. 8000bd4: 2201 movs r2, #1
  1854. 8000bd6: 611a str r2, [r3, #16]
  1855. HAL_GPIO_Init(PWM5_GPIO_Port, &GPIO_InitStruct);
  1856. 8000bd8: 187b adds r3, r7, r1
  1857. 8000bda: 4a1b ldr r2, [pc, #108] @ (8000c48 <HAL_TIM_MspPostInit+0x110>)
  1858. 8000bdc: 0019 movs r1, r3
  1859. 8000bde: 0010 movs r0, r2
  1860. 8000be0: f002 fcfc bl 80035dc <HAL_GPIO_Init>
  1861. /* USER CODE BEGIN TIM3_MspPostInit 1 */
  1862. /* USER CODE END TIM3_MspPostInit 1 */
  1863. }
  1864. }
  1865. 8000be4: e027 b.n 8000c36 <HAL_TIM_MspPostInit+0xfe>
  1866. else if(htim->Instance==TIM3)
  1867. 8000be6: 687b ldr r3, [r7, #4]
  1868. 8000be8: 681b ldr r3, [r3, #0]
  1869. 8000bea: 4a18 ldr r2, [pc, #96] @ (8000c4c <HAL_TIM_MspPostInit+0x114>)
  1870. 8000bec: 4293 cmp r3, r2
  1871. 8000bee: d122 bne.n 8000c36 <HAL_TIM_MspPostInit+0xfe>
  1872. __HAL_RCC_GPIOA_CLK_ENABLE();
  1873. 8000bf0: 4b14 ldr r3, [pc, #80] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1874. 8000bf2: 6b5a ldr r2, [r3, #52] @ 0x34
  1875. 8000bf4: 4b13 ldr r3, [pc, #76] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1876. 8000bf6: 2101 movs r1, #1
  1877. 8000bf8: 430a orrs r2, r1
  1878. 8000bfa: 635a str r2, [r3, #52] @ 0x34
  1879. 8000bfc: 4b11 ldr r3, [pc, #68] @ (8000c44 <HAL_TIM_MspPostInit+0x10c>)
  1880. 8000bfe: 6b5b ldr r3, [r3, #52] @ 0x34
  1881. 8000c00: 2201 movs r2, #1
  1882. 8000c02: 4013 ands r3, r2
  1883. 8000c04: 60bb str r3, [r7, #8]
  1884. 8000c06: 68bb ldr r3, [r7, #8]
  1885. GPIO_InitStruct.Pin = PWM1_Pin|PWM2_Pin;
  1886. 8000c08: 2114 movs r1, #20
  1887. 8000c0a: 187b adds r3, r7, r1
  1888. 8000c0c: 22c0 movs r2, #192 @ 0xc0
  1889. 8000c0e: 601a str r2, [r3, #0]
  1890. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  1891. 8000c10: 187b adds r3, r7, r1
  1892. 8000c12: 2202 movs r2, #2
  1893. 8000c14: 605a str r2, [r3, #4]
  1894. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1895. 8000c16: 187b adds r3, r7, r1
  1896. 8000c18: 2200 movs r2, #0
  1897. 8000c1a: 609a str r2, [r3, #8]
  1898. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1899. 8000c1c: 187b adds r3, r7, r1
  1900. 8000c1e: 2200 movs r2, #0
  1901. 8000c20: 60da str r2, [r3, #12]
  1902. GPIO_InitStruct.Alternate = GPIO_AF1_TIM3;
  1903. 8000c22: 187b adds r3, r7, r1
  1904. 8000c24: 2201 movs r2, #1
  1905. 8000c26: 611a str r2, [r3, #16]
  1906. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  1907. 8000c28: 187a adds r2, r7, r1
  1908. 8000c2a: 23a0 movs r3, #160 @ 0xa0
  1909. 8000c2c: 05db lsls r3, r3, #23
  1910. 8000c2e: 0011 movs r1, r2
  1911. 8000c30: 0018 movs r0, r3
  1912. 8000c32: f002 fcd3 bl 80035dc <HAL_GPIO_Init>
  1913. }
  1914. 8000c36: 46c0 nop @ (mov r8, r8)
  1915. 8000c38: 46bd mov sp, r7
  1916. 8000c3a: b00b add sp, #44 @ 0x2c
  1917. 8000c3c: bd90 pop {r4, r7, pc}
  1918. 8000c3e: 46c0 nop @ (mov r8, r8)
  1919. 8000c40: 40012c00 .word 0x40012c00
  1920. 8000c44: 40021000 .word 0x40021000
  1921. 8000c48: 50000400 .word 0x50000400
  1922. 8000c4c: 40000400 .word 0x40000400
  1923. 08000c50 <HAL_UART_MspInit>:
  1924. * This function configures the hardware resources used in this example
  1925. * @param huart: UART handle pointer
  1926. * @retval None
  1927. */
  1928. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  1929. {
  1930. 8000c50: b590 push {r4, r7, lr}
  1931. 8000c52: b08b sub sp, #44 @ 0x2c
  1932. 8000c54: af00 add r7, sp, #0
  1933. 8000c56: 6078 str r0, [r7, #4]
  1934. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1935. 8000c58: 2414 movs r4, #20
  1936. 8000c5a: 193b adds r3, r7, r4
  1937. 8000c5c: 0018 movs r0, r3
  1938. 8000c5e: 2314 movs r3, #20
  1939. 8000c60: 001a movs r2, r3
  1940. 8000c62: 2100 movs r1, #0
  1941. 8000c64: f005 f9bc bl 8005fe0 <memset>
  1942. if(huart->Instance==USART2)
  1943. 8000c68: 687b ldr r3, [r7, #4]
  1944. 8000c6a: 681b ldr r3, [r3, #0]
  1945. 8000c6c: 4a45 ldr r2, [pc, #276] @ (8000d84 <HAL_UART_MspInit+0x134>)
  1946. 8000c6e: 4293 cmp r3, r2
  1947. 8000c70: d000 beq.n 8000c74 <HAL_UART_MspInit+0x24>
  1948. 8000c72: e083 b.n 8000d7c <HAL_UART_MspInit+0x12c>
  1949. {
  1950. /* USER CODE BEGIN USART2_MspInit 0 */
  1951. /* USER CODE END USART2_MspInit 0 */
  1952. /* Peripheral clock enable */
  1953. __HAL_RCC_USART2_CLK_ENABLE();
  1954. 8000c74: 4b44 ldr r3, [pc, #272] @ (8000d88 <HAL_UART_MspInit+0x138>)
  1955. 8000c76: 6bda ldr r2, [r3, #60] @ 0x3c
  1956. 8000c78: 4b43 ldr r3, [pc, #268] @ (8000d88 <HAL_UART_MspInit+0x138>)
  1957. 8000c7a: 2180 movs r1, #128 @ 0x80
  1958. 8000c7c: 0289 lsls r1, r1, #10
  1959. 8000c7e: 430a orrs r2, r1
  1960. 8000c80: 63da str r2, [r3, #60] @ 0x3c
  1961. 8000c82: 4b41 ldr r3, [pc, #260] @ (8000d88 <HAL_UART_MspInit+0x138>)
  1962. 8000c84: 6bda ldr r2, [r3, #60] @ 0x3c
  1963. 8000c86: 2380 movs r3, #128 @ 0x80
  1964. 8000c88: 029b lsls r3, r3, #10
  1965. 8000c8a: 4013 ands r3, r2
  1966. 8000c8c: 613b str r3, [r7, #16]
  1967. 8000c8e: 693b ldr r3, [r7, #16]
  1968. __HAL_RCC_GPIOA_CLK_ENABLE();
  1969. 8000c90: 4b3d ldr r3, [pc, #244] @ (8000d88 <HAL_UART_MspInit+0x138>)
  1970. 8000c92: 6b5a ldr r2, [r3, #52] @ 0x34
  1971. 8000c94: 4b3c ldr r3, [pc, #240] @ (8000d88 <HAL_UART_MspInit+0x138>)
  1972. 8000c96: 2101 movs r1, #1
  1973. 8000c98: 430a orrs r2, r1
  1974. 8000c9a: 635a str r2, [r3, #52] @ 0x34
  1975. 8000c9c: 4b3a ldr r3, [pc, #232] @ (8000d88 <HAL_UART_MspInit+0x138>)
  1976. 8000c9e: 6b5b ldr r3, [r3, #52] @ 0x34
  1977. 8000ca0: 2201 movs r2, #1
  1978. 8000ca2: 4013 ands r3, r2
  1979. 8000ca4: 60fb str r3, [r7, #12]
  1980. 8000ca6: 68fb ldr r3, [r7, #12]
  1981. /**USART2 GPIO Configuration
  1982. PA2 ------> USART2_TX
  1983. PA3 ------> USART2_RX
  1984. */
  1985. GPIO_InitStruct.Pin = TX_Pin|RX_Pin;
  1986. 8000ca8: 0021 movs r1, r4
  1987. 8000caa: 187b adds r3, r7, r1
  1988. 8000cac: 220c movs r2, #12
  1989. 8000cae: 601a str r2, [r3, #0]
  1990. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  1991. 8000cb0: 187b adds r3, r7, r1
  1992. 8000cb2: 2202 movs r2, #2
  1993. 8000cb4: 605a str r2, [r3, #4]
  1994. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1995. 8000cb6: 187b adds r3, r7, r1
  1996. 8000cb8: 2200 movs r2, #0
  1997. 8000cba: 609a str r2, [r3, #8]
  1998. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1999. 8000cbc: 187b adds r3, r7, r1
  2000. 8000cbe: 2200 movs r2, #0
  2001. 8000cc0: 60da str r2, [r3, #12]
  2002. GPIO_InitStruct.Alternate = GPIO_AF1_USART2;
  2003. 8000cc2: 187b adds r3, r7, r1
  2004. 8000cc4: 2201 movs r2, #1
  2005. 8000cc6: 611a str r2, [r3, #16]
  2006. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  2007. 8000cc8: 187a adds r2, r7, r1
  2008. 8000cca: 23a0 movs r3, #160 @ 0xa0
  2009. 8000ccc: 05db lsls r3, r3, #23
  2010. 8000cce: 0011 movs r1, r2
  2011. 8000cd0: 0018 movs r0, r3
  2012. 8000cd2: f002 fc83 bl 80035dc <HAL_GPIO_Init>
  2013. /* USART2 DMA Init */
  2014. /* USART2_RX Init */
  2015. hdma_usart2_rx.Instance = DMA1_Channel4;
  2016. 8000cd6: 4b2d ldr r3, [pc, #180] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2017. 8000cd8: 4a2d ldr r2, [pc, #180] @ (8000d90 <HAL_UART_MspInit+0x140>)
  2018. 8000cda: 601a str r2, [r3, #0]
  2019. hdma_usart2_rx.Init.Request = DMA_REQUEST_USART2_RX;
  2020. 8000cdc: 4b2b ldr r3, [pc, #172] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2021. 8000cde: 2234 movs r2, #52 @ 0x34
  2022. 8000ce0: 605a str r2, [r3, #4]
  2023. hdma_usart2_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
  2024. 8000ce2: 4b2a ldr r3, [pc, #168] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2025. 8000ce4: 2200 movs r2, #0
  2026. 8000ce6: 609a str r2, [r3, #8]
  2027. hdma_usart2_rx.Init.PeriphInc = DMA_PINC_DISABLE;
  2028. 8000ce8: 4b28 ldr r3, [pc, #160] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2029. 8000cea: 2200 movs r2, #0
  2030. 8000cec: 60da str r2, [r3, #12]
  2031. hdma_usart2_rx.Init.MemInc = DMA_MINC_ENABLE;
  2032. 8000cee: 4b27 ldr r3, [pc, #156] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2033. 8000cf0: 2280 movs r2, #128 @ 0x80
  2034. 8000cf2: 611a str r2, [r3, #16]
  2035. hdma_usart2_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
  2036. 8000cf4: 4b25 ldr r3, [pc, #148] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2037. 8000cf6: 2200 movs r2, #0
  2038. 8000cf8: 615a str r2, [r3, #20]
  2039. hdma_usart2_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
  2040. 8000cfa: 4b24 ldr r3, [pc, #144] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2041. 8000cfc: 2200 movs r2, #0
  2042. 8000cfe: 619a str r2, [r3, #24]
  2043. hdma_usart2_rx.Init.Mode = DMA_CIRCULAR;
  2044. 8000d00: 4b22 ldr r3, [pc, #136] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2045. 8000d02: 2220 movs r2, #32
  2046. 8000d04: 61da str r2, [r3, #28]
  2047. hdma_usart2_rx.Init.Priority = DMA_PRIORITY_LOW;
  2048. 8000d06: 4b21 ldr r3, [pc, #132] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2049. 8000d08: 2200 movs r2, #0
  2050. 8000d0a: 621a str r2, [r3, #32]
  2051. if (HAL_DMA_Init(&hdma_usart2_rx) != HAL_OK)
  2052. 8000d0c: 4b1f ldr r3, [pc, #124] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2053. 8000d0e: 0018 movs r0, r3
  2054. 8000d10: f002 f800 bl 8002d14 <HAL_DMA_Init>
  2055. 8000d14: 1e03 subs r3, r0, #0
  2056. 8000d16: d001 beq.n 8000d1c <HAL_UART_MspInit+0xcc>
  2057. {
  2058. Error_Handler();
  2059. 8000d18: f7ff fd7e bl 8000818 <Error_Handler>
  2060. }
  2061. __HAL_LINKDMA(huart,hdmarx,hdma_usart2_rx);
  2062. 8000d1c: 687b ldr r3, [r7, #4]
  2063. 8000d1e: 2180 movs r1, #128 @ 0x80
  2064. 8000d20: 4a1a ldr r2, [pc, #104] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2065. 8000d22: 505a str r2, [r3, r1]
  2066. 8000d24: 4b19 ldr r3, [pc, #100] @ (8000d8c <HAL_UART_MspInit+0x13c>)
  2067. 8000d26: 687a ldr r2, [r7, #4]
  2068. 8000d28: 629a str r2, [r3, #40] @ 0x28
  2069. /* USART2_TX Init */
  2070. hdma_usart2_tx.Instance = DMA1_Channel5;
  2071. 8000d2a: 4b1a ldr r3, [pc, #104] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2072. 8000d2c: 4a1a ldr r2, [pc, #104] @ (8000d98 <HAL_UART_MspInit+0x148>)
  2073. 8000d2e: 601a str r2, [r3, #0]
  2074. hdma_usart2_tx.Init.Request = DMA_REQUEST_USART2_TX;
  2075. 8000d30: 4b18 ldr r3, [pc, #96] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2076. 8000d32: 2235 movs r2, #53 @ 0x35
  2077. 8000d34: 605a str r2, [r3, #4]
  2078. hdma_usart2_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
  2079. 8000d36: 4b17 ldr r3, [pc, #92] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2080. 8000d38: 2210 movs r2, #16
  2081. 8000d3a: 609a str r2, [r3, #8]
  2082. hdma_usart2_tx.Init.PeriphInc = DMA_PINC_DISABLE;
  2083. 8000d3c: 4b15 ldr r3, [pc, #84] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2084. 8000d3e: 2200 movs r2, #0
  2085. 8000d40: 60da str r2, [r3, #12]
  2086. hdma_usart2_tx.Init.MemInc = DMA_MINC_ENABLE;
  2087. 8000d42: 4b14 ldr r3, [pc, #80] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2088. 8000d44: 2280 movs r2, #128 @ 0x80
  2089. 8000d46: 611a str r2, [r3, #16]
  2090. hdma_usart2_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
  2091. 8000d48: 4b12 ldr r3, [pc, #72] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2092. 8000d4a: 2200 movs r2, #0
  2093. 8000d4c: 615a str r2, [r3, #20]
  2094. hdma_usart2_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
  2095. 8000d4e: 4b11 ldr r3, [pc, #68] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2096. 8000d50: 2200 movs r2, #0
  2097. 8000d52: 619a str r2, [r3, #24]
  2098. hdma_usart2_tx.Init.Mode = DMA_NORMAL;
  2099. 8000d54: 4b0f ldr r3, [pc, #60] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2100. 8000d56: 2200 movs r2, #0
  2101. 8000d58: 61da str r2, [r3, #28]
  2102. hdma_usart2_tx.Init.Priority = DMA_PRIORITY_LOW;
  2103. 8000d5a: 4b0e ldr r3, [pc, #56] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2104. 8000d5c: 2200 movs r2, #0
  2105. 8000d5e: 621a str r2, [r3, #32]
  2106. if (HAL_DMA_Init(&hdma_usart2_tx) != HAL_OK)
  2107. 8000d60: 4b0c ldr r3, [pc, #48] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2108. 8000d62: 0018 movs r0, r3
  2109. 8000d64: f001 ffd6 bl 8002d14 <HAL_DMA_Init>
  2110. 8000d68: 1e03 subs r3, r0, #0
  2111. 8000d6a: d001 beq.n 8000d70 <HAL_UART_MspInit+0x120>
  2112. {
  2113. Error_Handler();
  2114. 8000d6c: f7ff fd54 bl 8000818 <Error_Handler>
  2115. }
  2116. __HAL_LINKDMA(huart,hdmatx,hdma_usart2_tx);
  2117. 8000d70: 687b ldr r3, [r7, #4]
  2118. 8000d72: 4a08 ldr r2, [pc, #32] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2119. 8000d74: 67da str r2, [r3, #124] @ 0x7c
  2120. 8000d76: 4b07 ldr r3, [pc, #28] @ (8000d94 <HAL_UART_MspInit+0x144>)
  2121. 8000d78: 687a ldr r2, [r7, #4]
  2122. 8000d7a: 629a str r2, [r3, #40] @ 0x28
  2123. /* USER CODE BEGIN USART2_MspInit 1 */
  2124. /* USER CODE END USART2_MspInit 1 */
  2125. }
  2126. }
  2127. 8000d7c: 46c0 nop @ (mov r8, r8)
  2128. 8000d7e: 46bd mov sp, r7
  2129. 8000d80: b00b add sp, #44 @ 0x2c
  2130. 8000d82: bd90 pop {r4, r7, pc}
  2131. 8000d84: 40004400 .word 0x40004400
  2132. 8000d88: 40021000 .word 0x40021000
  2133. 8000d8c: 200003a0 .word 0x200003a0
  2134. 8000d90: 40020044 .word 0x40020044
  2135. 8000d94: 200003fc .word 0x200003fc
  2136. 8000d98: 40020058 .word 0x40020058
  2137. 08000d9c <NMI_Handler>:
  2138. /******************************************************************************/
  2139. /**
  2140. * @brief This function handles Non maskable interrupt.
  2141. */
  2142. void NMI_Handler(void)
  2143. {
  2144. 8000d9c: b580 push {r7, lr}
  2145. 8000d9e: af00 add r7, sp, #0
  2146. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  2147. /* USER CODE END NonMaskableInt_IRQn 0 */
  2148. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  2149. while (1)
  2150. 8000da0: 46c0 nop @ (mov r8, r8)
  2151. 8000da2: e7fd b.n 8000da0 <NMI_Handler+0x4>
  2152. 08000da4 <HardFault_Handler>:
  2153. /**
  2154. * @brief This function handles Hard fault interrupt.
  2155. */
  2156. void HardFault_Handler(void)
  2157. {
  2158. 8000da4: b580 push {r7, lr}
  2159. 8000da6: af00 add r7, sp, #0
  2160. /* USER CODE BEGIN HardFault_IRQn 0 */
  2161. /* USER CODE END HardFault_IRQn 0 */
  2162. while (1)
  2163. 8000da8: 46c0 nop @ (mov r8, r8)
  2164. 8000daa: e7fd b.n 8000da8 <HardFault_Handler+0x4>
  2165. 08000dac <SVC_Handler>:
  2166. /**
  2167. * @brief This function handles System service call via SWI instruction.
  2168. */
  2169. void SVC_Handler(void)
  2170. {
  2171. 8000dac: b580 push {r7, lr}
  2172. 8000dae: af00 add r7, sp, #0
  2173. /* USER CODE END SVC_IRQn 0 */
  2174. /* USER CODE BEGIN SVC_IRQn 1 */
  2175. /* USER CODE END SVC_IRQn 1 */
  2176. }
  2177. 8000db0: 46c0 nop @ (mov r8, r8)
  2178. 8000db2: 46bd mov sp, r7
  2179. 8000db4: bd80 pop {r7, pc}
  2180. 08000db6 <PendSV_Handler>:
  2181. /**
  2182. * @brief This function handles Pendable request for system service.
  2183. */
  2184. void PendSV_Handler(void)
  2185. {
  2186. 8000db6: b580 push {r7, lr}
  2187. 8000db8: af00 add r7, sp, #0
  2188. /* USER CODE END PendSV_IRQn 0 */
  2189. /* USER CODE BEGIN PendSV_IRQn 1 */
  2190. /* USER CODE END PendSV_IRQn 1 */
  2191. }
  2192. 8000dba: 46c0 nop @ (mov r8, r8)
  2193. 8000dbc: 46bd mov sp, r7
  2194. 8000dbe: bd80 pop {r7, pc}
  2195. 08000dc0 <SysTick_Handler>:
  2196. /**
  2197. * @brief This function handles System tick timer.
  2198. */
  2199. void SysTick_Handler(void)
  2200. {
  2201. 8000dc0: b580 push {r7, lr}
  2202. 8000dc2: af00 add r7, sp, #0
  2203. /* USER CODE BEGIN SysTick_IRQn 0 */
  2204. /* USER CODE END SysTick_IRQn 0 */
  2205. HAL_IncTick();
  2206. 8000dc4: f000 fd3e bl 8001844 <HAL_IncTick>
  2207. /* USER CODE BEGIN SysTick_IRQn 1 */
  2208. /* USER CODE END SysTick_IRQn 1 */
  2209. }
  2210. 8000dc8: 46c0 nop @ (mov r8, r8)
  2211. 8000dca: 46bd mov sp, r7
  2212. 8000dcc: bd80 pop {r7, pc}
  2213. ...
  2214. 08000dd0 <DMA1_Channel2_3_IRQHandler>:
  2215. /**
  2216. * @brief This function handles DMA1 channel 2 and channel 3 interrupts.
  2217. */
  2218. void DMA1_Channel2_3_IRQHandler(void)
  2219. {
  2220. 8000dd0: b580 push {r7, lr}
  2221. 8000dd2: af00 add r7, sp, #0
  2222. /* USER CODE BEGIN DMA1_Channel2_3_IRQn 0 */
  2223. /* USER CODE END DMA1_Channel2_3_IRQn 0 */
  2224. HAL_DMA_IRQHandler(&hdma_adc1);
  2225. 8000dd4: 4b03 ldr r3, [pc, #12] @ (8000de4 <DMA1_Channel2_3_IRQHandler+0x14>)
  2226. 8000dd6: 0018 movs r0, r3
  2227. 8000dd8: f002 f90e bl 8002ff8 <HAL_DMA_IRQHandler>
  2228. /* USER CODE BEGIN DMA1_Channel2_3_IRQn 1 */
  2229. /* USER CODE END DMA1_Channel2_3_IRQn 1 */
  2230. }
  2231. 8000ddc: 46c0 nop @ (mov r8, r8)
  2232. 8000dde: 46bd mov sp, r7
  2233. 8000de0: bd80 pop {r7, pc}
  2234. 8000de2: 46c0 nop @ (mov r8, r8)
  2235. 8000de4: 20000218 .word 0x20000218
  2236. 08000de8 <DMA1_Ch4_5_DMAMUX1_OVR_IRQHandler>:
  2237. /**
  2238. * @brief This function handles DMA1 channel 4, channel 5 and DMAMUX1 interrupts.
  2239. */
  2240. void DMA1_Ch4_5_DMAMUX1_OVR_IRQHandler(void)
  2241. {
  2242. 8000de8: b580 push {r7, lr}
  2243. 8000dea: af00 add r7, sp, #0
  2244. /* USER CODE BEGIN DMA1_Ch4_5_DMAMUX1_OVR_IRQn 0 */
  2245. /* USER CODE END DMA1_Ch4_5_DMAMUX1_OVR_IRQn 0 */
  2246. HAL_DMA_IRQHandler(&hdma_usart2_rx);
  2247. 8000dec: 4b05 ldr r3, [pc, #20] @ (8000e04 <DMA1_Ch4_5_DMAMUX1_OVR_IRQHandler+0x1c>)
  2248. 8000dee: 0018 movs r0, r3
  2249. 8000df0: f002 f902 bl 8002ff8 <HAL_DMA_IRQHandler>
  2250. HAL_DMA_IRQHandler(&hdma_usart2_tx);
  2251. 8000df4: 4b04 ldr r3, [pc, #16] @ (8000e08 <DMA1_Ch4_5_DMAMUX1_OVR_IRQHandler+0x20>)
  2252. 8000df6: 0018 movs r0, r3
  2253. 8000df8: f002 f8fe bl 8002ff8 <HAL_DMA_IRQHandler>
  2254. /* USER CODE BEGIN DMA1_Ch4_5_DMAMUX1_OVR_IRQn 1 */
  2255. /* USER CODE END DMA1_Ch4_5_DMAMUX1_OVR_IRQn 1 */
  2256. }
  2257. 8000dfc: 46c0 nop @ (mov r8, r8)
  2258. 8000dfe: 46bd mov sp, r7
  2259. 8000e00: bd80 pop {r7, pc}
  2260. 8000e02: 46c0 nop @ (mov r8, r8)
  2261. 8000e04: 200003a0 .word 0x200003a0
  2262. 8000e08: 200003fc .word 0x200003fc
  2263. 08000e0c <SystemInit>:
  2264. * @brief Setup the microcontroller system.
  2265. * @param None
  2266. * @retval None
  2267. */
  2268. void SystemInit(void)
  2269. {
  2270. 8000e0c: b580 push {r7, lr}
  2271. 8000e0e: af00 add r7, sp, #0
  2272. /* Configure the Vector Table location -------------------------------------*/
  2273. #if defined(USER_VECT_TAB_ADDRESS)
  2274. SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation */
  2275. #endif /* USER_VECT_TAB_ADDRESS */
  2276. }
  2277. 8000e10: 46c0 nop @ (mov r8, r8)
  2278. 8000e12: 46bd mov sp, r7
  2279. 8000e14: bd80 pop {r7, pc}
  2280. ...
  2281. 08000e18 <TICKS_TO_US>:
  2282. RC_RC_BatterySensorsFrame Frame;
  2283. RC_LinkStatistics LinkStatistics;
  2284. unsigned int Channals[16];
  2285. int TICKS_TO_US (int x)
  2286. {
  2287. 8000e18: b580 push {r7, lr}
  2288. 8000e1a: b082 sub sp, #8
  2289. 8000e1c: af00 add r7, sp, #0
  2290. 8000e1e: 6078 str r0, [r7, #4]
  2291. return ((x - 992) * 5 / 8 + 1500);
  2292. 8000e20: 687b ldr r3, [r7, #4]
  2293. 8000e22: 4a08 ldr r2, [pc, #32] @ (8000e44 <TICKS_TO_US+0x2c>)
  2294. 8000e24: 189a adds r2, r3, r2
  2295. 8000e26: 0013 movs r3, r2
  2296. 8000e28: 009b lsls r3, r3, #2
  2297. 8000e2a: 189b adds r3, r3, r2
  2298. 8000e2c: 2b00 cmp r3, #0
  2299. 8000e2e: da00 bge.n 8000e32 <TICKS_TO_US+0x1a>
  2300. 8000e30: 3307 adds r3, #7
  2301. 8000e32: 10db asrs r3, r3, #3
  2302. 8000e34: 4a04 ldr r2, [pc, #16] @ (8000e48 <TICKS_TO_US+0x30>)
  2303. 8000e36: 4694 mov ip, r2
  2304. 8000e38: 4463 add r3, ip
  2305. }
  2306. 8000e3a: 0018 movs r0, r3
  2307. 8000e3c: 46bd mov sp, r7
  2308. 8000e3e: b002 add sp, #8
  2309. 8000e40: bd80 pop {r7, pc}
  2310. 8000e42: 46c0 nop @ (mov r8, r8)
  2311. 8000e44: fffffc20 .word 0xfffffc20
  2312. 8000e48: 000005dc .word 0x000005dc
  2313. 08000e4c <crc8>:
  2314. 0xD6, 0x03, 0xA9, 0x7C, 0x28, 0xFD, 0x57, 0x82, 0xFF, 0x2A, 0x80, 0x55, 0x01, 0xD4, 0x7E, 0xAB,
  2315. 0x84, 0x51, 0xFB, 0x2E, 0x7A, 0xAF, 0x05, 0xD0, 0xAD, 0x78, 0xD2, 0x07, 0x53, 0x86, 0x2C, 0xF9};
  2316. uint8_t crc8(uint8_t * ptr, uint8_t len)
  2317. {
  2318. 8000e4c: b590 push {r4, r7, lr}
  2319. 8000e4e: b085 sub sp, #20
  2320. 8000e50: af00 add r7, sp, #0
  2321. 8000e52: 6078 str r0, [r7, #4]
  2322. 8000e54: 000a movs r2, r1
  2323. 8000e56: 1cfb adds r3, r7, #3
  2324. 8000e58: 701a strb r2, [r3, #0]
  2325. uint8_t crc = 0;
  2326. 8000e5a: 230f movs r3, #15
  2327. 8000e5c: 18fb adds r3, r7, r3
  2328. 8000e5e: 2200 movs r2, #0
  2329. 8000e60: 701a strb r2, [r3, #0]
  2330. for (uint8_t i=2; i<=len; i++)
  2331. 8000e62: 230e movs r3, #14
  2332. 8000e64: 18fb adds r3, r7, r3
  2333. 8000e66: 2202 movs r2, #2
  2334. 8000e68: 701a strb r2, [r3, #0]
  2335. 8000e6a: e014 b.n 8000e96 <crc8+0x4a>
  2336. crc = crc8tab[crc ^ ptr[i]];
  2337. 8000e6c: 200e movs r0, #14
  2338. 8000e6e: 183b adds r3, r7, r0
  2339. 8000e70: 781b ldrb r3, [r3, #0]
  2340. 8000e72: 687a ldr r2, [r7, #4]
  2341. 8000e74: 18d3 adds r3, r2, r3
  2342. 8000e76: 781a ldrb r2, [r3, #0]
  2343. 8000e78: 240f movs r4, #15
  2344. 8000e7a: 193b adds r3, r7, r4
  2345. 8000e7c: 781b ldrb r3, [r3, #0]
  2346. 8000e7e: 4053 eors r3, r2
  2347. 8000e80: b2db uxtb r3, r3
  2348. 8000e82: 0019 movs r1, r3
  2349. 8000e84: 193b adds r3, r7, r4
  2350. 8000e86: 4a0b ldr r2, [pc, #44] @ (8000eb4 <crc8+0x68>)
  2351. 8000e88: 5c52 ldrb r2, [r2, r1]
  2352. 8000e8a: 701a strb r2, [r3, #0]
  2353. for (uint8_t i=2; i<=len; i++)
  2354. 8000e8c: 183b adds r3, r7, r0
  2355. 8000e8e: 781a ldrb r2, [r3, #0]
  2356. 8000e90: 183b adds r3, r7, r0
  2357. 8000e92: 3201 adds r2, #1
  2358. 8000e94: 701a strb r2, [r3, #0]
  2359. 8000e96: 230e movs r3, #14
  2360. 8000e98: 18fa adds r2, r7, r3
  2361. 8000e9a: 1cfb adds r3, r7, #3
  2362. 8000e9c: 7812 ldrb r2, [r2, #0]
  2363. 8000e9e: 781b ldrb r3, [r3, #0]
  2364. 8000ea0: 429a cmp r2, r3
  2365. 8000ea2: d9e3 bls.n 8000e6c <crc8+0x20>
  2366. return crc;
  2367. 8000ea4: 230f movs r3, #15
  2368. 8000ea6: 18fb adds r3, r7, r3
  2369. 8000ea8: 781b ldrb r3, [r3, #0]
  2370. }
  2371. 8000eaa: 0018 movs r0, r3
  2372. 8000eac: 46bd mov sp, r7
  2373. 8000eae: b005 add sp, #20
  2374. 8000eb0: bd90 pop {r4, r7, pc}
  2375. 8000eb2: 46c0 nop @ (mov r8, r8)
  2376. 8000eb4: 20000004 .word 0x20000004
  2377. 08000eb8 <processLink_Statistics>:
  2378. void processLink_Statistics()
  2379. {
  2380. 8000eb8: b580 push {r7, lr}
  2381. 8000eba: b082 sub sp, #8
  2382. 8000ebc: af00 add r7, sp, #0
  2383. RC_LinkStatistics *ls = (RC_LinkStatistics *)&RxBuf[3];
  2384. 8000ebe: 4b18 ldr r3, [pc, #96] @ (8000f20 <processLink_Statistics+0x68>)
  2385. 8000ec0: 607b str r3, [r7, #4]
  2386. LinkStatistics.up_rssi_ant1 = ls->up_rssi_ant1;
  2387. 8000ec2: 687b ldr r3, [r7, #4]
  2388. 8000ec4: 781a ldrb r2, [r3, #0]
  2389. 8000ec6: 4b17 ldr r3, [pc, #92] @ (8000f24 <processLink_Statistics+0x6c>)
  2390. 8000ec8: 701a strb r2, [r3, #0]
  2391. LinkStatistics.up_rssi_ant2 = ls->up_rssi_ant2;
  2392. 8000eca: 687b ldr r3, [r7, #4]
  2393. 8000ecc: 785a ldrb r2, [r3, #1]
  2394. 8000ece: 4b15 ldr r3, [pc, #84] @ (8000f24 <processLink_Statistics+0x6c>)
  2395. 8000ed0: 705a strb r2, [r3, #1]
  2396. LinkStatistics.up_link_quality = ls->up_link_quality;
  2397. 8000ed2: 687b ldr r3, [r7, #4]
  2398. 8000ed4: 789a ldrb r2, [r3, #2]
  2399. 8000ed6: 4b13 ldr r3, [pc, #76] @ (8000f24 <processLink_Statistics+0x6c>)
  2400. 8000ed8: 709a strb r2, [r3, #2]
  2401. LinkStatistics.up_snr = ls->up_snr;
  2402. 8000eda: 687b ldr r3, [r7, #4]
  2403. 8000edc: 2203 movs r2, #3
  2404. 8000ede: 569a ldrsb r2, [r3, r2]
  2405. 8000ee0: 4b10 ldr r3, [pc, #64] @ (8000f24 <processLink_Statistics+0x6c>)
  2406. 8000ee2: 70da strb r2, [r3, #3]
  2407. LinkStatistics.active_antenna = ls->active_antenna;
  2408. 8000ee4: 687b ldr r3, [r7, #4]
  2409. 8000ee6: 791a ldrb r2, [r3, #4]
  2410. 8000ee8: 4b0e ldr r3, [pc, #56] @ (8000f24 <processLink_Statistics+0x6c>)
  2411. 8000eea: 711a strb r2, [r3, #4]
  2412. LinkStatistics.rf_profile = ls->rf_profile;
  2413. 8000eec: 687b ldr r3, [r7, #4]
  2414. 8000eee: 795a ldrb r2, [r3, #5]
  2415. 8000ef0: 4b0c ldr r3, [pc, #48] @ (8000f24 <processLink_Statistics+0x6c>)
  2416. 8000ef2: 715a strb r2, [r3, #5]
  2417. LinkStatistics.up_rf_power = ls->up_rf_power;
  2418. 8000ef4: 687b ldr r3, [r7, #4]
  2419. 8000ef6: 799a ldrb r2, [r3, #6]
  2420. 8000ef8: 4b0a ldr r3, [pc, #40] @ (8000f24 <processLink_Statistics+0x6c>)
  2421. 8000efa: 719a strb r2, [r3, #6]
  2422. LinkStatistics.down_rssi = ls->down_rssi;
  2423. 8000efc: 687b ldr r3, [r7, #4]
  2424. 8000efe: 79da ldrb r2, [r3, #7]
  2425. 8000f00: 4b08 ldr r3, [pc, #32] @ (8000f24 <processLink_Statistics+0x6c>)
  2426. 8000f02: 71da strb r2, [r3, #7]
  2427. LinkStatistics.down_link_quality = ls->down_link_quality;
  2428. 8000f04: 687b ldr r3, [r7, #4]
  2429. 8000f06: 7a1a ldrb r2, [r3, #8]
  2430. 8000f08: 4b06 ldr r3, [pc, #24] @ (8000f24 <processLink_Statistics+0x6c>)
  2431. 8000f0a: 721a strb r2, [r3, #8]
  2432. LinkStatistics.down_snr = ls->down_snr;
  2433. 8000f0c: 687b ldr r3, [r7, #4]
  2434. 8000f0e: 2209 movs r2, #9
  2435. 8000f10: 569a ldrsb r2, [r3, r2]
  2436. 8000f12: 4b04 ldr r3, [pc, #16] @ (8000f24 <processLink_Statistics+0x6c>)
  2437. 8000f14: 725a strb r2, [r3, #9]
  2438. }
  2439. 8000f16: 46c0 nop @ (mov r8, r8)
  2440. 8000f18: 46bd mov sp, r7
  2441. 8000f1a: b002 add sp, #8
  2442. 8000f1c: bd80 pop {r7, pc}
  2443. 8000f1e: 46c0 nop @ (mov r8, r8)
  2444. 8000f20: 20000473 .word 0x20000473
  2445. 8000f24: 200004c0 .word 0x200004c0
  2446. 08000f28 <processLink_RC_Channels>:
  2447. void processLink_RC_Channels()
  2448. {
  2449. 8000f28: b580 push {r7, lr}
  2450. 8000f2a: b082 sub sp, #8
  2451. 8000f2c: af00 add r7, sp, #0
  2452. RC_Channels *ch = (RC_Channels *)&RxBuf[3];
  2453. 8000f2e: 4b8d ldr r3, [pc, #564] @ (8001164 <processLink_RC_Channels+0x23c>)
  2454. 8000f30: 607b str r3, [r7, #4]
  2455. Channals[0] = TICKS_TO_US(ch->channel_01);
  2456. 8000f32: 687b ldr r3, [r7, #4]
  2457. 8000f34: 781a ldrb r2, [r3, #0]
  2458. 8000f36: 785b ldrb r3, [r3, #1]
  2459. 8000f38: 2107 movs r1, #7
  2460. 8000f3a: 400b ands r3, r1
  2461. 8000f3c: 021b lsls r3, r3, #8
  2462. 8000f3e: 4313 orrs r3, r2
  2463. 8000f40: b29b uxth r3, r3
  2464. 8000f42: 0018 movs r0, r3
  2465. 8000f44: f7ff ff68 bl 8000e18 <TICKS_TO_US>
  2466. 8000f48: 0003 movs r3, r0
  2467. 8000f4a: 001a movs r2, r3
  2468. 8000f4c: 4b86 ldr r3, [pc, #536] @ (8001168 <processLink_RC_Channels+0x240>)
  2469. 8000f4e: 601a str r2, [r3, #0]
  2470. Channals[1] = TICKS_TO_US(ch->channel_02);
  2471. 8000f50: 687b ldr r3, [r7, #4]
  2472. 8000f52: 785a ldrb r2, [r3, #1]
  2473. 8000f54: 08d2 lsrs r2, r2, #3
  2474. 8000f56: b2d2 uxtb r2, r2
  2475. 8000f58: 789b ldrb r3, [r3, #2]
  2476. 8000f5a: 213f movs r1, #63 @ 0x3f
  2477. 8000f5c: 400b ands r3, r1
  2478. 8000f5e: 015b lsls r3, r3, #5
  2479. 8000f60: 4313 orrs r3, r2
  2480. 8000f62: b29b uxth r3, r3
  2481. 8000f64: 0018 movs r0, r3
  2482. 8000f66: f7ff ff57 bl 8000e18 <TICKS_TO_US>
  2483. 8000f6a: 0003 movs r3, r0
  2484. 8000f6c: 001a movs r2, r3
  2485. 8000f6e: 4b7e ldr r3, [pc, #504] @ (8001168 <processLink_RC_Channels+0x240>)
  2486. 8000f70: 605a str r2, [r3, #4]
  2487. Channals[2] = TICKS_TO_US(ch->channel_03);
  2488. 8000f72: 687b ldr r3, [r7, #4]
  2489. 8000f74: 789a ldrb r2, [r3, #2]
  2490. 8000f76: 0992 lsrs r2, r2, #6
  2491. 8000f78: b2d2 uxtb r2, r2
  2492. 8000f7a: 78d9 ldrb r1, [r3, #3]
  2493. 8000f7c: 0089 lsls r1, r1, #2
  2494. 8000f7e: 430a orrs r2, r1
  2495. 8000f80: 791b ldrb r3, [r3, #4]
  2496. 8000f82: 2101 movs r1, #1
  2497. 8000f84: 400b ands r3, r1
  2498. 8000f86: 029b lsls r3, r3, #10
  2499. 8000f88: 4313 orrs r3, r2
  2500. 8000f8a: b29b uxth r3, r3
  2501. 8000f8c: 0018 movs r0, r3
  2502. 8000f8e: f7ff ff43 bl 8000e18 <TICKS_TO_US>
  2503. 8000f92: 0003 movs r3, r0
  2504. 8000f94: 001a movs r2, r3
  2505. 8000f96: 4b74 ldr r3, [pc, #464] @ (8001168 <processLink_RC_Channels+0x240>)
  2506. 8000f98: 609a str r2, [r3, #8]
  2507. Channals[3] = TICKS_TO_US(ch->channel_04);
  2508. 8000f9a: 687b ldr r3, [r7, #4]
  2509. 8000f9c: 791a ldrb r2, [r3, #4]
  2510. 8000f9e: 0852 lsrs r2, r2, #1
  2511. 8000fa0: b2d2 uxtb r2, r2
  2512. 8000fa2: 795b ldrb r3, [r3, #5]
  2513. 8000fa4: 210f movs r1, #15
  2514. 8000fa6: 400b ands r3, r1
  2515. 8000fa8: 01db lsls r3, r3, #7
  2516. 8000faa: 4313 orrs r3, r2
  2517. 8000fac: b29b uxth r3, r3
  2518. 8000fae: 0018 movs r0, r3
  2519. 8000fb0: f7ff ff32 bl 8000e18 <TICKS_TO_US>
  2520. 8000fb4: 0003 movs r3, r0
  2521. 8000fb6: 001a movs r2, r3
  2522. 8000fb8: 4b6b ldr r3, [pc, #428] @ (8001168 <processLink_RC_Channels+0x240>)
  2523. 8000fba: 60da str r2, [r3, #12]
  2524. Channals[4] = TICKS_TO_US(ch->channel_05);
  2525. 8000fbc: 687b ldr r3, [r7, #4]
  2526. 8000fbe: 795a ldrb r2, [r3, #5]
  2527. 8000fc0: 0912 lsrs r2, r2, #4
  2528. 8000fc2: b2d2 uxtb r2, r2
  2529. 8000fc4: 799b ldrb r3, [r3, #6]
  2530. 8000fc6: 217f movs r1, #127 @ 0x7f
  2531. 8000fc8: 400b ands r3, r1
  2532. 8000fca: 011b lsls r3, r3, #4
  2533. 8000fcc: 4313 orrs r3, r2
  2534. 8000fce: b29b uxth r3, r3
  2535. 8000fd0: 0018 movs r0, r3
  2536. 8000fd2: f7ff ff21 bl 8000e18 <TICKS_TO_US>
  2537. 8000fd6: 0003 movs r3, r0
  2538. 8000fd8: 001a movs r2, r3
  2539. 8000fda: 4b63 ldr r3, [pc, #396] @ (8001168 <processLink_RC_Channels+0x240>)
  2540. 8000fdc: 611a str r2, [r3, #16]
  2541. Channals[5] = TICKS_TO_US(ch->channel_06);
  2542. 8000fde: 687b ldr r3, [r7, #4]
  2543. 8000fe0: 799a ldrb r2, [r3, #6]
  2544. 8000fe2: 09d2 lsrs r2, r2, #7
  2545. 8000fe4: b2d2 uxtb r2, r2
  2546. 8000fe6: 79d9 ldrb r1, [r3, #7]
  2547. 8000fe8: 0049 lsls r1, r1, #1
  2548. 8000fea: 430a orrs r2, r1
  2549. 8000fec: 7a1b ldrb r3, [r3, #8]
  2550. 8000fee: 2103 movs r1, #3
  2551. 8000ff0: 400b ands r3, r1
  2552. 8000ff2: 025b lsls r3, r3, #9
  2553. 8000ff4: 4313 orrs r3, r2
  2554. 8000ff6: b29b uxth r3, r3
  2555. 8000ff8: 0018 movs r0, r3
  2556. 8000ffa: f7ff ff0d bl 8000e18 <TICKS_TO_US>
  2557. 8000ffe: 0003 movs r3, r0
  2558. 8001000: 001a movs r2, r3
  2559. 8001002: 4b59 ldr r3, [pc, #356] @ (8001168 <processLink_RC_Channels+0x240>)
  2560. 8001004: 615a str r2, [r3, #20]
  2561. Channals[6] = TICKS_TO_US(ch->channel_07);
  2562. 8001006: 687b ldr r3, [r7, #4]
  2563. 8001008: 7a1a ldrb r2, [r3, #8]
  2564. 800100a: 0892 lsrs r2, r2, #2
  2565. 800100c: b2d2 uxtb r2, r2
  2566. 800100e: 7a5b ldrb r3, [r3, #9]
  2567. 8001010: 211f movs r1, #31
  2568. 8001012: 400b ands r3, r1
  2569. 8001014: 019b lsls r3, r3, #6
  2570. 8001016: 4313 orrs r3, r2
  2571. 8001018: b29b uxth r3, r3
  2572. 800101a: 0018 movs r0, r3
  2573. 800101c: f7ff fefc bl 8000e18 <TICKS_TO_US>
  2574. 8001020: 0003 movs r3, r0
  2575. 8001022: 001a movs r2, r3
  2576. 8001024: 4b50 ldr r3, [pc, #320] @ (8001168 <processLink_RC_Channels+0x240>)
  2577. 8001026: 619a str r2, [r3, #24]
  2578. Channals[7] = TICKS_TO_US(ch->channel_08);
  2579. 8001028: 687b ldr r3, [r7, #4]
  2580. 800102a: 7a5a ldrb r2, [r3, #9]
  2581. 800102c: 0952 lsrs r2, r2, #5
  2582. 800102e: b2d2 uxtb r2, r2
  2583. 8001030: 7a9b ldrb r3, [r3, #10]
  2584. 8001032: 00db lsls r3, r3, #3
  2585. 8001034: 4313 orrs r3, r2
  2586. 8001036: b29b uxth r3, r3
  2587. 8001038: 0018 movs r0, r3
  2588. 800103a: f7ff feed bl 8000e18 <TICKS_TO_US>
  2589. 800103e: 0003 movs r3, r0
  2590. 8001040: 001a movs r2, r3
  2591. 8001042: 4b49 ldr r3, [pc, #292] @ (8001168 <processLink_RC_Channels+0x240>)
  2592. 8001044: 61da str r2, [r3, #28]
  2593. Channals[8] = TICKS_TO_US(ch->channel_09);
  2594. 8001046: 687b ldr r3, [r7, #4]
  2595. 8001048: 7ada ldrb r2, [r3, #11]
  2596. 800104a: 7b1b ldrb r3, [r3, #12]
  2597. 800104c: 2107 movs r1, #7
  2598. 800104e: 400b ands r3, r1
  2599. 8001050: 021b lsls r3, r3, #8
  2600. 8001052: 4313 orrs r3, r2
  2601. 8001054: b29b uxth r3, r3
  2602. 8001056: 0018 movs r0, r3
  2603. 8001058: f7ff fede bl 8000e18 <TICKS_TO_US>
  2604. 800105c: 0003 movs r3, r0
  2605. 800105e: 001a movs r2, r3
  2606. 8001060: 4b41 ldr r3, [pc, #260] @ (8001168 <processLink_RC_Channels+0x240>)
  2607. 8001062: 621a str r2, [r3, #32]
  2608. Channals[9] = TICKS_TO_US(ch->channel_10);
  2609. 8001064: 687b ldr r3, [r7, #4]
  2610. 8001066: 7b1a ldrb r2, [r3, #12]
  2611. 8001068: 08d2 lsrs r2, r2, #3
  2612. 800106a: b2d2 uxtb r2, r2
  2613. 800106c: 7b5b ldrb r3, [r3, #13]
  2614. 800106e: 213f movs r1, #63 @ 0x3f
  2615. 8001070: 400b ands r3, r1
  2616. 8001072: 015b lsls r3, r3, #5
  2617. 8001074: 4313 orrs r3, r2
  2618. 8001076: b29b uxth r3, r3
  2619. 8001078: 0018 movs r0, r3
  2620. 800107a: f7ff fecd bl 8000e18 <TICKS_TO_US>
  2621. 800107e: 0003 movs r3, r0
  2622. 8001080: 001a movs r2, r3
  2623. 8001082: 4b39 ldr r3, [pc, #228] @ (8001168 <processLink_RC_Channels+0x240>)
  2624. 8001084: 625a str r2, [r3, #36] @ 0x24
  2625. Channals[10] = TICKS_TO_US(ch->channel_11);
  2626. 8001086: 687b ldr r3, [r7, #4]
  2627. 8001088: 7b5a ldrb r2, [r3, #13]
  2628. 800108a: 0992 lsrs r2, r2, #6
  2629. 800108c: b2d2 uxtb r2, r2
  2630. 800108e: 7b99 ldrb r1, [r3, #14]
  2631. 8001090: 0089 lsls r1, r1, #2
  2632. 8001092: 430a orrs r2, r1
  2633. 8001094: 7bdb ldrb r3, [r3, #15]
  2634. 8001096: 2101 movs r1, #1
  2635. 8001098: 400b ands r3, r1
  2636. 800109a: 029b lsls r3, r3, #10
  2637. 800109c: 4313 orrs r3, r2
  2638. 800109e: b29b uxth r3, r3
  2639. 80010a0: 0018 movs r0, r3
  2640. 80010a2: f7ff feb9 bl 8000e18 <TICKS_TO_US>
  2641. 80010a6: 0003 movs r3, r0
  2642. 80010a8: 001a movs r2, r3
  2643. 80010aa: 4b2f ldr r3, [pc, #188] @ (8001168 <processLink_RC_Channels+0x240>)
  2644. 80010ac: 629a str r2, [r3, #40] @ 0x28
  2645. Channals[11] = TICKS_TO_US(ch->channel_12);
  2646. 80010ae: 687b ldr r3, [r7, #4]
  2647. 80010b0: 7bda ldrb r2, [r3, #15]
  2648. 80010b2: 0852 lsrs r2, r2, #1
  2649. 80010b4: b2d2 uxtb r2, r2
  2650. 80010b6: 7c1b ldrb r3, [r3, #16]
  2651. 80010b8: 210f movs r1, #15
  2652. 80010ba: 400b ands r3, r1
  2653. 80010bc: 01db lsls r3, r3, #7
  2654. 80010be: 4313 orrs r3, r2
  2655. 80010c0: b29b uxth r3, r3
  2656. 80010c2: 0018 movs r0, r3
  2657. 80010c4: f7ff fea8 bl 8000e18 <TICKS_TO_US>
  2658. 80010c8: 0003 movs r3, r0
  2659. 80010ca: 001a movs r2, r3
  2660. 80010cc: 4b26 ldr r3, [pc, #152] @ (8001168 <processLink_RC_Channels+0x240>)
  2661. 80010ce: 62da str r2, [r3, #44] @ 0x2c
  2662. Channals[12] = TICKS_TO_US(ch->channel_13);
  2663. 80010d0: 687b ldr r3, [r7, #4]
  2664. 80010d2: 7c1a ldrb r2, [r3, #16]
  2665. 80010d4: 0912 lsrs r2, r2, #4
  2666. 80010d6: b2d2 uxtb r2, r2
  2667. 80010d8: 7c5b ldrb r3, [r3, #17]
  2668. 80010da: 217f movs r1, #127 @ 0x7f
  2669. 80010dc: 400b ands r3, r1
  2670. 80010de: 011b lsls r3, r3, #4
  2671. 80010e0: 4313 orrs r3, r2
  2672. 80010e2: b29b uxth r3, r3
  2673. 80010e4: 0018 movs r0, r3
  2674. 80010e6: f7ff fe97 bl 8000e18 <TICKS_TO_US>
  2675. 80010ea: 0003 movs r3, r0
  2676. 80010ec: 001a movs r2, r3
  2677. 80010ee: 4b1e ldr r3, [pc, #120] @ (8001168 <processLink_RC_Channels+0x240>)
  2678. 80010f0: 631a str r2, [r3, #48] @ 0x30
  2679. Channals[13] = TICKS_TO_US(ch->channel_14);
  2680. 80010f2: 687b ldr r3, [r7, #4]
  2681. 80010f4: 7c5a ldrb r2, [r3, #17]
  2682. 80010f6: 09d2 lsrs r2, r2, #7
  2683. 80010f8: b2d2 uxtb r2, r2
  2684. 80010fa: 7c99 ldrb r1, [r3, #18]
  2685. 80010fc: 0049 lsls r1, r1, #1
  2686. 80010fe: 430a orrs r2, r1
  2687. 8001100: 7cdb ldrb r3, [r3, #19]
  2688. 8001102: 2103 movs r1, #3
  2689. 8001104: 400b ands r3, r1
  2690. 8001106: 025b lsls r3, r3, #9
  2691. 8001108: 4313 orrs r3, r2
  2692. 800110a: b29b uxth r3, r3
  2693. 800110c: 0018 movs r0, r3
  2694. 800110e: f7ff fe83 bl 8000e18 <TICKS_TO_US>
  2695. 8001112: 0003 movs r3, r0
  2696. 8001114: 001a movs r2, r3
  2697. 8001116: 4b14 ldr r3, [pc, #80] @ (8001168 <processLink_RC_Channels+0x240>)
  2698. 8001118: 635a str r2, [r3, #52] @ 0x34
  2699. Channals[14] = TICKS_TO_US(ch->channel_15);
  2700. 800111a: 687b ldr r3, [r7, #4]
  2701. 800111c: 7cda ldrb r2, [r3, #19]
  2702. 800111e: 0892 lsrs r2, r2, #2
  2703. 8001120: b2d2 uxtb r2, r2
  2704. 8001122: 7d1b ldrb r3, [r3, #20]
  2705. 8001124: 211f movs r1, #31
  2706. 8001126: 400b ands r3, r1
  2707. 8001128: 019b lsls r3, r3, #6
  2708. 800112a: 4313 orrs r3, r2
  2709. 800112c: b29b uxth r3, r3
  2710. 800112e: 0018 movs r0, r3
  2711. 8001130: f7ff fe72 bl 8000e18 <TICKS_TO_US>
  2712. 8001134: 0003 movs r3, r0
  2713. 8001136: 001a movs r2, r3
  2714. 8001138: 4b0b ldr r3, [pc, #44] @ (8001168 <processLink_RC_Channels+0x240>)
  2715. 800113a: 639a str r2, [r3, #56] @ 0x38
  2716. Channals[15] = TICKS_TO_US(ch->channel_16);
  2717. 800113c: 687b ldr r3, [r7, #4]
  2718. 800113e: 7d1a ldrb r2, [r3, #20]
  2719. 8001140: 0952 lsrs r2, r2, #5
  2720. 8001142: b2d2 uxtb r2, r2
  2721. 8001144: 7d5b ldrb r3, [r3, #21]
  2722. 8001146: 00db lsls r3, r3, #3
  2723. 8001148: 4313 orrs r3, r2
  2724. 800114a: b29b uxth r3, r3
  2725. 800114c: 0018 movs r0, r3
  2726. 800114e: f7ff fe63 bl 8000e18 <TICKS_TO_US>
  2727. 8001152: 0003 movs r3, r0
  2728. 8001154: 001a movs r2, r3
  2729. 8001156: 4b04 ldr r3, [pc, #16] @ (8001168 <processLink_RC_Channels+0x240>)
  2730. 8001158: 63da str r2, [r3, #60] @ 0x3c
  2731. }
  2732. 800115a: 46c0 nop @ (mov r8, r8)
  2733. 800115c: 46bd mov sp, r7
  2734. 800115e: b002 add sp, #8
  2735. 8001160: bd80 pop {r7, pc}
  2736. 8001162: 46c0 nop @ (mov r8, r8)
  2737. 8001164: 20000473 .word 0x20000473
  2738. 8001168: 200004cc .word 0x200004cc
  2739. 0800116c <checkValidPakage>:
  2740. void checkValidPakage()
  2741. {
  2742. 800116c: b590 push {r4, r7, lr}
  2743. 800116e: b083 sub sp, #12
  2744. 8001170: af00 add r7, sp, #0
  2745. uint8_t crc;
  2746. uint8_t crc_frame;
  2747. if (RxBufPos > 5) {
  2748. 8001172: 4b1c ldr r3, [pc, #112] @ (80011e4 <checkValidPakage+0x78>)
  2749. 8001174: 781b ldrb r3, [r3, #0]
  2750. 8001176: 2b05 cmp r3, #5
  2751. 8001178: d930 bls.n 80011dc <checkValidPakage+0x70>
  2752. if (RxBuf[0] == SYNC_BYTE) {
  2753. 800117a: 4b1b ldr r3, [pc, #108] @ (80011e8 <checkValidPakage+0x7c>)
  2754. 800117c: 781b ldrb r3, [r3, #0]
  2755. 800117e: 2bc8 cmp r3, #200 @ 0xc8
  2756. 8001180: d12c bne.n 80011dc <checkValidPakage+0x70>
  2757. if (RxBuf[FRAME_LENGTH_BYTE]+2 == RxBufPos) {
  2758. 8001182: 4b19 ldr r3, [pc, #100] @ (80011e8 <checkValidPakage+0x7c>)
  2759. 8001184: 785b ldrb r3, [r3, #1]
  2760. 8001186: 3302 adds r3, #2
  2761. 8001188: 4a16 ldr r2, [pc, #88] @ (80011e4 <checkValidPakage+0x78>)
  2762. 800118a: 7812 ldrb r2, [r2, #0]
  2763. 800118c: 4293 cmp r3, r2
  2764. 800118e: d125 bne.n 80011dc <checkValidPakage+0x70>
  2765. crc = crc8((uint8_t * )&RxBuf, RxBuf[FRAME_LENGTH_BYTE]);
  2766. 8001190: 4b15 ldr r3, [pc, #84] @ (80011e8 <checkValidPakage+0x7c>)
  2767. 8001192: 785a ldrb r2, [r3, #1]
  2768. 8001194: 1dfc adds r4, r7, #7
  2769. 8001196: 4b14 ldr r3, [pc, #80] @ (80011e8 <checkValidPakage+0x7c>)
  2770. 8001198: 0011 movs r1, r2
  2771. 800119a: 0018 movs r0, r3
  2772. 800119c: f7ff fe56 bl 8000e4c <crc8>
  2773. 80011a0: 0003 movs r3, r0
  2774. 80011a2: 7023 strb r3, [r4, #0]
  2775. crc_frame = RxBuf[RxBufPos-1];
  2776. 80011a4: 4b0f ldr r3, [pc, #60] @ (80011e4 <checkValidPakage+0x78>)
  2777. 80011a6: 781b ldrb r3, [r3, #0]
  2778. 80011a8: 1e5a subs r2, r3, #1
  2779. 80011aa: 1dbb adds r3, r7, #6
  2780. 80011ac: 490e ldr r1, [pc, #56] @ (80011e8 <checkValidPakage+0x7c>)
  2781. 80011ae: 5c8a ldrb r2, [r1, r2]
  2782. 80011b0: 701a strb r2, [r3, #0]
  2783. if (crc == crc_frame) {
  2784. 80011b2: 1dfa adds r2, r7, #7
  2785. 80011b4: 1dbb adds r3, r7, #6
  2786. 80011b6: 7812 ldrb r2, [r2, #0]
  2787. 80011b8: 781b ldrb r3, [r3, #0]
  2788. 80011ba: 429a cmp r2, r3
  2789. 80011bc: d10e bne.n 80011dc <checkValidPakage+0x70>
  2790. // Process Pakage
  2791. if (RxBuf[FRAME_TYPE_BYTE] == FRAME_TYPE_Link_Statistics) {
  2792. 80011be: 4b0a ldr r3, [pc, #40] @ (80011e8 <checkValidPakage+0x7c>)
  2793. 80011c0: 789b ldrb r3, [r3, #2]
  2794. 80011c2: 2b14 cmp r3, #20
  2795. 80011c4: d101 bne.n 80011ca <checkValidPakage+0x5e>
  2796. processLink_Statistics();
  2797. 80011c6: f7ff fe77 bl 8000eb8 <processLink_Statistics>
  2798. }
  2799. if (RxBuf[FRAME_TYPE_BYTE] == FRAME_TYPE_RC_Channels) {
  2800. 80011ca: 4b07 ldr r3, [pc, #28] @ (80011e8 <checkValidPakage+0x7c>)
  2801. 80011cc: 789b ldrb r3, [r3, #2]
  2802. 80011ce: 2b16 cmp r3, #22
  2803. 80011d0: d101 bne.n 80011d6 <checkValidPakage+0x6a>
  2804. processLink_RC_Channels();
  2805. 80011d2: f7ff fea9 bl 8000f28 <processLink_RC_Channels>
  2806. }
  2807. // Reset Buffer
  2808. RxBufPos = 0;
  2809. 80011d6: 4b03 ldr r3, [pc, #12] @ (80011e4 <checkValidPakage+0x78>)
  2810. 80011d8: 2200 movs r2, #0
  2811. 80011da: 701a strb r2, [r3, #0]
  2812. }
  2813. }
  2814. } else {
  2815. //ErrorPakageCounter++;
  2816. }
  2817. }
  2818. 80011dc: 46c0 nop @ (mov r8, r8)
  2819. 80011de: 46bd mov sp, r7
  2820. 80011e0: b003 add sp, #12
  2821. 80011e2: bd90 pop {r4, r7, pc}
  2822. 80011e4: 200004b0 .word 0x200004b0
  2823. 80011e8: 20000470 .word 0x20000470
  2824. 080011ec <HAL_UARTEx_RxEventCallback>:
  2825. uint8_t UART_Counter = 0;
  2826. void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
  2827. {
  2828. 80011ec: b580 push {r7, lr}
  2829. 80011ee: b082 sub sp, #8
  2830. 80011f0: af00 add r7, sp, #0
  2831. 80011f2: 6078 str r0, [r7, #4]
  2832. 80011f4: 000a movs r2, r1
  2833. 80011f6: 1cbb adds r3, r7, #2
  2834. 80011f8: 801a strh r2, [r3, #0]
  2835. if (huart->Instance == USART2)
  2836. 80011fa: 687b ldr r3, [r7, #4]
  2837. 80011fc: 681b ldr r3, [r3, #0]
  2838. 80011fe: 4a14 ldr r2, [pc, #80] @ (8001250 <HAL_UARTEx_RxEventCallback+0x64>)
  2839. 8001200: 4293 cmp r3, r2
  2840. 8001202: d122 bne.n 800124a <HAL_UARTEx_RxEventCallback+0x5e>
  2841. {
  2842. if ((RxBufPos == 0) && (RxChar[0] != SYNC_BYTE )) {
  2843. 8001204: 4b13 ldr r3, [pc, #76] @ (8001254 <HAL_UARTEx_RxEventCallback+0x68>)
  2844. 8001206: 781b ldrb r3, [r3, #0]
  2845. 8001208: 2b00 cmp r3, #0
  2846. 800120a: d103 bne.n 8001214 <HAL_UARTEx_RxEventCallback+0x28>
  2847. 800120c: 4b12 ldr r3, [pc, #72] @ (8001258 <HAL_UARTEx_RxEventCallback+0x6c>)
  2848. 800120e: 781b ldrb r3, [r3, #0]
  2849. 8001210: 2bc8 cmp r3, #200 @ 0xc8
  2850. 8001212: d119 bne.n 8001248 <HAL_UARTEx_RxEventCallback+0x5c>
  2851. return;
  2852. }
  2853. RxBuf[RxBufPos] = RxChar[0];
  2854. 8001214: 4b0f ldr r3, [pc, #60] @ (8001254 <HAL_UARTEx_RxEventCallback+0x68>)
  2855. 8001216: 781b ldrb r3, [r3, #0]
  2856. 8001218: 001a movs r2, r3
  2857. 800121a: 4b0f ldr r3, [pc, #60] @ (8001258 <HAL_UARTEx_RxEventCallback+0x6c>)
  2858. 800121c: 7819 ldrb r1, [r3, #0]
  2859. 800121e: 4b0f ldr r3, [pc, #60] @ (800125c <HAL_UARTEx_RxEventCallback+0x70>)
  2860. 8001220: 5499 strb r1, [r3, r2]
  2861. RxBufPos++;
  2862. 8001222: 4b0c ldr r3, [pc, #48] @ (8001254 <HAL_UARTEx_RxEventCallback+0x68>)
  2863. 8001224: 781b ldrb r3, [r3, #0]
  2864. 8001226: 3301 adds r3, #1
  2865. 8001228: b2da uxtb r2, r3
  2866. 800122a: 4b0a ldr r3, [pc, #40] @ (8001254 <HAL_UARTEx_RxEventCallback+0x68>)
  2867. 800122c: 701a strb r2, [r3, #0]
  2868. if (RxBufPos > BUFFER_LENGTH-1) {
  2869. 800122e: 4b09 ldr r3, [pc, #36] @ (8001254 <HAL_UARTEx_RxEventCallback+0x68>)
  2870. 8001230: 781b ldrb r3, [r3, #0]
  2871. 8001232: 2b3f cmp r3, #63 @ 0x3f
  2872. 8001234: d902 bls.n 800123c <HAL_UARTEx_RxEventCallback+0x50>
  2873. RxBufPos = 0;
  2874. 8001236: 4b07 ldr r3, [pc, #28] @ (8001254 <HAL_UARTEx_RxEventCallback+0x68>)
  2875. 8001238: 2200 movs r2, #0
  2876. 800123a: 701a strb r2, [r3, #0]
  2877. }
  2878. checkValidPakage();
  2879. 800123c: f7ff ff96 bl 800116c <checkValidPakage>
  2880. UART_Counter = 0;
  2881. 8001240: 4b07 ldr r3, [pc, #28] @ (8001260 <HAL_UARTEx_RxEventCallback+0x74>)
  2882. 8001242: 2200 movs r2, #0
  2883. 8001244: 701a strb r2, [r3, #0]
  2884. 8001246: e000 b.n 800124a <HAL_UARTEx_RxEventCallback+0x5e>
  2885. return;
  2886. 8001248: 46c0 nop @ (mov r8, r8)
  2887. }
  2888. }
  2889. 800124a: 46bd mov sp, r7
  2890. 800124c: b002 add sp, #8
  2891. 800124e: bd80 pop {r7, pc}
  2892. 8001250: 40004400 .word 0x40004400
  2893. 8001254: 200004b0 .word 0x200004b0
  2894. 8001258: 2000046c .word 0x2000046c
  2895. 800125c: 20000470 .word 0x20000470
  2896. 8001260: 2000050c .word 0x2000050c
  2897. 08001264 <Uart_StartReceive>:
  2898. void Uart_StartReceive() {
  2899. 8001264: b580 push {r7, lr}
  2900. 8001266: af00 add r7, sp, #0
  2901. RxBufPos = 0;
  2902. 8001268: 4b0b ldr r3, [pc, #44] @ (8001298 <Uart_StartReceive+0x34>)
  2903. 800126a: 2200 movs r2, #0
  2904. 800126c: 701a strb r2, [r3, #0]
  2905. HAL_UART_DMAStop(&huart2);
  2906. 800126e: 4b0b ldr r3, [pc, #44] @ (800129c <Uart_StartReceive+0x38>)
  2907. 8001270: 0018 movs r0, r3
  2908. 8001272: f003 ffb5 bl 80051e0 <HAL_UART_DMAStop>
  2909. HAL_UARTEx_ReceiveToIdle_DMA(&huart2, RxChar, 1);
  2910. 8001276: 490a ldr r1, [pc, #40] @ (80012a0 <Uart_StartReceive+0x3c>)
  2911. 8001278: 4b08 ldr r3, [pc, #32] @ (800129c <Uart_StartReceive+0x38>)
  2912. 800127a: 2201 movs r2, #1
  2913. 800127c: 0018 movs r0, r3
  2914. 800127e: f004 fe47 bl 8005f10 <HAL_UARTEx_ReceiveToIdle_DMA>
  2915. __HAL_DMA_DISABLE_IT(&hdma_usart2_rx, DMA_IT_HT);
  2916. 8001282: 4b08 ldr r3, [pc, #32] @ (80012a4 <Uart_StartReceive+0x40>)
  2917. 8001284: 681b ldr r3, [r3, #0]
  2918. 8001286: 681a ldr r2, [r3, #0]
  2919. 8001288: 4b06 ldr r3, [pc, #24] @ (80012a4 <Uart_StartReceive+0x40>)
  2920. 800128a: 681b ldr r3, [r3, #0]
  2921. 800128c: 2104 movs r1, #4
  2922. 800128e: 438a bics r2, r1
  2923. 8001290: 601a str r2, [r3, #0]
  2924. }
  2925. 8001292: 46c0 nop @ (mov r8, r8)
  2926. 8001294: 46bd mov sp, r7
  2927. 8001296: bd80 pop {r7, pc}
  2928. 8001298: 200004b0 .word 0x200004b0
  2929. 800129c: 2000030c .word 0x2000030c
  2930. 80012a0: 2000046c .word 0x2000046c
  2931. 80012a4: 200003a0 .word 0x200003a0
  2932. 080012a8 <Uart_StartSendFrame>:
  2933. void Uart_StartSendFrame() {
  2934. 80012a8: b580 push {r7, lr}
  2935. 80012aa: af00 add r7, sp, #0
  2936. //HAL_UART_AbortTransmit(&huart2);
  2937. huart2.gState = HAL_UART_STATE_READY;
  2938. 80012ac: 4b06 ldr r3, [pc, #24] @ (80012c8 <Uart_StartSendFrame+0x20>)
  2939. 80012ae: 2288 movs r2, #136 @ 0x88
  2940. 80012b0: 2120 movs r1, #32
  2941. 80012b2: 5099 str r1, [r3, r2]
  2942. HAL_UART_Transmit_DMA(&huart2, (uint8_t *) &Frame, 12);
  2943. 80012b4: 4905 ldr r1, [pc, #20] @ (80012cc <Uart_StartSendFrame+0x24>)
  2944. 80012b6: 4b04 ldr r3, [pc, #16] @ (80012c8 <Uart_StartSendFrame+0x20>)
  2945. 80012b8: 220c movs r2, #12
  2946. 80012ba: 0018 movs r0, r3
  2947. 80012bc: f003 fefe bl 80050bc <HAL_UART_Transmit_DMA>
  2948. }
  2949. 80012c0: 46c0 nop @ (mov r8, r8)
  2950. 80012c2: 46bd mov sp, r7
  2951. 80012c4: bd80 pop {r7, pc}
  2952. 80012c6: 46c0 nop @ (mov r8, r8)
  2953. 80012c8: 2000030c .word 0x2000030c
  2954. 80012cc: 200004b4 .word 0x200004b4
  2955. 080012d0 <Make_Frame>:
  2956. void Make_Frame() {
  2957. 80012d0: b590 push {r4, r7, lr}
  2958. 80012d2: b083 sub sp, #12
  2959. 80012d4: af00 add r7, sp, #0
  2960. uint8_t crc;
  2961. uint16_t voltage;
  2962. voltage = ADC_GetVoltage();
  2963. 80012d6: 1dbc adds r4, r7, #6
  2964. 80012d8: f7fe ffce bl 8000278 <ADC_GetVoltage>
  2965. 80012dc: 0003 movs r3, r0
  2966. 80012de: 8023 strh r3, [r4, #0]
  2967. voltage = (voltage << 8) | (voltage >> 8);
  2968. 80012e0: 1dbb adds r3, r7, #6
  2969. 80012e2: 881b ldrh r3, [r3, #0]
  2970. 80012e4: 021b lsls r3, r3, #8
  2971. 80012e6: b21a sxth r2, r3
  2972. 80012e8: 1dbb adds r3, r7, #6
  2973. 80012ea: 881b ldrh r3, [r3, #0]
  2974. 80012ec: 0a1b lsrs r3, r3, #8
  2975. 80012ee: b29b uxth r3, r3
  2976. 80012f0: b21b sxth r3, r3
  2977. 80012f2: 4313 orrs r3, r2
  2978. 80012f4: b21a sxth r2, r3
  2979. 80012f6: 1dbb adds r3, r7, #6
  2980. 80012f8: 801a strh r2, [r3, #0]
  2981. Frame.sync_byte = SYNC_BYTE;
  2982. 80012fa: 4b23 ldr r3, [pc, #140] @ (8001388 <Make_Frame+0xb8>)
  2983. 80012fc: 22c8 movs r2, #200 @ 0xc8
  2984. 80012fe: 701a strb r2, [r3, #0]
  2985. Frame.length = 10;
  2986. 8001300: 4b21 ldr r3, [pc, #132] @ (8001388 <Make_Frame+0xb8>)
  2987. 8001302: 220a movs r2, #10
  2988. 8001304: 705a strb r2, [r3, #1]
  2989. Frame.type = FRAME_TYPE_Battery_Sensor;
  2990. 8001306: 4b20 ldr r3, [pc, #128] @ (8001388 <Make_Frame+0xb8>)
  2991. 8001308: 2208 movs r2, #8
  2992. 800130a: 709a strb r2, [r3, #2]
  2993. Frame.voltage = voltage;
  2994. 800130c: 4b1e ldr r3, [pc, #120] @ (8001388 <Make_Frame+0xb8>)
  2995. 800130e: 1dba adds r2, r7, #6
  2996. 8001310: 3303 adds r3, #3
  2997. 8001312: 7814 ldrb r4, [r2, #0]
  2998. 8001314: 7819 ldrb r1, [r3, #0]
  2999. 8001316: 2000 movs r0, #0
  3000. 8001318: 4001 ands r1, r0
  3001. 800131a: 1c08 adds r0, r1, #0
  3002. 800131c: 1c21 adds r1, r4, #0
  3003. 800131e: 4301 orrs r1, r0
  3004. 8001320: 7019 strb r1, [r3, #0]
  3005. 8001322: 7850 ldrb r0, [r2, #1]
  3006. 8001324: 785a ldrb r2, [r3, #1]
  3007. 8001326: 2100 movs r1, #0
  3008. 8001328: 400a ands r2, r1
  3009. 800132a: 1c11 adds r1, r2, #0
  3010. 800132c: 1c02 adds r2, r0, #0
  3011. 800132e: 430a orrs r2, r1
  3012. 8001330: 705a strb r2, [r3, #1]
  3013. Frame.current = 0;
  3014. 8001332: 4b15 ldr r3, [pc, #84] @ (8001388 <Make_Frame+0xb8>)
  3015. 8001334: 3303 adds r3, #3
  3016. 8001336: 789a ldrb r2, [r3, #2]
  3017. 8001338: 2100 movs r1, #0
  3018. 800133a: 400a ands r2, r1
  3019. 800133c: 709a strb r2, [r3, #2]
  3020. 800133e: 78da ldrb r2, [r3, #3]
  3021. 8001340: 2100 movs r1, #0
  3022. 8001342: 400a ands r2, r1
  3023. 8001344: 70da strb r2, [r3, #3]
  3024. Frame.capacity = 0;
  3025. 8001346: 4b10 ldr r3, [pc, #64] @ (8001388 <Make_Frame+0xb8>)
  3026. 8001348: 3303 adds r3, #3
  3027. 800134a: 791a ldrb r2, [r3, #4]
  3028. 800134c: 2100 movs r1, #0
  3029. 800134e: 400a ands r2, r1
  3030. 8001350: 711a strb r2, [r3, #4]
  3031. 8001352: 795a ldrb r2, [r3, #5]
  3032. 8001354: 2100 movs r1, #0
  3033. 8001356: 400a ands r2, r1
  3034. 8001358: 715a strb r2, [r3, #5]
  3035. 800135a: 799a ldrb r2, [r3, #6]
  3036. 800135c: 2100 movs r1, #0
  3037. 800135e: 400a ands r2, r1
  3038. 8001360: 719a strb r2, [r3, #6]
  3039. Frame.remaining = 0;
  3040. 8001362: 4b09 ldr r3, [pc, #36] @ (8001388 <Make_Frame+0xb8>)
  3041. 8001364: 2200 movs r2, #0
  3042. 8001366: 729a strb r2, [r3, #10]
  3043. crc = crc8((uint8_t * )&Frame, 10);
  3044. 8001368: 1d7c adds r4, r7, #5
  3045. 800136a: 4b07 ldr r3, [pc, #28] @ (8001388 <Make_Frame+0xb8>)
  3046. 800136c: 210a movs r1, #10
  3047. 800136e: 0018 movs r0, r3
  3048. 8001370: f7ff fd6c bl 8000e4c <crc8>
  3049. 8001374: 0003 movs r3, r0
  3050. 8001376: 7023 strb r3, [r4, #0]
  3051. Frame.crc = crc;
  3052. 8001378: 4b03 ldr r3, [pc, #12] @ (8001388 <Make_Frame+0xb8>)
  3053. 800137a: 1d7a adds r2, r7, #5
  3054. 800137c: 7812 ldrb r2, [r2, #0]
  3055. 800137e: 72da strb r2, [r3, #11]
  3056. }
  3057. 8001380: 46c0 nop @ (mov r8, r8)
  3058. 8001382: 46bd mov sp, r7
  3059. 8001384: b003 add sp, #12
  3060. 8001386: bd90 pop {r4, r7, pc}
  3061. 8001388: 200004b4 .word 0x200004b4
  3062. 0800138c <Uart_GetChannel>:
  3063. unsigned int Uart_GetChannel(uint8_t ch) {
  3064. 800138c: b580 push {r7, lr}
  3065. 800138e: b082 sub sp, #8
  3066. 8001390: af00 add r7, sp, #0
  3067. 8001392: 0002 movs r2, r0
  3068. 8001394: 1dfb adds r3, r7, #7
  3069. 8001396: 701a strb r2, [r3, #0]
  3070. return Channals[ch];
  3071. 8001398: 1dfb adds r3, r7, #7
  3072. 800139a: 781a ldrb r2, [r3, #0]
  3073. 800139c: 4b03 ldr r3, [pc, #12] @ (80013ac <Uart_GetChannel+0x20>)
  3074. 800139e: 0092 lsls r2, r2, #2
  3075. 80013a0: 58d3 ldr r3, [r2, r3]
  3076. }
  3077. 80013a2: 0018 movs r0, r3
  3078. 80013a4: 46bd mov sp, r7
  3079. 80013a6: b002 add sp, #8
  3080. 80013a8: bd80 pop {r7, pc}
  3081. 80013aa: 46c0 nop @ (mov r8, r8)
  3082. 80013ac: 200004cc .word 0x200004cc
  3083. 080013b0 <Uart_IncCounter>:
  3084. void Uart_IncCounter(void) {
  3085. 80013b0: b580 push {r7, lr}
  3086. 80013b2: af00 add r7, sp, #0
  3087. if (UART_Counter < 100) {
  3088. 80013b4: 4b06 ldr r3, [pc, #24] @ (80013d0 <Uart_IncCounter+0x20>)
  3089. 80013b6: 781b ldrb r3, [r3, #0]
  3090. 80013b8: 2b63 cmp r3, #99 @ 0x63
  3091. 80013ba: d805 bhi.n 80013c8 <Uart_IncCounter+0x18>
  3092. UART_Counter++;
  3093. 80013bc: 4b04 ldr r3, [pc, #16] @ (80013d0 <Uart_IncCounter+0x20>)
  3094. 80013be: 781b ldrb r3, [r3, #0]
  3095. 80013c0: 3301 adds r3, #1
  3096. 80013c2: b2da uxtb r2, r3
  3097. 80013c4: 4b02 ldr r3, [pc, #8] @ (80013d0 <Uart_IncCounter+0x20>)
  3098. 80013c6: 701a strb r2, [r3, #0]
  3099. }
  3100. }
  3101. 80013c8: 46c0 nop @ (mov r8, r8)
  3102. 80013ca: 46bd mov sp, r7
  3103. 80013cc: bd80 pop {r7, pc}
  3104. 80013ce: 46c0 nop @ (mov r8, r8)
  3105. 80013d0: 2000050c .word 0x2000050c
  3106. 080013d4 <Uart_GetCounter>:
  3107. uint8_t Uart_GetCounter(void) {
  3108. 80013d4: b580 push {r7, lr}
  3109. 80013d6: af00 add r7, sp, #0
  3110. return UART_Counter;
  3111. 80013d8: 4b02 ldr r3, [pc, #8] @ (80013e4 <Uart_GetCounter+0x10>)
  3112. 80013da: 781b ldrb r3, [r3, #0]
  3113. }
  3114. 80013dc: 0018 movs r0, r3
  3115. 80013de: 46bd mov sp, r7
  3116. 80013e0: bd80 pop {r7, pc}
  3117. 80013e2: 46c0 nop @ (mov r8, r8)
  3118. 80013e4: 2000050c .word 0x2000050c
  3119. 080013e8 <USER_Init>:
  3120. extern SettingsStruct Settings;
  3121. extern RC_LinkStatistics LinkStatistics;
  3122. uint8_t RC_LinkUpAtLeastOnce = 0;
  3123. void USER_Init(void) {
  3124. 80013e8: b580 push {r7, lr}
  3125. 80013ea: b082 sub sp, #8
  3126. 80013ec: af00 add r7, sp, #0
  3127. unsigned int ChannelValue;
  3128. unsigned int ch;
  3129. SettingsInit();
  3130. 80013ee: f7ff fa19 bl 8000824 <SettingsInit>
  3131. for(ch=0; ch<5; ch++) {
  3132. 80013f2: 2300 movs r3, #0
  3133. 80013f4: 607b str r3, [r7, #4]
  3134. 80013f6: e01b b.n 8001430 <USER_Init+0x48>
  3135. ChannelValue = Settings.start[ch];
  3136. 80013f8: 4b33 ldr r3, [pc, #204] @ (80014c8 <USER_Init+0xe0>)
  3137. 80013fa: 687a ldr r2, [r7, #4]
  3138. 80013fc: 0052 lsls r2, r2, #1
  3139. 80013fe: 5ad3 ldrh r3, [r2, r3]
  3140. 8001400: 603b str r3, [r7, #0]
  3141. if (ChannelValue > 0) {
  3142. 8001402: 683b ldr r3, [r7, #0]
  3143. 8001404: 2b00 cmp r3, #0
  3144. 8001406: d008 beq.n 800141a <USER_Init+0x32>
  3145. USER_SetPWM(ch, ChannelValue);
  3146. 8001408: 687b ldr r3, [r7, #4]
  3147. 800140a: b2db uxtb r3, r3
  3148. 800140c: 683a ldr r2, [r7, #0]
  3149. 800140e: b292 uxth r2, r2
  3150. 8001410: 0011 movs r1, r2
  3151. 8001412: 0018 movs r0, r3
  3152. 8001414: f000 f862 bl 80014dc <USER_SetPWM>
  3153. 8001418: e007 b.n 800142a <USER_Init+0x42>
  3154. } else {
  3155. USER_SetPWM(ch, 1000);
  3156. 800141a: 687b ldr r3, [r7, #4]
  3157. 800141c: b2db uxtb r3, r3
  3158. 800141e: 22fa movs r2, #250 @ 0xfa
  3159. 8001420: 0092 lsls r2, r2, #2
  3160. 8001422: 0011 movs r1, r2
  3161. 8001424: 0018 movs r0, r3
  3162. 8001426: f000 f859 bl 80014dc <USER_SetPWM>
  3163. for(ch=0; ch<5; ch++) {
  3164. 800142a: 687b ldr r3, [r7, #4]
  3165. 800142c: 3301 adds r3, #1
  3166. 800142e: 607b str r3, [r7, #4]
  3167. 8001430: 687b ldr r3, [r7, #4]
  3168. 8001432: 2b04 cmp r3, #4
  3169. 8001434: d9e0 bls.n 80013f8 <USER_Init+0x10>
  3170. }
  3171. }
  3172. TIM3->CCER |= (uint32_t)(TIM_CCx_ENABLE << (TIM_CHANNEL_1 & 0x1FU)); // PWM1
  3173. 8001436: 4b25 ldr r3, [pc, #148] @ (80014cc <USER_Init+0xe4>)
  3174. 8001438: 6a1a ldr r2, [r3, #32]
  3175. 800143a: 4b24 ldr r3, [pc, #144] @ (80014cc <USER_Init+0xe4>)
  3176. 800143c: 2101 movs r1, #1
  3177. 800143e: 430a orrs r2, r1
  3178. 8001440: 621a str r2, [r3, #32]
  3179. TIM3->CCER |= (uint32_t)(TIM_CCx_ENABLE << (TIM_CHANNEL_2 & 0x1FU)); // PWM2
  3180. 8001442: 4b22 ldr r3, [pc, #136] @ (80014cc <USER_Init+0xe4>)
  3181. 8001444: 6a1a ldr r2, [r3, #32]
  3182. 8001446: 4b21 ldr r3, [pc, #132] @ (80014cc <USER_Init+0xe4>)
  3183. 8001448: 2110 movs r1, #16
  3184. 800144a: 430a orrs r2, r1
  3185. 800144c: 621a str r2, [r3, #32]
  3186. TIM1->CCER |= (uint32_t)(TIM_CCx_ENABLE << (TIM_CHANNEL_1 & 0x1FU)); // PWM3
  3187. 800144e: 4b20 ldr r3, [pc, #128] @ (80014d0 <USER_Init+0xe8>)
  3188. 8001450: 6a1a ldr r2, [r3, #32]
  3189. 8001452: 4b1f ldr r3, [pc, #124] @ (80014d0 <USER_Init+0xe8>)
  3190. 8001454: 2101 movs r1, #1
  3191. 8001456: 430a orrs r2, r1
  3192. 8001458: 621a str r2, [r3, #32]
  3193. TIM1->CCER |= (uint32_t)(TIM_CCx_ENABLE << (TIM_CHANNEL_4 & 0x1FU)); // PWM4
  3194. 800145a: 4b1d ldr r3, [pc, #116] @ (80014d0 <USER_Init+0xe8>)
  3195. 800145c: 6a1a ldr r2, [r3, #32]
  3196. 800145e: 4b1c ldr r3, [pc, #112] @ (80014d0 <USER_Init+0xe8>)
  3197. 8001460: 2180 movs r1, #128 @ 0x80
  3198. 8001462: 0149 lsls r1, r1, #5
  3199. 8001464: 430a orrs r2, r1
  3200. 8001466: 621a str r2, [r3, #32]
  3201. TIM1->CCER |= (uint32_t)(TIM_CCx_ENABLE << (TIM_CHANNEL_2 & 0x1FU)); // PWM5
  3202. 8001468: 4b19 ldr r3, [pc, #100] @ (80014d0 <USER_Init+0xe8>)
  3203. 800146a: 6a1a ldr r2, [r3, #32]
  3204. 800146c: 4b18 ldr r3, [pc, #96] @ (80014d0 <USER_Init+0xe8>)
  3205. 800146e: 2110 movs r1, #16
  3206. 8001470: 430a orrs r2, r1
  3207. 8001472: 621a str r2, [r3, #32]
  3208. __HAL_TIM_MOE_ENABLE(&htim1);
  3209. 8001474: 4b17 ldr r3, [pc, #92] @ (80014d4 <USER_Init+0xec>)
  3210. 8001476: 681b ldr r3, [r3, #0]
  3211. 8001478: 6c5a ldr r2, [r3, #68] @ 0x44
  3212. 800147a: 4b16 ldr r3, [pc, #88] @ (80014d4 <USER_Init+0xec>)
  3213. 800147c: 681b ldr r3, [r3, #0]
  3214. 800147e: 2180 movs r1, #128 @ 0x80
  3215. 8001480: 0209 lsls r1, r1, #8
  3216. 8001482: 430a orrs r2, r1
  3217. 8001484: 645a str r2, [r3, #68] @ 0x44
  3218. __HAL_TIM_ENABLE(&htim1);
  3219. 8001486: 4b13 ldr r3, [pc, #76] @ (80014d4 <USER_Init+0xec>)
  3220. 8001488: 681b ldr r3, [r3, #0]
  3221. 800148a: 681a ldr r2, [r3, #0]
  3222. 800148c: 4b11 ldr r3, [pc, #68] @ (80014d4 <USER_Init+0xec>)
  3223. 800148e: 681b ldr r3, [r3, #0]
  3224. 8001490: 2101 movs r1, #1
  3225. 8001492: 430a orrs r2, r1
  3226. 8001494: 601a str r2, [r3, #0]
  3227. __HAL_TIM_MOE_ENABLE(&htim3);
  3228. 8001496: 4b10 ldr r3, [pc, #64] @ (80014d8 <USER_Init+0xf0>)
  3229. 8001498: 681b ldr r3, [r3, #0]
  3230. 800149a: 6c5a ldr r2, [r3, #68] @ 0x44
  3231. 800149c: 4b0e ldr r3, [pc, #56] @ (80014d8 <USER_Init+0xf0>)
  3232. 800149e: 681b ldr r3, [r3, #0]
  3233. 80014a0: 2180 movs r1, #128 @ 0x80
  3234. 80014a2: 0209 lsls r1, r1, #8
  3235. 80014a4: 430a orrs r2, r1
  3236. 80014a6: 645a str r2, [r3, #68] @ 0x44
  3237. __HAL_TIM_ENABLE(&htim3);
  3238. 80014a8: 4b0b ldr r3, [pc, #44] @ (80014d8 <USER_Init+0xf0>)
  3239. 80014aa: 681b ldr r3, [r3, #0]
  3240. 80014ac: 681a ldr r2, [r3, #0]
  3241. 80014ae: 4b0a ldr r3, [pc, #40] @ (80014d8 <USER_Init+0xf0>)
  3242. 80014b0: 681b ldr r3, [r3, #0]
  3243. 80014b2: 2101 movs r1, #1
  3244. 80014b4: 430a orrs r2, r1
  3245. 80014b6: 601a str r2, [r3, #0]
  3246. Uart_StartReceive();
  3247. 80014b8: f7ff fed4 bl 8001264 <Uart_StartReceive>
  3248. ADC_Init();
  3249. 80014bc: f7fe feac bl 8000218 <ADC_Init>
  3250. }
  3251. 80014c0: 46c0 nop @ (mov r8, r8)
  3252. 80014c2: 46bd mov sp, r7
  3253. 80014c4: b002 add sp, #8
  3254. 80014c6: bd80 pop {r7, pc}
  3255. 80014c8: 20000458 .word 0x20000458
  3256. 80014cc: 40000400 .word 0x40000400
  3257. 80014d0: 40012c00 .word 0x40012c00
  3258. 80014d4: 20000274 .word 0x20000274
  3259. 80014d8: 200002c0 .word 0x200002c0
  3260. 080014dc <USER_SetPWM>:
  3261. void USER_SetPWM(uint8_t chanel, uint16_t value) {
  3262. 80014dc: b580 push {r7, lr}
  3263. 80014de: b082 sub sp, #8
  3264. 80014e0: af00 add r7, sp, #0
  3265. 80014e2: 0002 movs r2, r0
  3266. 80014e4: 1dfb adds r3, r7, #7
  3267. 80014e6: 701a strb r2, [r3, #0]
  3268. 80014e8: 1d3b adds r3, r7, #4
  3269. 80014ea: 1c0a adds r2, r1, #0
  3270. 80014ec: 801a strh r2, [r3, #0]
  3271. switch ( chanel )
  3272. 80014ee: 1dfb adds r3, r7, #7
  3273. 80014f0: 781b ldrb r3, [r3, #0]
  3274. 80014f2: 2b04 cmp r3, #4
  3275. 80014f4: d81d bhi.n 8001532 <USER_SetPWM+0x56>
  3276. 80014f6: 009a lsls r2, r3, #2
  3277. 80014f8: 4b10 ldr r3, [pc, #64] @ (800153c <USER_SetPWM+0x60>)
  3278. 80014fa: 18d3 adds r3, r2, r3
  3279. 80014fc: 681b ldr r3, [r3, #0]
  3280. 80014fe: 469f mov pc, r3
  3281. {
  3282. case 0:
  3283. TIM3->CCR1 = value;
  3284. 8001500: 4b0f ldr r3, [pc, #60] @ (8001540 <USER_SetPWM+0x64>)
  3285. 8001502: 1d3a adds r2, r7, #4
  3286. 8001504: 8812 ldrh r2, [r2, #0]
  3287. 8001506: 635a str r2, [r3, #52] @ 0x34
  3288. break;
  3289. 8001508: e014 b.n 8001534 <USER_SetPWM+0x58>
  3290. case 1:
  3291. TIM3->CCR2 = value;
  3292. 800150a: 4b0d ldr r3, [pc, #52] @ (8001540 <USER_SetPWM+0x64>)
  3293. 800150c: 1d3a adds r2, r7, #4
  3294. 800150e: 8812 ldrh r2, [r2, #0]
  3295. 8001510: 639a str r2, [r3, #56] @ 0x38
  3296. break;
  3297. 8001512: e00f b.n 8001534 <USER_SetPWM+0x58>
  3298. case 2:
  3299. TIM1->CCR1 = value;
  3300. 8001514: 4b0b ldr r3, [pc, #44] @ (8001544 <USER_SetPWM+0x68>)
  3301. 8001516: 1d3a adds r2, r7, #4
  3302. 8001518: 8812 ldrh r2, [r2, #0]
  3303. 800151a: 635a str r2, [r3, #52] @ 0x34
  3304. break;
  3305. 800151c: e00a b.n 8001534 <USER_SetPWM+0x58>
  3306. case 3:
  3307. TIM1->CCR4 = value;
  3308. 800151e: 4b09 ldr r3, [pc, #36] @ (8001544 <USER_SetPWM+0x68>)
  3309. 8001520: 1d3a adds r2, r7, #4
  3310. 8001522: 8812 ldrh r2, [r2, #0]
  3311. 8001524: 641a str r2, [r3, #64] @ 0x40
  3312. break;
  3313. 8001526: e005 b.n 8001534 <USER_SetPWM+0x58>
  3314. case 4:
  3315. TIM1->CCR2 = value;
  3316. 8001528: 4b06 ldr r3, [pc, #24] @ (8001544 <USER_SetPWM+0x68>)
  3317. 800152a: 1d3a adds r2, r7, #4
  3318. 800152c: 8812 ldrh r2, [r2, #0]
  3319. 800152e: 639a str r2, [r3, #56] @ 0x38
  3320. break;
  3321. 8001530: e000 b.n 8001534 <USER_SetPWM+0x58>
  3322. default:
  3323. break;
  3324. 8001532: 46c0 nop @ (mov r8, r8)
  3325. }
  3326. }
  3327. 8001534: 46c0 nop @ (mov r8, r8)
  3328. 8001536: 46bd mov sp, r7
  3329. 8001538: b002 add sp, #8
  3330. 800153a: bd80 pop {r7, pc}
  3331. 800153c: 080060c0 .word 0x080060c0
  3332. 8001540: 40000400 .word 0x40000400
  3333. 8001544: 40012c00 .word 0x40012c00
  3334. 08001548 <USER_Main_Loop>:
  3335. void USER_Main_Loop(void) {
  3336. 8001548: b590 push {r4, r7, lr}
  3337. 800154a: b085 sub sp, #20
  3338. 800154c: af00 add r7, sp, #0
  3339. unsigned int ChannelValue;
  3340. unsigned int tmp;
  3341. unsigned int ch;
  3342. if ((LinkStatistics.up_link_quality > 0) & (Uart_GetCounter() < 10)) { // ELRS connection checking
  3343. 800154e: 4b6f ldr r3, [pc, #444] @ (800170c <USER_Main_Loop+0x1c4>)
  3344. 8001550: 789b ldrb r3, [r3, #2]
  3345. 8001552: 1e5a subs r2, r3, #1
  3346. 8001554: 4193 sbcs r3, r2
  3347. 8001556: b2dc uxtb r4, r3
  3348. 8001558: f7ff ff3c bl 80013d4 <Uart_GetCounter>
  3349. 800155c: 0003 movs r3, r0
  3350. 800155e: 0019 movs r1, r3
  3351. 8001560: 2209 movs r2, #9
  3352. 8001562: 2300 movs r3, #0
  3353. 8001564: 428a cmp r2, r1
  3354. 8001566: 415b adcs r3, r3
  3355. 8001568: b2db uxtb r3, r3
  3356. 800156a: 4023 ands r3, r4
  3357. 800156c: b2db uxtb r3, r3
  3358. 800156e: 2b00 cmp r3, #0
  3359. 8001570: d100 bne.n 8001574 <USER_Main_Loop+0x2c>
  3360. 8001572: e080 b.n 8001676 <USER_Main_Loop+0x12e>
  3361. RC_LinkUpAtLeastOnce = 1;
  3362. 8001574: 4b66 ldr r3, [pc, #408] @ (8001710 <USER_Main_Loop+0x1c8>)
  3363. 8001576: 2201 movs r2, #1
  3364. 8001578: 701a strb r2, [r3, #0]
  3365. for(ch=0; ch<5; ch++) {
  3366. 800157a: 2300 movs r3, #0
  3367. 800157c: 60bb str r3, [r7, #8]
  3368. 800157e: e014 b.n 80015aa <USER_Main_Loop+0x62>
  3369. ChannelValue = Uart_GetChannel(ch);
  3370. 8001580: 68bb ldr r3, [r7, #8]
  3371. 8001582: b2db uxtb r3, r3
  3372. 8001584: 0018 movs r0, r3
  3373. 8001586: f7ff ff01 bl 800138c <Uart_GetChannel>
  3374. 800158a: 0003 movs r3, r0
  3375. 800158c: 607b str r3, [r7, #4]
  3376. if (ChannelValue > 0) {
  3377. 800158e: 687b ldr r3, [r7, #4]
  3378. 8001590: 2b00 cmp r3, #0
  3379. 8001592: d007 beq.n 80015a4 <USER_Main_Loop+0x5c>
  3380. USER_SetPWM(ch, ChannelValue);
  3381. 8001594: 68bb ldr r3, [r7, #8]
  3382. 8001596: b2db uxtb r3, r3
  3383. 8001598: 687a ldr r2, [r7, #4]
  3384. 800159a: b292 uxth r2, r2
  3385. 800159c: 0011 movs r1, r2
  3386. 800159e: 0018 movs r0, r3
  3387. 80015a0: f7ff ff9c bl 80014dc <USER_SetPWM>
  3388. for(ch=0; ch<5; ch++) {
  3389. 80015a4: 68bb ldr r3, [r7, #8]
  3390. 80015a6: 3301 adds r3, #1
  3391. 80015a8: 60bb str r3, [r7, #8]
  3392. 80015aa: 68bb ldr r3, [r7, #8]
  3393. 80015ac: 2b04 cmp r3, #4
  3394. 80015ae: d9e7 bls.n 8001580 <USER_Main_Loop+0x38>
  3395. }
  3396. }
  3397. if (HAL_GPIO_ReadPin(SET_DEFAULT_GPIO_Port, SET_DEFAULT_Pin) == GPIO_PIN_RESET) { // Set Default Values
  3398. 80015b0: 2380 movs r3, #128 @ 0x80
  3399. 80015b2: 005b lsls r3, r3, #1
  3400. 80015b4: 4a57 ldr r2, [pc, #348] @ (8001714 <USER_Main_Loop+0x1cc>)
  3401. 80015b6: 0019 movs r1, r3
  3402. 80015b8: 0010 movs r0, r2
  3403. 80015ba: f002 f973 bl 80038a4 <HAL_GPIO_ReadPin>
  3404. 80015be: 1e03 subs r3, r0, #0
  3405. 80015c0: d125 bne.n 800160e <USER_Main_Loop+0xc6>
  3406. for(ch=0; ch<5; ch++) {
  3407. 80015c2: 2300 movs r3, #0
  3408. 80015c4: 60bb str r3, [r7, #8]
  3409. 80015c6: e00d b.n 80015e4 <USER_Main_Loop+0x9c>
  3410. Settings.start[ch] = Uart_GetChannel(ch);
  3411. 80015c8: 68bb ldr r3, [r7, #8]
  3412. 80015ca: b2db uxtb r3, r3
  3413. 80015cc: 0018 movs r0, r3
  3414. 80015ce: f7ff fedd bl 800138c <Uart_GetChannel>
  3415. 80015d2: 0003 movs r3, r0
  3416. 80015d4: b299 uxth r1, r3
  3417. 80015d6: 4b50 ldr r3, [pc, #320] @ (8001718 <USER_Main_Loop+0x1d0>)
  3418. 80015d8: 68ba ldr r2, [r7, #8]
  3419. 80015da: 0052 lsls r2, r2, #1
  3420. 80015dc: 52d1 strh r1, [r2, r3]
  3421. for(ch=0; ch<5; ch++) {
  3422. 80015de: 68bb ldr r3, [r7, #8]
  3423. 80015e0: 3301 adds r3, #1
  3424. 80015e2: 60bb str r3, [r7, #8]
  3425. 80015e4: 68bb ldr r3, [r7, #8]
  3426. 80015e6: 2b04 cmp r3, #4
  3427. 80015e8: d9ee bls.n 80015c8 <USER_Main_Loop+0x80>
  3428. }
  3429. SettingsSave();
  3430. 80015ea: f7ff f94f bl 800088c <SettingsSave>
  3431. while (HAL_GPIO_ReadPin(SET_DEFAULT_GPIO_Port, SET_DEFAULT_Pin) == GPIO_PIN_RESET) {
  3432. 80015ee: e002 b.n 80015f6 <USER_Main_Loop+0xae>
  3433. HAL_Delay(10);
  3434. 80015f0: 200a movs r0, #10
  3435. 80015f2: f000 f943 bl 800187c <HAL_Delay>
  3436. while (HAL_GPIO_ReadPin(SET_DEFAULT_GPIO_Port, SET_DEFAULT_Pin) == GPIO_PIN_RESET) {
  3437. 80015f6: 2380 movs r3, #128 @ 0x80
  3438. 80015f8: 005b lsls r3, r3, #1
  3439. 80015fa: 4a46 ldr r2, [pc, #280] @ (8001714 <USER_Main_Loop+0x1cc>)
  3440. 80015fc: 0019 movs r1, r3
  3441. 80015fe: 0010 movs r0, r2
  3442. 8001600: f002 f950 bl 80038a4 <HAL_GPIO_ReadPin>
  3443. 8001604: 1e03 subs r3, r0, #0
  3444. 8001606: d0f3 beq.n 80015f0 <USER_Main_Loop+0xa8>
  3445. }
  3446. HAL_Delay(100);
  3447. 8001608: 2064 movs r0, #100 @ 0x64
  3448. 800160a: f000 f937 bl 800187c <HAL_Delay>
  3449. }
  3450. if (HAL_GPIO_ReadPin(SET_FAILSAFE_GPIO_Port, SET_FAILSAFE_Pin) == GPIO_PIN_RESET) { // Set Fail safe Values
  3451. 800160e: 2380 movs r3, #128 @ 0x80
  3452. 8001610: 009b lsls r3, r3, #2
  3453. 8001612: 4a40 ldr r2, [pc, #256] @ (8001714 <USER_Main_Loop+0x1cc>)
  3454. 8001614: 0019 movs r1, r3
  3455. 8001616: 0010 movs r0, r2
  3456. 8001618: f002 f944 bl 80038a4 <HAL_GPIO_ReadPin>
  3457. 800161c: 1e03 subs r3, r0, #0
  3458. 800161e: d165 bne.n 80016ec <USER_Main_Loop+0x1a4>
  3459. for(ch=0; ch<5; ch++) {
  3460. 8001620: 2300 movs r3, #0
  3461. 8001622: 60bb str r3, [r7, #8]
  3462. 8001624: e011 b.n 800164a <USER_Main_Loop+0x102>
  3463. Settings.fail[ch] = Uart_GetChannel(ch);
  3464. 8001626: 68bb ldr r3, [r7, #8]
  3465. 8001628: b2db uxtb r3, r3
  3466. 800162a: 0018 movs r0, r3
  3467. 800162c: f7ff feae bl 800138c <Uart_GetChannel>
  3468. 8001630: 0003 movs r3, r0
  3469. 8001632: b299 uxth r1, r3
  3470. 8001634: 4a38 ldr r2, [pc, #224] @ (8001718 <USER_Main_Loop+0x1d0>)
  3471. 8001636: 68bb ldr r3, [r7, #8]
  3472. 8001638: 3304 adds r3, #4
  3473. 800163a: 005b lsls r3, r3, #1
  3474. 800163c: 18d3 adds r3, r2, r3
  3475. 800163e: 3302 adds r3, #2
  3476. 8001640: 1c0a adds r2, r1, #0
  3477. 8001642: 801a strh r2, [r3, #0]
  3478. for(ch=0; ch<5; ch++) {
  3479. 8001644: 68bb ldr r3, [r7, #8]
  3480. 8001646: 3301 adds r3, #1
  3481. 8001648: 60bb str r3, [r7, #8]
  3482. 800164a: 68bb ldr r3, [r7, #8]
  3483. 800164c: 2b04 cmp r3, #4
  3484. 800164e: d9ea bls.n 8001626 <USER_Main_Loop+0xde>
  3485. }
  3486. SettingsSave();
  3487. 8001650: f7ff f91c bl 800088c <SettingsSave>
  3488. while (HAL_GPIO_ReadPin(SET_FAILSAFE_GPIO_Port, SET_FAILSAFE_Pin) == GPIO_PIN_RESET) {
  3489. 8001654: e002 b.n 800165c <USER_Main_Loop+0x114>
  3490. HAL_Delay(10);
  3491. 8001656: 200a movs r0, #10
  3492. 8001658: f000 f910 bl 800187c <HAL_Delay>
  3493. while (HAL_GPIO_ReadPin(SET_FAILSAFE_GPIO_Port, SET_FAILSAFE_Pin) == GPIO_PIN_RESET) {
  3494. 800165c: 2380 movs r3, #128 @ 0x80
  3495. 800165e: 009b lsls r3, r3, #2
  3496. 8001660: 4a2c ldr r2, [pc, #176] @ (8001714 <USER_Main_Loop+0x1cc>)
  3497. 8001662: 0019 movs r1, r3
  3498. 8001664: 0010 movs r0, r2
  3499. 8001666: f002 f91d bl 80038a4 <HAL_GPIO_ReadPin>
  3500. 800166a: 1e03 subs r3, r0, #0
  3501. 800166c: d0f3 beq.n 8001656 <USER_Main_Loop+0x10e>
  3502. }
  3503. HAL_Delay(100);
  3504. 800166e: 2064 movs r0, #100 @ 0x64
  3505. 8001670: f000 f904 bl 800187c <HAL_Delay>
  3506. 8001674: e03a b.n 80016ec <USER_Main_Loop+0x1a4>
  3507. }
  3508. } else {
  3509. if (RC_LinkUpAtLeastOnce == 1) {
  3510. 8001676: 4b26 ldr r3, [pc, #152] @ (8001710 <USER_Main_Loop+0x1c8>)
  3511. 8001678: 781b ldrb r3, [r3, #0]
  3512. 800167a: 2b01 cmp r3, #1
  3513. 800167c: d136 bne.n 80016ec <USER_Main_Loop+0x1a4>
  3514. // Check if the values ​​are set
  3515. tmp = 0;
  3516. 800167e: 2300 movs r3, #0
  3517. 8001680: 60fb str r3, [r7, #12]
  3518. for(ch=0; ch<5; ch++) {
  3519. 8001682: 2300 movs r3, #0
  3520. 8001684: 60bb str r3, [r7, #8]
  3521. 8001686: e00d b.n 80016a4 <USER_Main_Loop+0x15c>
  3522. tmp = tmp + Settings.fail[ch];
  3523. 8001688: 4a23 ldr r2, [pc, #140] @ (8001718 <USER_Main_Loop+0x1d0>)
  3524. 800168a: 68bb ldr r3, [r7, #8]
  3525. 800168c: 3304 adds r3, #4
  3526. 800168e: 005b lsls r3, r3, #1
  3527. 8001690: 18d3 adds r3, r2, r3
  3528. 8001692: 3302 adds r3, #2
  3529. 8001694: 881b ldrh r3, [r3, #0]
  3530. 8001696: 001a movs r2, r3
  3531. 8001698: 68fb ldr r3, [r7, #12]
  3532. 800169a: 189b adds r3, r3, r2
  3533. 800169c: 60fb str r3, [r7, #12]
  3534. for(ch=0; ch<5; ch++) {
  3535. 800169e: 68bb ldr r3, [r7, #8]
  3536. 80016a0: 3301 adds r3, #1
  3537. 80016a2: 60bb str r3, [r7, #8]
  3538. 80016a4: 68bb ldr r3, [r7, #8]
  3539. 80016a6: 2b04 cmp r3, #4
  3540. 80016a8: d9ee bls.n 8001688 <USER_Main_Loop+0x140>
  3541. }
  3542. if (tmp > 1000) {
  3543. 80016aa: 68fa ldr r2, [r7, #12]
  3544. 80016ac: 23fa movs r3, #250 @ 0xfa
  3545. 80016ae: 009b lsls r3, r3, #2
  3546. 80016b0: 429a cmp r2, r3
  3547. 80016b2: d91b bls.n 80016ec <USER_Main_Loop+0x1a4>
  3548. // Set Fail safe values
  3549. for(ch=0; ch<5; ch++) {
  3550. 80016b4: 2300 movs r3, #0
  3551. 80016b6: 60bb str r3, [r7, #8]
  3552. 80016b8: e015 b.n 80016e6 <USER_Main_Loop+0x19e>
  3553. ChannelValue = Settings.fail[ch];
  3554. 80016ba: 4a17 ldr r2, [pc, #92] @ (8001718 <USER_Main_Loop+0x1d0>)
  3555. 80016bc: 68bb ldr r3, [r7, #8]
  3556. 80016be: 3304 adds r3, #4
  3557. 80016c0: 005b lsls r3, r3, #1
  3558. 80016c2: 18d3 adds r3, r2, r3
  3559. 80016c4: 3302 adds r3, #2
  3560. 80016c6: 881b ldrh r3, [r3, #0]
  3561. 80016c8: 607b str r3, [r7, #4]
  3562. if (ChannelValue > 0) {
  3563. 80016ca: 687b ldr r3, [r7, #4]
  3564. 80016cc: 2b00 cmp r3, #0
  3565. 80016ce: d007 beq.n 80016e0 <USER_Main_Loop+0x198>
  3566. USER_SetPWM(ch, ChannelValue);
  3567. 80016d0: 68bb ldr r3, [r7, #8]
  3568. 80016d2: b2db uxtb r3, r3
  3569. 80016d4: 687a ldr r2, [r7, #4]
  3570. 80016d6: b292 uxth r2, r2
  3571. 80016d8: 0011 movs r1, r2
  3572. 80016da: 0018 movs r0, r3
  3573. 80016dc: f7ff fefe bl 80014dc <USER_SetPWM>
  3574. for(ch=0; ch<5; ch++) {
  3575. 80016e0: 68bb ldr r3, [r7, #8]
  3576. 80016e2: 3301 adds r3, #1
  3577. 80016e4: 60bb str r3, [r7, #8]
  3578. 80016e6: 68bb ldr r3, [r7, #8]
  3579. 80016e8: 2b04 cmp r3, #4
  3580. 80016ea: d9e6 bls.n 80016ba <USER_Main_Loop+0x172>
  3581. }
  3582. }
  3583. }
  3584. }
  3585. ADC_Start_Convertion();
  3586. 80016ec: f7fe fdb0 bl 8000250 <ADC_Start_Convertion>
  3587. Make_Frame();
  3588. 80016f0: f7ff fdee bl 80012d0 <Make_Frame>
  3589. Uart_StartSendFrame();
  3590. 80016f4: f7ff fdd8 bl 80012a8 <Uart_StartSendFrame>
  3591. Uart_IncCounter();
  3592. 80016f8: f7ff fe5a bl 80013b0 <Uart_IncCounter>
  3593. HAL_Delay(1);
  3594. 80016fc: 2001 movs r0, #1
  3595. 80016fe: f000 f8bd bl 800187c <HAL_Delay>
  3596. }
  3597. 8001702: 46c0 nop @ (mov r8, r8)
  3598. 8001704: 46bd mov sp, r7
  3599. 8001706: b005 add sp, #20
  3600. 8001708: bd90 pop {r4, r7, pc}
  3601. 800170a: 46c0 nop @ (mov r8, r8)
  3602. 800170c: 200004c0 .word 0x200004c0
  3603. 8001710: 2000050d .word 0x2000050d
  3604. 8001714: 50000400 .word 0x50000400
  3605. 8001718: 20000458 .word 0x20000458
  3606. 0800171c <Reset_Handler>:
  3607. .section .text.Reset_Handler
  3608. .weak Reset_Handler
  3609. .type Reset_Handler, %function
  3610. Reset_Handler:
  3611. ldr r0, =_estack
  3612. 800171c: 480d ldr r0, [pc, #52] @ (8001754 <LoopForever+0x2>)
  3613. mov sp, r0 /* set stack pointer */
  3614. 800171e: 4685 mov sp, r0
  3615. /* Call the clock system initialization function.*/
  3616. bl SystemInit
  3617. 8001720: f7ff fb74 bl 8000e0c <SystemInit>
  3618. /* Copy the data segment initializers from flash to SRAM */
  3619. ldr r0, =_sdata
  3620. 8001724: 480c ldr r0, [pc, #48] @ (8001758 <LoopForever+0x6>)
  3621. ldr r1, =_edata
  3622. 8001726: 490d ldr r1, [pc, #52] @ (800175c <LoopForever+0xa>)
  3623. ldr r2, =_sidata
  3624. 8001728: 4a0d ldr r2, [pc, #52] @ (8001760 <LoopForever+0xe>)
  3625. movs r3, #0
  3626. 800172a: 2300 movs r3, #0
  3627. b LoopCopyDataInit
  3628. 800172c: e002 b.n 8001734 <LoopCopyDataInit>
  3629. 0800172e <CopyDataInit>:
  3630. CopyDataInit:
  3631. ldr r4, [r2, r3]
  3632. 800172e: 58d4 ldr r4, [r2, r3]
  3633. str r4, [r0, r3]
  3634. 8001730: 50c4 str r4, [r0, r3]
  3635. adds r3, r3, #4
  3636. 8001732: 3304 adds r3, #4
  3637. 08001734 <LoopCopyDataInit>:
  3638. LoopCopyDataInit:
  3639. adds r4, r0, r3
  3640. 8001734: 18c4 adds r4, r0, r3
  3641. cmp r4, r1
  3642. 8001736: 428c cmp r4, r1
  3643. bcc CopyDataInit
  3644. 8001738: d3f9 bcc.n 800172e <CopyDataInit>
  3645. /* Zero fill the bss segment. */
  3646. ldr r2, =_sbss
  3647. 800173a: 4a0a ldr r2, [pc, #40] @ (8001764 <LoopForever+0x12>)
  3648. ldr r4, =_ebss
  3649. 800173c: 4c0a ldr r4, [pc, #40] @ (8001768 <LoopForever+0x16>)
  3650. movs r3, #0
  3651. 800173e: 2300 movs r3, #0
  3652. b LoopFillZerobss
  3653. 8001740: e001 b.n 8001746 <LoopFillZerobss>
  3654. 08001742 <FillZerobss>:
  3655. FillZerobss:
  3656. str r3, [r2]
  3657. 8001742: 6013 str r3, [r2, #0]
  3658. adds r2, r2, #4
  3659. 8001744: 3204 adds r2, #4
  3660. 08001746 <LoopFillZerobss>:
  3661. LoopFillZerobss:
  3662. cmp r2, r4
  3663. 8001746: 42a2 cmp r2, r4
  3664. bcc FillZerobss
  3665. 8001748: d3fb bcc.n 8001742 <FillZerobss>
  3666. /* Call static constructors */
  3667. bl __libc_init_array
  3668. 800174a: f004 fc51 bl 8005ff0 <__libc_init_array>
  3669. /* Call the application s entry point.*/
  3670. bl main
  3671. 800174e: f7fe fdc1 bl 80002d4 <main>
  3672. 08001752 <LoopForever>:
  3673. LoopForever:
  3674. b LoopForever
  3675. 8001752: e7fe b.n 8001752 <LoopForever>
  3676. ldr r0, =_estack
  3677. 8001754: 20002000 .word 0x20002000
  3678. ldr r0, =_sdata
  3679. 8001758: 20000000 .word 0x20000000
  3680. ldr r1, =_edata
  3681. 800175c: 20000194 .word 0x20000194
  3682. ldr r2, =_sidata
  3683. 8001760: 08006148 .word 0x08006148
  3684. ldr r2, =_sbss
  3685. 8001764: 20000194 .word 0x20000194
  3686. ldr r4, =_ebss
  3687. 8001768: 20000530 .word 0x20000530
  3688. 0800176c <ADC1_IRQHandler>:
  3689. * @retval None
  3690. */
  3691. .section .text.Default_Handler,"ax",%progbits
  3692. Default_Handler:
  3693. Infinite_Loop:
  3694. b Infinite_Loop
  3695. 800176c: e7fe b.n 800176c <ADC1_IRQHandler>
  3696. ...
  3697. 08001770 <HAL_Init>:
  3698. * each 1ms in the SysTick_Handler() interrupt handler.
  3699. *
  3700. * @retval HAL status
  3701. */
  3702. HAL_StatusTypeDef HAL_Init(void)
  3703. {
  3704. 8001770: b580 push {r7, lr}
  3705. 8001772: b082 sub sp, #8
  3706. 8001774: af00 add r7, sp, #0
  3707. HAL_StatusTypeDef status = HAL_OK;
  3708. 8001776: 1dfb adds r3, r7, #7
  3709. 8001778: 2200 movs r2, #0
  3710. 800177a: 701a strb r2, [r3, #0]
  3711. #if (INSTRUCTION_CACHE_ENABLE == 0U)
  3712. __HAL_FLASH_INSTRUCTION_CACHE_DISABLE();
  3713. #endif /* INSTRUCTION_CACHE_ENABLE */
  3714. #if (PREFETCH_ENABLE != 0U)
  3715. __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
  3716. 800177c: 4b0b ldr r3, [pc, #44] @ (80017ac <HAL_Init+0x3c>)
  3717. 800177e: 681a ldr r2, [r3, #0]
  3718. 8001780: 4b0a ldr r3, [pc, #40] @ (80017ac <HAL_Init+0x3c>)
  3719. 8001782: 2180 movs r1, #128 @ 0x80
  3720. 8001784: 0049 lsls r1, r1, #1
  3721. 8001786: 430a orrs r2, r1
  3722. 8001788: 601a str r2, [r3, #0]
  3723. #endif /* PREFETCH_ENABLE */
  3724. /* Use SysTick as time base source and configure 1ms tick (default clock after Reset is HSI) */
  3725. if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
  3726. 800178a: 2003 movs r0, #3
  3727. 800178c: f000 f810 bl 80017b0 <HAL_InitTick>
  3728. 8001790: 1e03 subs r3, r0, #0
  3729. 8001792: d003 beq.n 800179c <HAL_Init+0x2c>
  3730. {
  3731. status = HAL_ERROR;
  3732. 8001794: 1dfb adds r3, r7, #7
  3733. 8001796: 2201 movs r2, #1
  3734. 8001798: 701a strb r2, [r3, #0]
  3735. 800179a: e001 b.n 80017a0 <HAL_Init+0x30>
  3736. }
  3737. else
  3738. {
  3739. /* Init the low level hardware */
  3740. HAL_MspInit();
  3741. 800179c: f7ff f8ea bl 8000974 <HAL_MspInit>
  3742. }
  3743. /* Return function status */
  3744. return status;
  3745. 80017a0: 1dfb adds r3, r7, #7
  3746. 80017a2: 781b ldrb r3, [r3, #0]
  3747. }
  3748. 80017a4: 0018 movs r0, r3
  3749. 80017a6: 46bd mov sp, r7
  3750. 80017a8: b002 add sp, #8
  3751. 80017aa: bd80 pop {r7, pc}
  3752. 80017ac: 40022000 .word 0x40022000
  3753. 080017b0 <HAL_InitTick>:
  3754. * implementation in user file.
  3755. * @param TickPriority Tick interrupt priority.
  3756. * @retval HAL status
  3757. */
  3758. __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
  3759. {
  3760. 80017b0: b590 push {r4, r7, lr}
  3761. 80017b2: b085 sub sp, #20
  3762. 80017b4: af00 add r7, sp, #0
  3763. 80017b6: 6078 str r0, [r7, #4]
  3764. HAL_StatusTypeDef status = HAL_OK;
  3765. 80017b8: 230f movs r3, #15
  3766. 80017ba: 18fb adds r3, r7, r3
  3767. 80017bc: 2200 movs r2, #0
  3768. 80017be: 701a strb r2, [r3, #0]
  3769. /* Check uwTickFreq for MisraC 2012 (even if uwTickFreq is a enum type that doesn't take the value zero)*/
  3770. if ((uint32_t)uwTickFreq != 0U)
  3771. 80017c0: 4b1d ldr r3, [pc, #116] @ (8001838 <HAL_InitTick+0x88>)
  3772. 80017c2: 781b ldrb r3, [r3, #0]
  3773. 80017c4: 2b00 cmp r3, #0
  3774. 80017c6: d02b beq.n 8001820 <HAL_InitTick+0x70>
  3775. {
  3776. /*Configure the SysTick to have interrupt in 1ms time basis*/
  3777. if (HAL_SYSTICK_Config(SystemCoreClock / (1000U /(uint32_t)uwTickFreq)) == 0U)
  3778. 80017c8: 4b1c ldr r3, [pc, #112] @ (800183c <HAL_InitTick+0x8c>)
  3779. 80017ca: 681c ldr r4, [r3, #0]
  3780. 80017cc: 4b1a ldr r3, [pc, #104] @ (8001838 <HAL_InitTick+0x88>)
  3781. 80017ce: 781b ldrb r3, [r3, #0]
  3782. 80017d0: 0019 movs r1, r3
  3783. 80017d2: 23fa movs r3, #250 @ 0xfa
  3784. 80017d4: 0098 lsls r0, r3, #2
  3785. 80017d6: f7fe fc93 bl 8000100 <__udivsi3>
  3786. 80017da: 0003 movs r3, r0
  3787. 80017dc: 0019 movs r1, r3
  3788. 80017de: 0020 movs r0, r4
  3789. 80017e0: f7fe fc8e bl 8000100 <__udivsi3>
  3790. 80017e4: 0003 movs r3, r0
  3791. 80017e6: 0018 movs r0, r3
  3792. 80017e8: f001 fa87 bl 8002cfa <HAL_SYSTICK_Config>
  3793. 80017ec: 1e03 subs r3, r0, #0
  3794. 80017ee: d112 bne.n 8001816 <HAL_InitTick+0x66>
  3795. {
  3796. /* Configure the SysTick IRQ priority */
  3797. if (TickPriority < (1UL << __NVIC_PRIO_BITS))
  3798. 80017f0: 687b ldr r3, [r7, #4]
  3799. 80017f2: 2b03 cmp r3, #3
  3800. 80017f4: d80a bhi.n 800180c <HAL_InitTick+0x5c>
  3801. {
  3802. HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
  3803. 80017f6: 6879 ldr r1, [r7, #4]
  3804. 80017f8: 2301 movs r3, #1
  3805. 80017fa: 425b negs r3, r3
  3806. 80017fc: 2200 movs r2, #0
  3807. 80017fe: 0018 movs r0, r3
  3808. 8001800: f001 fa56 bl 8002cb0 <HAL_NVIC_SetPriority>
  3809. uwTickPrio = TickPriority;
  3810. 8001804: 4b0e ldr r3, [pc, #56] @ (8001840 <HAL_InitTick+0x90>)
  3811. 8001806: 687a ldr r2, [r7, #4]
  3812. 8001808: 601a str r2, [r3, #0]
  3813. 800180a: e00d b.n 8001828 <HAL_InitTick+0x78>
  3814. }
  3815. else
  3816. {
  3817. status = HAL_ERROR;
  3818. 800180c: 230f movs r3, #15
  3819. 800180e: 18fb adds r3, r7, r3
  3820. 8001810: 2201 movs r2, #1
  3821. 8001812: 701a strb r2, [r3, #0]
  3822. 8001814: e008 b.n 8001828 <HAL_InitTick+0x78>
  3823. }
  3824. }
  3825. else
  3826. {
  3827. status = HAL_ERROR;
  3828. 8001816: 230f movs r3, #15
  3829. 8001818: 18fb adds r3, r7, r3
  3830. 800181a: 2201 movs r2, #1
  3831. 800181c: 701a strb r2, [r3, #0]
  3832. 800181e: e003 b.n 8001828 <HAL_InitTick+0x78>
  3833. }
  3834. }
  3835. else
  3836. {
  3837. status = HAL_ERROR;
  3838. 8001820: 230f movs r3, #15
  3839. 8001822: 18fb adds r3, r7, r3
  3840. 8001824: 2201 movs r2, #1
  3841. 8001826: 701a strb r2, [r3, #0]
  3842. }
  3843. /* Return function status */
  3844. return status;
  3845. 8001828: 230f movs r3, #15
  3846. 800182a: 18fb adds r3, r7, r3
  3847. 800182c: 781b ldrb r3, [r3, #0]
  3848. }
  3849. 800182e: 0018 movs r0, r3
  3850. 8001830: 46bd mov sp, r7
  3851. 8001832: b005 add sp, #20
  3852. 8001834: bd90 pop {r4, r7, pc}
  3853. 8001836: 46c0 nop @ (mov r8, r8)
  3854. 8001838: 20000108 .word 0x20000108
  3855. 800183c: 20000000 .word 0x20000000
  3856. 8001840: 20000104 .word 0x20000104
  3857. 08001844 <HAL_IncTick>:
  3858. * @note This function is declared as __weak to be overwritten in case of other
  3859. * implementations in user file.
  3860. * @retval None
  3861. */
  3862. __weak void HAL_IncTick(void)
  3863. {
  3864. 8001844: b580 push {r7, lr}
  3865. 8001846: af00 add r7, sp, #0
  3866. uwTick += (uint32_t)uwTickFreq;
  3867. 8001848: 4b05 ldr r3, [pc, #20] @ (8001860 <HAL_IncTick+0x1c>)
  3868. 800184a: 781b ldrb r3, [r3, #0]
  3869. 800184c: 001a movs r2, r3
  3870. 800184e: 4b05 ldr r3, [pc, #20] @ (8001864 <HAL_IncTick+0x20>)
  3871. 8001850: 681b ldr r3, [r3, #0]
  3872. 8001852: 18d2 adds r2, r2, r3
  3873. 8001854: 4b03 ldr r3, [pc, #12] @ (8001864 <HAL_IncTick+0x20>)
  3874. 8001856: 601a str r2, [r3, #0]
  3875. }
  3876. 8001858: 46c0 nop @ (mov r8, r8)
  3877. 800185a: 46bd mov sp, r7
  3878. 800185c: bd80 pop {r7, pc}
  3879. 800185e: 46c0 nop @ (mov r8, r8)
  3880. 8001860: 20000108 .word 0x20000108
  3881. 8001864: 20000510 .word 0x20000510
  3882. 08001868 <HAL_GetTick>:
  3883. * @note This function is declared as __weak to be overwritten in case of other
  3884. * implementations in user file.
  3885. * @retval tick value
  3886. */
  3887. __weak uint32_t HAL_GetTick(void)
  3888. {
  3889. 8001868: b580 push {r7, lr}
  3890. 800186a: af00 add r7, sp, #0
  3891. return uwTick;
  3892. 800186c: 4b02 ldr r3, [pc, #8] @ (8001878 <HAL_GetTick+0x10>)
  3893. 800186e: 681b ldr r3, [r3, #0]
  3894. }
  3895. 8001870: 0018 movs r0, r3
  3896. 8001872: 46bd mov sp, r7
  3897. 8001874: bd80 pop {r7, pc}
  3898. 8001876: 46c0 nop @ (mov r8, r8)
  3899. 8001878: 20000510 .word 0x20000510
  3900. 0800187c <HAL_Delay>:
  3901. * implementations in user file.
  3902. * @param Delay specifies the delay time length, in milliseconds.
  3903. * @retval None
  3904. */
  3905. __weak void HAL_Delay(uint32_t Delay)
  3906. {
  3907. 800187c: b580 push {r7, lr}
  3908. 800187e: b084 sub sp, #16
  3909. 8001880: af00 add r7, sp, #0
  3910. 8001882: 6078 str r0, [r7, #4]
  3911. uint32_t tickstart = HAL_GetTick();
  3912. 8001884: f7ff fff0 bl 8001868 <HAL_GetTick>
  3913. 8001888: 0003 movs r3, r0
  3914. 800188a: 60bb str r3, [r7, #8]
  3915. uint32_t wait = Delay;
  3916. 800188c: 687b ldr r3, [r7, #4]
  3917. 800188e: 60fb str r3, [r7, #12]
  3918. /* Add a freq to guarantee minimum wait */
  3919. if (wait < HAL_MAX_DELAY)
  3920. 8001890: 68fb ldr r3, [r7, #12]
  3921. 8001892: 3301 adds r3, #1
  3922. 8001894: d005 beq.n 80018a2 <HAL_Delay+0x26>
  3923. {
  3924. wait += (uint32_t)(uwTickFreq);
  3925. 8001896: 4b0a ldr r3, [pc, #40] @ (80018c0 <HAL_Delay+0x44>)
  3926. 8001898: 781b ldrb r3, [r3, #0]
  3927. 800189a: 001a movs r2, r3
  3928. 800189c: 68fb ldr r3, [r7, #12]
  3929. 800189e: 189b adds r3, r3, r2
  3930. 80018a0: 60fb str r3, [r7, #12]
  3931. }
  3932. while ((HAL_GetTick() - tickstart) < wait)
  3933. 80018a2: 46c0 nop @ (mov r8, r8)
  3934. 80018a4: f7ff ffe0 bl 8001868 <HAL_GetTick>
  3935. 80018a8: 0002 movs r2, r0
  3936. 80018aa: 68bb ldr r3, [r7, #8]
  3937. 80018ac: 1ad3 subs r3, r2, r3
  3938. 80018ae: 68fa ldr r2, [r7, #12]
  3939. 80018b0: 429a cmp r2, r3
  3940. 80018b2: d8f7 bhi.n 80018a4 <HAL_Delay+0x28>
  3941. {
  3942. }
  3943. }
  3944. 80018b4: 46c0 nop @ (mov r8, r8)
  3945. 80018b6: 46c0 nop @ (mov r8, r8)
  3946. 80018b8: 46bd mov sp, r7
  3947. 80018ba: b004 add sp, #16
  3948. 80018bc: bd80 pop {r7, pc}
  3949. 80018be: 46c0 nop @ (mov r8, r8)
  3950. 80018c0: 20000108 .word 0x20000108
  3951. 080018c4 <LL_ADC_SetCommonPathInternalCh>:
  3952. * @arg @ref LL_ADC_PATH_INTERNAL_TEMPSENSOR
  3953. * @arg @ref LL_ADC_PATH_INTERNAL_VBAT
  3954. * @retval None
  3955. */
  3956. __STATIC_INLINE void LL_ADC_SetCommonPathInternalCh(ADC_Common_TypeDef *ADCxy_COMMON, uint32_t PathInternal)
  3957. {
  3958. 80018c4: b580 push {r7, lr}
  3959. 80018c6: b082 sub sp, #8
  3960. 80018c8: af00 add r7, sp, #0
  3961. 80018ca: 6078 str r0, [r7, #4]
  3962. 80018cc: 6039 str r1, [r7, #0]
  3963. MODIFY_REG(ADCxy_COMMON->CCR, ADC_CCR_VREFEN | ADC_CCR_TSEN | ADC_CCR_VBATEN, PathInternal);
  3964. 80018ce: 687b ldr r3, [r7, #4]
  3965. 80018d0: 681b ldr r3, [r3, #0]
  3966. 80018d2: 4a05 ldr r2, [pc, #20] @ (80018e8 <LL_ADC_SetCommonPathInternalCh+0x24>)
  3967. 80018d4: 401a ands r2, r3
  3968. 80018d6: 683b ldr r3, [r7, #0]
  3969. 80018d8: 431a orrs r2, r3
  3970. 80018da: 687b ldr r3, [r7, #4]
  3971. 80018dc: 601a str r2, [r3, #0]
  3972. }
  3973. 80018de: 46c0 nop @ (mov r8, r8)
  3974. 80018e0: 46bd mov sp, r7
  3975. 80018e2: b002 add sp, #8
  3976. 80018e4: bd80 pop {r7, pc}
  3977. 80018e6: 46c0 nop @ (mov r8, r8)
  3978. 80018e8: fe3fffff .word 0xfe3fffff
  3979. 080018ec <LL_ADC_GetCommonPathInternalCh>:
  3980. * @arg @ref LL_ADC_PATH_INTERNAL_VREFINT
  3981. * @arg @ref LL_ADC_PATH_INTERNAL_TEMPSENSOR
  3982. * @arg @ref LL_ADC_PATH_INTERNAL_VBAT
  3983. */
  3984. __STATIC_INLINE uint32_t LL_ADC_GetCommonPathInternalCh(const ADC_Common_TypeDef *ADCxy_COMMON)
  3985. {
  3986. 80018ec: b580 push {r7, lr}
  3987. 80018ee: b082 sub sp, #8
  3988. 80018f0: af00 add r7, sp, #0
  3989. 80018f2: 6078 str r0, [r7, #4]
  3990. return (uint32_t)(READ_BIT(ADCxy_COMMON->CCR, ADC_CCR_VREFEN | ADC_CCR_TSEN | ADC_CCR_VBATEN));
  3991. 80018f4: 687b ldr r3, [r7, #4]
  3992. 80018f6: 681a ldr r2, [r3, #0]
  3993. 80018f8: 23e0 movs r3, #224 @ 0xe0
  3994. 80018fa: 045b lsls r3, r3, #17
  3995. 80018fc: 4013 ands r3, r2
  3996. }
  3997. 80018fe: 0018 movs r0, r3
  3998. 8001900: 46bd mov sp, r7
  3999. 8001902: b002 add sp, #8
  4000. 8001904: bd80 pop {r7, pc}
  4001. 08001906 <LL_ADC_SetSamplingTimeCommonChannels>:
  4002. * @arg @ref LL_ADC_SAMPLINGTIME_160CYCLES_5
  4003. * @retval None
  4004. */
  4005. __STATIC_INLINE void LL_ADC_SetSamplingTimeCommonChannels(ADC_TypeDef *ADCx, uint32_t SamplingTimeY,
  4006. uint32_t SamplingTime)
  4007. {
  4008. 8001906: b580 push {r7, lr}
  4009. 8001908: b084 sub sp, #16
  4010. 800190a: af00 add r7, sp, #0
  4011. 800190c: 60f8 str r0, [r7, #12]
  4012. 800190e: 60b9 str r1, [r7, #8]
  4013. 8001910: 607a str r2, [r7, #4]
  4014. MODIFY_REG(ADCx->SMPR,
  4015. 8001912: 68fb ldr r3, [r7, #12]
  4016. 8001914: 695b ldr r3, [r3, #20]
  4017. 8001916: 68ba ldr r2, [r7, #8]
  4018. 8001918: 2104 movs r1, #4
  4019. 800191a: 400a ands r2, r1
  4020. 800191c: 2107 movs r1, #7
  4021. 800191e: 4091 lsls r1, r2
  4022. 8001920: 000a movs r2, r1
  4023. 8001922: 43d2 mvns r2, r2
  4024. 8001924: 401a ands r2, r3
  4025. 8001926: 68bb ldr r3, [r7, #8]
  4026. 8001928: 2104 movs r1, #4
  4027. 800192a: 400b ands r3, r1
  4028. 800192c: 6879 ldr r1, [r7, #4]
  4029. 800192e: 4099 lsls r1, r3
  4030. 8001930: 000b movs r3, r1
  4031. 8001932: 431a orrs r2, r3
  4032. 8001934: 68fb ldr r3, [r7, #12]
  4033. 8001936: 615a str r2, [r3, #20]
  4034. ADC_SMPR_SMP1 << (SamplingTimeY & ADC_SAMPLING_TIME_SMP_SHIFT_MASK),
  4035. SamplingTime << (SamplingTimeY & ADC_SAMPLING_TIME_SMP_SHIFT_MASK));
  4036. }
  4037. 8001938: 46c0 nop @ (mov r8, r8)
  4038. 800193a: 46bd mov sp, r7
  4039. 800193c: b004 add sp, #16
  4040. 800193e: bd80 pop {r7, pc}
  4041. 08001940 <LL_ADC_GetSamplingTimeCommonChannels>:
  4042. * @arg @ref LL_ADC_SAMPLINGTIME_39CYCLES_5
  4043. * @arg @ref LL_ADC_SAMPLINGTIME_79CYCLES_5
  4044. * @arg @ref LL_ADC_SAMPLINGTIME_160CYCLES_5
  4045. */
  4046. __STATIC_INLINE uint32_t LL_ADC_GetSamplingTimeCommonChannels(const ADC_TypeDef *ADCx, uint32_t SamplingTimeY)
  4047. {
  4048. 8001940: b580 push {r7, lr}
  4049. 8001942: b082 sub sp, #8
  4050. 8001944: af00 add r7, sp, #0
  4051. 8001946: 6078 str r0, [r7, #4]
  4052. 8001948: 6039 str r1, [r7, #0]
  4053. return (uint32_t)((READ_BIT(ADCx->SMPR, ADC_SMPR_SMP1 << (SamplingTimeY & ADC_SAMPLING_TIME_SMP_SHIFT_MASK)))
  4054. 800194a: 687b ldr r3, [r7, #4]
  4055. 800194c: 695b ldr r3, [r3, #20]
  4056. 800194e: 683a ldr r2, [r7, #0]
  4057. 8001950: 2104 movs r1, #4
  4058. 8001952: 400a ands r2, r1
  4059. 8001954: 2107 movs r1, #7
  4060. 8001956: 4091 lsls r1, r2
  4061. 8001958: 000a movs r2, r1
  4062. 800195a: 401a ands r2, r3
  4063. >> (SamplingTimeY & ADC_SAMPLING_TIME_SMP_SHIFT_MASK));
  4064. 800195c: 683b ldr r3, [r7, #0]
  4065. 800195e: 2104 movs r1, #4
  4066. 8001960: 400b ands r3, r1
  4067. return (uint32_t)((READ_BIT(ADCx->SMPR, ADC_SMPR_SMP1 << (SamplingTimeY & ADC_SAMPLING_TIME_SMP_SHIFT_MASK)))
  4068. 8001962: 40da lsrs r2, r3
  4069. 8001964: 0013 movs r3, r2
  4070. }
  4071. 8001966: 0018 movs r0, r3
  4072. 8001968: 46bd mov sp, r7
  4073. 800196a: b002 add sp, #8
  4074. 800196c: bd80 pop {r7, pc}
  4075. 0800196e <LL_ADC_REG_IsTriggerSourceSWStart>:
  4076. * @param ADCx ADC instance
  4077. * @retval Value "0" if trigger source external trigger
  4078. * Value "1" if trigger source SW start.
  4079. */
  4080. __STATIC_INLINE uint32_t LL_ADC_REG_IsTriggerSourceSWStart(const ADC_TypeDef *ADCx)
  4081. {
  4082. 800196e: b580 push {r7, lr}
  4083. 8001970: b082 sub sp, #8
  4084. 8001972: af00 add r7, sp, #0
  4085. 8001974: 6078 str r0, [r7, #4]
  4086. return ((READ_BIT(ADCx->CFGR1, ADC_CFGR1_EXTEN) == (LL_ADC_REG_TRIG_SOFTWARE & ADC_CFGR1_EXTEN)) ? 1UL : 0UL);
  4087. 8001976: 687b ldr r3, [r7, #4]
  4088. 8001978: 68da ldr r2, [r3, #12]
  4089. 800197a: 23c0 movs r3, #192 @ 0xc0
  4090. 800197c: 011b lsls r3, r3, #4
  4091. 800197e: 4013 ands r3, r2
  4092. 8001980: d101 bne.n 8001986 <LL_ADC_REG_IsTriggerSourceSWStart+0x18>
  4093. 8001982: 2301 movs r3, #1
  4094. 8001984: e000 b.n 8001988 <LL_ADC_REG_IsTriggerSourceSWStart+0x1a>
  4095. 8001986: 2300 movs r3, #0
  4096. }
  4097. 8001988: 0018 movs r0, r3
  4098. 800198a: 46bd mov sp, r7
  4099. 800198c: b002 add sp, #8
  4100. 800198e: bd80 pop {r7, pc}
  4101. 08001990 <LL_ADC_REG_SetSequencerRanks>:
  4102. * only if sequencer is set in mode "not fully configurable",
  4103. * refer to function @ref LL_ADC_REG_SetSequencerConfigurable().
  4104. * @retval None
  4105. */
  4106. __STATIC_INLINE void LL_ADC_REG_SetSequencerRanks(ADC_TypeDef *ADCx, uint32_t Rank, uint32_t Channel)
  4107. {
  4108. 8001990: b580 push {r7, lr}
  4109. 8001992: b084 sub sp, #16
  4110. 8001994: af00 add r7, sp, #0
  4111. 8001996: 60f8 str r0, [r7, #12]
  4112. 8001998: 60b9 str r1, [r7, #8]
  4113. 800199a: 607a str r2, [r7, #4]
  4114. /* Set bits with content of parameter "Channel" with bits position */
  4115. /* in register depending on parameter "Rank". */
  4116. /* Parameters "Rank" and "Channel" are used with masks because containing */
  4117. /* other bits reserved for other purpose. */
  4118. MODIFY_REG(ADCx->CHSELR,
  4119. 800199c: 68fb ldr r3, [r7, #12]
  4120. 800199e: 6a9b ldr r3, [r3, #40] @ 0x28
  4121. 80019a0: 68ba ldr r2, [r7, #8]
  4122. 80019a2: 211f movs r1, #31
  4123. 80019a4: 400a ands r2, r1
  4124. 80019a6: 210f movs r1, #15
  4125. 80019a8: 4091 lsls r1, r2
  4126. 80019aa: 000a movs r2, r1
  4127. 80019ac: 43d2 mvns r2, r2
  4128. 80019ae: 401a ands r2, r3
  4129. 80019b0: 687b ldr r3, [r7, #4]
  4130. 80019b2: 0e9b lsrs r3, r3, #26
  4131. 80019b4: 210f movs r1, #15
  4132. 80019b6: 4019 ands r1, r3
  4133. 80019b8: 68bb ldr r3, [r7, #8]
  4134. 80019ba: 201f movs r0, #31
  4135. 80019bc: 4003 ands r3, r0
  4136. 80019be: 4099 lsls r1, r3
  4137. 80019c0: 000b movs r3, r1
  4138. 80019c2: 431a orrs r2, r3
  4139. 80019c4: 68fb ldr r3, [r7, #12]
  4140. 80019c6: 629a str r2, [r3, #40] @ 0x28
  4141. ADC_CHSELR_SQ1 << (Rank & ADC_REG_RANK_ID_SQRX_MASK),
  4142. ((Channel & ADC_CHANNEL_ID_NUMBER_MASK_SEQ) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS)
  4143. << (Rank & ADC_REG_RANK_ID_SQRX_MASK));
  4144. }
  4145. 80019c8: 46c0 nop @ (mov r8, r8)
  4146. 80019ca: 46bd mov sp, r7
  4147. 80019cc: b004 add sp, #16
  4148. 80019ce: bd80 pop {r7, pc}
  4149. 080019d0 <LL_ADC_REG_SetSequencerChAdd>:
  4150. * only if sequencer is set in mode "not fully configurable",
  4151. * refer to function @ref LL_ADC_REG_SetSequencerConfigurable().
  4152. * @retval None
  4153. */
  4154. __STATIC_INLINE void LL_ADC_REG_SetSequencerChAdd(ADC_TypeDef *ADCx, uint32_t Channel)
  4155. {
  4156. 80019d0: b580 push {r7, lr}
  4157. 80019d2: b082 sub sp, #8
  4158. 80019d4: af00 add r7, sp, #0
  4159. 80019d6: 6078 str r0, [r7, #4]
  4160. 80019d8: 6039 str r1, [r7, #0]
  4161. /* Parameter "Channel" is used with masks because containing */
  4162. /* other bits reserved for other purpose. */
  4163. SET_BIT(ADCx->CHSELR, (Channel & ADC_CHANNEL_ID_BITFIELD_MASK));
  4164. 80019da: 687b ldr r3, [r7, #4]
  4165. 80019dc: 6a9a ldr r2, [r3, #40] @ 0x28
  4166. 80019de: 683b ldr r3, [r7, #0]
  4167. 80019e0: 035b lsls r3, r3, #13
  4168. 80019e2: 0b5b lsrs r3, r3, #13
  4169. 80019e4: 431a orrs r2, r3
  4170. 80019e6: 687b ldr r3, [r7, #4]
  4171. 80019e8: 629a str r2, [r3, #40] @ 0x28
  4172. }
  4173. 80019ea: 46c0 nop @ (mov r8, r8)
  4174. 80019ec: 46bd mov sp, r7
  4175. 80019ee: b002 add sp, #8
  4176. 80019f0: bd80 pop {r7, pc}
  4177. 080019f2 <LL_ADC_REG_SetSequencerChRem>:
  4178. * only if sequencer is set in mode "not fully configurable",
  4179. * refer to function @ref LL_ADC_REG_SetSequencerConfigurable().
  4180. * @retval None
  4181. */
  4182. __STATIC_INLINE void LL_ADC_REG_SetSequencerChRem(ADC_TypeDef *ADCx, uint32_t Channel)
  4183. {
  4184. 80019f2: b580 push {r7, lr}
  4185. 80019f4: b082 sub sp, #8
  4186. 80019f6: af00 add r7, sp, #0
  4187. 80019f8: 6078 str r0, [r7, #4]
  4188. 80019fa: 6039 str r1, [r7, #0]
  4189. /* Parameter "Channel" is used with masks because containing */
  4190. /* other bits reserved for other purpose. */
  4191. CLEAR_BIT(ADCx->CHSELR, (Channel & ADC_CHANNEL_ID_BITFIELD_MASK));
  4192. 80019fc: 687b ldr r3, [r7, #4]
  4193. 80019fe: 6a9b ldr r3, [r3, #40] @ 0x28
  4194. 8001a00: 683a ldr r2, [r7, #0]
  4195. 8001a02: 0352 lsls r2, r2, #13
  4196. 8001a04: 0b52 lsrs r2, r2, #13
  4197. 8001a06: 43d2 mvns r2, r2
  4198. 8001a08: 401a ands r2, r3
  4199. 8001a0a: 687b ldr r3, [r7, #4]
  4200. 8001a0c: 629a str r2, [r3, #40] @ 0x28
  4201. }
  4202. 8001a0e: 46c0 nop @ (mov r8, r8)
  4203. 8001a10: 46bd mov sp, r7
  4204. 8001a12: b002 add sp, #8
  4205. 8001a14: bd80 pop {r7, pc}
  4206. ...
  4207. 08001a18 <LL_ADC_SetChannelSamplingTime>:
  4208. * @arg @ref LL_ADC_SAMPLINGTIME_COMMON_1
  4209. * @arg @ref LL_ADC_SAMPLINGTIME_COMMON_2
  4210. * @retval None
  4211. */
  4212. __STATIC_INLINE void LL_ADC_SetChannelSamplingTime(ADC_TypeDef *ADCx, uint32_t Channel, uint32_t SamplingTimeY)
  4213. {
  4214. 8001a18: b580 push {r7, lr}
  4215. 8001a1a: b084 sub sp, #16
  4216. 8001a1c: af00 add r7, sp, #0
  4217. 8001a1e: 60f8 str r0, [r7, #12]
  4218. 8001a20: 60b9 str r1, [r7, #8]
  4219. 8001a22: 607a str r2, [r7, #4]
  4220. /* Parameter "Channel" is used with masks because containing */
  4221. /* other bits reserved for other purpose. */
  4222. MODIFY_REG(ADCx->SMPR,
  4223. 8001a24: 68fb ldr r3, [r7, #12]
  4224. 8001a26: 695b ldr r3, [r3, #20]
  4225. 8001a28: 68ba ldr r2, [r7, #8]
  4226. 8001a2a: 0212 lsls r2, r2, #8
  4227. 8001a2c: 43d2 mvns r2, r2
  4228. 8001a2e: 401a ands r2, r3
  4229. 8001a30: 68bb ldr r3, [r7, #8]
  4230. 8001a32: 021b lsls r3, r3, #8
  4231. 8001a34: 6879 ldr r1, [r7, #4]
  4232. 8001a36: 400b ands r3, r1
  4233. 8001a38: 4904 ldr r1, [pc, #16] @ (8001a4c <LL_ADC_SetChannelSamplingTime+0x34>)
  4234. 8001a3a: 400b ands r3, r1
  4235. 8001a3c: 431a orrs r2, r3
  4236. 8001a3e: 68fb ldr r3, [r7, #12]
  4237. 8001a40: 615a str r2, [r3, #20]
  4238. (Channel << ADC_SMPR_SMPSEL0_BITOFFSET_POS),
  4239. (Channel << ADC_SMPR_SMPSEL0_BITOFFSET_POS) & (SamplingTimeY & ADC_SAMPLING_TIME_CH_MASK)
  4240. );
  4241. }
  4242. 8001a42: 46c0 nop @ (mov r8, r8)
  4243. 8001a44: 46bd mov sp, r7
  4244. 8001a46: b004 add sp, #16
  4245. 8001a48: bd80 pop {r7, pc}
  4246. 8001a4a: 46c0 nop @ (mov r8, r8)
  4247. 8001a4c: 07ffff00 .word 0x07ffff00
  4248. 08001a50 <LL_ADC_EnableInternalRegulator>:
  4249. * @rmtoll CR ADVREGEN LL_ADC_EnableInternalRegulator
  4250. * @param ADCx ADC instance
  4251. * @retval None
  4252. */
  4253. __STATIC_INLINE void LL_ADC_EnableInternalRegulator(ADC_TypeDef *ADCx)
  4254. {
  4255. 8001a50: b580 push {r7, lr}
  4256. 8001a52: b082 sub sp, #8
  4257. 8001a54: af00 add r7, sp, #0
  4258. 8001a56: 6078 str r0, [r7, #4]
  4259. /* Note: Write register with some additional bits forced to state reset */
  4260. /* instead of modifying only the selected bit for this function, */
  4261. /* to not interfere with bits with HW property "rs". */
  4262. MODIFY_REG(ADCx->CR,
  4263. 8001a58: 687b ldr r3, [r7, #4]
  4264. 8001a5a: 689b ldr r3, [r3, #8]
  4265. 8001a5c: 4a05 ldr r2, [pc, #20] @ (8001a74 <LL_ADC_EnableInternalRegulator+0x24>)
  4266. 8001a5e: 4013 ands r3, r2
  4267. 8001a60: 2280 movs r2, #128 @ 0x80
  4268. 8001a62: 0552 lsls r2, r2, #21
  4269. 8001a64: 431a orrs r2, r3
  4270. 8001a66: 687b ldr r3, [r7, #4]
  4271. 8001a68: 609a str r2, [r3, #8]
  4272. ADC_CR_BITS_PROPERTY_RS,
  4273. ADC_CR_ADVREGEN);
  4274. }
  4275. 8001a6a: 46c0 nop @ (mov r8, r8)
  4276. 8001a6c: 46bd mov sp, r7
  4277. 8001a6e: b002 add sp, #8
  4278. 8001a70: bd80 pop {r7, pc}
  4279. 8001a72: 46c0 nop @ (mov r8, r8)
  4280. 8001a74: 6fffffe8 .word 0x6fffffe8
  4281. 08001a78 <LL_ADC_IsInternalRegulatorEnabled>:
  4282. * @rmtoll CR ADVREGEN LL_ADC_IsInternalRegulatorEnabled
  4283. * @param ADCx ADC instance
  4284. * @retval 0: internal regulator is disabled, 1: internal regulator is enabled.
  4285. */
  4286. __STATIC_INLINE uint32_t LL_ADC_IsInternalRegulatorEnabled(const ADC_TypeDef *ADCx)
  4287. {
  4288. 8001a78: b580 push {r7, lr}
  4289. 8001a7a: b082 sub sp, #8
  4290. 8001a7c: af00 add r7, sp, #0
  4291. 8001a7e: 6078 str r0, [r7, #4]
  4292. return ((READ_BIT(ADCx->CR, ADC_CR_ADVREGEN) == (ADC_CR_ADVREGEN)) ? 1UL : 0UL);
  4293. 8001a80: 687b ldr r3, [r7, #4]
  4294. 8001a82: 689a ldr r2, [r3, #8]
  4295. 8001a84: 2380 movs r3, #128 @ 0x80
  4296. 8001a86: 055b lsls r3, r3, #21
  4297. 8001a88: 401a ands r2, r3
  4298. 8001a8a: 2380 movs r3, #128 @ 0x80
  4299. 8001a8c: 055b lsls r3, r3, #21
  4300. 8001a8e: 429a cmp r2, r3
  4301. 8001a90: d101 bne.n 8001a96 <LL_ADC_IsInternalRegulatorEnabled+0x1e>
  4302. 8001a92: 2301 movs r3, #1
  4303. 8001a94: e000 b.n 8001a98 <LL_ADC_IsInternalRegulatorEnabled+0x20>
  4304. 8001a96: 2300 movs r3, #0
  4305. }
  4306. 8001a98: 0018 movs r0, r3
  4307. 8001a9a: 46bd mov sp, r7
  4308. 8001a9c: b002 add sp, #8
  4309. 8001a9e: bd80 pop {r7, pc}
  4310. 08001aa0 <LL_ADC_Enable>:
  4311. * @rmtoll CR ADEN LL_ADC_Enable
  4312. * @param ADCx ADC instance
  4313. * @retval None
  4314. */
  4315. __STATIC_INLINE void LL_ADC_Enable(ADC_TypeDef *ADCx)
  4316. {
  4317. 8001aa0: b580 push {r7, lr}
  4318. 8001aa2: b082 sub sp, #8
  4319. 8001aa4: af00 add r7, sp, #0
  4320. 8001aa6: 6078 str r0, [r7, #4]
  4321. /* Note: Write register with some additional bits forced to state reset */
  4322. /* instead of modifying only the selected bit for this function, */
  4323. /* to not interfere with bits with HW property "rs". */
  4324. MODIFY_REG(ADCx->CR,
  4325. 8001aa8: 687b ldr r3, [r7, #4]
  4326. 8001aaa: 689b ldr r3, [r3, #8]
  4327. 8001aac: 4a04 ldr r2, [pc, #16] @ (8001ac0 <LL_ADC_Enable+0x20>)
  4328. 8001aae: 4013 ands r3, r2
  4329. 8001ab0: 2201 movs r2, #1
  4330. 8001ab2: 431a orrs r2, r3
  4331. 8001ab4: 687b ldr r3, [r7, #4]
  4332. 8001ab6: 609a str r2, [r3, #8]
  4333. ADC_CR_BITS_PROPERTY_RS,
  4334. ADC_CR_ADEN);
  4335. }
  4336. 8001ab8: 46c0 nop @ (mov r8, r8)
  4337. 8001aba: 46bd mov sp, r7
  4338. 8001abc: b002 add sp, #8
  4339. 8001abe: bd80 pop {r7, pc}
  4340. 8001ac0: 7fffffe8 .word 0x7fffffe8
  4341. 08001ac4 <LL_ADC_Disable>:
  4342. * @rmtoll CR ADDIS LL_ADC_Disable
  4343. * @param ADCx ADC instance
  4344. * @retval None
  4345. */
  4346. __STATIC_INLINE void LL_ADC_Disable(ADC_TypeDef *ADCx)
  4347. {
  4348. 8001ac4: b580 push {r7, lr}
  4349. 8001ac6: b082 sub sp, #8
  4350. 8001ac8: af00 add r7, sp, #0
  4351. 8001aca: 6078 str r0, [r7, #4]
  4352. /* Note: Write register with some additional bits forced to state reset */
  4353. /* instead of modifying only the selected bit for this function, */
  4354. /* to not interfere with bits with HW property "rs". */
  4355. MODIFY_REG(ADCx->CR,
  4356. 8001acc: 687b ldr r3, [r7, #4]
  4357. 8001ace: 689b ldr r3, [r3, #8]
  4358. 8001ad0: 4a04 ldr r2, [pc, #16] @ (8001ae4 <LL_ADC_Disable+0x20>)
  4359. 8001ad2: 4013 ands r3, r2
  4360. 8001ad4: 2202 movs r2, #2
  4361. 8001ad6: 431a orrs r2, r3
  4362. 8001ad8: 687b ldr r3, [r7, #4]
  4363. 8001ada: 609a str r2, [r3, #8]
  4364. ADC_CR_BITS_PROPERTY_RS,
  4365. ADC_CR_ADDIS);
  4366. }
  4367. 8001adc: 46c0 nop @ (mov r8, r8)
  4368. 8001ade: 46bd mov sp, r7
  4369. 8001ae0: b002 add sp, #8
  4370. 8001ae2: bd80 pop {r7, pc}
  4371. 8001ae4: 7fffffe8 .word 0x7fffffe8
  4372. 08001ae8 <LL_ADC_IsEnabled>:
  4373. * @rmtoll CR ADEN LL_ADC_IsEnabled
  4374. * @param ADCx ADC instance
  4375. * @retval 0: ADC is disabled, 1: ADC is enabled.
  4376. */
  4377. __STATIC_INLINE uint32_t LL_ADC_IsEnabled(const ADC_TypeDef *ADCx)
  4378. {
  4379. 8001ae8: b580 push {r7, lr}
  4380. 8001aea: b082 sub sp, #8
  4381. 8001aec: af00 add r7, sp, #0
  4382. 8001aee: 6078 str r0, [r7, #4]
  4383. return ((READ_BIT(ADCx->CR, ADC_CR_ADEN) == (ADC_CR_ADEN)) ? 1UL : 0UL);
  4384. 8001af0: 687b ldr r3, [r7, #4]
  4385. 8001af2: 689b ldr r3, [r3, #8]
  4386. 8001af4: 2201 movs r2, #1
  4387. 8001af6: 4013 ands r3, r2
  4388. 8001af8: 2b01 cmp r3, #1
  4389. 8001afa: d101 bne.n 8001b00 <LL_ADC_IsEnabled+0x18>
  4390. 8001afc: 2301 movs r3, #1
  4391. 8001afe: e000 b.n 8001b02 <LL_ADC_IsEnabled+0x1a>
  4392. 8001b00: 2300 movs r3, #0
  4393. }
  4394. 8001b02: 0018 movs r0, r3
  4395. 8001b04: 46bd mov sp, r7
  4396. 8001b06: b002 add sp, #8
  4397. 8001b08: bd80 pop {r7, pc}
  4398. 08001b0a <LL_ADC_IsDisableOngoing>:
  4399. * @rmtoll CR ADDIS LL_ADC_IsDisableOngoing
  4400. * @param ADCx ADC instance
  4401. * @retval 0: no ADC disable command on going.
  4402. */
  4403. __STATIC_INLINE uint32_t LL_ADC_IsDisableOngoing(const ADC_TypeDef *ADCx)
  4404. {
  4405. 8001b0a: b580 push {r7, lr}
  4406. 8001b0c: b082 sub sp, #8
  4407. 8001b0e: af00 add r7, sp, #0
  4408. 8001b10: 6078 str r0, [r7, #4]
  4409. return ((READ_BIT(ADCx->CR, ADC_CR_ADDIS) == (ADC_CR_ADDIS)) ? 1UL : 0UL);
  4410. 8001b12: 687b ldr r3, [r7, #4]
  4411. 8001b14: 689b ldr r3, [r3, #8]
  4412. 8001b16: 2202 movs r2, #2
  4413. 8001b18: 4013 ands r3, r2
  4414. 8001b1a: 2b02 cmp r3, #2
  4415. 8001b1c: d101 bne.n 8001b22 <LL_ADC_IsDisableOngoing+0x18>
  4416. 8001b1e: 2301 movs r3, #1
  4417. 8001b20: e000 b.n 8001b24 <LL_ADC_IsDisableOngoing+0x1a>
  4418. 8001b22: 2300 movs r3, #0
  4419. }
  4420. 8001b24: 0018 movs r0, r3
  4421. 8001b26: 46bd mov sp, r7
  4422. 8001b28: b002 add sp, #8
  4423. 8001b2a: bd80 pop {r7, pc}
  4424. 08001b2c <LL_ADC_REG_StartConversion>:
  4425. * @rmtoll CR ADSTART LL_ADC_REG_StartConversion
  4426. * @param ADCx ADC instance
  4427. * @retval None
  4428. */
  4429. __STATIC_INLINE void LL_ADC_REG_StartConversion(ADC_TypeDef *ADCx)
  4430. {
  4431. 8001b2c: b580 push {r7, lr}
  4432. 8001b2e: b082 sub sp, #8
  4433. 8001b30: af00 add r7, sp, #0
  4434. 8001b32: 6078 str r0, [r7, #4]
  4435. /* Note: Write register with some additional bits forced to state reset */
  4436. /* instead of modifying only the selected bit for this function, */
  4437. /* to not interfere with bits with HW property "rs". */
  4438. MODIFY_REG(ADCx->CR,
  4439. 8001b34: 687b ldr r3, [r7, #4]
  4440. 8001b36: 689b ldr r3, [r3, #8]
  4441. 8001b38: 4a04 ldr r2, [pc, #16] @ (8001b4c <LL_ADC_REG_StartConversion+0x20>)
  4442. 8001b3a: 4013 ands r3, r2
  4443. 8001b3c: 2204 movs r2, #4
  4444. 8001b3e: 431a orrs r2, r3
  4445. 8001b40: 687b ldr r3, [r7, #4]
  4446. 8001b42: 609a str r2, [r3, #8]
  4447. ADC_CR_BITS_PROPERTY_RS,
  4448. ADC_CR_ADSTART);
  4449. }
  4450. 8001b44: 46c0 nop @ (mov r8, r8)
  4451. 8001b46: 46bd mov sp, r7
  4452. 8001b48: b002 add sp, #8
  4453. 8001b4a: bd80 pop {r7, pc}
  4454. 8001b4c: 7fffffe8 .word 0x7fffffe8
  4455. 08001b50 <LL_ADC_REG_StopConversion>:
  4456. * @rmtoll CR ADSTP LL_ADC_REG_StopConversion
  4457. * @param ADCx ADC instance
  4458. * @retval None
  4459. */
  4460. __STATIC_INLINE void LL_ADC_REG_StopConversion(ADC_TypeDef *ADCx)
  4461. {
  4462. 8001b50: b580 push {r7, lr}
  4463. 8001b52: b082 sub sp, #8
  4464. 8001b54: af00 add r7, sp, #0
  4465. 8001b56: 6078 str r0, [r7, #4]
  4466. /* Note: Write register with some additional bits forced to state reset */
  4467. /* instead of modifying only the selected bit for this function, */
  4468. /* to not interfere with bits with HW property "rs". */
  4469. MODIFY_REG(ADCx->CR,
  4470. 8001b58: 687b ldr r3, [r7, #4]
  4471. 8001b5a: 689b ldr r3, [r3, #8]
  4472. 8001b5c: 4a04 ldr r2, [pc, #16] @ (8001b70 <LL_ADC_REG_StopConversion+0x20>)
  4473. 8001b5e: 4013 ands r3, r2
  4474. 8001b60: 2210 movs r2, #16
  4475. 8001b62: 431a orrs r2, r3
  4476. 8001b64: 687b ldr r3, [r7, #4]
  4477. 8001b66: 609a str r2, [r3, #8]
  4478. ADC_CR_BITS_PROPERTY_RS,
  4479. ADC_CR_ADSTP);
  4480. }
  4481. 8001b68: 46c0 nop @ (mov r8, r8)
  4482. 8001b6a: 46bd mov sp, r7
  4483. 8001b6c: b002 add sp, #8
  4484. 8001b6e: bd80 pop {r7, pc}
  4485. 8001b70: 7fffffe8 .word 0x7fffffe8
  4486. 08001b74 <LL_ADC_REG_IsConversionOngoing>:
  4487. * @rmtoll CR ADSTART LL_ADC_REG_IsConversionOngoing
  4488. * @param ADCx ADC instance
  4489. * @retval 0: no conversion is on going on ADC group regular.
  4490. */
  4491. __STATIC_INLINE uint32_t LL_ADC_REG_IsConversionOngoing(const ADC_TypeDef *ADCx)
  4492. {
  4493. 8001b74: b580 push {r7, lr}
  4494. 8001b76: b082 sub sp, #8
  4495. 8001b78: af00 add r7, sp, #0
  4496. 8001b7a: 6078 str r0, [r7, #4]
  4497. return ((READ_BIT(ADCx->CR, ADC_CR_ADSTART) == (ADC_CR_ADSTART)) ? 1UL : 0UL);
  4498. 8001b7c: 687b ldr r3, [r7, #4]
  4499. 8001b7e: 689b ldr r3, [r3, #8]
  4500. 8001b80: 2204 movs r2, #4
  4501. 8001b82: 4013 ands r3, r2
  4502. 8001b84: 2b04 cmp r3, #4
  4503. 8001b86: d101 bne.n 8001b8c <LL_ADC_REG_IsConversionOngoing+0x18>
  4504. 8001b88: 2301 movs r3, #1
  4505. 8001b8a: e000 b.n 8001b8e <LL_ADC_REG_IsConversionOngoing+0x1a>
  4506. 8001b8c: 2300 movs r3, #0
  4507. }
  4508. 8001b8e: 0018 movs r0, r3
  4509. 8001b90: 46bd mov sp, r7
  4510. 8001b92: b002 add sp, #8
  4511. 8001b94: bd80 pop {r7, pc}
  4512. ...
  4513. 08001b98 <HAL_ADC_Init>:
  4514. * of structure "ADC_InitTypeDef".
  4515. * @param hadc ADC handle
  4516. * @retval HAL status
  4517. */
  4518. HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef *hadc)
  4519. {
  4520. 8001b98: b580 push {r7, lr}
  4521. 8001b9a: b088 sub sp, #32
  4522. 8001b9c: af00 add r7, sp, #0
  4523. 8001b9e: 6078 str r0, [r7, #4]
  4524. HAL_StatusTypeDef tmp_hal_status = HAL_OK;
  4525. 8001ba0: 231f movs r3, #31
  4526. 8001ba2: 18fb adds r3, r7, r3
  4527. 8001ba4: 2200 movs r2, #0
  4528. 8001ba6: 701a strb r2, [r3, #0]
  4529. uint32_t tmp_cfgr1 = 0UL;
  4530. 8001ba8: 2300 movs r3, #0
  4531. 8001baa: 61bb str r3, [r7, #24]
  4532. uint32_t tmp_cfgr2 = 0UL;
  4533. 8001bac: 2300 movs r3, #0
  4534. 8001bae: 617b str r3, [r7, #20]
  4535. uint32_t tmp_adc_reg_is_conversion_on_going;
  4536. __IO uint32_t wait_loop_index = 0UL;
  4537. 8001bb0: 2300 movs r3, #0
  4538. 8001bb2: 60fb str r3, [r7, #12]
  4539. /* Check ADC handle */
  4540. if (hadc == NULL)
  4541. 8001bb4: 687b ldr r3, [r7, #4]
  4542. 8001bb6: 2b00 cmp r3, #0
  4543. 8001bb8: d101 bne.n 8001bbe <HAL_ADC_Init+0x26>
  4544. {
  4545. return HAL_ERROR;
  4546. 8001bba: 2301 movs r3, #1
  4547. 8001bbc: e17f b.n 8001ebe <HAL_ADC_Init+0x326>
  4548. /* continuous mode is disabled. */
  4549. assert_param(!((hadc->Init.DiscontinuousConvMode == ENABLE) && (hadc->Init.ContinuousConvMode == ENABLE)));
  4550. /* Actions performed only if ADC is coming from state reset: */
  4551. /* - Initialization of ADC MSP */
  4552. if (hadc->State == HAL_ADC_STATE_RESET)
  4553. 8001bbe: 687b ldr r3, [r7, #4]
  4554. 8001bc0: 6d9b ldr r3, [r3, #88] @ 0x58
  4555. 8001bc2: 2b00 cmp r3, #0
  4556. 8001bc4: d10a bne.n 8001bdc <HAL_ADC_Init+0x44>
  4557. /* Init the low level hardware */
  4558. hadc->MspInitCallback(hadc);
  4559. #else
  4560. /* Init the low level hardware */
  4561. HAL_ADC_MspInit(hadc);
  4562. 8001bc6: 687b ldr r3, [r7, #4]
  4563. 8001bc8: 0018 movs r0, r3
  4564. 8001bca: f7fe fef7 bl 80009bc <HAL_ADC_MspInit>
  4565. #endif /* USE_HAL_ADC_REGISTER_CALLBACKS */
  4566. /* Set ADC error code to none */
  4567. ADC_CLEAR_ERRORCODE(hadc);
  4568. 8001bce: 687b ldr r3, [r7, #4]
  4569. 8001bd0: 2200 movs r2, #0
  4570. 8001bd2: 65da str r2, [r3, #92] @ 0x5c
  4571. /* Initialize Lock */
  4572. hadc->Lock = HAL_UNLOCKED;
  4573. 8001bd4: 687b ldr r3, [r7, #4]
  4574. 8001bd6: 2254 movs r2, #84 @ 0x54
  4575. 8001bd8: 2100 movs r1, #0
  4576. 8001bda: 5499 strb r1, [r3, r2]
  4577. }
  4578. if (LL_ADC_IsInternalRegulatorEnabled(hadc->Instance) == 0UL)
  4579. 8001bdc: 687b ldr r3, [r7, #4]
  4580. 8001bde: 681b ldr r3, [r3, #0]
  4581. 8001be0: 0018 movs r0, r3
  4582. 8001be2: f7ff ff49 bl 8001a78 <LL_ADC_IsInternalRegulatorEnabled>
  4583. 8001be6: 1e03 subs r3, r0, #0
  4584. 8001be8: d115 bne.n 8001c16 <HAL_ADC_Init+0x7e>
  4585. {
  4586. /* Enable ADC internal voltage regulator */
  4587. LL_ADC_EnableInternalRegulator(hadc->Instance);
  4588. 8001bea: 687b ldr r3, [r7, #4]
  4589. 8001bec: 681b ldr r3, [r3, #0]
  4590. 8001bee: 0018 movs r0, r3
  4591. 8001bf0: f7ff ff2e bl 8001a50 <LL_ADC_EnableInternalRegulator>
  4592. /* Delay for ADC stabilization time */
  4593. /* Wait loop initialization and execution */
  4594. /* Note: Variable divided by 2 to compensate partially */
  4595. /* CPU processing cycles, scaling in us split to not */
  4596. /* exceed 32 bits register capacity and handle low frequency. */
  4597. wait_loop_index = ((LL_ADC_DELAY_INTERNAL_REGUL_STAB_US / 10UL) * ((SystemCoreClock / (100000UL * 2UL)) + 1UL));
  4598. 8001bf4: 4bb4 ldr r3, [pc, #720] @ (8001ec8 <HAL_ADC_Init+0x330>)
  4599. 8001bf6: 681b ldr r3, [r3, #0]
  4600. 8001bf8: 49b4 ldr r1, [pc, #720] @ (8001ecc <HAL_ADC_Init+0x334>)
  4601. 8001bfa: 0018 movs r0, r3
  4602. 8001bfc: f7fe fa80 bl 8000100 <__udivsi3>
  4603. 8001c00: 0003 movs r3, r0
  4604. 8001c02: 3301 adds r3, #1
  4605. 8001c04: 005b lsls r3, r3, #1
  4606. 8001c06: 60fb str r3, [r7, #12]
  4607. while (wait_loop_index != 0UL)
  4608. 8001c08: e002 b.n 8001c10 <HAL_ADC_Init+0x78>
  4609. {
  4610. wait_loop_index--;
  4611. 8001c0a: 68fb ldr r3, [r7, #12]
  4612. 8001c0c: 3b01 subs r3, #1
  4613. 8001c0e: 60fb str r3, [r7, #12]
  4614. while (wait_loop_index != 0UL)
  4615. 8001c10: 68fb ldr r3, [r7, #12]
  4616. 8001c12: 2b00 cmp r3, #0
  4617. 8001c14: d1f9 bne.n 8001c0a <HAL_ADC_Init+0x72>
  4618. }
  4619. /* Verification that ADC voltage regulator is correctly enabled, whether */
  4620. /* or not ADC is coming from state reset (if any potential problem of */
  4621. /* clocking, voltage regulator would not be enabled). */
  4622. if (LL_ADC_IsInternalRegulatorEnabled(hadc->Instance) == 0UL)
  4623. 8001c16: 687b ldr r3, [r7, #4]
  4624. 8001c18: 681b ldr r3, [r3, #0]
  4625. 8001c1a: 0018 movs r0, r3
  4626. 8001c1c: f7ff ff2c bl 8001a78 <LL_ADC_IsInternalRegulatorEnabled>
  4627. 8001c20: 1e03 subs r3, r0, #0
  4628. 8001c22: d10f bne.n 8001c44 <HAL_ADC_Init+0xac>
  4629. {
  4630. /* Update ADC state machine to error */
  4631. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  4632. 8001c24: 687b ldr r3, [r7, #4]
  4633. 8001c26: 6d9b ldr r3, [r3, #88] @ 0x58
  4634. 8001c28: 2210 movs r2, #16
  4635. 8001c2a: 431a orrs r2, r3
  4636. 8001c2c: 687b ldr r3, [r7, #4]
  4637. 8001c2e: 659a str r2, [r3, #88] @ 0x58
  4638. /* Set ADC error code to ADC peripheral internal error */
  4639. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  4640. 8001c30: 687b ldr r3, [r7, #4]
  4641. 8001c32: 6ddb ldr r3, [r3, #92] @ 0x5c
  4642. 8001c34: 2201 movs r2, #1
  4643. 8001c36: 431a orrs r2, r3
  4644. 8001c38: 687b ldr r3, [r7, #4]
  4645. 8001c3a: 65da str r2, [r3, #92] @ 0x5c
  4646. tmp_hal_status = HAL_ERROR;
  4647. 8001c3c: 231f movs r3, #31
  4648. 8001c3e: 18fb adds r3, r7, r3
  4649. 8001c40: 2201 movs r2, #1
  4650. 8001c42: 701a strb r2, [r3, #0]
  4651. /* Configuration of ADC parameters if previous preliminary actions are */
  4652. /* correctly completed and if there is no conversion on going on regular */
  4653. /* group (ADC may already be enabled at this point if HAL_ADC_Init() is */
  4654. /* called to update a parameter on the fly). */
  4655. tmp_adc_reg_is_conversion_on_going = LL_ADC_REG_IsConversionOngoing(hadc->Instance);
  4656. 8001c44: 687b ldr r3, [r7, #4]
  4657. 8001c46: 681b ldr r3, [r3, #0]
  4658. 8001c48: 0018 movs r0, r3
  4659. 8001c4a: f7ff ff93 bl 8001b74 <LL_ADC_REG_IsConversionOngoing>
  4660. 8001c4e: 0003 movs r3, r0
  4661. 8001c50: 613b str r3, [r7, #16]
  4662. if (((hadc->State & HAL_ADC_STATE_ERROR_INTERNAL) == 0UL)
  4663. 8001c52: 687b ldr r3, [r7, #4]
  4664. 8001c54: 6d9b ldr r3, [r3, #88] @ 0x58
  4665. 8001c56: 2210 movs r2, #16
  4666. 8001c58: 4013 ands r3, r2
  4667. 8001c5a: d000 beq.n 8001c5e <HAL_ADC_Init+0xc6>
  4668. 8001c5c: e122 b.n 8001ea4 <HAL_ADC_Init+0x30c>
  4669. && (tmp_adc_reg_is_conversion_on_going == 0UL)
  4670. 8001c5e: 693b ldr r3, [r7, #16]
  4671. 8001c60: 2b00 cmp r3, #0
  4672. 8001c62: d000 beq.n 8001c66 <HAL_ADC_Init+0xce>
  4673. 8001c64: e11e b.n 8001ea4 <HAL_ADC_Init+0x30c>
  4674. )
  4675. {
  4676. /* Set ADC state */
  4677. ADC_STATE_CLR_SET(hadc->State,
  4678. 8001c66: 687b ldr r3, [r7, #4]
  4679. 8001c68: 6d9b ldr r3, [r3, #88] @ 0x58
  4680. 8001c6a: 4a99 ldr r2, [pc, #612] @ (8001ed0 <HAL_ADC_Init+0x338>)
  4681. 8001c6c: 4013 ands r3, r2
  4682. 8001c6e: 2202 movs r2, #2
  4683. 8001c70: 431a orrs r2, r3
  4684. 8001c72: 687b ldr r3, [r7, #4]
  4685. 8001c74: 659a str r2, [r3, #88] @ 0x58
  4686. /* - DMA continuous request */
  4687. /* - Trigger frequency mode */
  4688. /* Note: If low power mode AutoPowerOff is enabled, ADC enable */
  4689. /* and disable phases are performed automatically by hardware */
  4690. /* (in this case, flag ADC_FLAG_RDY is not set). */
  4691. if (LL_ADC_IsEnabled(hadc->Instance) == 0UL)
  4692. 8001c76: 687b ldr r3, [r7, #4]
  4693. 8001c78: 681b ldr r3, [r3, #0]
  4694. 8001c7a: 0018 movs r0, r3
  4695. 8001c7c: f7ff ff34 bl 8001ae8 <LL_ADC_IsEnabled>
  4696. 8001c80: 1e03 subs r3, r0, #0
  4697. 8001c82: d000 beq.n 8001c86 <HAL_ADC_Init+0xee>
  4698. 8001c84: e0ad b.n 8001de2 <HAL_ADC_Init+0x24a>
  4699. /* without needing to reconfigure all other ADC groups/channels */
  4700. /* parameters): */
  4701. /* - internal measurement paths (VrefInt, ...) */
  4702. /* (set into HAL_ADC_ConfigChannel() ) */
  4703. tmp_cfgr1 |= (hadc->Init.Resolution |
  4704. 8001c86: 687b ldr r3, [r7, #4]
  4705. 8001c88: 689a ldr r2, [r3, #8]
  4706. ADC_CFGR1_AUTOWAIT((uint32_t)hadc->Init.LowPowerAutoWait) |
  4707. 8001c8a: 687b ldr r3, [r7, #4]
  4708. 8001c8c: 7e1b ldrb r3, [r3, #24]
  4709. 8001c8e: 039b lsls r3, r3, #14
  4710. tmp_cfgr1 |= (hadc->Init.Resolution |
  4711. 8001c90: 431a orrs r2, r3
  4712. ADC_CFGR1_AUTOOFF((uint32_t)hadc->Init.LowPowerAutoPowerOff) |
  4713. 8001c92: 687b ldr r3, [r7, #4]
  4714. 8001c94: 7e5b ldrb r3, [r3, #25]
  4715. 8001c96: 03db lsls r3, r3, #15
  4716. ADC_CFGR1_AUTOWAIT((uint32_t)hadc->Init.LowPowerAutoWait) |
  4717. 8001c98: 431a orrs r2, r3
  4718. ADC_CFGR1_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) |
  4719. 8001c9a: 687b ldr r3, [r7, #4]
  4720. 8001c9c: 7e9b ldrb r3, [r3, #26]
  4721. 8001c9e: 035b lsls r3, r3, #13
  4722. ADC_CFGR1_AUTOOFF((uint32_t)hadc->Init.LowPowerAutoPowerOff) |
  4723. 8001ca0: 431a orrs r2, r3
  4724. ADC_CFGR1_OVERRUN(hadc->Init.Overrun) |
  4725. 8001ca2: 687b ldr r3, [r7, #4]
  4726. 8001ca4: 6b1b ldr r3, [r3, #48] @ 0x30
  4727. 8001ca6: 2b00 cmp r3, #0
  4728. 8001ca8: d002 beq.n 8001cb0 <HAL_ADC_Init+0x118>
  4729. 8001caa: 2380 movs r3, #128 @ 0x80
  4730. 8001cac: 015b lsls r3, r3, #5
  4731. 8001cae: e000 b.n 8001cb2 <HAL_ADC_Init+0x11a>
  4732. 8001cb0: 2300 movs r3, #0
  4733. ADC_CFGR1_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) |
  4734. 8001cb2: 431a orrs r2, r3
  4735. hadc->Init.DataAlign |
  4736. 8001cb4: 687b ldr r3, [r7, #4]
  4737. 8001cb6: 68db ldr r3, [r3, #12]
  4738. ADC_CFGR1_OVERRUN(hadc->Init.Overrun) |
  4739. 8001cb8: 431a orrs r2, r3
  4740. ADC_SCAN_SEQ_MODE(hadc->Init.ScanConvMode) |
  4741. 8001cba: 687b ldr r3, [r7, #4]
  4742. 8001cbc: 691b ldr r3, [r3, #16]
  4743. 8001cbe: 2b00 cmp r3, #0
  4744. 8001cc0: da04 bge.n 8001ccc <HAL_ADC_Init+0x134>
  4745. 8001cc2: 687b ldr r3, [r7, #4]
  4746. 8001cc4: 691b ldr r3, [r3, #16]
  4747. 8001cc6: 005b lsls r3, r3, #1
  4748. 8001cc8: 085b lsrs r3, r3, #1
  4749. 8001cca: e001 b.n 8001cd0 <HAL_ADC_Init+0x138>
  4750. 8001ccc: 2380 movs r3, #128 @ 0x80
  4751. 8001cce: 039b lsls r3, r3, #14
  4752. hadc->Init.DataAlign |
  4753. 8001cd0: 431a orrs r2, r3
  4754. ADC_CFGR1_DMACONTREQ((uint32_t)hadc->Init.DMAContinuousRequests));
  4755. 8001cd2: 687b ldr r3, [r7, #4]
  4756. 8001cd4: 212c movs r1, #44 @ 0x2c
  4757. 8001cd6: 5c5b ldrb r3, [r3, r1]
  4758. 8001cd8: 005b lsls r3, r3, #1
  4759. ADC_SCAN_SEQ_MODE(hadc->Init.ScanConvMode) |
  4760. 8001cda: 4313 orrs r3, r2
  4761. tmp_cfgr1 |= (hadc->Init.Resolution |
  4762. 8001cdc: 69ba ldr r2, [r7, #24]
  4763. 8001cde: 4313 orrs r3, r2
  4764. 8001ce0: 61bb str r3, [r7, #24]
  4765. /* Update setting of discontinuous mode only if continuous mode is disabled */
  4766. if (hadc->Init.DiscontinuousConvMode == ENABLE)
  4767. 8001ce2: 687b ldr r3, [r7, #4]
  4768. 8001ce4: 2220 movs r2, #32
  4769. 8001ce6: 5c9b ldrb r3, [r3, r2]
  4770. 8001ce8: 2b01 cmp r3, #1
  4771. 8001cea: d115 bne.n 8001d18 <HAL_ADC_Init+0x180>
  4772. {
  4773. if (hadc->Init.ContinuousConvMode == DISABLE)
  4774. 8001cec: 687b ldr r3, [r7, #4]
  4775. 8001cee: 7e9b ldrb r3, [r3, #26]
  4776. 8001cf0: 2b00 cmp r3, #0
  4777. 8001cf2: d105 bne.n 8001d00 <HAL_ADC_Init+0x168>
  4778. {
  4779. /* Enable the selected ADC group regular discontinuous mode */
  4780. tmp_cfgr1 |= ADC_CFGR1_DISCEN;
  4781. 8001cf4: 69bb ldr r3, [r7, #24]
  4782. 8001cf6: 2280 movs r2, #128 @ 0x80
  4783. 8001cf8: 0252 lsls r2, r2, #9
  4784. 8001cfa: 4313 orrs r3, r2
  4785. 8001cfc: 61bb str r3, [r7, #24]
  4786. 8001cfe: e00b b.n 8001d18 <HAL_ADC_Init+0x180>
  4787. /* ADC regular group discontinuous was intended to be enabled, */
  4788. /* but ADC regular group modes continuous and sequencer discontinuous */
  4789. /* cannot be enabled simultaneously. */
  4790. /* Update ADC state machine to error */
  4791. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
  4792. 8001d00: 687b ldr r3, [r7, #4]
  4793. 8001d02: 6d9b ldr r3, [r3, #88] @ 0x58
  4794. 8001d04: 2220 movs r2, #32
  4795. 8001d06: 431a orrs r2, r3
  4796. 8001d08: 687b ldr r3, [r7, #4]
  4797. 8001d0a: 659a str r2, [r3, #88] @ 0x58
  4798. /* Set ADC error code to ADC peripheral internal error */
  4799. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  4800. 8001d0c: 687b ldr r3, [r7, #4]
  4801. 8001d0e: 6ddb ldr r3, [r3, #92] @ 0x5c
  4802. 8001d10: 2201 movs r2, #1
  4803. 8001d12: 431a orrs r2, r3
  4804. 8001d14: 687b ldr r3, [r7, #4]
  4805. 8001d16: 65da str r2, [r3, #92] @ 0x5c
  4806. /* Enable external trigger if trigger selection is different of software */
  4807. /* start. */
  4808. /* Note: This configuration keeps the hardware feature of parameter */
  4809. /* ExternalTrigConvEdge "trigger edge none" equivalent to */
  4810. /* software start. */
  4811. if (hadc->Init.ExternalTrigConv != ADC_SOFTWARE_START)
  4812. 8001d18: 687b ldr r3, [r7, #4]
  4813. 8001d1a: 6a5b ldr r3, [r3, #36] @ 0x24
  4814. 8001d1c: 2b00 cmp r3, #0
  4815. 8001d1e: d00a beq.n 8001d36 <HAL_ADC_Init+0x19e>
  4816. {
  4817. tmp_cfgr1 |= ((hadc->Init.ExternalTrigConv & ADC_CFGR1_EXTSEL) |
  4818. 8001d20: 687b ldr r3, [r7, #4]
  4819. 8001d22: 6a5a ldr r2, [r3, #36] @ 0x24
  4820. 8001d24: 23e0 movs r3, #224 @ 0xe0
  4821. 8001d26: 005b lsls r3, r3, #1
  4822. 8001d28: 401a ands r2, r3
  4823. hadc->Init.ExternalTrigConvEdge);
  4824. 8001d2a: 687b ldr r3, [r7, #4]
  4825. 8001d2c: 6a9b ldr r3, [r3, #40] @ 0x28
  4826. tmp_cfgr1 |= ((hadc->Init.ExternalTrigConv & ADC_CFGR1_EXTSEL) |
  4827. 8001d2e: 4313 orrs r3, r2
  4828. 8001d30: 69ba ldr r2, [r7, #24]
  4829. 8001d32: 4313 orrs r3, r2
  4830. 8001d34: 61bb str r3, [r7, #24]
  4831. }
  4832. /* Update ADC configuration register with previous settings */
  4833. MODIFY_REG(hadc->Instance->CFGR1,
  4834. 8001d36: 687b ldr r3, [r7, #4]
  4835. 8001d38: 681b ldr r3, [r3, #0]
  4836. 8001d3a: 68db ldr r3, [r3, #12]
  4837. 8001d3c: 4a65 ldr r2, [pc, #404] @ (8001ed4 <HAL_ADC_Init+0x33c>)
  4838. 8001d3e: 4013 ands r3, r2
  4839. 8001d40: 0019 movs r1, r3
  4840. 8001d42: 687b ldr r3, [r7, #4]
  4841. 8001d44: 681b ldr r3, [r3, #0]
  4842. 8001d46: 69ba ldr r2, [r7, #24]
  4843. 8001d48: 430a orrs r2, r1
  4844. 8001d4a: 60da str r2, [r3, #12]
  4845. ADC_CFGR1_ALIGN |
  4846. ADC_CFGR1_SCANDIR |
  4847. ADC_CFGR1_DMACFG,
  4848. tmp_cfgr1);
  4849. tmp_cfgr2 |= ((hadc->Init.ClockPrescaler & ADC_CFGR2_CKMODE) |
  4850. 8001d4c: 687b ldr r3, [r7, #4]
  4851. 8001d4e: 685b ldr r3, [r3, #4]
  4852. 8001d50: 0f9b lsrs r3, r3, #30
  4853. 8001d52: 079a lsls r2, r3, #30
  4854. hadc->Init.TriggerFrequencyMode
  4855. 8001d54: 687b ldr r3, [r7, #4]
  4856. 8001d56: 6cdb ldr r3, [r3, #76] @ 0x4c
  4857. tmp_cfgr2 |= ((hadc->Init.ClockPrescaler & ADC_CFGR2_CKMODE) |
  4858. 8001d58: 4313 orrs r3, r2
  4859. 8001d5a: 697a ldr r2, [r7, #20]
  4860. 8001d5c: 4313 orrs r3, r2
  4861. 8001d5e: 617b str r3, [r7, #20]
  4862. );
  4863. if (hadc->Init.OversamplingMode == ENABLE)
  4864. 8001d60: 687b ldr r3, [r7, #4]
  4865. 8001d62: 223c movs r2, #60 @ 0x3c
  4866. 8001d64: 5c9b ldrb r3, [r3, r2]
  4867. 8001d66: 2b01 cmp r3, #1
  4868. 8001d68: d111 bne.n 8001d8e <HAL_ADC_Init+0x1f6>
  4869. {
  4870. tmp_cfgr2 |= (ADC_CFGR2_OVSE |
  4871. (hadc->Init.ClockPrescaler & ADC_CFGR2_CKMODE) |
  4872. 8001d6a: 687b ldr r3, [r7, #4]
  4873. 8001d6c: 685b ldr r3, [r3, #4]
  4874. 8001d6e: 0f9b lsrs r3, r3, #30
  4875. 8001d70: 079a lsls r2, r3, #30
  4876. hadc->Init.Oversampling.Ratio |
  4877. 8001d72: 687b ldr r3, [r7, #4]
  4878. 8001d74: 6c1b ldr r3, [r3, #64] @ 0x40
  4879. (hadc->Init.ClockPrescaler & ADC_CFGR2_CKMODE) |
  4880. 8001d76: 431a orrs r2, r3
  4881. hadc->Init.Oversampling.RightBitShift |
  4882. 8001d78: 687b ldr r3, [r7, #4]
  4883. 8001d7a: 6c5b ldr r3, [r3, #68] @ 0x44
  4884. hadc->Init.Oversampling.Ratio |
  4885. 8001d7c: 431a orrs r2, r3
  4886. hadc->Init.Oversampling.TriggeredMode
  4887. 8001d7e: 687b ldr r3, [r7, #4]
  4888. 8001d80: 6c9b ldr r3, [r3, #72] @ 0x48
  4889. hadc->Init.Oversampling.RightBitShift |
  4890. 8001d82: 431a orrs r2, r3
  4891. tmp_cfgr2 |= (ADC_CFGR2_OVSE |
  4892. 8001d84: 697b ldr r3, [r7, #20]
  4893. 8001d86: 4313 orrs r3, r2
  4894. 8001d88: 2201 movs r2, #1
  4895. 8001d8a: 4313 orrs r3, r2
  4896. 8001d8c: 617b str r3, [r7, #20]
  4897. );
  4898. }
  4899. MODIFY_REG(hadc->Instance->CFGR2,
  4900. 8001d8e: 687b ldr r3, [r7, #4]
  4901. 8001d90: 681b ldr r3, [r3, #0]
  4902. 8001d92: 691b ldr r3, [r3, #16]
  4903. 8001d94: 4a50 ldr r2, [pc, #320] @ (8001ed8 <HAL_ADC_Init+0x340>)
  4904. 8001d96: 4013 ands r3, r2
  4905. 8001d98: 0019 movs r1, r3
  4906. 8001d9a: 687b ldr r3, [r7, #4]
  4907. 8001d9c: 681b ldr r3, [r3, #0]
  4908. 8001d9e: 697a ldr r2, [r7, #20]
  4909. 8001da0: 430a orrs r2, r1
  4910. 8001da2: 611a str r2, [r3, #16]
  4911. ADC_CFGR2_TOVS,
  4912. tmp_cfgr2);
  4913. /* Configuration of ADC clock mode: asynchronous clock source */
  4914. /* with selectable prescaler. */
  4915. if (((hadc->Init.ClockPrescaler) != ADC_CLOCK_SYNC_PCLK_DIV1) &&
  4916. 8001da4: 687b ldr r3, [r7, #4]
  4917. 8001da6: 685a ldr r2, [r3, #4]
  4918. 8001da8: 23c0 movs r3, #192 @ 0xc0
  4919. 8001daa: 061b lsls r3, r3, #24
  4920. 8001dac: 429a cmp r2, r3
  4921. 8001dae: d018 beq.n 8001de2 <HAL_ADC_Init+0x24a>
  4922. ((hadc->Init.ClockPrescaler) != ADC_CLOCK_SYNC_PCLK_DIV2) &&
  4923. 8001db0: 687b ldr r3, [r7, #4]
  4924. 8001db2: 685a ldr r2, [r3, #4]
  4925. if (((hadc->Init.ClockPrescaler) != ADC_CLOCK_SYNC_PCLK_DIV1) &&
  4926. 8001db4: 2380 movs r3, #128 @ 0x80
  4927. 8001db6: 05db lsls r3, r3, #23
  4928. 8001db8: 429a cmp r2, r3
  4929. 8001dba: d012 beq.n 8001de2 <HAL_ADC_Init+0x24a>
  4930. ((hadc->Init.ClockPrescaler) != ADC_CLOCK_SYNC_PCLK_DIV4))
  4931. 8001dbc: 687b ldr r3, [r7, #4]
  4932. 8001dbe: 685a ldr r2, [r3, #4]
  4933. ((hadc->Init.ClockPrescaler) != ADC_CLOCK_SYNC_PCLK_DIV2) &&
  4934. 8001dc0: 2380 movs r3, #128 @ 0x80
  4935. 8001dc2: 061b lsls r3, r3, #24
  4936. 8001dc4: 429a cmp r2, r3
  4937. 8001dc6: d00c beq.n 8001de2 <HAL_ADC_Init+0x24a>
  4938. {
  4939. MODIFY_REG(ADC1_COMMON->CCR,
  4940. 8001dc8: 4b44 ldr r3, [pc, #272] @ (8001edc <HAL_ADC_Init+0x344>)
  4941. 8001dca: 681b ldr r3, [r3, #0]
  4942. 8001dcc: 4a44 ldr r2, [pc, #272] @ (8001ee0 <HAL_ADC_Init+0x348>)
  4943. 8001dce: 4013 ands r3, r2
  4944. 8001dd0: 0019 movs r1, r3
  4945. 8001dd2: 687b ldr r3, [r7, #4]
  4946. 8001dd4: 685a ldr r2, [r3, #4]
  4947. 8001dd6: 23f0 movs r3, #240 @ 0xf0
  4948. 8001dd8: 039b lsls r3, r3, #14
  4949. 8001dda: 401a ands r2, r3
  4950. 8001ddc: 4b3f ldr r3, [pc, #252] @ (8001edc <HAL_ADC_Init+0x344>)
  4951. 8001dde: 430a orrs r2, r1
  4952. 8001de0: 601a str r2, [r3, #0]
  4953. hadc->Init.ClockPrescaler & ADC_CCR_PRESC);
  4954. }
  4955. }
  4956. /* Channel sampling time configuration */
  4957. LL_ADC_SetSamplingTimeCommonChannels(hadc->Instance, LL_ADC_SAMPLINGTIME_COMMON_1, hadc->Init.SamplingTimeCommon1);
  4958. 8001de2: 687b ldr r3, [r7, #4]
  4959. 8001de4: 6818 ldr r0, [r3, #0]
  4960. 8001de6: 687b ldr r3, [r7, #4]
  4961. 8001de8: 6b5b ldr r3, [r3, #52] @ 0x34
  4962. 8001dea: 001a movs r2, r3
  4963. 8001dec: 2100 movs r1, #0
  4964. 8001dee: f7ff fd8a bl 8001906 <LL_ADC_SetSamplingTimeCommonChannels>
  4965. LL_ADC_SetSamplingTimeCommonChannels(hadc->Instance, LL_ADC_SAMPLINGTIME_COMMON_2, hadc->Init.SamplingTimeCommon2);
  4966. 8001df2: 687b ldr r3, [r7, #4]
  4967. 8001df4: 6818 ldr r0, [r3, #0]
  4968. 8001df6: 687b ldr r3, [r7, #4]
  4969. 8001df8: 6b9b ldr r3, [r3, #56] @ 0x38
  4970. 8001dfa: 493a ldr r1, [pc, #232] @ (8001ee4 <HAL_ADC_Init+0x34c>)
  4971. 8001dfc: 001a movs r2, r3
  4972. 8001dfe: f7ff fd82 bl 8001906 <LL_ADC_SetSamplingTimeCommonChannels>
  4973. /* emulated by software for alignment over all STM32 devices. */
  4974. /* - if scan mode is enabled, regular channels sequence length is set to */
  4975. /* parameter "NbrOfConversion". */
  4976. /* Channels must be configured into each rank using function */
  4977. /* "HAL_ADC_ConfigChannel()". */
  4978. if (hadc->Init.ScanConvMode == ADC_SCAN_DISABLE)
  4979. 8001e02: 687b ldr r3, [r7, #4]
  4980. 8001e04: 691b ldr r3, [r3, #16]
  4981. 8001e06: 2b00 cmp r3, #0
  4982. 8001e08: d109 bne.n 8001e1e <HAL_ADC_Init+0x286>
  4983. {
  4984. /* Set sequencer scan length by clearing ranks above rank 1 */
  4985. /* and do not modify rank 1 value. */
  4986. SET_BIT(hadc->Instance->CHSELR,
  4987. 8001e0a: 687b ldr r3, [r7, #4]
  4988. 8001e0c: 681b ldr r3, [r3, #0]
  4989. 8001e0e: 6a9a ldr r2, [r3, #40] @ 0x28
  4990. 8001e10: 687b ldr r3, [r7, #4]
  4991. 8001e12: 681b ldr r3, [r3, #0]
  4992. 8001e14: 2110 movs r1, #16
  4993. 8001e16: 4249 negs r1, r1
  4994. 8001e18: 430a orrs r2, r1
  4995. 8001e1a: 629a str r2, [r3, #40] @ 0x28
  4996. 8001e1c: e018 b.n 8001e50 <HAL_ADC_Init+0x2b8>
  4997. ADC_CHSELR_SQ2_TO_SQ8);
  4998. }
  4999. else if (hadc->Init.ScanConvMode == ADC_SCAN_ENABLE)
  5000. 8001e1e: 687b ldr r3, [r7, #4]
  5001. 8001e20: 691a ldr r2, [r3, #16]
  5002. 8001e22: 2380 movs r3, #128 @ 0x80
  5003. 8001e24: 039b lsls r3, r3, #14
  5004. 8001e26: 429a cmp r2, r3
  5005. 8001e28: d112 bne.n 8001e50 <HAL_ADC_Init+0x2b8>
  5006. /* therefore after the first call of "HAL_ADC_Init()", */
  5007. /* each rank corresponding to parameter "NbrOfConversion" */
  5008. /* must be set using "HAL_ADC_ConfigChannel()". */
  5009. /* - Set sequencer scan length by clearing ranks above maximum rank */
  5010. /* and do not modify other ranks value. */
  5011. MODIFY_REG(hadc->Instance->CHSELR,
  5012. 8001e2a: 687b ldr r3, [r7, #4]
  5013. 8001e2c: 681b ldr r3, [r3, #0]
  5014. 8001e2e: 6a9b ldr r3, [r3, #40] @ 0x28
  5015. 8001e30: 687b ldr r3, [r7, #4]
  5016. 8001e32: 69db ldr r3, [r3, #28]
  5017. 8001e34: 3b01 subs r3, #1
  5018. 8001e36: 009b lsls r3, r3, #2
  5019. 8001e38: 221c movs r2, #28
  5020. 8001e3a: 4013 ands r3, r2
  5021. 8001e3c: 2210 movs r2, #16
  5022. 8001e3e: 4252 negs r2, r2
  5023. 8001e40: 409a lsls r2, r3
  5024. 8001e42: 0011 movs r1, r2
  5025. 8001e44: 687b ldr r3, [r7, #4]
  5026. 8001e46: 6e1a ldr r2, [r3, #96] @ 0x60
  5027. 8001e48: 687b ldr r3, [r7, #4]
  5028. 8001e4a: 681b ldr r3, [r3, #0]
  5029. 8001e4c: 430a orrs r2, r1
  5030. 8001e4e: 629a str r2, [r3, #40] @ 0x28
  5031. /* Nothing to do */
  5032. }
  5033. /* Check back that ADC registers have effectively been configured to */
  5034. /* ensure of no potential problem of ADC core peripheral clocking. */
  5035. if (LL_ADC_GetSamplingTimeCommonChannels(hadc->Instance, LL_ADC_SAMPLINGTIME_COMMON_1)
  5036. 8001e50: 687b ldr r3, [r7, #4]
  5037. 8001e52: 681b ldr r3, [r3, #0]
  5038. 8001e54: 2100 movs r1, #0
  5039. 8001e56: 0018 movs r0, r3
  5040. 8001e58: f7ff fd72 bl 8001940 <LL_ADC_GetSamplingTimeCommonChannels>
  5041. 8001e5c: 0002 movs r2, r0
  5042. == hadc->Init.SamplingTimeCommon1)
  5043. 8001e5e: 687b ldr r3, [r7, #4]
  5044. 8001e60: 6b5b ldr r3, [r3, #52] @ 0x34
  5045. if (LL_ADC_GetSamplingTimeCommonChannels(hadc->Instance, LL_ADC_SAMPLINGTIME_COMMON_1)
  5046. 8001e62: 429a cmp r2, r3
  5047. 8001e64: d10b bne.n 8001e7e <HAL_ADC_Init+0x2e6>
  5048. {
  5049. /* Set ADC error code to none */
  5050. ADC_CLEAR_ERRORCODE(hadc);
  5051. 8001e66: 687b ldr r3, [r7, #4]
  5052. 8001e68: 2200 movs r2, #0
  5053. 8001e6a: 65da str r2, [r3, #92] @ 0x5c
  5054. /* Set the ADC state */
  5055. ADC_STATE_CLR_SET(hadc->State,
  5056. 8001e6c: 687b ldr r3, [r7, #4]
  5057. 8001e6e: 6d9b ldr r3, [r3, #88] @ 0x58
  5058. 8001e70: 2203 movs r2, #3
  5059. 8001e72: 4393 bics r3, r2
  5060. 8001e74: 2201 movs r2, #1
  5061. 8001e76: 431a orrs r2, r3
  5062. 8001e78: 687b ldr r3, [r7, #4]
  5063. 8001e7a: 659a str r2, [r3, #88] @ 0x58
  5064. if (LL_ADC_GetSamplingTimeCommonChannels(hadc->Instance, LL_ADC_SAMPLINGTIME_COMMON_1)
  5065. 8001e7c: e01c b.n 8001eb8 <HAL_ADC_Init+0x320>
  5066. HAL_ADC_STATE_READY);
  5067. }
  5068. else
  5069. {
  5070. /* Update ADC state machine to error */
  5071. ADC_STATE_CLR_SET(hadc->State,
  5072. 8001e7e: 687b ldr r3, [r7, #4]
  5073. 8001e80: 6d9b ldr r3, [r3, #88] @ 0x58
  5074. 8001e82: 2212 movs r2, #18
  5075. 8001e84: 4393 bics r3, r2
  5076. 8001e86: 2210 movs r2, #16
  5077. 8001e88: 431a orrs r2, r3
  5078. 8001e8a: 687b ldr r3, [r7, #4]
  5079. 8001e8c: 659a str r2, [r3, #88] @ 0x58
  5080. HAL_ADC_STATE_BUSY_INTERNAL,
  5081. HAL_ADC_STATE_ERROR_INTERNAL);
  5082. /* Set ADC error code to ADC peripheral internal error */
  5083. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  5084. 8001e8e: 687b ldr r3, [r7, #4]
  5085. 8001e90: 6ddb ldr r3, [r3, #92] @ 0x5c
  5086. 8001e92: 2201 movs r2, #1
  5087. 8001e94: 431a orrs r2, r3
  5088. 8001e96: 687b ldr r3, [r7, #4]
  5089. 8001e98: 65da str r2, [r3, #92] @ 0x5c
  5090. tmp_hal_status = HAL_ERROR;
  5091. 8001e9a: 231f movs r3, #31
  5092. 8001e9c: 18fb adds r3, r7, r3
  5093. 8001e9e: 2201 movs r2, #1
  5094. 8001ea0: 701a strb r2, [r3, #0]
  5095. if (LL_ADC_GetSamplingTimeCommonChannels(hadc->Instance, LL_ADC_SAMPLINGTIME_COMMON_1)
  5096. 8001ea2: e009 b.n 8001eb8 <HAL_ADC_Init+0x320>
  5097. }
  5098. else
  5099. {
  5100. /* Update ADC state machine to error */
  5101. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  5102. 8001ea4: 687b ldr r3, [r7, #4]
  5103. 8001ea6: 6d9b ldr r3, [r3, #88] @ 0x58
  5104. 8001ea8: 2210 movs r2, #16
  5105. 8001eaa: 431a orrs r2, r3
  5106. 8001eac: 687b ldr r3, [r7, #4]
  5107. 8001eae: 659a str r2, [r3, #88] @ 0x58
  5108. tmp_hal_status = HAL_ERROR;
  5109. 8001eb0: 231f movs r3, #31
  5110. 8001eb2: 18fb adds r3, r7, r3
  5111. 8001eb4: 2201 movs r2, #1
  5112. 8001eb6: 701a strb r2, [r3, #0]
  5113. }
  5114. return tmp_hal_status;
  5115. 8001eb8: 231f movs r3, #31
  5116. 8001eba: 18fb adds r3, r7, r3
  5117. 8001ebc: 781b ldrb r3, [r3, #0]
  5118. }
  5119. 8001ebe: 0018 movs r0, r3
  5120. 8001ec0: 46bd mov sp, r7
  5121. 8001ec2: b008 add sp, #32
  5122. 8001ec4: bd80 pop {r7, pc}
  5123. 8001ec6: 46c0 nop @ (mov r8, r8)
  5124. 8001ec8: 20000000 .word 0x20000000
  5125. 8001ecc: 00030d40 .word 0x00030d40
  5126. 8001ed0: fffffefd .word 0xfffffefd
  5127. 8001ed4: ffde0201 .word 0xffde0201
  5128. 8001ed8: 1ffffc02 .word 0x1ffffc02
  5129. 8001edc: 40012708 .word 0x40012708
  5130. 8001ee0: ffc3ffff .word 0xffc3ffff
  5131. 8001ee4: 07ffff04 .word 0x07ffff04
  5132. 08001ee8 <HAL_ADC_Start_DMA>:
  5133. * @param pData Destination Buffer address.
  5134. * @param Length Number of data to be transferred from ADC peripheral to memory
  5135. * @retval HAL status.
  5136. */
  5137. HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef *hadc, uint32_t *pData, uint32_t Length)
  5138. {
  5139. 8001ee8: b5b0 push {r4, r5, r7, lr}
  5140. 8001eea: b086 sub sp, #24
  5141. 8001eec: af00 add r7, sp, #0
  5142. 8001eee: 60f8 str r0, [r7, #12]
  5143. 8001ef0: 60b9 str r1, [r7, #8]
  5144. 8001ef2: 607a str r2, [r7, #4]
  5145. /* Check the parameters */
  5146. assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance));
  5147. /* Perform ADC enable and conversion start if no conversion is on going */
  5148. if (LL_ADC_REG_IsConversionOngoing(hadc->Instance) == 0UL)
  5149. 8001ef4: 68fb ldr r3, [r7, #12]
  5150. 8001ef6: 681b ldr r3, [r3, #0]
  5151. 8001ef8: 0018 movs r0, r3
  5152. 8001efa: f7ff fe3b bl 8001b74 <LL_ADC_REG_IsConversionOngoing>
  5153. 8001efe: 1e03 subs r3, r0, #0
  5154. 8001f00: d16c bne.n 8001fdc <HAL_ADC_Start_DMA+0xf4>
  5155. {
  5156. __HAL_LOCK(hadc);
  5157. 8001f02: 68fb ldr r3, [r7, #12]
  5158. 8001f04: 2254 movs r2, #84 @ 0x54
  5159. 8001f06: 5c9b ldrb r3, [r3, r2]
  5160. 8001f08: 2b01 cmp r3, #1
  5161. 8001f0a: d101 bne.n 8001f10 <HAL_ADC_Start_DMA+0x28>
  5162. 8001f0c: 2302 movs r3, #2
  5163. 8001f0e: e06c b.n 8001fea <HAL_ADC_Start_DMA+0x102>
  5164. 8001f10: 68fb ldr r3, [r7, #12]
  5165. 8001f12: 2254 movs r2, #84 @ 0x54
  5166. 8001f14: 2101 movs r1, #1
  5167. 8001f16: 5499 strb r1, [r3, r2]
  5168. /* Specific case for first call occurrence of this function (DMA transfer */
  5169. /* not activated and ADC disabled), DMA transfer must be activated */
  5170. /* with ADC disabled. */
  5171. if ((hadc->Instance->CFGR1 & ADC_CFGR1_DMAEN) == 0UL)
  5172. 8001f18: 68fb ldr r3, [r7, #12]
  5173. 8001f1a: 681b ldr r3, [r3, #0]
  5174. 8001f1c: 68db ldr r3, [r3, #12]
  5175. 8001f1e: 2201 movs r2, #1
  5176. 8001f20: 4013 ands r3, r2
  5177. 8001f22: d113 bne.n 8001f4c <HAL_ADC_Start_DMA+0x64>
  5178. {
  5179. if (LL_ADC_IsEnabled(hadc->Instance) != 0UL)
  5180. 8001f24: 68fb ldr r3, [r7, #12]
  5181. 8001f26: 681b ldr r3, [r3, #0]
  5182. 8001f28: 0018 movs r0, r3
  5183. 8001f2a: f7ff fddd bl 8001ae8 <LL_ADC_IsEnabled>
  5184. 8001f2e: 1e03 subs r3, r0, #0
  5185. 8001f30: d004 beq.n 8001f3c <HAL_ADC_Start_DMA+0x54>
  5186. {
  5187. /* Disable ADC */
  5188. LL_ADC_Disable(hadc->Instance);
  5189. 8001f32: 68fb ldr r3, [r7, #12]
  5190. 8001f34: 681b ldr r3, [r3, #0]
  5191. 8001f36: 0018 movs r0, r3
  5192. 8001f38: f7ff fdc4 bl 8001ac4 <LL_ADC_Disable>
  5193. }
  5194. /* Enable ADC DMA mode */
  5195. hadc->Instance->CFGR1 |= ADC_CFGR1_DMAEN;
  5196. 8001f3c: 68fb ldr r3, [r7, #12]
  5197. 8001f3e: 681b ldr r3, [r3, #0]
  5198. 8001f40: 68da ldr r2, [r3, #12]
  5199. 8001f42: 68fb ldr r3, [r7, #12]
  5200. 8001f44: 681b ldr r3, [r3, #0]
  5201. 8001f46: 2101 movs r1, #1
  5202. 8001f48: 430a orrs r2, r1
  5203. 8001f4a: 60da str r2, [r3, #12]
  5204. }
  5205. /* Enable the ADC peripheral */
  5206. tmp_hal_status = ADC_Enable(hadc);
  5207. 8001f4c: 2517 movs r5, #23
  5208. 8001f4e: 197c adds r4, r7, r5
  5209. 8001f50: 68fb ldr r3, [r7, #12]
  5210. 8001f52: 0018 movs r0, r3
  5211. 8001f54: f000 fafa bl 800254c <ADC_Enable>
  5212. 8001f58: 0003 movs r3, r0
  5213. 8001f5a: 7023 strb r3, [r4, #0]
  5214. /* Start conversion if ADC is effectively enabled */
  5215. if (tmp_hal_status == HAL_OK)
  5216. 8001f5c: 002c movs r4, r5
  5217. 8001f5e: 193b adds r3, r7, r4
  5218. 8001f60: 781b ldrb r3, [r3, #0]
  5219. 8001f62: 2b00 cmp r3, #0
  5220. 8001f64: d13e bne.n 8001fe4 <HAL_ADC_Start_DMA+0xfc>
  5221. {
  5222. /* Set ADC state */
  5223. /* - Clear state bitfield related to regular group conversion results */
  5224. /* - Set state bitfield related to regular operation */
  5225. ADC_STATE_CLR_SET(hadc->State,
  5226. 8001f66: 68fb ldr r3, [r7, #12]
  5227. 8001f68: 6d9b ldr r3, [r3, #88] @ 0x58
  5228. 8001f6a: 4a22 ldr r2, [pc, #136] @ (8001ff4 <HAL_ADC_Start_DMA+0x10c>)
  5229. 8001f6c: 4013 ands r3, r2
  5230. 8001f6e: 2280 movs r2, #128 @ 0x80
  5231. 8001f70: 0052 lsls r2, r2, #1
  5232. 8001f72: 431a orrs r2, r3
  5233. 8001f74: 68fb ldr r3, [r7, #12]
  5234. 8001f76: 659a str r2, [r3, #88] @ 0x58
  5235. HAL_ADC_STATE_READY | HAL_ADC_STATE_REG_EOC | HAL_ADC_STATE_REG_OVR | HAL_ADC_STATE_REG_EOSMP,
  5236. HAL_ADC_STATE_REG_BUSY);
  5237. /* Set ADC error code */
  5238. /* Reset all ADC error code fields */
  5239. ADC_CLEAR_ERRORCODE(hadc);
  5240. 8001f78: 68fb ldr r3, [r7, #12]
  5241. 8001f7a: 2200 movs r2, #0
  5242. 8001f7c: 65da str r2, [r3, #92] @ 0x5c
  5243. /* Set the DMA transfer complete callback */
  5244. hadc->DMA_Handle->XferCpltCallback = ADC_DMAConvCplt;
  5245. 8001f7e: 68fb ldr r3, [r7, #12]
  5246. 8001f80: 6d1b ldr r3, [r3, #80] @ 0x50
  5247. 8001f82: 4a1d ldr r2, [pc, #116] @ (8001ff8 <HAL_ADC_Start_DMA+0x110>)
  5248. 8001f84: 62da str r2, [r3, #44] @ 0x2c
  5249. /* Set the DMA half transfer complete callback */
  5250. hadc->DMA_Handle->XferHalfCpltCallback = ADC_DMAHalfConvCplt;
  5251. 8001f86: 68fb ldr r3, [r7, #12]
  5252. 8001f88: 6d1b ldr r3, [r3, #80] @ 0x50
  5253. 8001f8a: 4a1c ldr r2, [pc, #112] @ (8001ffc <HAL_ADC_Start_DMA+0x114>)
  5254. 8001f8c: 631a str r2, [r3, #48] @ 0x30
  5255. /* Set the DMA error callback */
  5256. hadc->DMA_Handle->XferErrorCallback = ADC_DMAError;
  5257. 8001f8e: 68fb ldr r3, [r7, #12]
  5258. 8001f90: 6d1b ldr r3, [r3, #80] @ 0x50
  5259. 8001f92: 4a1b ldr r2, [pc, #108] @ (8002000 <HAL_ADC_Start_DMA+0x118>)
  5260. 8001f94: 635a str r2, [r3, #52] @ 0x34
  5261. /* start (in case of SW start): */
  5262. /* Clear regular group conversion flag and overrun flag */
  5263. /* (To ensure of no unknown state from potential previous ADC */
  5264. /* operations) */
  5265. __HAL_ADC_CLEAR_FLAG(hadc, (ADC_FLAG_EOC | ADC_FLAG_EOS | ADC_FLAG_OVR));
  5266. 8001f96: 68fb ldr r3, [r7, #12]
  5267. 8001f98: 681b ldr r3, [r3, #0]
  5268. 8001f9a: 221c movs r2, #28
  5269. 8001f9c: 601a str r2, [r3, #0]
  5270. /* Process unlocked */
  5271. /* Unlock before starting ADC conversions: in case of potential */
  5272. /* interruption, to let the process to ADC IRQ Handler. */
  5273. __HAL_UNLOCK(hadc);
  5274. 8001f9e: 68fb ldr r3, [r7, #12]
  5275. 8001fa0: 2254 movs r2, #84 @ 0x54
  5276. 8001fa2: 2100 movs r1, #0
  5277. 8001fa4: 5499 strb r1, [r3, r2]
  5278. /* Enable ADC overrun interrupt */
  5279. __HAL_ADC_ENABLE_IT(hadc, ADC_IT_OVR);
  5280. 8001fa6: 68fb ldr r3, [r7, #12]
  5281. 8001fa8: 681b ldr r3, [r3, #0]
  5282. 8001faa: 685a ldr r2, [r3, #4]
  5283. 8001fac: 68fb ldr r3, [r7, #12]
  5284. 8001fae: 681b ldr r3, [r3, #0]
  5285. 8001fb0: 2110 movs r1, #16
  5286. 8001fb2: 430a orrs r2, r1
  5287. 8001fb4: 605a str r2, [r3, #4]
  5288. /* Start the DMA channel */
  5289. tmp_hal_status = HAL_DMA_Start_IT(hadc->DMA_Handle, (uint32_t)&hadc->Instance->DR, (uint32_t)pData, Length);
  5290. 8001fb6: 68fb ldr r3, [r7, #12]
  5291. 8001fb8: 6d18 ldr r0, [r3, #80] @ 0x50
  5292. 8001fba: 68fb ldr r3, [r7, #12]
  5293. 8001fbc: 681b ldr r3, [r3, #0]
  5294. 8001fbe: 3340 adds r3, #64 @ 0x40
  5295. 8001fc0: 0019 movs r1, r3
  5296. 8001fc2: 68ba ldr r2, [r7, #8]
  5297. 8001fc4: 193c adds r4, r7, r4
  5298. 8001fc6: 687b ldr r3, [r7, #4]
  5299. 8001fc8: f000 ff2e bl 8002e28 <HAL_DMA_Start_IT>
  5300. 8001fcc: 0003 movs r3, r0
  5301. 8001fce: 7023 strb r3, [r4, #0]
  5302. /* Enable conversion of regular group. */
  5303. /* If software start has been selected, conversion starts immediately. */
  5304. /* If external trigger has been selected, conversion will start at next */
  5305. /* trigger event. */
  5306. /* Start ADC group regular conversion */
  5307. LL_ADC_REG_StartConversion(hadc->Instance);
  5308. 8001fd0: 68fb ldr r3, [r7, #12]
  5309. 8001fd2: 681b ldr r3, [r3, #0]
  5310. 8001fd4: 0018 movs r0, r3
  5311. 8001fd6: f7ff fda9 bl 8001b2c <LL_ADC_REG_StartConversion>
  5312. 8001fda: e003 b.n 8001fe4 <HAL_ADC_Start_DMA+0xfc>
  5313. }
  5314. }
  5315. else
  5316. {
  5317. tmp_hal_status = HAL_BUSY;
  5318. 8001fdc: 2317 movs r3, #23
  5319. 8001fde: 18fb adds r3, r7, r3
  5320. 8001fe0: 2202 movs r2, #2
  5321. 8001fe2: 701a strb r2, [r3, #0]
  5322. }
  5323. return tmp_hal_status;
  5324. 8001fe4: 2317 movs r3, #23
  5325. 8001fe6: 18fb adds r3, r7, r3
  5326. 8001fe8: 781b ldrb r3, [r3, #0]
  5327. }
  5328. 8001fea: 0018 movs r0, r3
  5329. 8001fec: 46bd mov sp, r7
  5330. 8001fee: b006 add sp, #24
  5331. 8001ff0: bdb0 pop {r4, r5, r7, pc}
  5332. 8001ff2: 46c0 nop @ (mov r8, r8)
  5333. 8001ff4: fffff0fe .word 0xfffff0fe
  5334. 8001ff8: 08002715 .word 0x08002715
  5335. 8001ffc: 080027dd .word 0x080027dd
  5336. 8002000: 080027fb .word 0x080027fb
  5337. 08002004 <HAL_ADC_Stop_DMA>:
  5338. * ADC peripheral.
  5339. * @param hadc ADC handle
  5340. * @retval HAL status.
  5341. */
  5342. HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef *hadc)
  5343. {
  5344. 8002004: b5b0 push {r4, r5, r7, lr}
  5345. 8002006: b084 sub sp, #16
  5346. 8002008: af00 add r7, sp, #0
  5347. 800200a: 6078 str r0, [r7, #4]
  5348. HAL_StatusTypeDef tmp_hal_status;
  5349. /* Check the parameters */
  5350. assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance));
  5351. __HAL_LOCK(hadc);
  5352. 800200c: 687b ldr r3, [r7, #4]
  5353. 800200e: 2254 movs r2, #84 @ 0x54
  5354. 8002010: 5c9b ldrb r3, [r3, r2]
  5355. 8002012: 2b01 cmp r3, #1
  5356. 8002014: d101 bne.n 800201a <HAL_ADC_Stop_DMA+0x16>
  5357. 8002016: 2302 movs r3, #2
  5358. 8002018: e05f b.n 80020da <HAL_ADC_Stop_DMA+0xd6>
  5359. 800201a: 687b ldr r3, [r7, #4]
  5360. 800201c: 2254 movs r2, #84 @ 0x54
  5361. 800201e: 2101 movs r1, #1
  5362. 8002020: 5499 strb r1, [r3, r2]
  5363. /* 1. Stop potential ADC group regular conversion on going */
  5364. tmp_hal_status = ADC_ConversionStop(hadc);
  5365. 8002022: 250f movs r5, #15
  5366. 8002024: 197c adds r4, r7, r5
  5367. 8002026: 687b ldr r3, [r7, #4]
  5368. 8002028: 0018 movs r0, r3
  5369. 800202a: f000 fa4d bl 80024c8 <ADC_ConversionStop>
  5370. 800202e: 0003 movs r3, r0
  5371. 8002030: 7023 strb r3, [r4, #0]
  5372. /* Disable ADC peripheral if conversions are effectively stopped */
  5373. if (tmp_hal_status == HAL_OK)
  5374. 8002032: 0029 movs r1, r5
  5375. 8002034: 187b adds r3, r7, r1
  5376. 8002036: 781b ldrb r3, [r3, #0]
  5377. 8002038: 2b00 cmp r3, #0
  5378. 800203a: d147 bne.n 80020cc <HAL_ADC_Stop_DMA+0xc8>
  5379. {
  5380. /* Disable the DMA channel (in case of DMA in circular mode or stop */
  5381. /* while DMA transfer is on going) */
  5382. if (hadc->DMA_Handle->State == HAL_DMA_STATE_BUSY)
  5383. 800203c: 687b ldr r3, [r7, #4]
  5384. 800203e: 6d1b ldr r3, [r3, #80] @ 0x50
  5385. 8002040: 2225 movs r2, #37 @ 0x25
  5386. 8002042: 5c9b ldrb r3, [r3, r2]
  5387. 8002044: b2db uxtb r3, r3
  5388. 8002046: 2b02 cmp r3, #2
  5389. 8002048: d112 bne.n 8002070 <HAL_ADC_Stop_DMA+0x6c>
  5390. {
  5391. tmp_hal_status = HAL_DMA_Abort(hadc->DMA_Handle);
  5392. 800204a: 687b ldr r3, [r7, #4]
  5393. 800204c: 6d1b ldr r3, [r3, #80] @ 0x50
  5394. 800204e: 000d movs r5, r1
  5395. 8002050: 187c adds r4, r7, r1
  5396. 8002052: 0018 movs r0, r3
  5397. 8002054: f000 ff6e bl 8002f34 <HAL_DMA_Abort>
  5398. 8002058: 0003 movs r3, r0
  5399. 800205a: 7023 strb r3, [r4, #0]
  5400. /* Check if DMA channel effectively disabled */
  5401. if (tmp_hal_status != HAL_OK)
  5402. 800205c: 197b adds r3, r7, r5
  5403. 800205e: 781b ldrb r3, [r3, #0]
  5404. 8002060: 2b00 cmp r3, #0
  5405. 8002062: d005 beq.n 8002070 <HAL_ADC_Stop_DMA+0x6c>
  5406. {
  5407. /* Update ADC state machine to error */
  5408. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_DMA);
  5409. 8002064: 687b ldr r3, [r7, #4]
  5410. 8002066: 6d9b ldr r3, [r3, #88] @ 0x58
  5411. 8002068: 2240 movs r2, #64 @ 0x40
  5412. 800206a: 431a orrs r2, r3
  5413. 800206c: 687b ldr r3, [r7, #4]
  5414. 800206e: 659a str r2, [r3, #88] @ 0x58
  5415. }
  5416. }
  5417. /* Disable ADC overrun interrupt */
  5418. __HAL_ADC_DISABLE_IT(hadc, ADC_IT_OVR);
  5419. 8002070: 687b ldr r3, [r7, #4]
  5420. 8002072: 681b ldr r3, [r3, #0]
  5421. 8002074: 685a ldr r2, [r3, #4]
  5422. 8002076: 687b ldr r3, [r7, #4]
  5423. 8002078: 681b ldr r3, [r3, #0]
  5424. 800207a: 2110 movs r1, #16
  5425. 800207c: 438a bics r2, r1
  5426. 800207e: 605a str r2, [r3, #4]
  5427. /* 2. Disable the ADC peripheral */
  5428. /* Update "tmp_hal_status" only if DMA channel disabling passed, */
  5429. /* to keep in memory a potential failing status. */
  5430. if (tmp_hal_status == HAL_OK)
  5431. 8002080: 220f movs r2, #15
  5432. 8002082: 18bb adds r3, r7, r2
  5433. 8002084: 781b ldrb r3, [r3, #0]
  5434. 8002086: 2b00 cmp r3, #0
  5435. 8002088: d107 bne.n 800209a <HAL_ADC_Stop_DMA+0x96>
  5436. {
  5437. tmp_hal_status = ADC_Disable(hadc);
  5438. 800208a: 18bc adds r4, r7, r2
  5439. 800208c: 687b ldr r3, [r7, #4]
  5440. 800208e: 0018 movs r0, r3
  5441. 8002090: f000 fae2 bl 8002658 <ADC_Disable>
  5442. 8002094: 0003 movs r3, r0
  5443. 8002096: 7023 strb r3, [r4, #0]
  5444. 8002098: e003 b.n 80020a2 <HAL_ADC_Stop_DMA+0x9e>
  5445. }
  5446. else
  5447. {
  5448. (void)ADC_Disable(hadc);
  5449. 800209a: 687b ldr r3, [r7, #4]
  5450. 800209c: 0018 movs r0, r3
  5451. 800209e: f000 fadb bl 8002658 <ADC_Disable>
  5452. }
  5453. /* Check if ADC is effectively disabled */
  5454. if (tmp_hal_status == HAL_OK)
  5455. 80020a2: 230f movs r3, #15
  5456. 80020a4: 18fb adds r3, r7, r3
  5457. 80020a6: 781b ldrb r3, [r3, #0]
  5458. 80020a8: 2b00 cmp r3, #0
  5459. 80020aa: d107 bne.n 80020bc <HAL_ADC_Stop_DMA+0xb8>
  5460. {
  5461. /* Set ADC state */
  5462. ADC_STATE_CLR_SET(hadc->State,
  5463. 80020ac: 687b ldr r3, [r7, #4]
  5464. 80020ae: 6d9b ldr r3, [r3, #88] @ 0x58
  5465. 80020b0: 4a0c ldr r2, [pc, #48] @ (80020e4 <HAL_ADC_Stop_DMA+0xe0>)
  5466. 80020b2: 4013 ands r3, r2
  5467. 80020b4: 2201 movs r2, #1
  5468. 80020b6: 431a orrs r2, r3
  5469. 80020b8: 687b ldr r3, [r7, #4]
  5470. 80020ba: 659a str r2, [r3, #88] @ 0x58
  5471. HAL_ADC_STATE_REG_BUSY,
  5472. HAL_ADC_STATE_READY);
  5473. }
  5474. /* Disable ADC DMA (ADC DMA configuration of continuous requests is kept) */
  5475. CLEAR_BIT(hadc->Instance->CFGR1, ADC_CFGR1_DMAEN);
  5476. 80020bc: 687b ldr r3, [r7, #4]
  5477. 80020be: 681b ldr r3, [r3, #0]
  5478. 80020c0: 68da ldr r2, [r3, #12]
  5479. 80020c2: 687b ldr r3, [r7, #4]
  5480. 80020c4: 681b ldr r3, [r3, #0]
  5481. 80020c6: 2101 movs r1, #1
  5482. 80020c8: 438a bics r2, r1
  5483. 80020ca: 60da str r2, [r3, #12]
  5484. }
  5485. __HAL_UNLOCK(hadc);
  5486. 80020cc: 687b ldr r3, [r7, #4]
  5487. 80020ce: 2254 movs r2, #84 @ 0x54
  5488. 80020d0: 2100 movs r1, #0
  5489. 80020d2: 5499 strb r1, [r3, r2]
  5490. return tmp_hal_status;
  5491. 80020d4: 230f movs r3, #15
  5492. 80020d6: 18fb adds r3, r7, r3
  5493. 80020d8: 781b ldrb r3, [r3, #0]
  5494. }
  5495. 80020da: 0018 movs r0, r3
  5496. 80020dc: 46bd mov sp, r7
  5497. 80020de: b004 add sp, #16
  5498. 80020e0: bdb0 pop {r4, r5, r7, pc}
  5499. 80020e2: 46c0 nop @ (mov r8, r8)
  5500. 80020e4: fffffefe .word 0xfffffefe
  5501. 080020e8 <HAL_ADC_ConvCpltCallback>:
  5502. * @brief Conversion complete callback in non-blocking mode.
  5503. * @param hadc ADC handle
  5504. * @retval None
  5505. */
  5506. __weak void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc)
  5507. {
  5508. 80020e8: b580 push {r7, lr}
  5509. 80020ea: b082 sub sp, #8
  5510. 80020ec: af00 add r7, sp, #0
  5511. 80020ee: 6078 str r0, [r7, #4]
  5512. UNUSED(hadc);
  5513. /* NOTE : This function should not be modified. When the callback is needed,
  5514. function HAL_ADC_ConvCpltCallback must be implemented in the user file.
  5515. */
  5516. }
  5517. 80020f0: 46c0 nop @ (mov r8, r8)
  5518. 80020f2: 46bd mov sp, r7
  5519. 80020f4: b002 add sp, #8
  5520. 80020f6: bd80 pop {r7, pc}
  5521. 080020f8 <HAL_ADC_ConvHalfCpltCallback>:
  5522. * @brief Conversion DMA half-transfer callback in non-blocking mode.
  5523. * @param hadc ADC handle
  5524. * @retval None
  5525. */
  5526. __weak void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef *hadc)
  5527. {
  5528. 80020f8: b580 push {r7, lr}
  5529. 80020fa: b082 sub sp, #8
  5530. 80020fc: af00 add r7, sp, #0
  5531. 80020fe: 6078 str r0, [r7, #4]
  5532. UNUSED(hadc);
  5533. /* NOTE : This function should not be modified. When the callback is needed,
  5534. function HAL_ADC_ConvHalfCpltCallback must be implemented in the user file.
  5535. */
  5536. }
  5537. 8002100: 46c0 nop @ (mov r8, r8)
  5538. 8002102: 46bd mov sp, r7
  5539. 8002104: b002 add sp, #8
  5540. 8002106: bd80 pop {r7, pc}
  5541. 08002108 <HAL_ADC_ErrorCallback>:
  5542. * (this function is also clearing overrun flag)
  5543. * @param hadc ADC handle
  5544. * @retval None
  5545. */
  5546. __weak void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc)
  5547. {
  5548. 8002108: b580 push {r7, lr}
  5549. 800210a: b082 sub sp, #8
  5550. 800210c: af00 add r7, sp, #0
  5551. 800210e: 6078 str r0, [r7, #4]
  5552. UNUSED(hadc);
  5553. /* NOTE : This function should not be modified. When the callback is needed,
  5554. function HAL_ADC_ErrorCallback must be implemented in the user file.
  5555. */
  5556. }
  5557. 8002110: 46c0 nop @ (mov r8, r8)
  5558. 8002112: 46bd mov sp, r7
  5559. 8002114: b002 add sp, #8
  5560. 8002116: bd80 pop {r7, pc}
  5561. 08002118 <HAL_ADC_ConfigChannel>:
  5562. * @param hadc ADC handle
  5563. * @param pConfig Structure of ADC channel assigned to ADC group regular.
  5564. * @retval HAL status
  5565. */
  5566. HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, const ADC_ChannelConfTypeDef *pConfig)
  5567. {
  5568. 8002118: b580 push {r7, lr}
  5569. 800211a: b086 sub sp, #24
  5570. 800211c: af00 add r7, sp, #0
  5571. 800211e: 6078 str r0, [r7, #4]
  5572. 8002120: 6039 str r1, [r7, #0]
  5573. HAL_StatusTypeDef tmp_hal_status = HAL_OK;
  5574. 8002122: 2317 movs r3, #23
  5575. 8002124: 18fb adds r3, r7, r3
  5576. 8002126: 2200 movs r2, #0
  5577. 8002128: 701a strb r2, [r3, #0]
  5578. uint32_t tmp_config_internal_channel;
  5579. __IO uint32_t wait_loop_index = 0UL;
  5580. 800212a: 2300 movs r3, #0
  5581. 800212c: 60fb str r3, [r7, #12]
  5582. assert_param(IS_ADC_REGULAR_NB_CONV(hadc->Init.NbrOfConversion));
  5583. assert_param(IS_ADC_REGULAR_RANK(pConfig->Rank));
  5584. }
  5585. __HAL_LOCK(hadc);
  5586. 800212e: 687b ldr r3, [r7, #4]
  5587. 8002130: 2254 movs r2, #84 @ 0x54
  5588. 8002132: 5c9b ldrb r3, [r3, r2]
  5589. 8002134: 2b01 cmp r3, #1
  5590. 8002136: d101 bne.n 800213c <HAL_ADC_ConfigChannel+0x24>
  5591. 8002138: 2302 movs r3, #2
  5592. 800213a: e1c0 b.n 80024be <HAL_ADC_ConfigChannel+0x3a6>
  5593. 800213c: 687b ldr r3, [r7, #4]
  5594. 800213e: 2254 movs r2, #84 @ 0x54
  5595. 8002140: 2101 movs r1, #1
  5596. 8002142: 5499 strb r1, [r3, r2]
  5597. /* Parameters that can be updated when ADC is disabled or enabled without */
  5598. /* conversion on going on regular group: */
  5599. /* - Channel number */
  5600. /* - Channel sampling time */
  5601. /* - Management of internal measurement channels: VrefInt/TempSensor/Vbat */
  5602. if (LL_ADC_REG_IsConversionOngoing(hadc->Instance) == 0UL)
  5603. 8002144: 687b ldr r3, [r7, #4]
  5604. 8002146: 681b ldr r3, [r3, #0]
  5605. 8002148: 0018 movs r0, r3
  5606. 800214a: f7ff fd13 bl 8001b74 <LL_ADC_REG_IsConversionOngoing>
  5607. 800214e: 1e03 subs r3, r0, #0
  5608. 8002150: d000 beq.n 8002154 <HAL_ADC_ConfigChannel+0x3c>
  5609. 8002152: e1a3 b.n 800249c <HAL_ADC_ConfigChannel+0x384>
  5610. /* If sequencer set to not fully configurable with channel rank set to */
  5611. /* none, remove the channel from the sequencer. */
  5612. /* Otherwise (sequencer set to fully configurable or to to not fully */
  5613. /* configurable with channel rank to be set), configure the selected */
  5614. /* channel. */
  5615. if (pConfig->Rank != ADC_RANK_NONE)
  5616. 8002154: 683b ldr r3, [r7, #0]
  5617. 8002156: 685b ldr r3, [r3, #4]
  5618. 8002158: 2b02 cmp r3, #2
  5619. 800215a: d100 bne.n 800215e <HAL_ADC_ConfigChannel+0x46>
  5620. 800215c: e143 b.n 80023e6 <HAL_ADC_ConfigChannel+0x2ce>
  5621. /* Note: ADC channel configuration requires few ADC clock cycles */
  5622. /* to be ready. Processing of ADC settings in this function */
  5623. /* induce that a specific wait time is not necessary. */
  5624. /* For more details on ADC channel configuration ready, */
  5625. /* refer to function "LL_ADC_IsActiveFlag_CCRDY()". */
  5626. if ((hadc->Init.ScanConvMode == ADC_SCAN_SEQ_FIXED) ||
  5627. 800215e: 687b ldr r3, [r7, #4]
  5628. 8002160: 691a ldr r2, [r3, #16]
  5629. 8002162: 2380 movs r3, #128 @ 0x80
  5630. 8002164: 061b lsls r3, r3, #24
  5631. 8002166: 429a cmp r2, r3
  5632. 8002168: d004 beq.n 8002174 <HAL_ADC_ConfigChannel+0x5c>
  5633. (hadc->Init.ScanConvMode == ADC_SCAN_SEQ_FIXED_BACKWARD))
  5634. 800216a: 687b ldr r3, [r7, #4]
  5635. 800216c: 691b ldr r3, [r3, #16]
  5636. if ((hadc->Init.ScanConvMode == ADC_SCAN_SEQ_FIXED) ||
  5637. 800216e: 4ac1 ldr r2, [pc, #772] @ (8002474 <HAL_ADC_ConfigChannel+0x35c>)
  5638. 8002170: 4293 cmp r3, r2
  5639. 8002172: d108 bne.n 8002186 <HAL_ADC_ConfigChannel+0x6e>
  5640. {
  5641. /* Sequencer set to not fully configurable: */
  5642. /* Set the channel by enabling the corresponding bitfield. */
  5643. LL_ADC_REG_SetSequencerChAdd(hadc->Instance, pConfig->Channel);
  5644. 8002174: 687b ldr r3, [r7, #4]
  5645. 8002176: 681a ldr r2, [r3, #0]
  5646. 8002178: 683b ldr r3, [r7, #0]
  5647. 800217a: 681b ldr r3, [r3, #0]
  5648. 800217c: 0019 movs r1, r3
  5649. 800217e: 0010 movs r0, r2
  5650. 8002180: f7ff fc26 bl 80019d0 <LL_ADC_REG_SetSequencerChAdd>
  5651. 8002184: e0c9 b.n 800231a <HAL_ADC_ConfigChannel+0x202>
  5652. {
  5653. /* Sequencer set to fully configurable: */
  5654. /* Set the channel by entering it into the selected rank. */
  5655. /* Memorize the channel set into variable in HAL ADC handle */
  5656. MODIFY_REG(hadc->ADCGroupRegularSequencerRanks,
  5657. 8002186: 687b ldr r3, [r7, #4]
  5658. 8002188: 6e1a ldr r2, [r3, #96] @ 0x60
  5659. 800218a: 683b ldr r3, [r7, #0]
  5660. 800218c: 685b ldr r3, [r3, #4]
  5661. 800218e: 211f movs r1, #31
  5662. 8002190: 400b ands r3, r1
  5663. 8002192: 210f movs r1, #15
  5664. 8002194: 4099 lsls r1, r3
  5665. 8002196: 000b movs r3, r1
  5666. 8002198: 43db mvns r3, r3
  5667. 800219a: 4013 ands r3, r2
  5668. 800219c: 0019 movs r1, r3
  5669. 800219e: 683b ldr r3, [r7, #0]
  5670. 80021a0: 681b ldr r3, [r3, #0]
  5671. 80021a2: 035b lsls r3, r3, #13
  5672. 80021a4: 0b5b lsrs r3, r3, #13
  5673. 80021a6: d105 bne.n 80021b4 <HAL_ADC_ConfigChannel+0x9c>
  5674. 80021a8: 683b ldr r3, [r7, #0]
  5675. 80021aa: 681b ldr r3, [r3, #0]
  5676. 80021ac: 0e9b lsrs r3, r3, #26
  5677. 80021ae: 221f movs r2, #31
  5678. 80021b0: 4013 ands r3, r2
  5679. 80021b2: e098 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5680. 80021b4: 683b ldr r3, [r7, #0]
  5681. 80021b6: 681b ldr r3, [r3, #0]
  5682. 80021b8: 2201 movs r2, #1
  5683. 80021ba: 4013 ands r3, r2
  5684. 80021bc: d000 beq.n 80021c0 <HAL_ADC_ConfigChannel+0xa8>
  5685. 80021be: e091 b.n 80022e4 <HAL_ADC_ConfigChannel+0x1cc>
  5686. 80021c0: 683b ldr r3, [r7, #0]
  5687. 80021c2: 681b ldr r3, [r3, #0]
  5688. 80021c4: 2202 movs r2, #2
  5689. 80021c6: 4013 ands r3, r2
  5690. 80021c8: d000 beq.n 80021cc <HAL_ADC_ConfigChannel+0xb4>
  5691. 80021ca: e089 b.n 80022e0 <HAL_ADC_ConfigChannel+0x1c8>
  5692. 80021cc: 683b ldr r3, [r7, #0]
  5693. 80021ce: 681b ldr r3, [r3, #0]
  5694. 80021d0: 2204 movs r2, #4
  5695. 80021d2: 4013 ands r3, r2
  5696. 80021d4: d000 beq.n 80021d8 <HAL_ADC_ConfigChannel+0xc0>
  5697. 80021d6: e081 b.n 80022dc <HAL_ADC_ConfigChannel+0x1c4>
  5698. 80021d8: 683b ldr r3, [r7, #0]
  5699. 80021da: 681b ldr r3, [r3, #0]
  5700. 80021dc: 2208 movs r2, #8
  5701. 80021de: 4013 ands r3, r2
  5702. 80021e0: d000 beq.n 80021e4 <HAL_ADC_ConfigChannel+0xcc>
  5703. 80021e2: e079 b.n 80022d8 <HAL_ADC_ConfigChannel+0x1c0>
  5704. 80021e4: 683b ldr r3, [r7, #0]
  5705. 80021e6: 681b ldr r3, [r3, #0]
  5706. 80021e8: 2210 movs r2, #16
  5707. 80021ea: 4013 ands r3, r2
  5708. 80021ec: d000 beq.n 80021f0 <HAL_ADC_ConfigChannel+0xd8>
  5709. 80021ee: e071 b.n 80022d4 <HAL_ADC_ConfigChannel+0x1bc>
  5710. 80021f0: 683b ldr r3, [r7, #0]
  5711. 80021f2: 681b ldr r3, [r3, #0]
  5712. 80021f4: 2220 movs r2, #32
  5713. 80021f6: 4013 ands r3, r2
  5714. 80021f8: d000 beq.n 80021fc <HAL_ADC_ConfigChannel+0xe4>
  5715. 80021fa: e069 b.n 80022d0 <HAL_ADC_ConfigChannel+0x1b8>
  5716. 80021fc: 683b ldr r3, [r7, #0]
  5717. 80021fe: 681b ldr r3, [r3, #0]
  5718. 8002200: 2240 movs r2, #64 @ 0x40
  5719. 8002202: 4013 ands r3, r2
  5720. 8002204: d000 beq.n 8002208 <HAL_ADC_ConfigChannel+0xf0>
  5721. 8002206: e061 b.n 80022cc <HAL_ADC_ConfigChannel+0x1b4>
  5722. 8002208: 683b ldr r3, [r7, #0]
  5723. 800220a: 681b ldr r3, [r3, #0]
  5724. 800220c: 2280 movs r2, #128 @ 0x80
  5725. 800220e: 4013 ands r3, r2
  5726. 8002210: d000 beq.n 8002214 <HAL_ADC_ConfigChannel+0xfc>
  5727. 8002212: e059 b.n 80022c8 <HAL_ADC_ConfigChannel+0x1b0>
  5728. 8002214: 683b ldr r3, [r7, #0]
  5729. 8002216: 681a ldr r2, [r3, #0]
  5730. 8002218: 2380 movs r3, #128 @ 0x80
  5731. 800221a: 005b lsls r3, r3, #1
  5732. 800221c: 4013 ands r3, r2
  5733. 800221e: d151 bne.n 80022c4 <HAL_ADC_ConfigChannel+0x1ac>
  5734. 8002220: 683b ldr r3, [r7, #0]
  5735. 8002222: 681a ldr r2, [r3, #0]
  5736. 8002224: 2380 movs r3, #128 @ 0x80
  5737. 8002226: 009b lsls r3, r3, #2
  5738. 8002228: 4013 ands r3, r2
  5739. 800222a: d149 bne.n 80022c0 <HAL_ADC_ConfigChannel+0x1a8>
  5740. 800222c: 683b ldr r3, [r7, #0]
  5741. 800222e: 681a ldr r2, [r3, #0]
  5742. 8002230: 2380 movs r3, #128 @ 0x80
  5743. 8002232: 00db lsls r3, r3, #3
  5744. 8002234: 4013 ands r3, r2
  5745. 8002236: d141 bne.n 80022bc <HAL_ADC_ConfigChannel+0x1a4>
  5746. 8002238: 683b ldr r3, [r7, #0]
  5747. 800223a: 681a ldr r2, [r3, #0]
  5748. 800223c: 2380 movs r3, #128 @ 0x80
  5749. 800223e: 011b lsls r3, r3, #4
  5750. 8002240: 4013 ands r3, r2
  5751. 8002242: d139 bne.n 80022b8 <HAL_ADC_ConfigChannel+0x1a0>
  5752. 8002244: 683b ldr r3, [r7, #0]
  5753. 8002246: 681a ldr r2, [r3, #0]
  5754. 8002248: 2380 movs r3, #128 @ 0x80
  5755. 800224a: 015b lsls r3, r3, #5
  5756. 800224c: 4013 ands r3, r2
  5757. 800224e: d131 bne.n 80022b4 <HAL_ADC_ConfigChannel+0x19c>
  5758. 8002250: 683b ldr r3, [r7, #0]
  5759. 8002252: 681a ldr r2, [r3, #0]
  5760. 8002254: 2380 movs r3, #128 @ 0x80
  5761. 8002256: 019b lsls r3, r3, #6
  5762. 8002258: 4013 ands r3, r2
  5763. 800225a: d129 bne.n 80022b0 <HAL_ADC_ConfigChannel+0x198>
  5764. 800225c: 683b ldr r3, [r7, #0]
  5765. 800225e: 681a ldr r2, [r3, #0]
  5766. 8002260: 2380 movs r3, #128 @ 0x80
  5767. 8002262: 01db lsls r3, r3, #7
  5768. 8002264: 4013 ands r3, r2
  5769. 8002266: d121 bne.n 80022ac <HAL_ADC_ConfigChannel+0x194>
  5770. 8002268: 683b ldr r3, [r7, #0]
  5771. 800226a: 681a ldr r2, [r3, #0]
  5772. 800226c: 2380 movs r3, #128 @ 0x80
  5773. 800226e: 021b lsls r3, r3, #8
  5774. 8002270: 4013 ands r3, r2
  5775. 8002272: d119 bne.n 80022a8 <HAL_ADC_ConfigChannel+0x190>
  5776. 8002274: 683b ldr r3, [r7, #0]
  5777. 8002276: 681a ldr r2, [r3, #0]
  5778. 8002278: 2380 movs r3, #128 @ 0x80
  5779. 800227a: 025b lsls r3, r3, #9
  5780. 800227c: 4013 ands r3, r2
  5781. 800227e: d111 bne.n 80022a4 <HAL_ADC_ConfigChannel+0x18c>
  5782. 8002280: 683b ldr r3, [r7, #0]
  5783. 8002282: 681a ldr r2, [r3, #0]
  5784. 8002284: 2380 movs r3, #128 @ 0x80
  5785. 8002286: 029b lsls r3, r3, #10
  5786. 8002288: 4013 ands r3, r2
  5787. 800228a: d109 bne.n 80022a0 <HAL_ADC_ConfigChannel+0x188>
  5788. 800228c: 683b ldr r3, [r7, #0]
  5789. 800228e: 681a ldr r2, [r3, #0]
  5790. 8002290: 2380 movs r3, #128 @ 0x80
  5791. 8002292: 02db lsls r3, r3, #11
  5792. 8002294: 4013 ands r3, r2
  5793. 8002296: d001 beq.n 800229c <HAL_ADC_ConfigChannel+0x184>
  5794. 8002298: 2312 movs r3, #18
  5795. 800229a: e024 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5796. 800229c: 2300 movs r3, #0
  5797. 800229e: e022 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5798. 80022a0: 2311 movs r3, #17
  5799. 80022a2: e020 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5800. 80022a4: 2310 movs r3, #16
  5801. 80022a6: e01e b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5802. 80022a8: 230f movs r3, #15
  5803. 80022aa: e01c b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5804. 80022ac: 230e movs r3, #14
  5805. 80022ae: e01a b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5806. 80022b0: 230d movs r3, #13
  5807. 80022b2: e018 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5808. 80022b4: 230c movs r3, #12
  5809. 80022b6: e016 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5810. 80022b8: 230b movs r3, #11
  5811. 80022ba: e014 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5812. 80022bc: 230a movs r3, #10
  5813. 80022be: e012 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5814. 80022c0: 2309 movs r3, #9
  5815. 80022c2: e010 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5816. 80022c4: 2308 movs r3, #8
  5817. 80022c6: e00e b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5818. 80022c8: 2307 movs r3, #7
  5819. 80022ca: e00c b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5820. 80022cc: 2306 movs r3, #6
  5821. 80022ce: e00a b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5822. 80022d0: 2305 movs r3, #5
  5823. 80022d2: e008 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5824. 80022d4: 2304 movs r3, #4
  5825. 80022d6: e006 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5826. 80022d8: 2303 movs r3, #3
  5827. 80022da: e004 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5828. 80022dc: 2302 movs r3, #2
  5829. 80022de: e002 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5830. 80022e0: 2301 movs r3, #1
  5831. 80022e2: e000 b.n 80022e6 <HAL_ADC_ConfigChannel+0x1ce>
  5832. 80022e4: 2300 movs r3, #0
  5833. 80022e6: 683a ldr r2, [r7, #0]
  5834. 80022e8: 6852 ldr r2, [r2, #4]
  5835. 80022ea: 201f movs r0, #31
  5836. 80022ec: 4002 ands r2, r0
  5837. 80022ee: 4093 lsls r3, r2
  5838. 80022f0: 000a movs r2, r1
  5839. 80022f2: 431a orrs r2, r3
  5840. 80022f4: 687b ldr r3, [r7, #4]
  5841. 80022f6: 661a str r2, [r3, #96] @ 0x60
  5842. /* If the selected rank is below ADC group regular sequencer length, */
  5843. /* apply the configuration in ADC register. */
  5844. /* Note: Otherwise, configuration is not applied. */
  5845. /* To apply it, parameter'NbrOfConversion' must be increased. */
  5846. if (((pConfig->Rank >> 2UL) + 1UL) <= hadc->Init.NbrOfConversion)
  5847. 80022f8: 683b ldr r3, [r7, #0]
  5848. 80022fa: 685b ldr r3, [r3, #4]
  5849. 80022fc: 089b lsrs r3, r3, #2
  5850. 80022fe: 1c5a adds r2, r3, #1
  5851. 8002300: 687b ldr r3, [r7, #4]
  5852. 8002302: 69db ldr r3, [r3, #28]
  5853. 8002304: 429a cmp r2, r3
  5854. 8002306: d808 bhi.n 800231a <HAL_ADC_ConfigChannel+0x202>
  5855. {
  5856. LL_ADC_REG_SetSequencerRanks(hadc->Instance, pConfig->Rank, pConfig->Channel);
  5857. 8002308: 687b ldr r3, [r7, #4]
  5858. 800230a: 6818 ldr r0, [r3, #0]
  5859. 800230c: 683b ldr r3, [r7, #0]
  5860. 800230e: 6859 ldr r1, [r3, #4]
  5861. 8002310: 683b ldr r3, [r7, #0]
  5862. 8002312: 681b ldr r3, [r3, #0]
  5863. 8002314: 001a movs r2, r3
  5864. 8002316: f7ff fb3b bl 8001990 <LL_ADC_REG_SetSequencerRanks>
  5865. }
  5866. }
  5867. /* Set sampling time of the selected ADC channel */
  5868. LL_ADC_SetChannelSamplingTime(hadc->Instance, pConfig->Channel, pConfig->SamplingTime);
  5869. 800231a: 687b ldr r3, [r7, #4]
  5870. 800231c: 6818 ldr r0, [r3, #0]
  5871. 800231e: 683b ldr r3, [r7, #0]
  5872. 8002320: 6819 ldr r1, [r3, #0]
  5873. 8002322: 683b ldr r3, [r7, #0]
  5874. 8002324: 689b ldr r3, [r3, #8]
  5875. 8002326: 001a movs r2, r3
  5876. 8002328: f7ff fb76 bl 8001a18 <LL_ADC_SetChannelSamplingTime>
  5877. /* internal measurement paths enable: If internal channel selected, */
  5878. /* enable dedicated internal buffers and path. */
  5879. /* Note: these internal measurement paths can be disabled using */
  5880. /* HAL_ADC_DeInit() or removing the channel from sequencer with */
  5881. /* channel configuration parameter "Rank". */
  5882. if (__LL_ADC_IS_CHANNEL_INTERNAL(pConfig->Channel))
  5883. 800232c: 683b ldr r3, [r7, #0]
  5884. 800232e: 681b ldr r3, [r3, #0]
  5885. 8002330: 2b00 cmp r3, #0
  5886. 8002332: db00 blt.n 8002336 <HAL_ADC_ConfigChannel+0x21e>
  5887. 8002334: e0bc b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  5888. {
  5889. tmp_config_internal_channel = LL_ADC_GetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance));
  5890. 8002336: 4b50 ldr r3, [pc, #320] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  5891. 8002338: 0018 movs r0, r3
  5892. 800233a: f7ff fad7 bl 80018ec <LL_ADC_GetCommonPathInternalCh>
  5893. 800233e: 0003 movs r3, r0
  5894. 8002340: 613b str r3, [r7, #16]
  5895. /* If the requested internal measurement path has already been enabled, */
  5896. /* bypass the configuration processing. */
  5897. if ((pConfig->Channel == ADC_CHANNEL_TEMPSENSOR) &&
  5898. 8002342: 683b ldr r3, [r7, #0]
  5899. 8002344: 681b ldr r3, [r3, #0]
  5900. 8002346: 4a4d ldr r2, [pc, #308] @ (800247c <HAL_ADC_ConfigChannel+0x364>)
  5901. 8002348: 4293 cmp r3, r2
  5902. 800234a: d122 bne.n 8002392 <HAL_ADC_ConfigChannel+0x27a>
  5903. ((tmp_config_internal_channel & LL_ADC_PATH_INTERNAL_TEMPSENSOR) == 0UL))
  5904. 800234c: 693a ldr r2, [r7, #16]
  5905. 800234e: 2380 movs r3, #128 @ 0x80
  5906. 8002350: 041b lsls r3, r3, #16
  5907. 8002352: 4013 ands r3, r2
  5908. if ((pConfig->Channel == ADC_CHANNEL_TEMPSENSOR) &&
  5909. 8002354: d11d bne.n 8002392 <HAL_ADC_ConfigChannel+0x27a>
  5910. {
  5911. LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance),
  5912. 8002356: 693b ldr r3, [r7, #16]
  5913. 8002358: 2280 movs r2, #128 @ 0x80
  5914. 800235a: 0412 lsls r2, r2, #16
  5915. 800235c: 4313 orrs r3, r2
  5916. 800235e: 4a46 ldr r2, [pc, #280] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  5917. 8002360: 0019 movs r1, r3
  5918. 8002362: 0010 movs r0, r2
  5919. 8002364: f7ff faae bl 80018c4 <LL_ADC_SetCommonPathInternalCh>
  5920. /* Delay for temperature sensor stabilization time */
  5921. /* Wait loop initialization and execution */
  5922. /* Note: Variable divided by 2 to compensate partially */
  5923. /* CPU processing cycles, scaling in us split to not */
  5924. /* exceed 32 bits register capacity and handle low frequency. */
  5925. wait_loop_index = ((LL_ADC_DELAY_TEMPSENSOR_STAB_US / 10UL) * ((SystemCoreClock / (100000UL * 2UL)) + 1UL));
  5926. 8002368: 4b45 ldr r3, [pc, #276] @ (8002480 <HAL_ADC_ConfigChannel+0x368>)
  5927. 800236a: 681b ldr r3, [r3, #0]
  5928. 800236c: 4945 ldr r1, [pc, #276] @ (8002484 <HAL_ADC_ConfigChannel+0x36c>)
  5929. 800236e: 0018 movs r0, r3
  5930. 8002370: f7fd fec6 bl 8000100 <__udivsi3>
  5931. 8002374: 0003 movs r3, r0
  5932. 8002376: 1c5a adds r2, r3, #1
  5933. 8002378: 0013 movs r3, r2
  5934. 800237a: 005b lsls r3, r3, #1
  5935. 800237c: 189b adds r3, r3, r2
  5936. 800237e: 009b lsls r3, r3, #2
  5937. 8002380: 60fb str r3, [r7, #12]
  5938. while (wait_loop_index != 0UL)
  5939. 8002382: e002 b.n 800238a <HAL_ADC_ConfigChannel+0x272>
  5940. {
  5941. wait_loop_index--;
  5942. 8002384: 68fb ldr r3, [r7, #12]
  5943. 8002386: 3b01 subs r3, #1
  5944. 8002388: 60fb str r3, [r7, #12]
  5945. while (wait_loop_index != 0UL)
  5946. 800238a: 68fb ldr r3, [r7, #12]
  5947. 800238c: 2b00 cmp r3, #0
  5948. 800238e: d1f9 bne.n 8002384 <HAL_ADC_ConfigChannel+0x26c>
  5949. if ((pConfig->Channel == ADC_CHANNEL_TEMPSENSOR) &&
  5950. 8002390: e08e b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  5951. }
  5952. }
  5953. else if ((pConfig->Channel == ADC_CHANNEL_VBAT)
  5954. 8002392: 683b ldr r3, [r7, #0]
  5955. 8002394: 681b ldr r3, [r3, #0]
  5956. 8002396: 4a3c ldr r2, [pc, #240] @ (8002488 <HAL_ADC_ConfigChannel+0x370>)
  5957. 8002398: 4293 cmp r3, r2
  5958. 800239a: d10e bne.n 80023ba <HAL_ADC_ConfigChannel+0x2a2>
  5959. && ((tmp_config_internal_channel & LL_ADC_PATH_INTERNAL_VBAT) == 0UL))
  5960. 800239c: 693a ldr r2, [r7, #16]
  5961. 800239e: 2380 movs r3, #128 @ 0x80
  5962. 80023a0: 045b lsls r3, r3, #17
  5963. 80023a2: 4013 ands r3, r2
  5964. 80023a4: d109 bne.n 80023ba <HAL_ADC_ConfigChannel+0x2a2>
  5965. {
  5966. LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance),
  5967. 80023a6: 693b ldr r3, [r7, #16]
  5968. 80023a8: 2280 movs r2, #128 @ 0x80
  5969. 80023aa: 0452 lsls r2, r2, #17
  5970. 80023ac: 4313 orrs r3, r2
  5971. 80023ae: 4a32 ldr r2, [pc, #200] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  5972. 80023b0: 0019 movs r1, r3
  5973. 80023b2: 0010 movs r0, r2
  5974. 80023b4: f7ff fa86 bl 80018c4 <LL_ADC_SetCommonPathInternalCh>
  5975. 80023b8: e07a b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  5976. LL_ADC_PATH_INTERNAL_VBAT | tmp_config_internal_channel);
  5977. }
  5978. else if ((pConfig->Channel == ADC_CHANNEL_VREFINT) &&
  5979. 80023ba: 683b ldr r3, [r7, #0]
  5980. 80023bc: 681b ldr r3, [r3, #0]
  5981. 80023be: 4a33 ldr r2, [pc, #204] @ (800248c <HAL_ADC_ConfigChannel+0x374>)
  5982. 80023c0: 4293 cmp r3, r2
  5983. 80023c2: d000 beq.n 80023c6 <HAL_ADC_ConfigChannel+0x2ae>
  5984. 80023c4: e074 b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  5985. ((tmp_config_internal_channel & LL_ADC_PATH_INTERNAL_VREFINT) == 0UL))
  5986. 80023c6: 693a ldr r2, [r7, #16]
  5987. 80023c8: 2380 movs r3, #128 @ 0x80
  5988. 80023ca: 03db lsls r3, r3, #15
  5989. 80023cc: 4013 ands r3, r2
  5990. else if ((pConfig->Channel == ADC_CHANNEL_VREFINT) &&
  5991. 80023ce: d000 beq.n 80023d2 <HAL_ADC_ConfigChannel+0x2ba>
  5992. 80023d0: e06e b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  5993. {
  5994. LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance),
  5995. 80023d2: 693b ldr r3, [r7, #16]
  5996. 80023d4: 2280 movs r2, #128 @ 0x80
  5997. 80023d6: 03d2 lsls r2, r2, #15
  5998. 80023d8: 4313 orrs r3, r2
  5999. 80023da: 4a27 ldr r2, [pc, #156] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  6000. 80023dc: 0019 movs r1, r3
  6001. 80023de: 0010 movs r0, r2
  6002. 80023e0: f7ff fa70 bl 80018c4 <LL_ADC_SetCommonPathInternalCh>
  6003. 80023e4: e064 b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  6004. /* Regular sequencer configuration */
  6005. /* Note: Case of sequencer set to fully configurable: */
  6006. /* Sequencer rank cannot be disabled, only affected to */
  6007. /* another channel. */
  6008. /* To remove a rank, use parameter 'NbrOfConversion". */
  6009. if ((hadc->Init.ScanConvMode == ADC_SCAN_SEQ_FIXED) ||
  6010. 80023e6: 687b ldr r3, [r7, #4]
  6011. 80023e8: 691a ldr r2, [r3, #16]
  6012. 80023ea: 2380 movs r3, #128 @ 0x80
  6013. 80023ec: 061b lsls r3, r3, #24
  6014. 80023ee: 429a cmp r2, r3
  6015. 80023f0: d004 beq.n 80023fc <HAL_ADC_ConfigChannel+0x2e4>
  6016. (hadc->Init.ScanConvMode == ADC_SCAN_SEQ_FIXED_BACKWARD))
  6017. 80023f2: 687b ldr r3, [r7, #4]
  6018. 80023f4: 691b ldr r3, [r3, #16]
  6019. if ((hadc->Init.ScanConvMode == ADC_SCAN_SEQ_FIXED) ||
  6020. 80023f6: 4a1f ldr r2, [pc, #124] @ (8002474 <HAL_ADC_ConfigChannel+0x35c>)
  6021. 80023f8: 4293 cmp r3, r2
  6022. 80023fa: d107 bne.n 800240c <HAL_ADC_ConfigChannel+0x2f4>
  6023. {
  6024. /* Sequencer set to not fully configurable: */
  6025. /* Reset the channel by disabling the corresponding bitfield. */
  6026. LL_ADC_REG_SetSequencerChRem(hadc->Instance, pConfig->Channel);
  6027. 80023fc: 687b ldr r3, [r7, #4]
  6028. 80023fe: 681a ldr r2, [r3, #0]
  6029. 8002400: 683b ldr r3, [r7, #0]
  6030. 8002402: 681b ldr r3, [r3, #0]
  6031. 8002404: 0019 movs r1, r3
  6032. 8002406: 0010 movs r0, r2
  6033. 8002408: f7ff faf3 bl 80019f2 <LL_ADC_REG_SetSequencerChRem>
  6034. }
  6035. /* Management of internal measurement channels: Vbat/VrefInt/TempSensor. */
  6036. /* If internal channel selected, enable dedicated internal buffers and */
  6037. /* paths. */
  6038. if (__LL_ADC_IS_CHANNEL_INTERNAL(pConfig->Channel))
  6039. 800240c: 683b ldr r3, [r7, #0]
  6040. 800240e: 681b ldr r3, [r3, #0]
  6041. 8002410: 2b00 cmp r3, #0
  6042. 8002412: da4d bge.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  6043. {
  6044. tmp_config_internal_channel = LL_ADC_GetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance));
  6045. 8002414: 4b18 ldr r3, [pc, #96] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  6046. 8002416: 0018 movs r0, r3
  6047. 8002418: f7ff fa68 bl 80018ec <LL_ADC_GetCommonPathInternalCh>
  6048. 800241c: 0003 movs r3, r0
  6049. 800241e: 613b str r3, [r7, #16]
  6050. if (pConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
  6051. 8002420: 683b ldr r3, [r7, #0]
  6052. 8002422: 681b ldr r3, [r3, #0]
  6053. 8002424: 4a15 ldr r2, [pc, #84] @ (800247c <HAL_ADC_ConfigChannel+0x364>)
  6054. 8002426: 4293 cmp r3, r2
  6055. 8002428: d108 bne.n 800243c <HAL_ADC_ConfigChannel+0x324>
  6056. {
  6057. LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance),
  6058. 800242a: 693b ldr r3, [r7, #16]
  6059. 800242c: 4a18 ldr r2, [pc, #96] @ (8002490 <HAL_ADC_ConfigChannel+0x378>)
  6060. 800242e: 4013 ands r3, r2
  6061. 8002430: 4a11 ldr r2, [pc, #68] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  6062. 8002432: 0019 movs r1, r3
  6063. 8002434: 0010 movs r0, r2
  6064. 8002436: f7ff fa45 bl 80018c4 <LL_ADC_SetCommonPathInternalCh>
  6065. 800243a: e039 b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  6066. ~LL_ADC_PATH_INTERNAL_TEMPSENSOR & tmp_config_internal_channel);
  6067. }
  6068. else if (pConfig->Channel == ADC_CHANNEL_VBAT)
  6069. 800243c: 683b ldr r3, [r7, #0]
  6070. 800243e: 681b ldr r3, [r3, #0]
  6071. 8002440: 4a11 ldr r2, [pc, #68] @ (8002488 <HAL_ADC_ConfigChannel+0x370>)
  6072. 8002442: 4293 cmp r3, r2
  6073. 8002444: d108 bne.n 8002458 <HAL_ADC_ConfigChannel+0x340>
  6074. {
  6075. LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance),
  6076. 8002446: 693b ldr r3, [r7, #16]
  6077. 8002448: 4a12 ldr r2, [pc, #72] @ (8002494 <HAL_ADC_ConfigChannel+0x37c>)
  6078. 800244a: 4013 ands r3, r2
  6079. 800244c: 4a0a ldr r2, [pc, #40] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  6080. 800244e: 0019 movs r1, r3
  6081. 8002450: 0010 movs r0, r2
  6082. 8002452: f7ff fa37 bl 80018c4 <LL_ADC_SetCommonPathInternalCh>
  6083. 8002456: e02b b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  6084. ~LL_ADC_PATH_INTERNAL_VBAT & tmp_config_internal_channel);
  6085. }
  6086. else if (pConfig->Channel == ADC_CHANNEL_VREFINT)
  6087. 8002458: 683b ldr r3, [r7, #0]
  6088. 800245a: 681b ldr r3, [r3, #0]
  6089. 800245c: 4a0b ldr r2, [pc, #44] @ (800248c <HAL_ADC_ConfigChannel+0x374>)
  6090. 800245e: 4293 cmp r3, r2
  6091. 8002460: d126 bne.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  6092. {
  6093. LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance),
  6094. 8002462: 693b ldr r3, [r7, #16]
  6095. 8002464: 4a0c ldr r2, [pc, #48] @ (8002498 <HAL_ADC_ConfigChannel+0x380>)
  6096. 8002466: 4013 ands r3, r2
  6097. 8002468: 4a03 ldr r2, [pc, #12] @ (8002478 <HAL_ADC_ConfigChannel+0x360>)
  6098. 800246a: 0019 movs r1, r3
  6099. 800246c: 0010 movs r0, r2
  6100. 800246e: f7ff fa29 bl 80018c4 <LL_ADC_SetCommonPathInternalCh>
  6101. 8002472: e01d b.n 80024b0 <HAL_ADC_ConfigChannel+0x398>
  6102. 8002474: 80000004 .word 0x80000004
  6103. 8002478: 40012708 .word 0x40012708
  6104. 800247c: b0001000 .word 0xb0001000
  6105. 8002480: 20000000 .word 0x20000000
  6106. 8002484: 00030d40 .word 0x00030d40
  6107. 8002488: b8004000 .word 0xb8004000
  6108. 800248c: b4002000 .word 0xb4002000
  6109. 8002490: ff7fffff .word 0xff7fffff
  6110. 8002494: feffffff .word 0xfeffffff
  6111. 8002498: ffbfffff .word 0xffbfffff
  6112. /* channel could be done on neither of the channel configuration structure */
  6113. /* parameters. */
  6114. else
  6115. {
  6116. /* Update ADC state machine to error */
  6117. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
  6118. 800249c: 687b ldr r3, [r7, #4]
  6119. 800249e: 6d9b ldr r3, [r3, #88] @ 0x58
  6120. 80024a0: 2220 movs r2, #32
  6121. 80024a2: 431a orrs r2, r3
  6122. 80024a4: 687b ldr r3, [r7, #4]
  6123. 80024a6: 659a str r2, [r3, #88] @ 0x58
  6124. tmp_hal_status = HAL_ERROR;
  6125. 80024a8: 2317 movs r3, #23
  6126. 80024aa: 18fb adds r3, r7, r3
  6127. 80024ac: 2201 movs r2, #1
  6128. 80024ae: 701a strb r2, [r3, #0]
  6129. }
  6130. __HAL_UNLOCK(hadc);
  6131. 80024b0: 687b ldr r3, [r7, #4]
  6132. 80024b2: 2254 movs r2, #84 @ 0x54
  6133. 80024b4: 2100 movs r1, #0
  6134. 80024b6: 5499 strb r1, [r3, r2]
  6135. return tmp_hal_status;
  6136. 80024b8: 2317 movs r3, #23
  6137. 80024ba: 18fb adds r3, r7, r3
  6138. 80024bc: 781b ldrb r3, [r3, #0]
  6139. }
  6140. 80024be: 0018 movs r0, r3
  6141. 80024c0: 46bd mov sp, r7
  6142. 80024c2: b006 add sp, #24
  6143. 80024c4: bd80 pop {r7, pc}
  6144. 80024c6: 46c0 nop @ (mov r8, r8)
  6145. 080024c8 <ADC_ConversionStop>:
  6146. * stopped to disable the ADC.
  6147. * @param hadc ADC handle
  6148. * @retval HAL status.
  6149. */
  6150. HAL_StatusTypeDef ADC_ConversionStop(ADC_HandleTypeDef *hadc)
  6151. {
  6152. 80024c8: b580 push {r7, lr}
  6153. 80024ca: b084 sub sp, #16
  6154. 80024cc: af00 add r7, sp, #0
  6155. 80024ce: 6078 str r0, [r7, #4]
  6156. /* Check the parameters */
  6157. assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance));
  6158. /* Verification if ADC is not already stopped on regular group to bypass */
  6159. /* this function if not needed. */
  6160. if (LL_ADC_REG_IsConversionOngoing(hadc->Instance) != 0UL)
  6161. 80024d0: 687b ldr r3, [r7, #4]
  6162. 80024d2: 681b ldr r3, [r3, #0]
  6163. 80024d4: 0018 movs r0, r3
  6164. 80024d6: f7ff fb4d bl 8001b74 <LL_ADC_REG_IsConversionOngoing>
  6165. 80024da: 1e03 subs r3, r0, #0
  6166. 80024dc: d031 beq.n 8002542 <ADC_ConversionStop+0x7a>
  6167. {
  6168. /* Stop potential conversion on going on regular group */
  6169. /* Software is allowed to set ADSTP only when ADSTART=1 and ADDIS=0 */
  6170. if (LL_ADC_IsDisableOngoing(hadc->Instance) == 0UL)
  6171. 80024de: 687b ldr r3, [r7, #4]
  6172. 80024e0: 681b ldr r3, [r3, #0]
  6173. 80024e2: 0018 movs r0, r3
  6174. 80024e4: f7ff fb11 bl 8001b0a <LL_ADC_IsDisableOngoing>
  6175. 80024e8: 1e03 subs r3, r0, #0
  6176. 80024ea: d104 bne.n 80024f6 <ADC_ConversionStop+0x2e>
  6177. {
  6178. /* Stop ADC group regular conversion */
  6179. LL_ADC_REG_StopConversion(hadc->Instance);
  6180. 80024ec: 687b ldr r3, [r7, #4]
  6181. 80024ee: 681b ldr r3, [r3, #0]
  6182. 80024f0: 0018 movs r0, r3
  6183. 80024f2: f7ff fb2d bl 8001b50 <LL_ADC_REG_StopConversion>
  6184. }
  6185. /* Wait for conversion effectively stopped */
  6186. /* Get tick count */
  6187. tickstart = HAL_GetTick();
  6188. 80024f6: f7ff f9b7 bl 8001868 <HAL_GetTick>
  6189. 80024fa: 0003 movs r3, r0
  6190. 80024fc: 60fb str r3, [r7, #12]
  6191. while ((hadc->Instance->CR & ADC_CR_ADSTART) != 0UL)
  6192. 80024fe: e01a b.n 8002536 <ADC_ConversionStop+0x6e>
  6193. {
  6194. if ((HAL_GetTick() - tickstart) > ADC_STOP_CONVERSION_TIMEOUT)
  6195. 8002500: f7ff f9b2 bl 8001868 <HAL_GetTick>
  6196. 8002504: 0002 movs r2, r0
  6197. 8002506: 68fb ldr r3, [r7, #12]
  6198. 8002508: 1ad3 subs r3, r2, r3
  6199. 800250a: 2b02 cmp r3, #2
  6200. 800250c: d913 bls.n 8002536 <ADC_ConversionStop+0x6e>
  6201. {
  6202. /* New check to avoid false timeout detection in case of preemption */
  6203. if ((hadc->Instance->CR & ADC_CR_ADSTART) != 0UL)
  6204. 800250e: 687b ldr r3, [r7, #4]
  6205. 8002510: 681b ldr r3, [r3, #0]
  6206. 8002512: 689b ldr r3, [r3, #8]
  6207. 8002514: 2204 movs r2, #4
  6208. 8002516: 4013 ands r3, r2
  6209. 8002518: d00d beq.n 8002536 <ADC_ConversionStop+0x6e>
  6210. {
  6211. /* Update ADC state machine to error */
  6212. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  6213. 800251a: 687b ldr r3, [r7, #4]
  6214. 800251c: 6d9b ldr r3, [r3, #88] @ 0x58
  6215. 800251e: 2210 movs r2, #16
  6216. 8002520: 431a orrs r2, r3
  6217. 8002522: 687b ldr r3, [r7, #4]
  6218. 8002524: 659a str r2, [r3, #88] @ 0x58
  6219. /* Set ADC error code to ADC peripheral internal error */
  6220. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  6221. 8002526: 687b ldr r3, [r7, #4]
  6222. 8002528: 6ddb ldr r3, [r3, #92] @ 0x5c
  6223. 800252a: 2201 movs r2, #1
  6224. 800252c: 431a orrs r2, r3
  6225. 800252e: 687b ldr r3, [r7, #4]
  6226. 8002530: 65da str r2, [r3, #92] @ 0x5c
  6227. return HAL_ERROR;
  6228. 8002532: 2301 movs r3, #1
  6229. 8002534: e006 b.n 8002544 <ADC_ConversionStop+0x7c>
  6230. while ((hadc->Instance->CR & ADC_CR_ADSTART) != 0UL)
  6231. 8002536: 687b ldr r3, [r7, #4]
  6232. 8002538: 681b ldr r3, [r3, #0]
  6233. 800253a: 689b ldr r3, [r3, #8]
  6234. 800253c: 2204 movs r2, #4
  6235. 800253e: 4013 ands r3, r2
  6236. 8002540: d1de bne.n 8002500 <ADC_ConversionStop+0x38>
  6237. }
  6238. }
  6239. /* Return HAL status */
  6240. return HAL_OK;
  6241. 8002542: 2300 movs r3, #0
  6242. }
  6243. 8002544: 0018 movs r0, r3
  6244. 8002546: 46bd mov sp, r7
  6245. 8002548: b004 add sp, #16
  6246. 800254a: bd80 pop {r7, pc}
  6247. 0800254c <ADC_Enable>:
  6248. * and voltage regulator must be enabled (done into HAL_ADC_Init()).
  6249. * @param hadc ADC handle
  6250. * @retval HAL status.
  6251. */
  6252. HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef *hadc)
  6253. {
  6254. 800254c: b580 push {r7, lr}
  6255. 800254e: b084 sub sp, #16
  6256. 8002550: af00 add r7, sp, #0
  6257. 8002552: 6078 str r0, [r7, #4]
  6258. uint32_t tickstart;
  6259. __IO uint32_t wait_loop_index = 0UL;
  6260. 8002554: 2300 movs r3, #0
  6261. 8002556: 60bb str r3, [r7, #8]
  6262. /* ADC enable and wait for ADC ready (in case of ADC is disabled or */
  6263. /* enabling phase not yet completed: flag ADC ready not yet set). */
  6264. /* Timeout implemented to not be stuck if ADC cannot be enabled (possible */
  6265. /* causes: ADC clock not running, ...). */
  6266. if (LL_ADC_IsEnabled(hadc->Instance) == 0UL)
  6267. 8002558: 687b ldr r3, [r7, #4]
  6268. 800255a: 681b ldr r3, [r3, #0]
  6269. 800255c: 0018 movs r0, r3
  6270. 800255e: f7ff fac3 bl 8001ae8 <LL_ADC_IsEnabled>
  6271. 8002562: 1e03 subs r3, r0, #0
  6272. 8002564: d000 beq.n 8002568 <ADC_Enable+0x1c>
  6273. 8002566: e069 b.n 800263c <ADC_Enable+0xf0>
  6274. {
  6275. /* Check if conditions to enable the ADC are fulfilled */
  6276. if ((hadc->Instance->CR & (ADC_CR_ADCAL | ADC_CR_ADSTP | ADC_CR_ADSTART | ADC_CR_ADDIS | ADC_CR_ADEN)) != 0UL)
  6277. 8002568: 687b ldr r3, [r7, #4]
  6278. 800256a: 681b ldr r3, [r3, #0]
  6279. 800256c: 689b ldr r3, [r3, #8]
  6280. 800256e: 4a36 ldr r2, [pc, #216] @ (8002648 <ADC_Enable+0xfc>)
  6281. 8002570: 4013 ands r3, r2
  6282. 8002572: d00d beq.n 8002590 <ADC_Enable+0x44>
  6283. {
  6284. /* Update ADC state machine to error */
  6285. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  6286. 8002574: 687b ldr r3, [r7, #4]
  6287. 8002576: 6d9b ldr r3, [r3, #88] @ 0x58
  6288. 8002578: 2210 movs r2, #16
  6289. 800257a: 431a orrs r2, r3
  6290. 800257c: 687b ldr r3, [r7, #4]
  6291. 800257e: 659a str r2, [r3, #88] @ 0x58
  6292. /* Set ADC error code to ADC peripheral internal error */
  6293. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  6294. 8002580: 687b ldr r3, [r7, #4]
  6295. 8002582: 6ddb ldr r3, [r3, #92] @ 0x5c
  6296. 8002584: 2201 movs r2, #1
  6297. 8002586: 431a orrs r2, r3
  6298. 8002588: 687b ldr r3, [r7, #4]
  6299. 800258a: 65da str r2, [r3, #92] @ 0x5c
  6300. return HAL_ERROR;
  6301. 800258c: 2301 movs r3, #1
  6302. 800258e: e056 b.n 800263e <ADC_Enable+0xf2>
  6303. }
  6304. /* Enable the ADC peripheral */
  6305. LL_ADC_Enable(hadc->Instance);
  6306. 8002590: 687b ldr r3, [r7, #4]
  6307. 8002592: 681b ldr r3, [r3, #0]
  6308. 8002594: 0018 movs r0, r3
  6309. 8002596: f7ff fa83 bl 8001aa0 <LL_ADC_Enable>
  6310. if ((LL_ADC_GetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(hadc->Instance)) & LL_ADC_PATH_INTERNAL_TEMPSENSOR)
  6311. 800259a: 4b2c ldr r3, [pc, #176] @ (800264c <ADC_Enable+0x100>)
  6312. 800259c: 0018 movs r0, r3
  6313. 800259e: f7ff f9a5 bl 80018ec <LL_ADC_GetCommonPathInternalCh>
  6314. 80025a2: 0002 movs r2, r0
  6315. 80025a4: 2380 movs r3, #128 @ 0x80
  6316. 80025a6: 041b lsls r3, r3, #16
  6317. 80025a8: 4013 ands r3, r2
  6318. 80025aa: d00f beq.n 80025cc <ADC_Enable+0x80>
  6319. /* Wait loop initialization and execution */
  6320. /* Note: Variable divided by 2 to compensate partially */
  6321. /* CPU processing cycles, scaling in us split to not */
  6322. /* exceed 32 bits register capacity and handle low frequency. */
  6323. wait_loop_index = ((LL_ADC_DELAY_TEMPSENSOR_BUFFER_STAB_US / 10UL)
  6324. * ((SystemCoreClock / (100000UL * 2UL)) + 1UL));
  6325. 80025ac: 4b28 ldr r3, [pc, #160] @ (8002650 <ADC_Enable+0x104>)
  6326. 80025ae: 681b ldr r3, [r3, #0]
  6327. 80025b0: 4928 ldr r1, [pc, #160] @ (8002654 <ADC_Enable+0x108>)
  6328. 80025b2: 0018 movs r0, r3
  6329. 80025b4: f7fd fda4 bl 8000100 <__udivsi3>
  6330. 80025b8: 0003 movs r3, r0
  6331. 80025ba: 3301 adds r3, #1
  6332. wait_loop_index = ((LL_ADC_DELAY_TEMPSENSOR_BUFFER_STAB_US / 10UL)
  6333. 80025bc: 60bb str r3, [r7, #8]
  6334. while (wait_loop_index != 0UL)
  6335. 80025be: e002 b.n 80025c6 <ADC_Enable+0x7a>
  6336. {
  6337. wait_loop_index--;
  6338. 80025c0: 68bb ldr r3, [r7, #8]
  6339. 80025c2: 3b01 subs r3, #1
  6340. 80025c4: 60bb str r3, [r7, #8]
  6341. while (wait_loop_index != 0UL)
  6342. 80025c6: 68bb ldr r3, [r7, #8]
  6343. 80025c8: 2b00 cmp r3, #0
  6344. 80025ca: d1f9 bne.n 80025c0 <ADC_Enable+0x74>
  6345. }
  6346. }
  6347. /* If low power mode AutoPowerOff is enabled, power-on/off phases are */
  6348. /* performed automatically by hardware and flag ADC ready is not set. */
  6349. if (hadc->Init.LowPowerAutoPowerOff != ENABLE)
  6350. 80025cc: 687b ldr r3, [r7, #4]
  6351. 80025ce: 7e5b ldrb r3, [r3, #25]
  6352. 80025d0: 2b01 cmp r3, #1
  6353. 80025d2: d033 beq.n 800263c <ADC_Enable+0xf0>
  6354. {
  6355. /* Wait for ADC effectively enabled */
  6356. tickstart = HAL_GetTick();
  6357. 80025d4: f7ff f948 bl 8001868 <HAL_GetTick>
  6358. 80025d8: 0003 movs r3, r0
  6359. 80025da: 60fb str r3, [r7, #12]
  6360. while (__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_RDY) == 0UL)
  6361. 80025dc: e027 b.n 800262e <ADC_Enable+0xe2>
  6362. The workaround is to continue setting ADEN until ADRDY is becomes 1.
  6363. Additionally, ADC_ENABLE_TIMEOUT is defined to encompass this
  6364. 4 ADC clock cycle duration */
  6365. /* Note: Test of ADC enabled required due to hardware constraint to */
  6366. /* not enable ADC if already enabled. */
  6367. if (LL_ADC_IsEnabled(hadc->Instance) == 0UL)
  6368. 80025de: 687b ldr r3, [r7, #4]
  6369. 80025e0: 681b ldr r3, [r3, #0]
  6370. 80025e2: 0018 movs r0, r3
  6371. 80025e4: f7ff fa80 bl 8001ae8 <LL_ADC_IsEnabled>
  6372. 80025e8: 1e03 subs r3, r0, #0
  6373. 80025ea: d104 bne.n 80025f6 <ADC_Enable+0xaa>
  6374. {
  6375. LL_ADC_Enable(hadc->Instance);
  6376. 80025ec: 687b ldr r3, [r7, #4]
  6377. 80025ee: 681b ldr r3, [r3, #0]
  6378. 80025f0: 0018 movs r0, r3
  6379. 80025f2: f7ff fa55 bl 8001aa0 <LL_ADC_Enable>
  6380. }
  6381. if ((HAL_GetTick() - tickstart) > ADC_ENABLE_TIMEOUT)
  6382. 80025f6: f7ff f937 bl 8001868 <HAL_GetTick>
  6383. 80025fa: 0002 movs r2, r0
  6384. 80025fc: 68fb ldr r3, [r7, #12]
  6385. 80025fe: 1ad3 subs r3, r2, r3
  6386. 8002600: 2b02 cmp r3, #2
  6387. 8002602: d914 bls.n 800262e <ADC_Enable+0xe2>
  6388. {
  6389. /* New check to avoid false timeout detection in case of preemption */
  6390. if (__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_RDY) == 0UL)
  6391. 8002604: 687b ldr r3, [r7, #4]
  6392. 8002606: 681b ldr r3, [r3, #0]
  6393. 8002608: 681b ldr r3, [r3, #0]
  6394. 800260a: 2201 movs r2, #1
  6395. 800260c: 4013 ands r3, r2
  6396. 800260e: 2b01 cmp r3, #1
  6397. 8002610: d00d beq.n 800262e <ADC_Enable+0xe2>
  6398. {
  6399. /* Update ADC state machine to error */
  6400. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  6401. 8002612: 687b ldr r3, [r7, #4]
  6402. 8002614: 6d9b ldr r3, [r3, #88] @ 0x58
  6403. 8002616: 2210 movs r2, #16
  6404. 8002618: 431a orrs r2, r3
  6405. 800261a: 687b ldr r3, [r7, #4]
  6406. 800261c: 659a str r2, [r3, #88] @ 0x58
  6407. /* Set ADC error code to ADC peripheral internal error */
  6408. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  6409. 800261e: 687b ldr r3, [r7, #4]
  6410. 8002620: 6ddb ldr r3, [r3, #92] @ 0x5c
  6411. 8002622: 2201 movs r2, #1
  6412. 8002624: 431a orrs r2, r3
  6413. 8002626: 687b ldr r3, [r7, #4]
  6414. 8002628: 65da str r2, [r3, #92] @ 0x5c
  6415. return HAL_ERROR;
  6416. 800262a: 2301 movs r3, #1
  6417. 800262c: e007 b.n 800263e <ADC_Enable+0xf2>
  6418. while (__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_RDY) == 0UL)
  6419. 800262e: 687b ldr r3, [r7, #4]
  6420. 8002630: 681b ldr r3, [r3, #0]
  6421. 8002632: 681b ldr r3, [r3, #0]
  6422. 8002634: 2201 movs r2, #1
  6423. 8002636: 4013 ands r3, r2
  6424. 8002638: 2b01 cmp r3, #1
  6425. 800263a: d1d0 bne.n 80025de <ADC_Enable+0x92>
  6426. }
  6427. }
  6428. }
  6429. /* Return HAL status */
  6430. return HAL_OK;
  6431. 800263c: 2300 movs r3, #0
  6432. }
  6433. 800263e: 0018 movs r0, r3
  6434. 8002640: 46bd mov sp, r7
  6435. 8002642: b004 add sp, #16
  6436. 8002644: bd80 pop {r7, pc}
  6437. 8002646: 46c0 nop @ (mov r8, r8)
  6438. 8002648: 80000017 .word 0x80000017
  6439. 800264c: 40012708 .word 0x40012708
  6440. 8002650: 20000000 .word 0x20000000
  6441. 8002654: 00030d40 .word 0x00030d40
  6442. 08002658 <ADC_Disable>:
  6443. * stopped.
  6444. * @param hadc ADC handle
  6445. * @retval HAL status.
  6446. */
  6447. HAL_StatusTypeDef ADC_Disable(ADC_HandleTypeDef *hadc)
  6448. {
  6449. 8002658: b580 push {r7, lr}
  6450. 800265a: b084 sub sp, #16
  6451. 800265c: af00 add r7, sp, #0
  6452. 800265e: 6078 str r0, [r7, #4]
  6453. uint32_t tickstart;
  6454. const uint32_t tmp_adc_is_disable_on_going = LL_ADC_IsDisableOngoing(hadc->Instance);
  6455. 8002660: 687b ldr r3, [r7, #4]
  6456. 8002662: 681b ldr r3, [r3, #0]
  6457. 8002664: 0018 movs r0, r3
  6458. 8002666: f7ff fa50 bl 8001b0a <LL_ADC_IsDisableOngoing>
  6459. 800266a: 0003 movs r3, r0
  6460. 800266c: 60fb str r3, [r7, #12]
  6461. /* Verification if ADC is not already disabled: */
  6462. /* Note: forbidden to disable ADC (set bit ADC_CR_ADDIS) if ADC is already */
  6463. /* disabled. */
  6464. if ((LL_ADC_IsEnabled(hadc->Instance) != 0UL)
  6465. 800266e: 687b ldr r3, [r7, #4]
  6466. 8002670: 681b ldr r3, [r3, #0]
  6467. 8002672: 0018 movs r0, r3
  6468. 8002674: f7ff fa38 bl 8001ae8 <LL_ADC_IsEnabled>
  6469. 8002678: 1e03 subs r3, r0, #0
  6470. 800267a: d046 beq.n 800270a <ADC_Disable+0xb2>
  6471. && (tmp_adc_is_disable_on_going == 0UL)
  6472. 800267c: 68fb ldr r3, [r7, #12]
  6473. 800267e: 2b00 cmp r3, #0
  6474. 8002680: d143 bne.n 800270a <ADC_Disable+0xb2>
  6475. )
  6476. {
  6477. /* Check if conditions to disable the ADC are fulfilled */
  6478. if ((hadc->Instance->CR & (ADC_CR_ADSTART | ADC_CR_ADEN)) == ADC_CR_ADEN)
  6479. 8002682: 687b ldr r3, [r7, #4]
  6480. 8002684: 681b ldr r3, [r3, #0]
  6481. 8002686: 689b ldr r3, [r3, #8]
  6482. 8002688: 2205 movs r2, #5
  6483. 800268a: 4013 ands r3, r2
  6484. 800268c: 2b01 cmp r3, #1
  6485. 800268e: d10d bne.n 80026ac <ADC_Disable+0x54>
  6486. {
  6487. /* Disable the ADC peripheral */
  6488. LL_ADC_Disable(hadc->Instance);
  6489. 8002690: 687b ldr r3, [r7, #4]
  6490. 8002692: 681b ldr r3, [r3, #0]
  6491. 8002694: 0018 movs r0, r3
  6492. 8002696: f7ff fa15 bl 8001ac4 <LL_ADC_Disable>
  6493. __HAL_ADC_CLEAR_FLAG(hadc, (ADC_FLAG_EOSMP | ADC_FLAG_RDY));
  6494. 800269a: 687b ldr r3, [r7, #4]
  6495. 800269c: 681b ldr r3, [r3, #0]
  6496. 800269e: 2203 movs r2, #3
  6497. 80026a0: 601a str r2, [r3, #0]
  6498. return HAL_ERROR;
  6499. }
  6500. /* Wait for ADC effectively disabled */
  6501. /* Get tick count */
  6502. tickstart = HAL_GetTick();
  6503. 80026a2: f7ff f8e1 bl 8001868 <HAL_GetTick>
  6504. 80026a6: 0003 movs r3, r0
  6505. 80026a8: 60bb str r3, [r7, #8]
  6506. while ((hadc->Instance->CR & ADC_CR_ADEN) != 0UL)
  6507. 80026aa: e028 b.n 80026fe <ADC_Disable+0xa6>
  6508. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  6509. 80026ac: 687b ldr r3, [r7, #4]
  6510. 80026ae: 6d9b ldr r3, [r3, #88] @ 0x58
  6511. 80026b0: 2210 movs r2, #16
  6512. 80026b2: 431a orrs r2, r3
  6513. 80026b4: 687b ldr r3, [r7, #4]
  6514. 80026b6: 659a str r2, [r3, #88] @ 0x58
  6515. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  6516. 80026b8: 687b ldr r3, [r7, #4]
  6517. 80026ba: 6ddb ldr r3, [r3, #92] @ 0x5c
  6518. 80026bc: 2201 movs r2, #1
  6519. 80026be: 431a orrs r2, r3
  6520. 80026c0: 687b ldr r3, [r7, #4]
  6521. 80026c2: 65da str r2, [r3, #92] @ 0x5c
  6522. return HAL_ERROR;
  6523. 80026c4: 2301 movs r3, #1
  6524. 80026c6: e021 b.n 800270c <ADC_Disable+0xb4>
  6525. {
  6526. if ((HAL_GetTick() - tickstart) > ADC_DISABLE_TIMEOUT)
  6527. 80026c8: f7ff f8ce bl 8001868 <HAL_GetTick>
  6528. 80026cc: 0002 movs r2, r0
  6529. 80026ce: 68bb ldr r3, [r7, #8]
  6530. 80026d0: 1ad3 subs r3, r2, r3
  6531. 80026d2: 2b02 cmp r3, #2
  6532. 80026d4: d913 bls.n 80026fe <ADC_Disable+0xa6>
  6533. {
  6534. /* New check to avoid false timeout detection in case of preemption */
  6535. if ((hadc->Instance->CR & ADC_CR_ADEN) != 0UL)
  6536. 80026d6: 687b ldr r3, [r7, #4]
  6537. 80026d8: 681b ldr r3, [r3, #0]
  6538. 80026da: 689b ldr r3, [r3, #8]
  6539. 80026dc: 2201 movs r2, #1
  6540. 80026de: 4013 ands r3, r2
  6541. 80026e0: d00d beq.n 80026fe <ADC_Disable+0xa6>
  6542. {
  6543. /* Update ADC state machine to error */
  6544. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  6545. 80026e2: 687b ldr r3, [r7, #4]
  6546. 80026e4: 6d9b ldr r3, [r3, #88] @ 0x58
  6547. 80026e6: 2210 movs r2, #16
  6548. 80026e8: 431a orrs r2, r3
  6549. 80026ea: 687b ldr r3, [r7, #4]
  6550. 80026ec: 659a str r2, [r3, #88] @ 0x58
  6551. /* Set ADC error code to ADC peripheral internal error */
  6552. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  6553. 80026ee: 687b ldr r3, [r7, #4]
  6554. 80026f0: 6ddb ldr r3, [r3, #92] @ 0x5c
  6555. 80026f2: 2201 movs r2, #1
  6556. 80026f4: 431a orrs r2, r3
  6557. 80026f6: 687b ldr r3, [r7, #4]
  6558. 80026f8: 65da str r2, [r3, #92] @ 0x5c
  6559. return HAL_ERROR;
  6560. 80026fa: 2301 movs r3, #1
  6561. 80026fc: e006 b.n 800270c <ADC_Disable+0xb4>
  6562. while ((hadc->Instance->CR & ADC_CR_ADEN) != 0UL)
  6563. 80026fe: 687b ldr r3, [r7, #4]
  6564. 8002700: 681b ldr r3, [r3, #0]
  6565. 8002702: 689b ldr r3, [r3, #8]
  6566. 8002704: 2201 movs r2, #1
  6567. 8002706: 4013 ands r3, r2
  6568. 8002708: d1de bne.n 80026c8 <ADC_Disable+0x70>
  6569. }
  6570. }
  6571. }
  6572. /* Return HAL status */
  6573. return HAL_OK;
  6574. 800270a: 2300 movs r3, #0
  6575. }
  6576. 800270c: 0018 movs r0, r3
  6577. 800270e: 46bd mov sp, r7
  6578. 8002710: b004 add sp, #16
  6579. 8002712: bd80 pop {r7, pc}
  6580. 08002714 <ADC_DMAConvCplt>:
  6581. * @brief DMA transfer complete callback.
  6582. * @param hdma pointer to DMA handle.
  6583. * @retval None
  6584. */
  6585. static void ADC_DMAConvCplt(DMA_HandleTypeDef *hdma)
  6586. {
  6587. 8002714: b580 push {r7, lr}
  6588. 8002716: b084 sub sp, #16
  6589. 8002718: af00 add r7, sp, #0
  6590. 800271a: 6078 str r0, [r7, #4]
  6591. /* Retrieve ADC handle corresponding to current DMA handle */
  6592. ADC_HandleTypeDef *hadc = (ADC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
  6593. 800271c: 687b ldr r3, [r7, #4]
  6594. 800271e: 6a9b ldr r3, [r3, #40] @ 0x28
  6595. 8002720: 60fb str r3, [r7, #12]
  6596. /* Update state machine on conversion status if not in error state */
  6597. if ((hadc->State & (HAL_ADC_STATE_ERROR_INTERNAL | HAL_ADC_STATE_ERROR_DMA)) == 0UL)
  6598. 8002722: 68fb ldr r3, [r7, #12]
  6599. 8002724: 6d9b ldr r3, [r3, #88] @ 0x58
  6600. 8002726: 2250 movs r2, #80 @ 0x50
  6601. 8002728: 4013 ands r3, r2
  6602. 800272a: d141 bne.n 80027b0 <ADC_DMAConvCplt+0x9c>
  6603. {
  6604. /* Set ADC state */
  6605. SET_BIT(hadc->State, HAL_ADC_STATE_REG_EOC);
  6606. 800272c: 68fb ldr r3, [r7, #12]
  6607. 800272e: 6d9b ldr r3, [r3, #88] @ 0x58
  6608. 8002730: 2280 movs r2, #128 @ 0x80
  6609. 8002732: 0092 lsls r2, r2, #2
  6610. 8002734: 431a orrs r2, r3
  6611. 8002736: 68fb ldr r3, [r7, #12]
  6612. 8002738: 659a str r2, [r3, #88] @ 0x58
  6613. /* Determine whether any further conversion upcoming on group regular */
  6614. /* by external trigger, continuous mode or scan sequence on going */
  6615. /* to disable interruption. */
  6616. if ((LL_ADC_REG_IsTriggerSourceSWStart(hadc->Instance) != 0UL)
  6617. 800273a: 68fb ldr r3, [r7, #12]
  6618. 800273c: 681b ldr r3, [r3, #0]
  6619. 800273e: 0018 movs r0, r3
  6620. 8002740: f7ff f915 bl 800196e <LL_ADC_REG_IsTriggerSourceSWStart>
  6621. 8002744: 1e03 subs r3, r0, #0
  6622. 8002746: d02e beq.n 80027a6 <ADC_DMAConvCplt+0x92>
  6623. && (hadc->Init.ContinuousConvMode == DISABLE)
  6624. 8002748: 68fb ldr r3, [r7, #12]
  6625. 800274a: 7e9b ldrb r3, [r3, #26]
  6626. 800274c: 2b00 cmp r3, #0
  6627. 800274e: d12a bne.n 80027a6 <ADC_DMAConvCplt+0x92>
  6628. )
  6629. {
  6630. /* If End of Sequence is reached, disable interrupts */
  6631. if (__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_EOS))
  6632. 8002750: 68fb ldr r3, [r7, #12]
  6633. 8002752: 681b ldr r3, [r3, #0]
  6634. 8002754: 681b ldr r3, [r3, #0]
  6635. 8002756: 2208 movs r2, #8
  6636. 8002758: 4013 ands r3, r2
  6637. 800275a: 2b08 cmp r3, #8
  6638. 800275c: d123 bne.n 80027a6 <ADC_DMAConvCplt+0x92>
  6639. {
  6640. /* Allowed to modify bits ADC_IT_EOC/ADC_IT_EOS only if bit */
  6641. /* ADSTART==0 (no conversion on going) */
  6642. if (LL_ADC_REG_IsConversionOngoing(hadc->Instance) == 0UL)
  6643. 800275e: 68fb ldr r3, [r7, #12]
  6644. 8002760: 681b ldr r3, [r3, #0]
  6645. 8002762: 0018 movs r0, r3
  6646. 8002764: f7ff fa06 bl 8001b74 <LL_ADC_REG_IsConversionOngoing>
  6647. 8002768: 1e03 subs r3, r0, #0
  6648. 800276a: d110 bne.n 800278e <ADC_DMAConvCplt+0x7a>
  6649. {
  6650. /* Disable ADC end of single conversion interrupt on group regular */
  6651. /* Note: Overrun interrupt was enabled with EOC interrupt in */
  6652. /* HAL_Start_IT(), but is not disabled here because can be used */
  6653. /* by overrun IRQ process below. */
  6654. __HAL_ADC_DISABLE_IT(hadc, ADC_IT_EOC | ADC_IT_EOS);
  6655. 800276c: 68fb ldr r3, [r7, #12]
  6656. 800276e: 681b ldr r3, [r3, #0]
  6657. 8002770: 685a ldr r2, [r3, #4]
  6658. 8002772: 68fb ldr r3, [r7, #12]
  6659. 8002774: 681b ldr r3, [r3, #0]
  6660. 8002776: 210c movs r1, #12
  6661. 8002778: 438a bics r2, r1
  6662. 800277a: 605a str r2, [r3, #4]
  6663. /* Set ADC state */
  6664. ADC_STATE_CLR_SET(hadc->State,
  6665. 800277c: 68fb ldr r3, [r7, #12]
  6666. 800277e: 6d9b ldr r3, [r3, #88] @ 0x58
  6667. 8002780: 4a15 ldr r2, [pc, #84] @ (80027d8 <ADC_DMAConvCplt+0xc4>)
  6668. 8002782: 4013 ands r3, r2
  6669. 8002784: 2201 movs r2, #1
  6670. 8002786: 431a orrs r2, r3
  6671. 8002788: 68fb ldr r3, [r7, #12]
  6672. 800278a: 659a str r2, [r3, #88] @ 0x58
  6673. 800278c: e00b b.n 80027a6 <ADC_DMAConvCplt+0x92>
  6674. HAL_ADC_STATE_READY);
  6675. }
  6676. else
  6677. {
  6678. /* Change ADC state to error state */
  6679. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
  6680. 800278e: 68fb ldr r3, [r7, #12]
  6681. 8002790: 6d9b ldr r3, [r3, #88] @ 0x58
  6682. 8002792: 2220 movs r2, #32
  6683. 8002794: 431a orrs r2, r3
  6684. 8002796: 68fb ldr r3, [r7, #12]
  6685. 8002798: 659a str r2, [r3, #88] @ 0x58
  6686. /* Set ADC error code to ADC peripheral internal error */
  6687. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  6688. 800279a: 68fb ldr r3, [r7, #12]
  6689. 800279c: 6ddb ldr r3, [r3, #92] @ 0x5c
  6690. 800279e: 2201 movs r2, #1
  6691. 80027a0: 431a orrs r2, r3
  6692. 80027a2: 68fb ldr r3, [r7, #12]
  6693. 80027a4: 65da str r2, [r3, #92] @ 0x5c
  6694. /* Conversion complete callback */
  6695. #if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
  6696. hadc->ConvCpltCallback(hadc);
  6697. #else
  6698. HAL_ADC_ConvCpltCallback(hadc);
  6699. 80027a6: 68fb ldr r3, [r7, #12]
  6700. 80027a8: 0018 movs r0, r3
  6701. 80027aa: f7ff fc9d bl 80020e8 <HAL_ADC_ConvCpltCallback>
  6702. {
  6703. /* Call ADC DMA error callback */
  6704. hadc->DMA_Handle->XferErrorCallback(hdma);
  6705. }
  6706. }
  6707. }
  6708. 80027ae: e00f b.n 80027d0 <ADC_DMAConvCplt+0xbc>
  6709. if ((hadc->State & HAL_ADC_STATE_ERROR_INTERNAL) != 0UL)
  6710. 80027b0: 68fb ldr r3, [r7, #12]
  6711. 80027b2: 6d9b ldr r3, [r3, #88] @ 0x58
  6712. 80027b4: 2210 movs r2, #16
  6713. 80027b6: 4013 ands r3, r2
  6714. 80027b8: d004 beq.n 80027c4 <ADC_DMAConvCplt+0xb0>
  6715. HAL_ADC_ErrorCallback(hadc);
  6716. 80027ba: 68fb ldr r3, [r7, #12]
  6717. 80027bc: 0018 movs r0, r3
  6718. 80027be: f7ff fca3 bl 8002108 <HAL_ADC_ErrorCallback>
  6719. }
  6720. 80027c2: e005 b.n 80027d0 <ADC_DMAConvCplt+0xbc>
  6721. hadc->DMA_Handle->XferErrorCallback(hdma);
  6722. 80027c4: 68fb ldr r3, [r7, #12]
  6723. 80027c6: 6d1b ldr r3, [r3, #80] @ 0x50
  6724. 80027c8: 6b5b ldr r3, [r3, #52] @ 0x34
  6725. 80027ca: 687a ldr r2, [r7, #4]
  6726. 80027cc: 0010 movs r0, r2
  6727. 80027ce: 4798 blx r3
  6728. }
  6729. 80027d0: 46c0 nop @ (mov r8, r8)
  6730. 80027d2: 46bd mov sp, r7
  6731. 80027d4: b004 add sp, #16
  6732. 80027d6: bd80 pop {r7, pc}
  6733. 80027d8: fffffefe .word 0xfffffefe
  6734. 080027dc <ADC_DMAHalfConvCplt>:
  6735. * @brief DMA half transfer complete callback.
  6736. * @param hdma pointer to DMA handle.
  6737. * @retval None
  6738. */
  6739. static void ADC_DMAHalfConvCplt(DMA_HandleTypeDef *hdma)
  6740. {
  6741. 80027dc: b580 push {r7, lr}
  6742. 80027de: b084 sub sp, #16
  6743. 80027e0: af00 add r7, sp, #0
  6744. 80027e2: 6078 str r0, [r7, #4]
  6745. /* Retrieve ADC handle corresponding to current DMA handle */
  6746. ADC_HandleTypeDef *hadc = (ADC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
  6747. 80027e4: 687b ldr r3, [r7, #4]
  6748. 80027e6: 6a9b ldr r3, [r3, #40] @ 0x28
  6749. 80027e8: 60fb str r3, [r7, #12]
  6750. /* Half conversion callback */
  6751. #if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
  6752. hadc->ConvHalfCpltCallback(hadc);
  6753. #else
  6754. HAL_ADC_ConvHalfCpltCallback(hadc);
  6755. 80027ea: 68fb ldr r3, [r7, #12]
  6756. 80027ec: 0018 movs r0, r3
  6757. 80027ee: f7ff fc83 bl 80020f8 <HAL_ADC_ConvHalfCpltCallback>
  6758. #endif /* USE_HAL_ADC_REGISTER_CALLBACKS */
  6759. }
  6760. 80027f2: 46c0 nop @ (mov r8, r8)
  6761. 80027f4: 46bd mov sp, r7
  6762. 80027f6: b004 add sp, #16
  6763. 80027f8: bd80 pop {r7, pc}
  6764. 080027fa <ADC_DMAError>:
  6765. * @brief DMA error callback.
  6766. * @param hdma pointer to DMA handle.
  6767. * @retval None
  6768. */
  6769. static void ADC_DMAError(DMA_HandleTypeDef *hdma)
  6770. {
  6771. 80027fa: b580 push {r7, lr}
  6772. 80027fc: b084 sub sp, #16
  6773. 80027fe: af00 add r7, sp, #0
  6774. 8002800: 6078 str r0, [r7, #4]
  6775. /* Retrieve ADC handle corresponding to current DMA handle */
  6776. ADC_HandleTypeDef *hadc = (ADC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
  6777. 8002802: 687b ldr r3, [r7, #4]
  6778. 8002804: 6a9b ldr r3, [r3, #40] @ 0x28
  6779. 8002806: 60fb str r3, [r7, #12]
  6780. /* Set ADC state */
  6781. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_DMA);
  6782. 8002808: 68fb ldr r3, [r7, #12]
  6783. 800280a: 6d9b ldr r3, [r3, #88] @ 0x58
  6784. 800280c: 2240 movs r2, #64 @ 0x40
  6785. 800280e: 431a orrs r2, r3
  6786. 8002810: 68fb ldr r3, [r7, #12]
  6787. 8002812: 659a str r2, [r3, #88] @ 0x58
  6788. /* Set ADC error code to DMA error */
  6789. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_DMA);
  6790. 8002814: 68fb ldr r3, [r7, #12]
  6791. 8002816: 6ddb ldr r3, [r3, #92] @ 0x5c
  6792. 8002818: 2204 movs r2, #4
  6793. 800281a: 431a orrs r2, r3
  6794. 800281c: 68fb ldr r3, [r7, #12]
  6795. 800281e: 65da str r2, [r3, #92] @ 0x5c
  6796. /* Error callback */
  6797. #if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
  6798. hadc->ErrorCallback(hadc);
  6799. #else
  6800. HAL_ADC_ErrorCallback(hadc);
  6801. 8002820: 68fb ldr r3, [r7, #12]
  6802. 8002822: 0018 movs r0, r3
  6803. 8002824: f7ff fc70 bl 8002108 <HAL_ADC_ErrorCallback>
  6804. #endif /* USE_HAL_ADC_REGISTER_CALLBACKS */
  6805. }
  6806. 8002828: 46c0 nop @ (mov r8, r8)
  6807. 800282a: 46bd mov sp, r7
  6808. 800282c: b004 add sp, #16
  6809. 800282e: bd80 pop {r7, pc}
  6810. 08002830 <LL_ADC_GetCommonClock>:
  6811. {
  6812. 8002830: b580 push {r7, lr}
  6813. 8002832: b082 sub sp, #8
  6814. 8002834: af00 add r7, sp, #0
  6815. 8002836: 6078 str r0, [r7, #4]
  6816. return (uint32_t)(READ_BIT(ADCxy_COMMON->CCR, ADC_CCR_PRESC));
  6817. 8002838: 687b ldr r3, [r7, #4]
  6818. 800283a: 681a ldr r2, [r3, #0]
  6819. 800283c: 23f0 movs r3, #240 @ 0xf0
  6820. 800283e: 039b lsls r3, r3, #14
  6821. 8002840: 4013 ands r3, r2
  6822. }
  6823. 8002842: 0018 movs r0, r3
  6824. 8002844: 46bd mov sp, r7
  6825. 8002846: b002 add sp, #8
  6826. 8002848: bd80 pop {r7, pc}
  6827. 0800284a <LL_ADC_GetClock>:
  6828. {
  6829. 800284a: b580 push {r7, lr}
  6830. 800284c: b082 sub sp, #8
  6831. 800284e: af00 add r7, sp, #0
  6832. 8002850: 6078 str r0, [r7, #4]
  6833. return (uint32_t)(READ_BIT(ADCx->CFGR2, ADC_CFGR2_CKMODE));
  6834. 8002852: 687b ldr r3, [r7, #4]
  6835. 8002854: 691b ldr r3, [r3, #16]
  6836. 8002856: 0f9b lsrs r3, r3, #30
  6837. 8002858: 079b lsls r3, r3, #30
  6838. }
  6839. 800285a: 0018 movs r0, r3
  6840. 800285c: 46bd mov sp, r7
  6841. 800285e: b002 add sp, #8
  6842. 8002860: bd80 pop {r7, pc}
  6843. 08002862 <LL_ADC_SetCalibrationFactor>:
  6844. {
  6845. 8002862: b580 push {r7, lr}
  6846. 8002864: b082 sub sp, #8
  6847. 8002866: af00 add r7, sp, #0
  6848. 8002868: 6078 str r0, [r7, #4]
  6849. 800286a: 6039 str r1, [r7, #0]
  6850. MODIFY_REG(ADCx->CALFACT,
  6851. 800286c: 687b ldr r3, [r7, #4]
  6852. 800286e: 22b4 movs r2, #180 @ 0xb4
  6853. 8002870: 589b ldr r3, [r3, r2]
  6854. 8002872: 227f movs r2, #127 @ 0x7f
  6855. 8002874: 4393 bics r3, r2
  6856. 8002876: 001a movs r2, r3
  6857. 8002878: 683b ldr r3, [r7, #0]
  6858. 800287a: 431a orrs r2, r3
  6859. 800287c: 687b ldr r3, [r7, #4]
  6860. 800287e: 21b4 movs r1, #180 @ 0xb4
  6861. 8002880: 505a str r2, [r3, r1]
  6862. }
  6863. 8002882: 46c0 nop @ (mov r8, r8)
  6864. 8002884: 46bd mov sp, r7
  6865. 8002886: b002 add sp, #8
  6866. 8002888: bd80 pop {r7, pc}
  6867. 0800288a <LL_ADC_GetCalibrationFactor>:
  6868. {
  6869. 800288a: b580 push {r7, lr}
  6870. 800288c: b082 sub sp, #8
  6871. 800288e: af00 add r7, sp, #0
  6872. 8002890: 6078 str r0, [r7, #4]
  6873. return (uint32_t)(READ_BIT(ADCx->CALFACT, ADC_CALFACT_CALFACT));
  6874. 8002892: 687b ldr r3, [r7, #4]
  6875. 8002894: 22b4 movs r2, #180 @ 0xb4
  6876. 8002896: 589b ldr r3, [r3, r2]
  6877. 8002898: 227f movs r2, #127 @ 0x7f
  6878. 800289a: 4013 ands r3, r2
  6879. }
  6880. 800289c: 0018 movs r0, r3
  6881. 800289e: 46bd mov sp, r7
  6882. 80028a0: b002 add sp, #8
  6883. 80028a2: bd80 pop {r7, pc}
  6884. 080028a4 <LL_ADC_Enable>:
  6885. {
  6886. 80028a4: b580 push {r7, lr}
  6887. 80028a6: b082 sub sp, #8
  6888. 80028a8: af00 add r7, sp, #0
  6889. 80028aa: 6078 str r0, [r7, #4]
  6890. MODIFY_REG(ADCx->CR,
  6891. 80028ac: 687b ldr r3, [r7, #4]
  6892. 80028ae: 689b ldr r3, [r3, #8]
  6893. 80028b0: 4a04 ldr r2, [pc, #16] @ (80028c4 <LL_ADC_Enable+0x20>)
  6894. 80028b2: 4013 ands r3, r2
  6895. 80028b4: 2201 movs r2, #1
  6896. 80028b6: 431a orrs r2, r3
  6897. 80028b8: 687b ldr r3, [r7, #4]
  6898. 80028ba: 609a str r2, [r3, #8]
  6899. }
  6900. 80028bc: 46c0 nop @ (mov r8, r8)
  6901. 80028be: 46bd mov sp, r7
  6902. 80028c0: b002 add sp, #8
  6903. 80028c2: bd80 pop {r7, pc}
  6904. 80028c4: 7fffffe8 .word 0x7fffffe8
  6905. 080028c8 <LL_ADC_Disable>:
  6906. {
  6907. 80028c8: b580 push {r7, lr}
  6908. 80028ca: b082 sub sp, #8
  6909. 80028cc: af00 add r7, sp, #0
  6910. 80028ce: 6078 str r0, [r7, #4]
  6911. MODIFY_REG(ADCx->CR,
  6912. 80028d0: 687b ldr r3, [r7, #4]
  6913. 80028d2: 689b ldr r3, [r3, #8]
  6914. 80028d4: 4a04 ldr r2, [pc, #16] @ (80028e8 <LL_ADC_Disable+0x20>)
  6915. 80028d6: 4013 ands r3, r2
  6916. 80028d8: 2202 movs r2, #2
  6917. 80028da: 431a orrs r2, r3
  6918. 80028dc: 687b ldr r3, [r7, #4]
  6919. 80028de: 609a str r2, [r3, #8]
  6920. }
  6921. 80028e0: 46c0 nop @ (mov r8, r8)
  6922. 80028e2: 46bd mov sp, r7
  6923. 80028e4: b002 add sp, #8
  6924. 80028e6: bd80 pop {r7, pc}
  6925. 80028e8: 7fffffe8 .word 0x7fffffe8
  6926. 080028ec <LL_ADC_IsEnabled>:
  6927. {
  6928. 80028ec: b580 push {r7, lr}
  6929. 80028ee: b082 sub sp, #8
  6930. 80028f0: af00 add r7, sp, #0
  6931. 80028f2: 6078 str r0, [r7, #4]
  6932. return ((READ_BIT(ADCx->CR, ADC_CR_ADEN) == (ADC_CR_ADEN)) ? 1UL : 0UL);
  6933. 80028f4: 687b ldr r3, [r7, #4]
  6934. 80028f6: 689b ldr r3, [r3, #8]
  6935. 80028f8: 2201 movs r2, #1
  6936. 80028fa: 4013 ands r3, r2
  6937. 80028fc: 2b01 cmp r3, #1
  6938. 80028fe: d101 bne.n 8002904 <LL_ADC_IsEnabled+0x18>
  6939. 8002900: 2301 movs r3, #1
  6940. 8002902: e000 b.n 8002906 <LL_ADC_IsEnabled+0x1a>
  6941. 8002904: 2300 movs r3, #0
  6942. }
  6943. 8002906: 0018 movs r0, r3
  6944. 8002908: 46bd mov sp, r7
  6945. 800290a: b002 add sp, #8
  6946. 800290c: bd80 pop {r7, pc}
  6947. ...
  6948. 08002910 <LL_ADC_StartCalibration>:
  6949. {
  6950. 8002910: b580 push {r7, lr}
  6951. 8002912: b082 sub sp, #8
  6952. 8002914: af00 add r7, sp, #0
  6953. 8002916: 6078 str r0, [r7, #4]
  6954. MODIFY_REG(ADCx->CR,
  6955. 8002918: 687b ldr r3, [r7, #4]
  6956. 800291a: 689b ldr r3, [r3, #8]
  6957. 800291c: 4a05 ldr r2, [pc, #20] @ (8002934 <LL_ADC_StartCalibration+0x24>)
  6958. 800291e: 4013 ands r3, r2
  6959. 8002920: 2280 movs r2, #128 @ 0x80
  6960. 8002922: 0612 lsls r2, r2, #24
  6961. 8002924: 431a orrs r2, r3
  6962. 8002926: 687b ldr r3, [r7, #4]
  6963. 8002928: 609a str r2, [r3, #8]
  6964. }
  6965. 800292a: 46c0 nop @ (mov r8, r8)
  6966. 800292c: 46bd mov sp, r7
  6967. 800292e: b002 add sp, #8
  6968. 8002930: bd80 pop {r7, pc}
  6969. 8002932: 46c0 nop @ (mov r8, r8)
  6970. 8002934: 7fffffe8 .word 0x7fffffe8
  6971. 08002938 <LL_ADC_IsCalibrationOnGoing>:
  6972. {
  6973. 8002938: b580 push {r7, lr}
  6974. 800293a: b082 sub sp, #8
  6975. 800293c: af00 add r7, sp, #0
  6976. 800293e: 6078 str r0, [r7, #4]
  6977. return ((READ_BIT(ADCx->CR, ADC_CR_ADCAL) == (ADC_CR_ADCAL)) ? 1UL : 0UL);
  6978. 8002940: 687b ldr r3, [r7, #4]
  6979. 8002942: 689b ldr r3, [r3, #8]
  6980. 8002944: 0fdb lsrs r3, r3, #31
  6981. 8002946: 07da lsls r2, r3, #31
  6982. 8002948: 2380 movs r3, #128 @ 0x80
  6983. 800294a: 061b lsls r3, r3, #24
  6984. 800294c: 429a cmp r2, r3
  6985. 800294e: d101 bne.n 8002954 <LL_ADC_IsCalibrationOnGoing+0x1c>
  6986. 8002950: 2301 movs r3, #1
  6987. 8002952: e000 b.n 8002956 <LL_ADC_IsCalibrationOnGoing+0x1e>
  6988. 8002954: 2300 movs r3, #0
  6989. }
  6990. 8002956: 0018 movs r0, r3
  6991. 8002958: 46bd mov sp, r7
  6992. 800295a: b002 add sp, #8
  6993. 800295c: bd80 pop {r7, pc}
  6994. ...
  6995. 08002960 <HAL_ADCEx_Calibration_Start>:
  6996. * HAL_ADC_GetValue() (value on 7 bits: from DR[6;0]).
  6997. * @param hadc ADC handle
  6998. * @retval HAL status
  6999. */
  7000. HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef *hadc)
  7001. {
  7002. 8002960: b590 push {r4, r7, lr}
  7003. 8002962: b08b sub sp, #44 @ 0x2c
  7004. 8002964: af00 add r7, sp, #0
  7005. 8002966: 6078 str r0, [r7, #4]
  7006. HAL_StatusTypeDef tmp_hal_status;
  7007. __IO uint32_t wait_loop_index = 0UL;
  7008. 8002968: 2300 movs r3, #0
  7009. 800296a: 60fb str r3, [r7, #12]
  7010. uint32_t backup_setting_cfgr1;
  7011. uint32_t calibration_index;
  7012. uint32_t calibration_factor_accumulated = 0;
  7013. 800296c: 2300 movs r3, #0
  7014. 800296e: 623b str r3, [r7, #32]
  7015. __IO uint32_t delay_cpu_cycles;
  7016. /* Check the parameters */
  7017. assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance));
  7018. __HAL_LOCK(hadc);
  7019. 8002970: 687b ldr r3, [r7, #4]
  7020. 8002972: 2254 movs r2, #84 @ 0x54
  7021. 8002974: 5c9b ldrb r3, [r3, r2]
  7022. 8002976: 2b01 cmp r3, #1
  7023. 8002978: d101 bne.n 800297e <HAL_ADCEx_Calibration_Start+0x1e>
  7024. 800297a: 2302 movs r3, #2
  7025. 800297c: e0dd b.n 8002b3a <HAL_ADCEx_Calibration_Start+0x1da>
  7026. 800297e: 687b ldr r3, [r7, #4]
  7027. 8002980: 2254 movs r2, #84 @ 0x54
  7028. 8002982: 2101 movs r1, #1
  7029. 8002984: 5499 strb r1, [r3, r2]
  7030. /* Calibration prerequisite: ADC must be disabled. */
  7031. /* Disable the ADC (if not already disabled) */
  7032. tmp_hal_status = ADC_Disable(hadc);
  7033. 8002986: 231f movs r3, #31
  7034. 8002988: 18fc adds r4, r7, r3
  7035. 800298a: 687b ldr r3, [r7, #4]
  7036. 800298c: 0018 movs r0, r3
  7037. 800298e: f7ff fe63 bl 8002658 <ADC_Disable>
  7038. 8002992: 0003 movs r3, r0
  7039. 8002994: 7023 strb r3, [r4, #0]
  7040. /* Check if ADC is effectively disabled */
  7041. if (LL_ADC_IsEnabled(hadc->Instance) == 0UL)
  7042. 8002996: 687b ldr r3, [r7, #4]
  7043. 8002998: 681b ldr r3, [r3, #0]
  7044. 800299a: 0018 movs r0, r3
  7045. 800299c: f7ff ffa6 bl 80028ec <LL_ADC_IsEnabled>
  7046. 80029a0: 1e03 subs r3, r0, #0
  7047. 80029a2: d000 beq.n 80029a6 <HAL_ADCEx_Calibration_Start+0x46>
  7048. 80029a4: e0bc b.n 8002b20 <HAL_ADCEx_Calibration_Start+0x1c0>
  7049. {
  7050. /* Set ADC state */
  7051. ADC_STATE_CLR_SET(hadc->State,
  7052. 80029a6: 687b ldr r3, [r7, #4]
  7053. 80029a8: 6d9b ldr r3, [r3, #88] @ 0x58
  7054. 80029aa: 4a66 ldr r2, [pc, #408] @ (8002b44 <HAL_ADCEx_Calibration_Start+0x1e4>)
  7055. 80029ac: 4013 ands r3, r2
  7056. 80029ae: 2202 movs r2, #2
  7057. 80029b0: 431a orrs r2, r3
  7058. 80029b2: 687b ldr r3, [r7, #4]
  7059. 80029b4: 659a str r2, [r3, #88] @ 0x58
  7060. /* Note: Specificity of this STM32 series: Calibration factor is */
  7061. /* available in data register and also transferred by DMA. */
  7062. /* To not insert ADC calibration factor among ADC conversion data */
  7063. /* in array variable, DMA transfer must be disabled during */
  7064. /* calibration. */
  7065. backup_setting_cfgr1 = READ_BIT(hadc->Instance->CFGR1, ADC_CFGR1_DMAEN | ADC_CFGR1_DMACFG | ADC_CFGR1_AUTOFF);
  7066. 80029b6: 687b ldr r3, [r7, #4]
  7067. 80029b8: 681b ldr r3, [r3, #0]
  7068. 80029ba: 68db ldr r3, [r3, #12]
  7069. 80029bc: 4a62 ldr r2, [pc, #392] @ (8002b48 <HAL_ADCEx_Calibration_Start+0x1e8>)
  7070. 80029be: 4013 ands r3, r2
  7071. 80029c0: 61bb str r3, [r7, #24]
  7072. CLEAR_BIT(hadc->Instance->CFGR1, ADC_CFGR1_DMAEN | ADC_CFGR1_DMACFG | ADC_CFGR1_AUTOFF);
  7073. 80029c2: 687b ldr r3, [r7, #4]
  7074. 80029c4: 681b ldr r3, [r3, #0]
  7075. 80029c6: 68da ldr r2, [r3, #12]
  7076. 80029c8: 687b ldr r3, [r7, #4]
  7077. 80029ca: 681b ldr r3, [r3, #0]
  7078. 80029cc: 495f ldr r1, [pc, #380] @ (8002b4c <HAL_ADCEx_Calibration_Start+0x1ec>)
  7079. 80029ce: 400a ands r2, r1
  7080. 80029d0: 60da str r2, [r3, #12]
  7081. /* ADC calibration procedure */
  7082. /* Note: Perform an averaging of 8 calibrations for optimized accuracy */
  7083. for (calibration_index = 0UL; calibration_index < 8UL; calibration_index++)
  7084. 80029d2: 2300 movs r3, #0
  7085. 80029d4: 627b str r3, [r7, #36] @ 0x24
  7086. 80029d6: e02d b.n 8002a34 <HAL_ADCEx_Calibration_Start+0xd4>
  7087. {
  7088. /* Start ADC calibration */
  7089. LL_ADC_StartCalibration(hadc->Instance);
  7090. 80029d8: 687b ldr r3, [r7, #4]
  7091. 80029da: 681b ldr r3, [r3, #0]
  7092. 80029dc: 0018 movs r0, r3
  7093. 80029de: f7ff ff97 bl 8002910 <LL_ADC_StartCalibration>
  7094. /* Wait for calibration completion */
  7095. while (LL_ADC_IsCalibrationOnGoing(hadc->Instance) != 0UL)
  7096. 80029e2: e014 b.n 8002a0e <HAL_ADCEx_Calibration_Start+0xae>
  7097. {
  7098. wait_loop_index++;
  7099. 80029e4: 68fb ldr r3, [r7, #12]
  7100. 80029e6: 3301 adds r3, #1
  7101. 80029e8: 60fb str r3, [r7, #12]
  7102. if (wait_loop_index >= ADC_CALIBRATION_TIMEOUT)
  7103. 80029ea: 68fb ldr r3, [r7, #12]
  7104. 80029ec: 4a58 ldr r2, [pc, #352] @ (8002b50 <HAL_ADCEx_Calibration_Start+0x1f0>)
  7105. 80029ee: 4293 cmp r3, r2
  7106. 80029f0: d90d bls.n 8002a0e <HAL_ADCEx_Calibration_Start+0xae>
  7107. {
  7108. /* Update ADC state machine to error */
  7109. ADC_STATE_CLR_SET(hadc->State,
  7110. 80029f2: 687b ldr r3, [r7, #4]
  7111. 80029f4: 6d9b ldr r3, [r3, #88] @ 0x58
  7112. 80029f6: 2212 movs r2, #18
  7113. 80029f8: 4393 bics r3, r2
  7114. 80029fa: 2210 movs r2, #16
  7115. 80029fc: 431a orrs r2, r3
  7116. 80029fe: 687b ldr r3, [r7, #4]
  7117. 8002a00: 659a str r2, [r3, #88] @ 0x58
  7118. HAL_ADC_STATE_BUSY_INTERNAL,
  7119. HAL_ADC_STATE_ERROR_INTERNAL);
  7120. __HAL_UNLOCK(hadc);
  7121. 8002a02: 687b ldr r3, [r7, #4]
  7122. 8002a04: 2254 movs r2, #84 @ 0x54
  7123. 8002a06: 2100 movs r1, #0
  7124. 8002a08: 5499 strb r1, [r3, r2]
  7125. return HAL_ERROR;
  7126. 8002a0a: 2301 movs r3, #1
  7127. 8002a0c: e095 b.n 8002b3a <HAL_ADCEx_Calibration_Start+0x1da>
  7128. while (LL_ADC_IsCalibrationOnGoing(hadc->Instance) != 0UL)
  7129. 8002a0e: 687b ldr r3, [r7, #4]
  7130. 8002a10: 681b ldr r3, [r3, #0]
  7131. 8002a12: 0018 movs r0, r3
  7132. 8002a14: f7ff ff90 bl 8002938 <LL_ADC_IsCalibrationOnGoing>
  7133. 8002a18: 1e03 subs r3, r0, #0
  7134. 8002a1a: d1e3 bne.n 80029e4 <HAL_ADCEx_Calibration_Start+0x84>
  7135. }
  7136. }
  7137. calibration_factor_accumulated += LL_ADC_GetCalibrationFactor(hadc->Instance);
  7138. 8002a1c: 687b ldr r3, [r7, #4]
  7139. 8002a1e: 681b ldr r3, [r3, #0]
  7140. 8002a20: 0018 movs r0, r3
  7141. 8002a22: f7ff ff32 bl 800288a <LL_ADC_GetCalibrationFactor>
  7142. 8002a26: 0002 movs r2, r0
  7143. 8002a28: 6a3b ldr r3, [r7, #32]
  7144. 8002a2a: 189b adds r3, r3, r2
  7145. 8002a2c: 623b str r3, [r7, #32]
  7146. for (calibration_index = 0UL; calibration_index < 8UL; calibration_index++)
  7147. 8002a2e: 6a7b ldr r3, [r7, #36] @ 0x24
  7148. 8002a30: 3301 adds r3, #1
  7149. 8002a32: 627b str r3, [r7, #36] @ 0x24
  7150. 8002a34: 6a7b ldr r3, [r7, #36] @ 0x24
  7151. 8002a36: 2b07 cmp r3, #7
  7152. 8002a38: d9ce bls.n 80029d8 <HAL_ADCEx_Calibration_Start+0x78>
  7153. }
  7154. /* Compute average */
  7155. calibration_factor_accumulated /= calibration_index;
  7156. 8002a3a: 6a79 ldr r1, [r7, #36] @ 0x24
  7157. 8002a3c: 6a38 ldr r0, [r7, #32]
  7158. 8002a3e: f7fd fb5f bl 8000100 <__udivsi3>
  7159. 8002a42: 0003 movs r3, r0
  7160. 8002a44: 623b str r3, [r7, #32]
  7161. /* Apply calibration factor (requires ADC enable and disable process) */
  7162. LL_ADC_Enable(hadc->Instance);
  7163. 8002a46: 687b ldr r3, [r7, #4]
  7164. 8002a48: 681b ldr r3, [r3, #0]
  7165. 8002a4a: 0018 movs r0, r3
  7166. 8002a4c: f7ff ff2a bl 80028a4 <LL_ADC_Enable>
  7167. /* Case of ADC clocked at low frequency: Delay required between ADC enable and disable actions */
  7168. if (LL_ADC_GetClock(hadc->Instance) == LL_ADC_CLOCK_ASYNC)
  7169. 8002a50: 687b ldr r3, [r7, #4]
  7170. 8002a52: 681b ldr r3, [r3, #0]
  7171. 8002a54: 0018 movs r0, r3
  7172. 8002a56: f7ff fef8 bl 800284a <LL_ADC_GetClock>
  7173. 8002a5a: 1e03 subs r3, r0, #0
  7174. 8002a5c: d11b bne.n 8002a96 <HAL_ADCEx_Calibration_Start+0x136>
  7175. {
  7176. adc_clk_async_presc = LL_ADC_GetCommonClock(__LL_ADC_COMMON_INSTANCE(hadc->Instance));
  7177. 8002a5e: 4b3d ldr r3, [pc, #244] @ (8002b54 <HAL_ADCEx_Calibration_Start+0x1f4>)
  7178. 8002a60: 0018 movs r0, r3
  7179. 8002a62: f7ff fee5 bl 8002830 <LL_ADC_GetCommonClock>
  7180. 8002a66: 0003 movs r3, r0
  7181. 8002a68: 617b str r3, [r7, #20]
  7182. if (adc_clk_async_presc >= LL_ADC_CLOCK_ASYNC_DIV16)
  7183. 8002a6a: 697a ldr r2, [r7, #20]
  7184. 8002a6c: 23e0 movs r3, #224 @ 0xe0
  7185. 8002a6e: 035b lsls r3, r3, #13
  7186. 8002a70: 429a cmp r2, r3
  7187. 8002a72: d310 bcc.n 8002a96 <HAL_ADCEx_Calibration_Start+0x136>
  7188. {
  7189. /* Delay loop initialization and execution */
  7190. /* Delay depends on ADC clock prescaler: Compute ADC clock asynchronous prescaler to decimal format */
  7191. delay_cpu_cycles = (1UL << ((adc_clk_async_presc >> ADC_CCR_PRESC_Pos) - 3UL));
  7192. 8002a74: 697b ldr r3, [r7, #20]
  7193. 8002a76: 0c9b lsrs r3, r3, #18
  7194. 8002a78: 3b03 subs r3, #3
  7195. 8002a7a: 2201 movs r2, #1
  7196. 8002a7c: 409a lsls r2, r3
  7197. 8002a7e: 0013 movs r3, r2
  7198. 8002a80: 60bb str r3, [r7, #8]
  7199. /* Divide variable by 2 to compensate partially CPU processing cycles */
  7200. delay_cpu_cycles >>= 1UL;
  7201. 8002a82: 68bb ldr r3, [r7, #8]
  7202. 8002a84: 085b lsrs r3, r3, #1
  7203. 8002a86: 60bb str r3, [r7, #8]
  7204. while (delay_cpu_cycles != 0UL)
  7205. 8002a88: e002 b.n 8002a90 <HAL_ADCEx_Calibration_Start+0x130>
  7206. {
  7207. delay_cpu_cycles--;
  7208. 8002a8a: 68bb ldr r3, [r7, #8]
  7209. 8002a8c: 3b01 subs r3, #1
  7210. 8002a8e: 60bb str r3, [r7, #8]
  7211. while (delay_cpu_cycles != 0UL)
  7212. 8002a90: 68bb ldr r3, [r7, #8]
  7213. 8002a92: 2b00 cmp r3, #0
  7214. 8002a94: d1f9 bne.n 8002a8a <HAL_ADCEx_Calibration_Start+0x12a>
  7215. }
  7216. }
  7217. }
  7218. LL_ADC_SetCalibrationFactor(hadc->Instance, calibration_factor_accumulated);
  7219. 8002a96: 687b ldr r3, [r7, #4]
  7220. 8002a98: 681b ldr r3, [r3, #0]
  7221. 8002a9a: 6a3a ldr r2, [r7, #32]
  7222. 8002a9c: 0011 movs r1, r2
  7223. 8002a9e: 0018 movs r0, r3
  7224. 8002aa0: f7ff fedf bl 8002862 <LL_ADC_SetCalibrationFactor>
  7225. LL_ADC_Disable(hadc->Instance);
  7226. 8002aa4: 687b ldr r3, [r7, #4]
  7227. 8002aa6: 681b ldr r3, [r3, #0]
  7228. 8002aa8: 0018 movs r0, r3
  7229. 8002aaa: f7ff ff0d bl 80028c8 <LL_ADC_Disable>
  7230. /* Wait for ADC effectively disabled before changing configuration */
  7231. /* Get tick count */
  7232. tickstart = HAL_GetTick();
  7233. 8002aae: f7fe fedb bl 8001868 <HAL_GetTick>
  7234. 8002ab2: 0003 movs r3, r0
  7235. 8002ab4: 613b str r3, [r7, #16]
  7236. while (LL_ADC_IsEnabled(hadc->Instance) != 0UL)
  7237. 8002ab6: e01b b.n 8002af0 <HAL_ADCEx_Calibration_Start+0x190>
  7238. {
  7239. if ((HAL_GetTick() - tickstart) > ADC_DISABLE_TIMEOUT)
  7240. 8002ab8: f7fe fed6 bl 8001868 <HAL_GetTick>
  7241. 8002abc: 0002 movs r2, r0
  7242. 8002abe: 693b ldr r3, [r7, #16]
  7243. 8002ac0: 1ad3 subs r3, r2, r3
  7244. 8002ac2: 2b02 cmp r3, #2
  7245. 8002ac4: d914 bls.n 8002af0 <HAL_ADCEx_Calibration_Start+0x190>
  7246. {
  7247. /* New check to avoid false timeout detection in case of preemption */
  7248. if (LL_ADC_IsEnabled(hadc->Instance) != 0UL)
  7249. 8002ac6: 687b ldr r3, [r7, #4]
  7250. 8002ac8: 681b ldr r3, [r3, #0]
  7251. 8002aca: 0018 movs r0, r3
  7252. 8002acc: f7ff ff0e bl 80028ec <LL_ADC_IsEnabled>
  7253. 8002ad0: 1e03 subs r3, r0, #0
  7254. 8002ad2: d00d beq.n 8002af0 <HAL_ADCEx_Calibration_Start+0x190>
  7255. {
  7256. /* Update ADC state machine to error */
  7257. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  7258. 8002ad4: 687b ldr r3, [r7, #4]
  7259. 8002ad6: 6d9b ldr r3, [r3, #88] @ 0x58
  7260. 8002ad8: 2210 movs r2, #16
  7261. 8002ada: 431a orrs r2, r3
  7262. 8002adc: 687b ldr r3, [r7, #4]
  7263. 8002ade: 659a str r2, [r3, #88] @ 0x58
  7264. /* Set ADC error code to ADC peripheral internal error */
  7265. SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
  7266. 8002ae0: 687b ldr r3, [r7, #4]
  7267. 8002ae2: 6ddb ldr r3, [r3, #92] @ 0x5c
  7268. 8002ae4: 2201 movs r2, #1
  7269. 8002ae6: 431a orrs r2, r3
  7270. 8002ae8: 687b ldr r3, [r7, #4]
  7271. 8002aea: 65da str r2, [r3, #92] @ 0x5c
  7272. return HAL_ERROR;
  7273. 8002aec: 2301 movs r3, #1
  7274. 8002aee: e024 b.n 8002b3a <HAL_ADCEx_Calibration_Start+0x1da>
  7275. while (LL_ADC_IsEnabled(hadc->Instance) != 0UL)
  7276. 8002af0: 687b ldr r3, [r7, #4]
  7277. 8002af2: 681b ldr r3, [r3, #0]
  7278. 8002af4: 0018 movs r0, r3
  7279. 8002af6: f7ff fef9 bl 80028ec <LL_ADC_IsEnabled>
  7280. 8002afa: 1e03 subs r3, r0, #0
  7281. 8002afc: d1dc bne.n 8002ab8 <HAL_ADCEx_Calibration_Start+0x158>
  7282. }
  7283. }
  7284. }
  7285. /* Restore configuration after calibration */
  7286. SET_BIT(hadc->Instance->CFGR1, backup_setting_cfgr1);
  7287. 8002afe: 687b ldr r3, [r7, #4]
  7288. 8002b00: 681b ldr r3, [r3, #0]
  7289. 8002b02: 68d9 ldr r1, [r3, #12]
  7290. 8002b04: 687b ldr r3, [r7, #4]
  7291. 8002b06: 681b ldr r3, [r3, #0]
  7292. 8002b08: 69ba ldr r2, [r7, #24]
  7293. 8002b0a: 430a orrs r2, r1
  7294. 8002b0c: 60da str r2, [r3, #12]
  7295. /* Set ADC state */
  7296. ADC_STATE_CLR_SET(hadc->State,
  7297. 8002b0e: 687b ldr r3, [r7, #4]
  7298. 8002b10: 6d9b ldr r3, [r3, #88] @ 0x58
  7299. 8002b12: 2203 movs r2, #3
  7300. 8002b14: 4393 bics r3, r2
  7301. 8002b16: 2201 movs r2, #1
  7302. 8002b18: 431a orrs r2, r3
  7303. 8002b1a: 687b ldr r3, [r7, #4]
  7304. 8002b1c: 659a str r2, [r3, #88] @ 0x58
  7305. 8002b1e: e005 b.n 8002b2c <HAL_ADCEx_Calibration_Start+0x1cc>
  7306. HAL_ADC_STATE_BUSY_INTERNAL,
  7307. HAL_ADC_STATE_READY);
  7308. }
  7309. else
  7310. {
  7311. SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
  7312. 8002b20: 687b ldr r3, [r7, #4]
  7313. 8002b22: 6d9b ldr r3, [r3, #88] @ 0x58
  7314. 8002b24: 2210 movs r2, #16
  7315. 8002b26: 431a orrs r2, r3
  7316. 8002b28: 687b ldr r3, [r7, #4]
  7317. 8002b2a: 659a str r2, [r3, #88] @ 0x58
  7318. /* Note: No need to update variable "tmp_hal_status" here: already set */
  7319. /* to state "HAL_ERROR" by function disabling the ADC. */
  7320. }
  7321. __HAL_UNLOCK(hadc);
  7322. 8002b2c: 687b ldr r3, [r7, #4]
  7323. 8002b2e: 2254 movs r2, #84 @ 0x54
  7324. 8002b30: 2100 movs r1, #0
  7325. 8002b32: 5499 strb r1, [r3, r2]
  7326. return tmp_hal_status;
  7327. 8002b34: 231f movs r3, #31
  7328. 8002b36: 18fb adds r3, r7, r3
  7329. 8002b38: 781b ldrb r3, [r3, #0]
  7330. }
  7331. 8002b3a: 0018 movs r0, r3
  7332. 8002b3c: 46bd mov sp, r7
  7333. 8002b3e: b00b add sp, #44 @ 0x2c
  7334. 8002b40: bd90 pop {r4, r7, pc}
  7335. 8002b42: 46c0 nop @ (mov r8, r8)
  7336. 8002b44: fffffefd .word 0xfffffefd
  7337. 8002b48: 00008003 .word 0x00008003
  7338. 8002b4c: ffff7ffc .word 0xffff7ffc
  7339. 8002b50: 0002f1ff .word 0x0002f1ff
  7340. 8002b54: 40012708 .word 0x40012708
  7341. 08002b58 <__NVIC_EnableIRQ>:
  7342. \details Enables a device specific interrupt in the NVIC interrupt controller.
  7343. \param [in] IRQn Device specific interrupt number.
  7344. \note IRQn must not be negative.
  7345. */
  7346. __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
  7347. {
  7348. 8002b58: b580 push {r7, lr}
  7349. 8002b5a: b082 sub sp, #8
  7350. 8002b5c: af00 add r7, sp, #0
  7351. 8002b5e: 0002 movs r2, r0
  7352. 8002b60: 1dfb adds r3, r7, #7
  7353. 8002b62: 701a strb r2, [r3, #0]
  7354. if ((int32_t)(IRQn) >= 0)
  7355. 8002b64: 1dfb adds r3, r7, #7
  7356. 8002b66: 781b ldrb r3, [r3, #0]
  7357. 8002b68: 2b7f cmp r3, #127 @ 0x7f
  7358. 8002b6a: d809 bhi.n 8002b80 <__NVIC_EnableIRQ+0x28>
  7359. {
  7360. __COMPILER_BARRIER();
  7361. NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  7362. 8002b6c: 1dfb adds r3, r7, #7
  7363. 8002b6e: 781b ldrb r3, [r3, #0]
  7364. 8002b70: 001a movs r2, r3
  7365. 8002b72: 231f movs r3, #31
  7366. 8002b74: 401a ands r2, r3
  7367. 8002b76: 4b04 ldr r3, [pc, #16] @ (8002b88 <__NVIC_EnableIRQ+0x30>)
  7368. 8002b78: 2101 movs r1, #1
  7369. 8002b7a: 4091 lsls r1, r2
  7370. 8002b7c: 000a movs r2, r1
  7371. 8002b7e: 601a str r2, [r3, #0]
  7372. __COMPILER_BARRIER();
  7373. }
  7374. }
  7375. 8002b80: 46c0 nop @ (mov r8, r8)
  7376. 8002b82: 46bd mov sp, r7
  7377. 8002b84: b002 add sp, #8
  7378. 8002b86: bd80 pop {r7, pc}
  7379. 8002b88: e000e100 .word 0xe000e100
  7380. 08002b8c <__NVIC_SetPriority>:
  7381. \param [in] IRQn Interrupt number.
  7382. \param [in] priority Priority to set.
  7383. \note The priority cannot be set for every processor exception.
  7384. */
  7385. __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
  7386. {
  7387. 8002b8c: b590 push {r4, r7, lr}
  7388. 8002b8e: b083 sub sp, #12
  7389. 8002b90: af00 add r7, sp, #0
  7390. 8002b92: 0002 movs r2, r0
  7391. 8002b94: 6039 str r1, [r7, #0]
  7392. 8002b96: 1dfb adds r3, r7, #7
  7393. 8002b98: 701a strb r2, [r3, #0]
  7394. if ((int32_t)(IRQn) >= 0)
  7395. 8002b9a: 1dfb adds r3, r7, #7
  7396. 8002b9c: 781b ldrb r3, [r3, #0]
  7397. 8002b9e: 2b7f cmp r3, #127 @ 0x7f
  7398. 8002ba0: d828 bhi.n 8002bf4 <__NVIC_SetPriority+0x68>
  7399. {
  7400. NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
  7401. 8002ba2: 4a2f ldr r2, [pc, #188] @ (8002c60 <__NVIC_SetPriority+0xd4>)
  7402. 8002ba4: 1dfb adds r3, r7, #7
  7403. 8002ba6: 781b ldrb r3, [r3, #0]
  7404. 8002ba8: b25b sxtb r3, r3
  7405. 8002baa: 089b lsrs r3, r3, #2
  7406. 8002bac: 33c0 adds r3, #192 @ 0xc0
  7407. 8002bae: 009b lsls r3, r3, #2
  7408. 8002bb0: 589b ldr r3, [r3, r2]
  7409. 8002bb2: 1dfa adds r2, r7, #7
  7410. 8002bb4: 7812 ldrb r2, [r2, #0]
  7411. 8002bb6: 0011 movs r1, r2
  7412. 8002bb8: 2203 movs r2, #3
  7413. 8002bba: 400a ands r2, r1
  7414. 8002bbc: 00d2 lsls r2, r2, #3
  7415. 8002bbe: 21ff movs r1, #255 @ 0xff
  7416. 8002bc0: 4091 lsls r1, r2
  7417. 8002bc2: 000a movs r2, r1
  7418. 8002bc4: 43d2 mvns r2, r2
  7419. 8002bc6: 401a ands r2, r3
  7420. 8002bc8: 0011 movs r1, r2
  7421. (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
  7422. 8002bca: 683b ldr r3, [r7, #0]
  7423. 8002bcc: 019b lsls r3, r3, #6
  7424. 8002bce: 22ff movs r2, #255 @ 0xff
  7425. 8002bd0: 401a ands r2, r3
  7426. 8002bd2: 1dfb adds r3, r7, #7
  7427. 8002bd4: 781b ldrb r3, [r3, #0]
  7428. 8002bd6: 0018 movs r0, r3
  7429. 8002bd8: 2303 movs r3, #3
  7430. 8002bda: 4003 ands r3, r0
  7431. 8002bdc: 00db lsls r3, r3, #3
  7432. 8002bde: 409a lsls r2, r3
  7433. NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
  7434. 8002be0: 481f ldr r0, [pc, #124] @ (8002c60 <__NVIC_SetPriority+0xd4>)
  7435. 8002be2: 1dfb adds r3, r7, #7
  7436. 8002be4: 781b ldrb r3, [r3, #0]
  7437. 8002be6: b25b sxtb r3, r3
  7438. 8002be8: 089b lsrs r3, r3, #2
  7439. 8002bea: 430a orrs r2, r1
  7440. 8002bec: 33c0 adds r3, #192 @ 0xc0
  7441. 8002bee: 009b lsls r3, r3, #2
  7442. 8002bf0: 501a str r2, [r3, r0]
  7443. else
  7444. {
  7445. SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
  7446. (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
  7447. }
  7448. }
  7449. 8002bf2: e031 b.n 8002c58 <__NVIC_SetPriority+0xcc>
  7450. SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
  7451. 8002bf4: 4a1b ldr r2, [pc, #108] @ (8002c64 <__NVIC_SetPriority+0xd8>)
  7452. 8002bf6: 1dfb adds r3, r7, #7
  7453. 8002bf8: 781b ldrb r3, [r3, #0]
  7454. 8002bfa: 0019 movs r1, r3
  7455. 8002bfc: 230f movs r3, #15
  7456. 8002bfe: 400b ands r3, r1
  7457. 8002c00: 3b08 subs r3, #8
  7458. 8002c02: 089b lsrs r3, r3, #2
  7459. 8002c04: 3306 adds r3, #6
  7460. 8002c06: 009b lsls r3, r3, #2
  7461. 8002c08: 18d3 adds r3, r2, r3
  7462. 8002c0a: 3304 adds r3, #4
  7463. 8002c0c: 681b ldr r3, [r3, #0]
  7464. 8002c0e: 1dfa adds r2, r7, #7
  7465. 8002c10: 7812 ldrb r2, [r2, #0]
  7466. 8002c12: 0011 movs r1, r2
  7467. 8002c14: 2203 movs r2, #3
  7468. 8002c16: 400a ands r2, r1
  7469. 8002c18: 00d2 lsls r2, r2, #3
  7470. 8002c1a: 21ff movs r1, #255 @ 0xff
  7471. 8002c1c: 4091 lsls r1, r2
  7472. 8002c1e: 000a movs r2, r1
  7473. 8002c20: 43d2 mvns r2, r2
  7474. 8002c22: 401a ands r2, r3
  7475. 8002c24: 0011 movs r1, r2
  7476. (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
  7477. 8002c26: 683b ldr r3, [r7, #0]
  7478. 8002c28: 019b lsls r3, r3, #6
  7479. 8002c2a: 22ff movs r2, #255 @ 0xff
  7480. 8002c2c: 401a ands r2, r3
  7481. 8002c2e: 1dfb adds r3, r7, #7
  7482. 8002c30: 781b ldrb r3, [r3, #0]
  7483. 8002c32: 0018 movs r0, r3
  7484. 8002c34: 2303 movs r3, #3
  7485. 8002c36: 4003 ands r3, r0
  7486. 8002c38: 00db lsls r3, r3, #3
  7487. 8002c3a: 409a lsls r2, r3
  7488. SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
  7489. 8002c3c: 4809 ldr r0, [pc, #36] @ (8002c64 <__NVIC_SetPriority+0xd8>)
  7490. 8002c3e: 1dfb adds r3, r7, #7
  7491. 8002c40: 781b ldrb r3, [r3, #0]
  7492. 8002c42: 001c movs r4, r3
  7493. 8002c44: 230f movs r3, #15
  7494. 8002c46: 4023 ands r3, r4
  7495. 8002c48: 3b08 subs r3, #8
  7496. 8002c4a: 089b lsrs r3, r3, #2
  7497. 8002c4c: 430a orrs r2, r1
  7498. 8002c4e: 3306 adds r3, #6
  7499. 8002c50: 009b lsls r3, r3, #2
  7500. 8002c52: 18c3 adds r3, r0, r3
  7501. 8002c54: 3304 adds r3, #4
  7502. 8002c56: 601a str r2, [r3, #0]
  7503. }
  7504. 8002c58: 46c0 nop @ (mov r8, r8)
  7505. 8002c5a: 46bd mov sp, r7
  7506. 8002c5c: b003 add sp, #12
  7507. 8002c5e: bd90 pop {r4, r7, pc}
  7508. 8002c60: e000e100 .word 0xe000e100
  7509. 8002c64: e000ed00 .word 0xe000ed00
  7510. 08002c68 <SysTick_Config>:
  7511. \note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
  7512. function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
  7513. must contain a vendor-specific implementation of this function.
  7514. */
  7515. __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
  7516. {
  7517. 8002c68: b580 push {r7, lr}
  7518. 8002c6a: b082 sub sp, #8
  7519. 8002c6c: af00 add r7, sp, #0
  7520. 8002c6e: 6078 str r0, [r7, #4]
  7521. if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
  7522. 8002c70: 687b ldr r3, [r7, #4]
  7523. 8002c72: 1e5a subs r2, r3, #1
  7524. 8002c74: 2380 movs r3, #128 @ 0x80
  7525. 8002c76: 045b lsls r3, r3, #17
  7526. 8002c78: 429a cmp r2, r3
  7527. 8002c7a: d301 bcc.n 8002c80 <SysTick_Config+0x18>
  7528. {
  7529. return (1UL); /* Reload value impossible */
  7530. 8002c7c: 2301 movs r3, #1
  7531. 8002c7e: e010 b.n 8002ca2 <SysTick_Config+0x3a>
  7532. }
  7533. SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
  7534. 8002c80: 4b0a ldr r3, [pc, #40] @ (8002cac <SysTick_Config+0x44>)
  7535. 8002c82: 687a ldr r2, [r7, #4]
  7536. 8002c84: 3a01 subs r2, #1
  7537. 8002c86: 605a str r2, [r3, #4]
  7538. NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
  7539. 8002c88: 2301 movs r3, #1
  7540. 8002c8a: 425b negs r3, r3
  7541. 8002c8c: 2103 movs r1, #3
  7542. 8002c8e: 0018 movs r0, r3
  7543. 8002c90: f7ff ff7c bl 8002b8c <__NVIC_SetPriority>
  7544. SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
  7545. 8002c94: 4b05 ldr r3, [pc, #20] @ (8002cac <SysTick_Config+0x44>)
  7546. 8002c96: 2200 movs r2, #0
  7547. 8002c98: 609a str r2, [r3, #8]
  7548. SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
  7549. 8002c9a: 4b04 ldr r3, [pc, #16] @ (8002cac <SysTick_Config+0x44>)
  7550. 8002c9c: 2207 movs r2, #7
  7551. 8002c9e: 601a str r2, [r3, #0]
  7552. SysTick_CTRL_TICKINT_Msk |
  7553. SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
  7554. return (0UL); /* Function successful */
  7555. 8002ca0: 2300 movs r3, #0
  7556. }
  7557. 8002ca2: 0018 movs r0, r3
  7558. 8002ca4: 46bd mov sp, r7
  7559. 8002ca6: b002 add sp, #8
  7560. 8002ca8: bd80 pop {r7, pc}
  7561. 8002caa: 46c0 nop @ (mov r8, r8)
  7562. 8002cac: e000e010 .word 0xe000e010
  7563. 08002cb0 <HAL_NVIC_SetPriority>:
  7564. * with stm32g0xx devices, this parameter is a dummy value and it is ignored, because
  7565. * no subpriority supported in Cortex M0+ based products.
  7566. * @retval None
  7567. */
  7568. void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
  7569. {
  7570. 8002cb0: b580 push {r7, lr}
  7571. 8002cb2: b084 sub sp, #16
  7572. 8002cb4: af00 add r7, sp, #0
  7573. 8002cb6: 60b9 str r1, [r7, #8]
  7574. 8002cb8: 607a str r2, [r7, #4]
  7575. 8002cba: 210f movs r1, #15
  7576. 8002cbc: 187b adds r3, r7, r1
  7577. 8002cbe: 1c02 adds r2, r0, #0
  7578. 8002cc0: 701a strb r2, [r3, #0]
  7579. /* Prevent unused argument(s) compilation warning */
  7580. UNUSED(SubPriority);
  7581. /* Check the parameters */
  7582. assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
  7583. NVIC_SetPriority(IRQn, PreemptPriority);
  7584. 8002cc2: 68ba ldr r2, [r7, #8]
  7585. 8002cc4: 187b adds r3, r7, r1
  7586. 8002cc6: 781b ldrb r3, [r3, #0]
  7587. 8002cc8: b25b sxtb r3, r3
  7588. 8002cca: 0011 movs r1, r2
  7589. 8002ccc: 0018 movs r0, r3
  7590. 8002cce: f7ff ff5d bl 8002b8c <__NVIC_SetPriority>
  7591. }
  7592. 8002cd2: 46c0 nop @ (mov r8, r8)
  7593. 8002cd4: 46bd mov sp, r7
  7594. 8002cd6: b004 add sp, #16
  7595. 8002cd8: bd80 pop {r7, pc}
  7596. 08002cda <HAL_NVIC_EnableIRQ>:
  7597. * This parameter can be an enumerator of IRQn_Type enumeration
  7598. * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32g0xxxx.h))
  7599. * @retval None
  7600. */
  7601. void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
  7602. {
  7603. 8002cda: b580 push {r7, lr}
  7604. 8002cdc: b082 sub sp, #8
  7605. 8002cde: af00 add r7, sp, #0
  7606. 8002ce0: 0002 movs r2, r0
  7607. 8002ce2: 1dfb adds r3, r7, #7
  7608. 8002ce4: 701a strb r2, [r3, #0]
  7609. /* Check the parameters */
  7610. assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
  7611. /* Enable interrupt */
  7612. NVIC_EnableIRQ(IRQn);
  7613. 8002ce6: 1dfb adds r3, r7, #7
  7614. 8002ce8: 781b ldrb r3, [r3, #0]
  7615. 8002cea: b25b sxtb r3, r3
  7616. 8002cec: 0018 movs r0, r3
  7617. 8002cee: f7ff ff33 bl 8002b58 <__NVIC_EnableIRQ>
  7618. }
  7619. 8002cf2: 46c0 nop @ (mov r8, r8)
  7620. 8002cf4: 46bd mov sp, r7
  7621. 8002cf6: b002 add sp, #8
  7622. 8002cf8: bd80 pop {r7, pc}
  7623. 08002cfa <HAL_SYSTICK_Config>:
  7624. * @param TicksNumb Specifies the ticks Number of ticks between two interrupts.
  7625. * @retval status: - 0 Function succeeded.
  7626. * - 1 Function failed.
  7627. */
  7628. uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
  7629. {
  7630. 8002cfa: b580 push {r7, lr}
  7631. 8002cfc: b082 sub sp, #8
  7632. 8002cfe: af00 add r7, sp, #0
  7633. 8002d00: 6078 str r0, [r7, #4]
  7634. return SysTick_Config(TicksNumb);
  7635. 8002d02: 687b ldr r3, [r7, #4]
  7636. 8002d04: 0018 movs r0, r3
  7637. 8002d06: f7ff ffaf bl 8002c68 <SysTick_Config>
  7638. 8002d0a: 0003 movs r3, r0
  7639. }
  7640. 8002d0c: 0018 movs r0, r3
  7641. 8002d0e: 46bd mov sp, r7
  7642. 8002d10: b002 add sp, #8
  7643. 8002d12: bd80 pop {r7, pc}
  7644. 08002d14 <HAL_DMA_Init>:
  7645. * @param hdma Pointer to a DMA_HandleTypeDef structure that contains
  7646. * the configuration information for the specified DMA Channel.
  7647. * @retval HAL status
  7648. */
  7649. HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
  7650. {
  7651. 8002d14: b580 push {r7, lr}
  7652. 8002d16: b082 sub sp, #8
  7653. 8002d18: af00 add r7, sp, #0
  7654. 8002d1a: 6078 str r0, [r7, #4]
  7655. /* Check the DMA handle allocation */
  7656. if (hdma == NULL)
  7657. 8002d1c: 687b ldr r3, [r7, #4]
  7658. 8002d1e: 2b00 cmp r3, #0
  7659. 8002d20: d101 bne.n 8002d26 <HAL_DMA_Init+0x12>
  7660. {
  7661. return HAL_ERROR;
  7662. 8002d22: 2301 movs r3, #1
  7663. 8002d24: e077 b.n 8002e16 <HAL_DMA_Init+0x102>
  7664. /* DMA2 */
  7665. hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA2_Channel1) / ((uint32_t)DMA2_Channel2 - (uint32_t)DMA2_Channel1)) << 2U;
  7666. hdma->DmaBaseAddress = DMA2;
  7667. }
  7668. #else
  7669. hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA1_Channel1) / ((uint32_t)DMA1_Channel2 - (uint32_t)DMA1_Channel1)) << 2U;
  7670. 8002d26: 687b ldr r3, [r7, #4]
  7671. 8002d28: 681b ldr r3, [r3, #0]
  7672. 8002d2a: 4a3d ldr r2, [pc, #244] @ (8002e20 <HAL_DMA_Init+0x10c>)
  7673. 8002d2c: 4694 mov ip, r2
  7674. 8002d2e: 4463 add r3, ip
  7675. 8002d30: 2114 movs r1, #20
  7676. 8002d32: 0018 movs r0, r3
  7677. 8002d34: f7fd f9e4 bl 8000100 <__udivsi3>
  7678. 8002d38: 0003 movs r3, r0
  7679. 8002d3a: 009a lsls r2, r3, #2
  7680. 8002d3c: 687b ldr r3, [r7, #4]
  7681. 8002d3e: 641a str r2, [r3, #64] @ 0x40
  7682. #endif /* DMA2 */
  7683. /* Change DMA peripheral state */
  7684. hdma->State = HAL_DMA_STATE_BUSY;
  7685. 8002d40: 687b ldr r3, [r7, #4]
  7686. 8002d42: 2225 movs r2, #37 @ 0x25
  7687. 8002d44: 2102 movs r1, #2
  7688. 8002d46: 5499 strb r1, [r3, r2]
  7689. /* Clear PL, MSIZE, PSIZE, MINC, PINC, CIRC, DIR and MEM2MEM bits */
  7690. CLEAR_BIT(hdma->Instance->CCR, (DMA_CCR_PL | DMA_CCR_MSIZE | DMA_CCR_PSIZE | \
  7691. 8002d48: 687b ldr r3, [r7, #4]
  7692. 8002d4a: 681b ldr r3, [r3, #0]
  7693. 8002d4c: 681a ldr r2, [r3, #0]
  7694. 8002d4e: 687b ldr r3, [r7, #4]
  7695. 8002d50: 681b ldr r3, [r3, #0]
  7696. 8002d52: 4934 ldr r1, [pc, #208] @ (8002e24 <HAL_DMA_Init+0x110>)
  7697. 8002d54: 400a ands r2, r1
  7698. 8002d56: 601a str r2, [r3, #0]
  7699. DMA_CCR_MINC | DMA_CCR_PINC | DMA_CCR_CIRC | \
  7700. DMA_CCR_DIR | DMA_CCR_MEM2MEM));
  7701. /* Set the DMA Channel configuration */
  7702. SET_BIT(hdma->Instance->CCR, (hdma->Init.Direction | \
  7703. 8002d58: 687b ldr r3, [r7, #4]
  7704. 8002d5a: 681b ldr r3, [r3, #0]
  7705. 8002d5c: 6819 ldr r1, [r3, #0]
  7706. 8002d5e: 687b ldr r3, [r7, #4]
  7707. 8002d60: 689a ldr r2, [r3, #8]
  7708. 8002d62: 687b ldr r3, [r7, #4]
  7709. 8002d64: 68db ldr r3, [r3, #12]
  7710. 8002d66: 431a orrs r2, r3
  7711. 8002d68: 687b ldr r3, [r7, #4]
  7712. 8002d6a: 691b ldr r3, [r3, #16]
  7713. 8002d6c: 431a orrs r2, r3
  7714. 8002d6e: 687b ldr r3, [r7, #4]
  7715. 8002d70: 695b ldr r3, [r3, #20]
  7716. 8002d72: 431a orrs r2, r3
  7717. 8002d74: 687b ldr r3, [r7, #4]
  7718. 8002d76: 699b ldr r3, [r3, #24]
  7719. 8002d78: 431a orrs r2, r3
  7720. 8002d7a: 687b ldr r3, [r7, #4]
  7721. 8002d7c: 69db ldr r3, [r3, #28]
  7722. 8002d7e: 431a orrs r2, r3
  7723. 8002d80: 687b ldr r3, [r7, #4]
  7724. 8002d82: 6a1b ldr r3, [r3, #32]
  7725. 8002d84: 431a orrs r2, r3
  7726. 8002d86: 687b ldr r3, [r7, #4]
  7727. 8002d88: 681b ldr r3, [r3, #0]
  7728. 8002d8a: 430a orrs r2, r1
  7729. 8002d8c: 601a str r2, [r3, #0]
  7730. hdma->Init.Mode | hdma->Init.Priority));
  7731. /* Initialize parameters for DMAMUX channel :
  7732. DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask
  7733. */
  7734. DMA_CalcDMAMUXChannelBaseAndMask(hdma);
  7735. 8002d8e: 687b ldr r3, [r7, #4]
  7736. 8002d90: 0018 movs r0, r3
  7737. 8002d92: f000 fa2d bl 80031f0 <DMA_CalcDMAMUXChannelBaseAndMask>
  7738. if (hdma->Init.Direction == DMA_MEMORY_TO_MEMORY)
  7739. 8002d96: 687b ldr r3, [r7, #4]
  7740. 8002d98: 689a ldr r2, [r3, #8]
  7741. 8002d9a: 2380 movs r3, #128 @ 0x80
  7742. 8002d9c: 01db lsls r3, r3, #7
  7743. 8002d9e: 429a cmp r2, r3
  7744. 8002da0: d102 bne.n 8002da8 <HAL_DMA_Init+0x94>
  7745. {
  7746. /* if memory to memory force the request to 0*/
  7747. hdma->Init.Request = DMA_REQUEST_MEM2MEM;
  7748. 8002da2: 687b ldr r3, [r7, #4]
  7749. 8002da4: 2200 movs r2, #0
  7750. 8002da6: 605a str r2, [r3, #4]
  7751. }
  7752. /* Set peripheral request to DMAMUX channel */
  7753. hdma->DMAmuxChannel->CCR = (hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID);
  7754. 8002da8: 687b ldr r3, [r7, #4]
  7755. 8002daa: 685a ldr r2, [r3, #4]
  7756. 8002dac: 687b ldr r3, [r7, #4]
  7757. 8002dae: 6c5b ldr r3, [r3, #68] @ 0x44
  7758. 8002db0: 213f movs r1, #63 @ 0x3f
  7759. 8002db2: 400a ands r2, r1
  7760. 8002db4: 601a str r2, [r3, #0]
  7761. /* Clear the DMAMUX synchro overrun flag */
  7762. hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
  7763. 8002db6: 687b ldr r3, [r7, #4]
  7764. 8002db8: 6c9b ldr r3, [r3, #72] @ 0x48
  7765. 8002dba: 687a ldr r2, [r7, #4]
  7766. 8002dbc: 6cd2 ldr r2, [r2, #76] @ 0x4c
  7767. 8002dbe: 605a str r2, [r3, #4]
  7768. if (((hdma->Init.Request > 0UL) && (hdma->Init.Request <= DMA_REQUEST_GENERATOR3)))
  7769. 8002dc0: 687b ldr r3, [r7, #4]
  7770. 8002dc2: 685b ldr r3, [r3, #4]
  7771. 8002dc4: 2b00 cmp r3, #0
  7772. 8002dc6: d011 beq.n 8002dec <HAL_DMA_Init+0xd8>
  7773. 8002dc8: 687b ldr r3, [r7, #4]
  7774. 8002dca: 685b ldr r3, [r3, #4]
  7775. 8002dcc: 2b04 cmp r3, #4
  7776. 8002dce: d80d bhi.n 8002dec <HAL_DMA_Init+0xd8>
  7777. {
  7778. /* Initialize parameters for DMAMUX request generator :
  7779. DMAmuxRequestGen, DMAmuxRequestGenStatus and DMAmuxRequestGenStatusMask
  7780. */
  7781. DMA_CalcDMAMUXRequestGenBaseAndMask(hdma);
  7782. 8002dd0: 687b ldr r3, [r7, #4]
  7783. 8002dd2: 0018 movs r0, r3
  7784. 8002dd4: f000 fa38 bl 8003248 <DMA_CalcDMAMUXRequestGenBaseAndMask>
  7785. /* Reset the DMAMUX request generator register*/
  7786. hdma->DMAmuxRequestGen->RGCR = 0U;
  7787. 8002dd8: 687b ldr r3, [r7, #4]
  7788. 8002dda: 6d1b ldr r3, [r3, #80] @ 0x50
  7789. 8002ddc: 2200 movs r2, #0
  7790. 8002dde: 601a str r2, [r3, #0]
  7791. /* Clear the DMAMUX request generator overrun flag */
  7792. hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
  7793. 8002de0: 687b ldr r3, [r7, #4]
  7794. 8002de2: 6d5b ldr r3, [r3, #84] @ 0x54
  7795. 8002de4: 687a ldr r2, [r7, #4]
  7796. 8002de6: 6d92 ldr r2, [r2, #88] @ 0x58
  7797. 8002de8: 605a str r2, [r3, #4]
  7798. 8002dea: e008 b.n 8002dfe <HAL_DMA_Init+0xea>
  7799. }
  7800. else
  7801. {
  7802. hdma->DMAmuxRequestGen = 0U;
  7803. 8002dec: 687b ldr r3, [r7, #4]
  7804. 8002dee: 2200 movs r2, #0
  7805. 8002df0: 651a str r2, [r3, #80] @ 0x50
  7806. hdma->DMAmuxRequestGenStatus = 0U;
  7807. 8002df2: 687b ldr r3, [r7, #4]
  7808. 8002df4: 2200 movs r2, #0
  7809. 8002df6: 655a str r2, [r3, #84] @ 0x54
  7810. hdma->DMAmuxRequestGenStatusMask = 0U;
  7811. 8002df8: 687b ldr r3, [r7, #4]
  7812. 8002dfa: 2200 movs r2, #0
  7813. 8002dfc: 659a str r2, [r3, #88] @ 0x58
  7814. }
  7815. /* Initialize the error code */
  7816. hdma->ErrorCode = HAL_DMA_ERROR_NONE;
  7817. 8002dfe: 687b ldr r3, [r7, #4]
  7818. 8002e00: 2200 movs r2, #0
  7819. 8002e02: 63da str r2, [r3, #60] @ 0x3c
  7820. /* Initialize the DMA state*/
  7821. hdma->State = HAL_DMA_STATE_READY;
  7822. 8002e04: 687b ldr r3, [r7, #4]
  7823. 8002e06: 2225 movs r2, #37 @ 0x25
  7824. 8002e08: 2101 movs r1, #1
  7825. 8002e0a: 5499 strb r1, [r3, r2]
  7826. /* Release Lock */
  7827. __HAL_UNLOCK(hdma);
  7828. 8002e0c: 687b ldr r3, [r7, #4]
  7829. 8002e0e: 2224 movs r2, #36 @ 0x24
  7830. 8002e10: 2100 movs r1, #0
  7831. 8002e12: 5499 strb r1, [r3, r2]
  7832. return HAL_OK;
  7833. 8002e14: 2300 movs r3, #0
  7834. }
  7835. 8002e16: 0018 movs r0, r3
  7836. 8002e18: 46bd mov sp, r7
  7837. 8002e1a: b002 add sp, #8
  7838. 8002e1c: bd80 pop {r7, pc}
  7839. 8002e1e: 46c0 nop @ (mov r8, r8)
  7840. 8002e20: bffdfff8 .word 0xbffdfff8
  7841. 8002e24: ffff800f .word 0xffff800f
  7842. 08002e28 <HAL_DMA_Start_IT>:
  7843. * @param DataLength The length of data to be transferred from source to destination
  7844. * @retval HAL status
  7845. */
  7846. HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress,
  7847. uint32_t DataLength)
  7848. {
  7849. 8002e28: b580 push {r7, lr}
  7850. 8002e2a: b086 sub sp, #24
  7851. 8002e2c: af00 add r7, sp, #0
  7852. 8002e2e: 60f8 str r0, [r7, #12]
  7853. 8002e30: 60b9 str r1, [r7, #8]
  7854. 8002e32: 607a str r2, [r7, #4]
  7855. 8002e34: 603b str r3, [r7, #0]
  7856. HAL_StatusTypeDef status = HAL_OK;
  7857. 8002e36: 2317 movs r3, #23
  7858. 8002e38: 18fb adds r3, r7, r3
  7859. 8002e3a: 2200 movs r2, #0
  7860. 8002e3c: 701a strb r2, [r3, #0]
  7861. /* Check the parameters */
  7862. assert_param(IS_DMA_BUFFER_SIZE(DataLength));
  7863. /* Process locked */
  7864. __HAL_LOCK(hdma);
  7865. 8002e3e: 68fb ldr r3, [r7, #12]
  7866. 8002e40: 2224 movs r2, #36 @ 0x24
  7867. 8002e42: 5c9b ldrb r3, [r3, r2]
  7868. 8002e44: 2b01 cmp r3, #1
  7869. 8002e46: d101 bne.n 8002e4c <HAL_DMA_Start_IT+0x24>
  7870. 8002e48: 2302 movs r3, #2
  7871. 8002e4a: e06f b.n 8002f2c <HAL_DMA_Start_IT+0x104>
  7872. 8002e4c: 68fb ldr r3, [r7, #12]
  7873. 8002e4e: 2224 movs r2, #36 @ 0x24
  7874. 8002e50: 2101 movs r1, #1
  7875. 8002e52: 5499 strb r1, [r3, r2]
  7876. if (hdma->State == HAL_DMA_STATE_READY)
  7877. 8002e54: 68fb ldr r3, [r7, #12]
  7878. 8002e56: 2225 movs r2, #37 @ 0x25
  7879. 8002e58: 5c9b ldrb r3, [r3, r2]
  7880. 8002e5a: b2db uxtb r3, r3
  7881. 8002e5c: 2b01 cmp r3, #1
  7882. 8002e5e: d157 bne.n 8002f10 <HAL_DMA_Start_IT+0xe8>
  7883. {
  7884. /* Change DMA peripheral state */
  7885. hdma->State = HAL_DMA_STATE_BUSY;
  7886. 8002e60: 68fb ldr r3, [r7, #12]
  7887. 8002e62: 2225 movs r2, #37 @ 0x25
  7888. 8002e64: 2102 movs r1, #2
  7889. 8002e66: 5499 strb r1, [r3, r2]
  7890. hdma->ErrorCode = HAL_DMA_ERROR_NONE;
  7891. 8002e68: 68fb ldr r3, [r7, #12]
  7892. 8002e6a: 2200 movs r2, #0
  7893. 8002e6c: 63da str r2, [r3, #60] @ 0x3c
  7894. /* Disable the peripheral */
  7895. __HAL_DMA_DISABLE(hdma);
  7896. 8002e6e: 68fb ldr r3, [r7, #12]
  7897. 8002e70: 681b ldr r3, [r3, #0]
  7898. 8002e72: 681a ldr r2, [r3, #0]
  7899. 8002e74: 68fb ldr r3, [r7, #12]
  7900. 8002e76: 681b ldr r3, [r3, #0]
  7901. 8002e78: 2101 movs r1, #1
  7902. 8002e7a: 438a bics r2, r1
  7903. 8002e7c: 601a str r2, [r3, #0]
  7904. /* Configure the source, destination address and the data length & clear flags*/
  7905. DMA_SetConfig(hdma, SrcAddress, DstAddress, DataLength);
  7906. 8002e7e: 683b ldr r3, [r7, #0]
  7907. 8002e80: 687a ldr r2, [r7, #4]
  7908. 8002e82: 68b9 ldr r1, [r7, #8]
  7909. 8002e84: 68f8 ldr r0, [r7, #12]
  7910. 8002e86: f000 f973 bl 8003170 <DMA_SetConfig>
  7911. /* Enable the transfer complete interrupt */
  7912. /* Enable the transfer Error interrupt */
  7913. if (NULL != hdma->XferHalfCpltCallback)
  7914. 8002e8a: 68fb ldr r3, [r7, #12]
  7915. 8002e8c: 6b1b ldr r3, [r3, #48] @ 0x30
  7916. 8002e8e: 2b00 cmp r3, #0
  7917. 8002e90: d008 beq.n 8002ea4 <HAL_DMA_Start_IT+0x7c>
  7918. {
  7919. /* Enable the Half transfer complete interrupt as well */
  7920. __HAL_DMA_ENABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
  7921. 8002e92: 68fb ldr r3, [r7, #12]
  7922. 8002e94: 681b ldr r3, [r3, #0]
  7923. 8002e96: 681a ldr r2, [r3, #0]
  7924. 8002e98: 68fb ldr r3, [r7, #12]
  7925. 8002e9a: 681b ldr r3, [r3, #0]
  7926. 8002e9c: 210e movs r1, #14
  7927. 8002e9e: 430a orrs r2, r1
  7928. 8002ea0: 601a str r2, [r3, #0]
  7929. 8002ea2: e00f b.n 8002ec4 <HAL_DMA_Start_IT+0x9c>
  7930. }
  7931. else
  7932. {
  7933. __HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT);
  7934. 8002ea4: 68fb ldr r3, [r7, #12]
  7935. 8002ea6: 681b ldr r3, [r3, #0]
  7936. 8002ea8: 681a ldr r2, [r3, #0]
  7937. 8002eaa: 68fb ldr r3, [r7, #12]
  7938. 8002eac: 681b ldr r3, [r3, #0]
  7939. 8002eae: 2104 movs r1, #4
  7940. 8002eb0: 438a bics r2, r1
  7941. 8002eb2: 601a str r2, [r3, #0]
  7942. __HAL_DMA_ENABLE_IT(hdma, (DMA_IT_TC | DMA_IT_TE));
  7943. 8002eb4: 68fb ldr r3, [r7, #12]
  7944. 8002eb6: 681b ldr r3, [r3, #0]
  7945. 8002eb8: 681a ldr r2, [r3, #0]
  7946. 8002eba: 68fb ldr r3, [r7, #12]
  7947. 8002ebc: 681b ldr r3, [r3, #0]
  7948. 8002ebe: 210a movs r1, #10
  7949. 8002ec0: 430a orrs r2, r1
  7950. 8002ec2: 601a str r2, [r3, #0]
  7951. }
  7952. /* Check if DMAMUX Synchronization is enabled*/
  7953. if ((hdma->DMAmuxChannel->CCR & DMAMUX_CxCR_SE) != 0U)
  7954. 8002ec4: 68fb ldr r3, [r7, #12]
  7955. 8002ec6: 6c5b ldr r3, [r3, #68] @ 0x44
  7956. 8002ec8: 681a ldr r2, [r3, #0]
  7957. 8002eca: 2380 movs r3, #128 @ 0x80
  7958. 8002ecc: 025b lsls r3, r3, #9
  7959. 8002ece: 4013 ands r3, r2
  7960. 8002ed0: d008 beq.n 8002ee4 <HAL_DMA_Start_IT+0xbc>
  7961. {
  7962. /* Enable DMAMUX sync overrun IT*/
  7963. hdma->DMAmuxChannel->CCR |= DMAMUX_CxCR_SOIE;
  7964. 8002ed2: 68fb ldr r3, [r7, #12]
  7965. 8002ed4: 6c5b ldr r3, [r3, #68] @ 0x44
  7966. 8002ed6: 681a ldr r2, [r3, #0]
  7967. 8002ed8: 68fb ldr r3, [r7, #12]
  7968. 8002eda: 6c5b ldr r3, [r3, #68] @ 0x44
  7969. 8002edc: 2180 movs r1, #128 @ 0x80
  7970. 8002ede: 0049 lsls r1, r1, #1
  7971. 8002ee0: 430a orrs r2, r1
  7972. 8002ee2: 601a str r2, [r3, #0]
  7973. }
  7974. if (hdma->DMAmuxRequestGen != 0U)
  7975. 8002ee4: 68fb ldr r3, [r7, #12]
  7976. 8002ee6: 6d1b ldr r3, [r3, #80] @ 0x50
  7977. 8002ee8: 2b00 cmp r3, #0
  7978. 8002eea: d008 beq.n 8002efe <HAL_DMA_Start_IT+0xd6>
  7979. {
  7980. /* if using DMAMUX request generator, enable the DMAMUX request generator overrun IT*/
  7981. /* enable the request gen overrun IT*/
  7982. hdma->DMAmuxRequestGen->RGCR |= DMAMUX_RGxCR_OIE;
  7983. 8002eec: 68fb ldr r3, [r7, #12]
  7984. 8002eee: 6d1b ldr r3, [r3, #80] @ 0x50
  7985. 8002ef0: 681a ldr r2, [r3, #0]
  7986. 8002ef2: 68fb ldr r3, [r7, #12]
  7987. 8002ef4: 6d1b ldr r3, [r3, #80] @ 0x50
  7988. 8002ef6: 2180 movs r1, #128 @ 0x80
  7989. 8002ef8: 0049 lsls r1, r1, #1
  7990. 8002efa: 430a orrs r2, r1
  7991. 8002efc: 601a str r2, [r3, #0]
  7992. }
  7993. /* Enable the Peripheral */
  7994. __HAL_DMA_ENABLE(hdma);
  7995. 8002efe: 68fb ldr r3, [r7, #12]
  7996. 8002f00: 681b ldr r3, [r3, #0]
  7997. 8002f02: 681a ldr r2, [r3, #0]
  7998. 8002f04: 68fb ldr r3, [r7, #12]
  7999. 8002f06: 681b ldr r3, [r3, #0]
  8000. 8002f08: 2101 movs r1, #1
  8001. 8002f0a: 430a orrs r2, r1
  8002. 8002f0c: 601a str r2, [r3, #0]
  8003. 8002f0e: e00a b.n 8002f26 <HAL_DMA_Start_IT+0xfe>
  8004. }
  8005. else
  8006. {
  8007. /* Change the error code */
  8008. hdma->ErrorCode = HAL_DMA_ERROR_BUSY;
  8009. 8002f10: 68fb ldr r3, [r7, #12]
  8010. 8002f12: 2280 movs r2, #128 @ 0x80
  8011. 8002f14: 63da str r2, [r3, #60] @ 0x3c
  8012. /* Process Unlocked */
  8013. __HAL_UNLOCK(hdma);
  8014. 8002f16: 68fb ldr r3, [r7, #12]
  8015. 8002f18: 2224 movs r2, #36 @ 0x24
  8016. 8002f1a: 2100 movs r1, #0
  8017. 8002f1c: 5499 strb r1, [r3, r2]
  8018. /* Return error status */
  8019. status = HAL_ERROR;
  8020. 8002f1e: 2317 movs r3, #23
  8021. 8002f20: 18fb adds r3, r7, r3
  8022. 8002f22: 2201 movs r2, #1
  8023. 8002f24: 701a strb r2, [r3, #0]
  8024. }
  8025. return status;
  8026. 8002f26: 2317 movs r3, #23
  8027. 8002f28: 18fb adds r3, r7, r3
  8028. 8002f2a: 781b ldrb r3, [r3, #0]
  8029. }
  8030. 8002f2c: 0018 movs r0, r3
  8031. 8002f2e: 46bd mov sp, r7
  8032. 8002f30: b006 add sp, #24
  8033. 8002f32: bd80 pop {r7, pc}
  8034. 08002f34 <HAL_DMA_Abort>:
  8035. * @param hdma Pointer to a DMA_HandleTypeDef structure that contains
  8036. * the configuration information for the specified DMA Channel.
  8037. * @retval HAL status
  8038. */
  8039. HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma)
  8040. {
  8041. 8002f34: b580 push {r7, lr}
  8042. 8002f36: b082 sub sp, #8
  8043. 8002f38: af00 add r7, sp, #0
  8044. 8002f3a: 6078 str r0, [r7, #4]
  8045. /* Check the DMA peripheral handle */
  8046. if (NULL == hdma)
  8047. 8002f3c: 687b ldr r3, [r7, #4]
  8048. 8002f3e: 2b00 cmp r3, #0
  8049. 8002f40: d101 bne.n 8002f46 <HAL_DMA_Abort+0x12>
  8050. {
  8051. return HAL_ERROR;
  8052. 8002f42: 2301 movs r3, #1
  8053. 8002f44: e050 b.n 8002fe8 <HAL_DMA_Abort+0xb4>
  8054. }
  8055. /* Check the DMA peripheral state */
  8056. if (hdma->State != HAL_DMA_STATE_BUSY)
  8057. 8002f46: 687b ldr r3, [r7, #4]
  8058. 8002f48: 2225 movs r2, #37 @ 0x25
  8059. 8002f4a: 5c9b ldrb r3, [r3, r2]
  8060. 8002f4c: b2db uxtb r3, r3
  8061. 8002f4e: 2b02 cmp r3, #2
  8062. 8002f50: d008 beq.n 8002f64 <HAL_DMA_Abort+0x30>
  8063. {
  8064. hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER;
  8065. 8002f52: 687b ldr r3, [r7, #4]
  8066. 8002f54: 2204 movs r2, #4
  8067. 8002f56: 63da str r2, [r3, #60] @ 0x3c
  8068. /* Process Unlocked */
  8069. __HAL_UNLOCK(hdma);
  8070. 8002f58: 687b ldr r3, [r7, #4]
  8071. 8002f5a: 2224 movs r2, #36 @ 0x24
  8072. 8002f5c: 2100 movs r1, #0
  8073. 8002f5e: 5499 strb r1, [r3, r2]
  8074. return HAL_ERROR;
  8075. 8002f60: 2301 movs r3, #1
  8076. 8002f62: e041 b.n 8002fe8 <HAL_DMA_Abort+0xb4>
  8077. }
  8078. else
  8079. {
  8080. /* Disable DMA IT */
  8081. __HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
  8082. 8002f64: 687b ldr r3, [r7, #4]
  8083. 8002f66: 681b ldr r3, [r3, #0]
  8084. 8002f68: 681a ldr r2, [r3, #0]
  8085. 8002f6a: 687b ldr r3, [r7, #4]
  8086. 8002f6c: 681b ldr r3, [r3, #0]
  8087. 8002f6e: 210e movs r1, #14
  8088. 8002f70: 438a bics r2, r1
  8089. 8002f72: 601a str r2, [r3, #0]
  8090. /* disable the DMAMUX sync overrun IT*/
  8091. hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE;
  8092. 8002f74: 687b ldr r3, [r7, #4]
  8093. 8002f76: 6c5b ldr r3, [r3, #68] @ 0x44
  8094. 8002f78: 681a ldr r2, [r3, #0]
  8095. 8002f7a: 687b ldr r3, [r7, #4]
  8096. 8002f7c: 6c5b ldr r3, [r3, #68] @ 0x44
  8097. 8002f7e: 491c ldr r1, [pc, #112] @ (8002ff0 <HAL_DMA_Abort+0xbc>)
  8098. 8002f80: 400a ands r2, r1
  8099. 8002f82: 601a str r2, [r3, #0]
  8100. /* Disable the channel */
  8101. __HAL_DMA_DISABLE(hdma);
  8102. 8002f84: 687b ldr r3, [r7, #4]
  8103. 8002f86: 681b ldr r3, [r3, #0]
  8104. 8002f88: 681a ldr r2, [r3, #0]
  8105. 8002f8a: 687b ldr r3, [r7, #4]
  8106. 8002f8c: 681b ldr r3, [r3, #0]
  8107. 8002f8e: 2101 movs r1, #1
  8108. 8002f90: 438a bics r2, r1
  8109. 8002f92: 601a str r2, [r3, #0]
  8110. /* Clear all flags */
  8111. #if defined(DMA2)
  8112. hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1CU));
  8113. #else
  8114. __HAL_DMA_CLEAR_FLAG(hdma, ((DMA_FLAG_GI1) << (hdma->ChannelIndex & 0x1CU)));
  8115. 8002f94: 4b17 ldr r3, [pc, #92] @ (8002ff4 <HAL_DMA_Abort+0xc0>)
  8116. 8002f96: 6859 ldr r1, [r3, #4]
  8117. 8002f98: 687b ldr r3, [r7, #4]
  8118. 8002f9a: 6c1b ldr r3, [r3, #64] @ 0x40
  8119. 8002f9c: 221c movs r2, #28
  8120. 8002f9e: 4013 ands r3, r2
  8121. 8002fa0: 2201 movs r2, #1
  8122. 8002fa2: 409a lsls r2, r3
  8123. 8002fa4: 4b13 ldr r3, [pc, #76] @ (8002ff4 <HAL_DMA_Abort+0xc0>)
  8124. 8002fa6: 430a orrs r2, r1
  8125. 8002fa8: 605a str r2, [r3, #4]
  8126. #endif /* DMA2 */
  8127. /* Clear the DMAMUX synchro overrun flag */
  8128. hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
  8129. 8002faa: 687b ldr r3, [r7, #4]
  8130. 8002fac: 6c9b ldr r3, [r3, #72] @ 0x48
  8131. 8002fae: 687a ldr r2, [r7, #4]
  8132. 8002fb0: 6cd2 ldr r2, [r2, #76] @ 0x4c
  8133. 8002fb2: 605a str r2, [r3, #4]
  8134. if (hdma->DMAmuxRequestGen != 0U)
  8135. 8002fb4: 687b ldr r3, [r7, #4]
  8136. 8002fb6: 6d1b ldr r3, [r3, #80] @ 0x50
  8137. 8002fb8: 2b00 cmp r3, #0
  8138. 8002fba: d00c beq.n 8002fd6 <HAL_DMA_Abort+0xa2>
  8139. {
  8140. /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT*/
  8141. /* disable the request gen overrun IT*/
  8142. hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE;
  8143. 8002fbc: 687b ldr r3, [r7, #4]
  8144. 8002fbe: 6d1b ldr r3, [r3, #80] @ 0x50
  8145. 8002fc0: 681a ldr r2, [r3, #0]
  8146. 8002fc2: 687b ldr r3, [r7, #4]
  8147. 8002fc4: 6d1b ldr r3, [r3, #80] @ 0x50
  8148. 8002fc6: 490a ldr r1, [pc, #40] @ (8002ff0 <HAL_DMA_Abort+0xbc>)
  8149. 8002fc8: 400a ands r2, r1
  8150. 8002fca: 601a str r2, [r3, #0]
  8151. /* Clear the DMAMUX request generator overrun flag */
  8152. hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
  8153. 8002fcc: 687b ldr r3, [r7, #4]
  8154. 8002fce: 6d5b ldr r3, [r3, #84] @ 0x54
  8155. 8002fd0: 687a ldr r2, [r7, #4]
  8156. 8002fd2: 6d92 ldr r2, [r2, #88] @ 0x58
  8157. 8002fd4: 605a str r2, [r3, #4]
  8158. }
  8159. /* Change the DMA state */
  8160. hdma->State = HAL_DMA_STATE_READY;
  8161. 8002fd6: 687b ldr r3, [r7, #4]
  8162. 8002fd8: 2225 movs r2, #37 @ 0x25
  8163. 8002fda: 2101 movs r1, #1
  8164. 8002fdc: 5499 strb r1, [r3, r2]
  8165. /* Process Unlocked */
  8166. __HAL_UNLOCK(hdma);
  8167. 8002fde: 687b ldr r3, [r7, #4]
  8168. 8002fe0: 2224 movs r2, #36 @ 0x24
  8169. 8002fe2: 2100 movs r1, #0
  8170. 8002fe4: 5499 strb r1, [r3, r2]
  8171. }
  8172. return HAL_OK;
  8173. 8002fe6: 2300 movs r3, #0
  8174. }
  8175. 8002fe8: 0018 movs r0, r3
  8176. 8002fea: 46bd mov sp, r7
  8177. 8002fec: b002 add sp, #8
  8178. 8002fee: bd80 pop {r7, pc}
  8179. 8002ff0: fffffeff .word 0xfffffeff
  8180. 8002ff4: 40020000 .word 0x40020000
  8181. 08002ff8 <HAL_DMA_IRQHandler>:
  8182. * @param hdma Pointer to a DMA_HandleTypeDef structure that contains
  8183. * the configuration information for the specified DMA Channel.
  8184. * @retval None
  8185. */
  8186. void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
  8187. {
  8188. 8002ff8: b580 push {r7, lr}
  8189. 8002ffa: b084 sub sp, #16
  8190. 8002ffc: af00 add r7, sp, #0
  8191. 8002ffe: 6078 str r0, [r7, #4]
  8192. #if defined(DMA2)
  8193. uint32_t flag_it = hdma->DmaBaseAddress->ISR;
  8194. #else
  8195. uint32_t flag_it = DMA1->ISR;
  8196. 8003000: 4b55 ldr r3, [pc, #340] @ (8003158 <HAL_DMA_IRQHandler+0x160>)
  8197. 8003002: 681b ldr r3, [r3, #0]
  8198. 8003004: 60fb str r3, [r7, #12]
  8199. #endif /* DMA2 */
  8200. uint32_t source_it = hdma->Instance->CCR;
  8201. 8003006: 687b ldr r3, [r7, #4]
  8202. 8003008: 681b ldr r3, [r3, #0]
  8203. 800300a: 681b ldr r3, [r3, #0]
  8204. 800300c: 60bb str r3, [r7, #8]
  8205. /* Half Transfer Complete Interrupt management ******************************/
  8206. if (((flag_it & (DMA_FLAG_HT1 << (hdma->ChannelIndex & 0x1CU))) != 0U) && ((source_it & DMA_IT_HT) != 0U))
  8207. 800300e: 687b ldr r3, [r7, #4]
  8208. 8003010: 6c1b ldr r3, [r3, #64] @ 0x40
  8209. 8003012: 221c movs r2, #28
  8210. 8003014: 4013 ands r3, r2
  8211. 8003016: 2204 movs r2, #4
  8212. 8003018: 409a lsls r2, r3
  8213. 800301a: 0013 movs r3, r2
  8214. 800301c: 68fa ldr r2, [r7, #12]
  8215. 800301e: 4013 ands r3, r2
  8216. 8003020: d027 beq.n 8003072 <HAL_DMA_IRQHandler+0x7a>
  8217. 8003022: 68bb ldr r3, [r7, #8]
  8218. 8003024: 2204 movs r2, #4
  8219. 8003026: 4013 ands r3, r2
  8220. 8003028: d023 beq.n 8003072 <HAL_DMA_IRQHandler+0x7a>
  8221. {
  8222. /* Disable the half transfer interrupt if the DMA mode is not CIRCULAR */
  8223. if ((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U)
  8224. 800302a: 687b ldr r3, [r7, #4]
  8225. 800302c: 681b ldr r3, [r3, #0]
  8226. 800302e: 681b ldr r3, [r3, #0]
  8227. 8003030: 2220 movs r2, #32
  8228. 8003032: 4013 ands r3, r2
  8229. 8003034: d107 bne.n 8003046 <HAL_DMA_IRQHandler+0x4e>
  8230. {
  8231. /* Disable the half transfer interrupt */
  8232. __HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT);
  8233. 8003036: 687b ldr r3, [r7, #4]
  8234. 8003038: 681b ldr r3, [r3, #0]
  8235. 800303a: 681a ldr r2, [r3, #0]
  8236. 800303c: 687b ldr r3, [r7, #4]
  8237. 800303e: 681b ldr r3, [r3, #0]
  8238. 8003040: 2104 movs r1, #4
  8239. 8003042: 438a bics r2, r1
  8240. 8003044: 601a str r2, [r3, #0]
  8241. }
  8242. /* Clear the half transfer complete flag */
  8243. #if defined(DMA2)
  8244. hdma->DmaBaseAddress->IFCR = DMA_ISR_HTIF1 << (hdma->ChannelIndex & 0x1CU);
  8245. #else
  8246. __HAL_DMA_CLEAR_FLAG(hdma, (DMA_FLAG_HT1 << (hdma->ChannelIndex & 0x1CU)));
  8247. 8003046: 4b44 ldr r3, [pc, #272] @ (8003158 <HAL_DMA_IRQHandler+0x160>)
  8248. 8003048: 6859 ldr r1, [r3, #4]
  8249. 800304a: 687b ldr r3, [r7, #4]
  8250. 800304c: 6c1b ldr r3, [r3, #64] @ 0x40
  8251. 800304e: 221c movs r2, #28
  8252. 8003050: 4013 ands r3, r2
  8253. 8003052: 2204 movs r2, #4
  8254. 8003054: 409a lsls r2, r3
  8255. 8003056: 4b40 ldr r3, [pc, #256] @ (8003158 <HAL_DMA_IRQHandler+0x160>)
  8256. 8003058: 430a orrs r2, r1
  8257. 800305a: 605a str r2, [r3, #4]
  8258. #endif /* DMA2 */
  8259. /* DMA peripheral state is not updated in Half Transfer */
  8260. /* but in Transfer Complete case */
  8261. if (hdma->XferHalfCpltCallback != NULL)
  8262. 800305c: 687b ldr r3, [r7, #4]
  8263. 800305e: 6b1b ldr r3, [r3, #48] @ 0x30
  8264. 8003060: 2b00 cmp r3, #0
  8265. 8003062: d100 bne.n 8003066 <HAL_DMA_IRQHandler+0x6e>
  8266. 8003064: e073 b.n 800314e <HAL_DMA_IRQHandler+0x156>
  8267. {
  8268. /* Half transfer callback */
  8269. hdma->XferHalfCpltCallback(hdma);
  8270. 8003066: 687b ldr r3, [r7, #4]
  8271. 8003068: 6b1b ldr r3, [r3, #48] @ 0x30
  8272. 800306a: 687a ldr r2, [r7, #4]
  8273. 800306c: 0010 movs r0, r2
  8274. 800306e: 4798 blx r3
  8275. if (hdma->XferHalfCpltCallback != NULL)
  8276. 8003070: e06d b.n 800314e <HAL_DMA_IRQHandler+0x156>
  8277. }
  8278. }
  8279. /* Transfer Complete Interrupt management ***********************************/
  8280. else if ((0U != (flag_it & (DMA_FLAG_TC1 << (hdma->ChannelIndex & 0x1CU)))) && (0U != (source_it & DMA_IT_TC)))
  8281. 8003072: 687b ldr r3, [r7, #4]
  8282. 8003074: 6c1b ldr r3, [r3, #64] @ 0x40
  8283. 8003076: 221c movs r2, #28
  8284. 8003078: 4013 ands r3, r2
  8285. 800307a: 2202 movs r2, #2
  8286. 800307c: 409a lsls r2, r3
  8287. 800307e: 0013 movs r3, r2
  8288. 8003080: 68fa ldr r2, [r7, #12]
  8289. 8003082: 4013 ands r3, r2
  8290. 8003084: d02e beq.n 80030e4 <HAL_DMA_IRQHandler+0xec>
  8291. 8003086: 68bb ldr r3, [r7, #8]
  8292. 8003088: 2202 movs r2, #2
  8293. 800308a: 4013 ands r3, r2
  8294. 800308c: d02a beq.n 80030e4 <HAL_DMA_IRQHandler+0xec>
  8295. {
  8296. if ((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U)
  8297. 800308e: 687b ldr r3, [r7, #4]
  8298. 8003090: 681b ldr r3, [r3, #0]
  8299. 8003092: 681b ldr r3, [r3, #0]
  8300. 8003094: 2220 movs r2, #32
  8301. 8003096: 4013 ands r3, r2
  8302. 8003098: d10b bne.n 80030b2 <HAL_DMA_IRQHandler+0xba>
  8303. {
  8304. /* Disable the transfer complete and error interrupt */
  8305. __HAL_DMA_DISABLE_IT(hdma, DMA_IT_TE | DMA_IT_TC);
  8306. 800309a: 687b ldr r3, [r7, #4]
  8307. 800309c: 681b ldr r3, [r3, #0]
  8308. 800309e: 681a ldr r2, [r3, #0]
  8309. 80030a0: 687b ldr r3, [r7, #4]
  8310. 80030a2: 681b ldr r3, [r3, #0]
  8311. 80030a4: 210a movs r1, #10
  8312. 80030a6: 438a bics r2, r1
  8313. 80030a8: 601a str r2, [r3, #0]
  8314. /* Change the DMA state */
  8315. hdma->State = HAL_DMA_STATE_READY;
  8316. 80030aa: 687b ldr r3, [r7, #4]
  8317. 80030ac: 2225 movs r2, #37 @ 0x25
  8318. 80030ae: 2101 movs r1, #1
  8319. 80030b0: 5499 strb r1, [r3, r2]
  8320. }
  8321. /* Clear the transfer complete flag */
  8322. __HAL_DMA_CLEAR_FLAG(hdma, (DMA_FLAG_TC1 << (hdma->ChannelIndex & 0x1CU)));
  8323. 80030b2: 4b29 ldr r3, [pc, #164] @ (8003158 <HAL_DMA_IRQHandler+0x160>)
  8324. 80030b4: 6859 ldr r1, [r3, #4]
  8325. 80030b6: 687b ldr r3, [r7, #4]
  8326. 80030b8: 6c1b ldr r3, [r3, #64] @ 0x40
  8327. 80030ba: 221c movs r2, #28
  8328. 80030bc: 4013 ands r3, r2
  8329. 80030be: 2202 movs r2, #2
  8330. 80030c0: 409a lsls r2, r3
  8331. 80030c2: 4b25 ldr r3, [pc, #148] @ (8003158 <HAL_DMA_IRQHandler+0x160>)
  8332. 80030c4: 430a orrs r2, r1
  8333. 80030c6: 605a str r2, [r3, #4]
  8334. /* Process Unlocked */
  8335. __HAL_UNLOCK(hdma);
  8336. 80030c8: 687b ldr r3, [r7, #4]
  8337. 80030ca: 2224 movs r2, #36 @ 0x24
  8338. 80030cc: 2100 movs r1, #0
  8339. 80030ce: 5499 strb r1, [r3, r2]
  8340. if (hdma->XferCpltCallback != NULL)
  8341. 80030d0: 687b ldr r3, [r7, #4]
  8342. 80030d2: 6adb ldr r3, [r3, #44] @ 0x2c
  8343. 80030d4: 2b00 cmp r3, #0
  8344. 80030d6: d03a beq.n 800314e <HAL_DMA_IRQHandler+0x156>
  8345. {
  8346. /* Transfer complete callback */
  8347. hdma->XferCpltCallback(hdma);
  8348. 80030d8: 687b ldr r3, [r7, #4]
  8349. 80030da: 6adb ldr r3, [r3, #44] @ 0x2c
  8350. 80030dc: 687a ldr r2, [r7, #4]
  8351. 80030de: 0010 movs r0, r2
  8352. 80030e0: 4798 blx r3
  8353. if (hdma->XferCpltCallback != NULL)
  8354. 80030e2: e034 b.n 800314e <HAL_DMA_IRQHandler+0x156>
  8355. }
  8356. }
  8357. /* Transfer Error Interrupt management **************************************/
  8358. else if (((flag_it & (DMA_FLAG_TE1 << (hdma->ChannelIndex & 0x1CU))) != 0U) && ((source_it & DMA_IT_TE) != 0U))
  8359. 80030e4: 687b ldr r3, [r7, #4]
  8360. 80030e6: 6c1b ldr r3, [r3, #64] @ 0x40
  8361. 80030e8: 221c movs r2, #28
  8362. 80030ea: 4013 ands r3, r2
  8363. 80030ec: 2208 movs r2, #8
  8364. 80030ee: 409a lsls r2, r3
  8365. 80030f0: 0013 movs r3, r2
  8366. 80030f2: 68fa ldr r2, [r7, #12]
  8367. 80030f4: 4013 ands r3, r2
  8368. 80030f6: d02b beq.n 8003150 <HAL_DMA_IRQHandler+0x158>
  8369. 80030f8: 68bb ldr r3, [r7, #8]
  8370. 80030fa: 2208 movs r2, #8
  8371. 80030fc: 4013 ands r3, r2
  8372. 80030fe: d027 beq.n 8003150 <HAL_DMA_IRQHandler+0x158>
  8373. {
  8374. /* When a DMA transfer error occurs */
  8375. /* A hardware clear of its EN bits is performed */
  8376. /* Disable ALL DMA IT */
  8377. __HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
  8378. 8003100: 687b ldr r3, [r7, #4]
  8379. 8003102: 681b ldr r3, [r3, #0]
  8380. 8003104: 681a ldr r2, [r3, #0]
  8381. 8003106: 687b ldr r3, [r7, #4]
  8382. 8003108: 681b ldr r3, [r3, #0]
  8383. 800310a: 210e movs r1, #14
  8384. 800310c: 438a bics r2, r1
  8385. 800310e: 601a str r2, [r3, #0]
  8386. /* Clear all flags */
  8387. #if defined(DMA2)
  8388. hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1CU));
  8389. #else
  8390. __HAL_DMA_CLEAR_FLAG(hdma, (DMA_FLAG_GI1 << (hdma->ChannelIndex & 0x1CU)));
  8391. 8003110: 4b11 ldr r3, [pc, #68] @ (8003158 <HAL_DMA_IRQHandler+0x160>)
  8392. 8003112: 6859 ldr r1, [r3, #4]
  8393. 8003114: 687b ldr r3, [r7, #4]
  8394. 8003116: 6c1b ldr r3, [r3, #64] @ 0x40
  8395. 8003118: 221c movs r2, #28
  8396. 800311a: 4013 ands r3, r2
  8397. 800311c: 2201 movs r2, #1
  8398. 800311e: 409a lsls r2, r3
  8399. 8003120: 4b0d ldr r3, [pc, #52] @ (8003158 <HAL_DMA_IRQHandler+0x160>)
  8400. 8003122: 430a orrs r2, r1
  8401. 8003124: 605a str r2, [r3, #4]
  8402. #endif /* DMA2 */
  8403. /* Update error code */
  8404. hdma->ErrorCode = HAL_DMA_ERROR_TE;
  8405. 8003126: 687b ldr r3, [r7, #4]
  8406. 8003128: 2201 movs r2, #1
  8407. 800312a: 63da str r2, [r3, #60] @ 0x3c
  8408. /* Change the DMA state */
  8409. hdma->State = HAL_DMA_STATE_READY;
  8410. 800312c: 687b ldr r3, [r7, #4]
  8411. 800312e: 2225 movs r2, #37 @ 0x25
  8412. 8003130: 2101 movs r1, #1
  8413. 8003132: 5499 strb r1, [r3, r2]
  8414. /* Process Unlocked */
  8415. __HAL_UNLOCK(hdma);
  8416. 8003134: 687b ldr r3, [r7, #4]
  8417. 8003136: 2224 movs r2, #36 @ 0x24
  8418. 8003138: 2100 movs r1, #0
  8419. 800313a: 5499 strb r1, [r3, r2]
  8420. if (hdma->XferErrorCallback != NULL)
  8421. 800313c: 687b ldr r3, [r7, #4]
  8422. 800313e: 6b5b ldr r3, [r3, #52] @ 0x34
  8423. 8003140: 2b00 cmp r3, #0
  8424. 8003142: d005 beq.n 8003150 <HAL_DMA_IRQHandler+0x158>
  8425. {
  8426. /* Transfer error callback */
  8427. hdma->XferErrorCallback(hdma);
  8428. 8003144: 687b ldr r3, [r7, #4]
  8429. 8003146: 6b5b ldr r3, [r3, #52] @ 0x34
  8430. 8003148: 687a ldr r2, [r7, #4]
  8431. 800314a: 0010 movs r0, r2
  8432. 800314c: 4798 blx r3
  8433. }
  8434. else
  8435. {
  8436. /* Nothing To Do */
  8437. }
  8438. return;
  8439. 800314e: 46c0 nop @ (mov r8, r8)
  8440. 8003150: 46c0 nop @ (mov r8, r8)
  8441. }
  8442. 8003152: 46bd mov sp, r7
  8443. 8003154: b004 add sp, #16
  8444. 8003156: bd80 pop {r7, pc}
  8445. 8003158: 40020000 .word 0x40020000
  8446. 0800315c <HAL_DMA_GetError>:
  8447. * @param hdma Pointer to a DMA_HandleTypeDef structure that contains
  8448. * the configuration information for the specified DMA Channel.
  8449. * @retval DMA Error Code
  8450. */
  8451. uint32_t HAL_DMA_GetError(DMA_HandleTypeDef *hdma)
  8452. {
  8453. 800315c: b580 push {r7, lr}
  8454. 800315e: b082 sub sp, #8
  8455. 8003160: af00 add r7, sp, #0
  8456. 8003162: 6078 str r0, [r7, #4]
  8457. /* Return the DMA error code */
  8458. return hdma->ErrorCode;
  8459. 8003164: 687b ldr r3, [r7, #4]
  8460. 8003166: 6bdb ldr r3, [r3, #60] @ 0x3c
  8461. }
  8462. 8003168: 0018 movs r0, r3
  8463. 800316a: 46bd mov sp, r7
  8464. 800316c: b002 add sp, #8
  8465. 800316e: bd80 pop {r7, pc}
  8466. 08003170 <DMA_SetConfig>:
  8467. * @param DstAddress The destination memory Buffer address
  8468. * @param DataLength The length of data to be transferred from source to destination
  8469. * @retval HAL status
  8470. */
  8471. static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
  8472. {
  8473. 8003170: b580 push {r7, lr}
  8474. 8003172: b084 sub sp, #16
  8475. 8003174: af00 add r7, sp, #0
  8476. 8003176: 60f8 str r0, [r7, #12]
  8477. 8003178: 60b9 str r1, [r7, #8]
  8478. 800317a: 607a str r2, [r7, #4]
  8479. 800317c: 603b str r3, [r7, #0]
  8480. /* Clear the DMAMUX synchro overrun flag */
  8481. hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
  8482. 800317e: 68fb ldr r3, [r7, #12]
  8483. 8003180: 6c9b ldr r3, [r3, #72] @ 0x48
  8484. 8003182: 68fa ldr r2, [r7, #12]
  8485. 8003184: 6cd2 ldr r2, [r2, #76] @ 0x4c
  8486. 8003186: 605a str r2, [r3, #4]
  8487. if (hdma->DMAmuxRequestGen != 0U)
  8488. 8003188: 68fb ldr r3, [r7, #12]
  8489. 800318a: 6d1b ldr r3, [r3, #80] @ 0x50
  8490. 800318c: 2b00 cmp r3, #0
  8491. 800318e: d004 beq.n 800319a <DMA_SetConfig+0x2a>
  8492. {
  8493. /* Clear the DMAMUX request generator overrun flag */
  8494. hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
  8495. 8003190: 68fb ldr r3, [r7, #12]
  8496. 8003192: 6d5b ldr r3, [r3, #84] @ 0x54
  8497. 8003194: 68fa ldr r2, [r7, #12]
  8498. 8003196: 6d92 ldr r2, [r2, #88] @ 0x58
  8499. 8003198: 605a str r2, [r3, #4]
  8500. /* Clear all flags */
  8501. #if defined(DMA2)
  8502. hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1CU));
  8503. #else
  8504. __HAL_DMA_CLEAR_FLAG(hdma, (DMA_FLAG_GI1 << (hdma->ChannelIndex & 0x1CU)));
  8505. 800319a: 4b14 ldr r3, [pc, #80] @ (80031ec <DMA_SetConfig+0x7c>)
  8506. 800319c: 6859 ldr r1, [r3, #4]
  8507. 800319e: 68fb ldr r3, [r7, #12]
  8508. 80031a0: 6c1b ldr r3, [r3, #64] @ 0x40
  8509. 80031a2: 221c movs r2, #28
  8510. 80031a4: 4013 ands r3, r2
  8511. 80031a6: 2201 movs r2, #1
  8512. 80031a8: 409a lsls r2, r3
  8513. 80031aa: 4b10 ldr r3, [pc, #64] @ (80031ec <DMA_SetConfig+0x7c>)
  8514. 80031ac: 430a orrs r2, r1
  8515. 80031ae: 605a str r2, [r3, #4]
  8516. #endif /* DMA2 */
  8517. /* Configure DMA Channel data length */
  8518. hdma->Instance->CNDTR = DataLength;
  8519. 80031b0: 68fb ldr r3, [r7, #12]
  8520. 80031b2: 681b ldr r3, [r3, #0]
  8521. 80031b4: 683a ldr r2, [r7, #0]
  8522. 80031b6: 605a str r2, [r3, #4]
  8523. /* Memory to Peripheral */
  8524. if ((hdma->Init.Direction) == DMA_MEMORY_TO_PERIPH)
  8525. 80031b8: 68fb ldr r3, [r7, #12]
  8526. 80031ba: 689b ldr r3, [r3, #8]
  8527. 80031bc: 2b10 cmp r3, #16
  8528. 80031be: d108 bne.n 80031d2 <DMA_SetConfig+0x62>
  8529. {
  8530. /* Configure DMA Channel destination address */
  8531. hdma->Instance->CPAR = DstAddress;
  8532. 80031c0: 68fb ldr r3, [r7, #12]
  8533. 80031c2: 681b ldr r3, [r3, #0]
  8534. 80031c4: 687a ldr r2, [r7, #4]
  8535. 80031c6: 609a str r2, [r3, #8]
  8536. /* Configure DMA Channel source address */
  8537. hdma->Instance->CMAR = SrcAddress;
  8538. 80031c8: 68fb ldr r3, [r7, #12]
  8539. 80031ca: 681b ldr r3, [r3, #0]
  8540. 80031cc: 68ba ldr r2, [r7, #8]
  8541. 80031ce: 60da str r2, [r3, #12]
  8542. hdma->Instance->CPAR = SrcAddress;
  8543. /* Configure DMA Channel destination address */
  8544. hdma->Instance->CMAR = DstAddress;
  8545. }
  8546. }
  8547. 80031d0: e007 b.n 80031e2 <DMA_SetConfig+0x72>
  8548. hdma->Instance->CPAR = SrcAddress;
  8549. 80031d2: 68fb ldr r3, [r7, #12]
  8550. 80031d4: 681b ldr r3, [r3, #0]
  8551. 80031d6: 68ba ldr r2, [r7, #8]
  8552. 80031d8: 609a str r2, [r3, #8]
  8553. hdma->Instance->CMAR = DstAddress;
  8554. 80031da: 68fb ldr r3, [r7, #12]
  8555. 80031dc: 681b ldr r3, [r3, #0]
  8556. 80031de: 687a ldr r2, [r7, #4]
  8557. 80031e0: 60da str r2, [r3, #12]
  8558. }
  8559. 80031e2: 46c0 nop @ (mov r8, r8)
  8560. 80031e4: 46bd mov sp, r7
  8561. 80031e6: b004 add sp, #16
  8562. 80031e8: bd80 pop {r7, pc}
  8563. 80031ea: 46c0 nop @ (mov r8, r8)
  8564. 80031ec: 40020000 .word 0x40020000
  8565. 080031f0 <DMA_CalcDMAMUXChannelBaseAndMask>:
  8566. * @param hdma Pointer to a DMA_HandleTypeDef structure that contains
  8567. * the configuration information for the specified DMA Channel.
  8568. * @retval None
  8569. */
  8570. static void DMA_CalcDMAMUXChannelBaseAndMask(DMA_HandleTypeDef *hdma)
  8571. {
  8572. 80031f0: b580 push {r7, lr}
  8573. 80031f2: b084 sub sp, #16
  8574. 80031f4: af00 add r7, sp, #0
  8575. 80031f6: 6078 str r0, [r7, #4]
  8576. /* Prepare channel_number used for DMAmuxChannelStatusMask computation */
  8577. channel_number = (((((uint32_t)hdma->Instance & 0xFFU) - 8U) / 20U) + 7U);
  8578. }
  8579. #else
  8580. /* Associate a DMA Channel to a DMAMUX channel */
  8581. hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)(uint32_t)((uint32_t)DMAMUX1_Channel0 + ((hdma->ChannelIndex >> 2U) * ((uint32_t)DMAMUX1_Channel1 - (uint32_t)DMAMUX1_Channel0)));
  8582. 80031f8: 687b ldr r3, [r7, #4]
  8583. 80031fa: 6c1b ldr r3, [r3, #64] @ 0x40
  8584. 80031fc: 089b lsrs r3, r3, #2
  8585. 80031fe: 4a10 ldr r2, [pc, #64] @ (8003240 <DMA_CalcDMAMUXChannelBaseAndMask+0x50>)
  8586. 8003200: 4694 mov ip, r2
  8587. 8003202: 4463 add r3, ip
  8588. 8003204: 009b lsls r3, r3, #2
  8589. 8003206: 001a movs r2, r3
  8590. 8003208: 687b ldr r3, [r7, #4]
  8591. 800320a: 645a str r2, [r3, #68] @ 0x44
  8592. /* Prepare channel_number used for DMAmuxChannelStatusMask computation */
  8593. channel_number = (((uint32_t)hdma->Instance & 0xFFU) - 8U) / 20U;
  8594. 800320c: 687b ldr r3, [r7, #4]
  8595. 800320e: 681b ldr r3, [r3, #0]
  8596. 8003210: 001a movs r2, r3
  8597. 8003212: 23ff movs r3, #255 @ 0xff
  8598. 8003214: 4013 ands r3, r2
  8599. 8003216: 3b08 subs r3, #8
  8600. 8003218: 2114 movs r1, #20
  8601. 800321a: 0018 movs r0, r3
  8602. 800321c: f7fc ff70 bl 8000100 <__udivsi3>
  8603. 8003220: 0003 movs r3, r0
  8604. 8003222: 60fb str r3, [r7, #12]
  8605. #endif /* DMA2 */
  8606. /* Initialize the field DMAmuxChannelStatus to DMAMUX1_ChannelStatus base */
  8607. hdma->DMAmuxChannelStatus = DMAMUX1_ChannelStatus;
  8608. 8003224: 687b ldr r3, [r7, #4]
  8609. 8003226: 4a07 ldr r2, [pc, #28] @ (8003244 <DMA_CalcDMAMUXChannelBaseAndMask+0x54>)
  8610. 8003228: 649a str r2, [r3, #72] @ 0x48
  8611. /* Initialize the field DMAmuxChannelStatusMask with the corresponding index of the DMAMUX channel selected for the current ChannelIndex */
  8612. hdma->DMAmuxChannelStatusMask = 1UL << (channel_number & 0x1FU);
  8613. 800322a: 68fb ldr r3, [r7, #12]
  8614. 800322c: 221f movs r2, #31
  8615. 800322e: 4013 ands r3, r2
  8616. 8003230: 2201 movs r2, #1
  8617. 8003232: 409a lsls r2, r3
  8618. 8003234: 687b ldr r3, [r7, #4]
  8619. 8003236: 64da str r2, [r3, #76] @ 0x4c
  8620. }
  8621. 8003238: 46c0 nop @ (mov r8, r8)
  8622. 800323a: 46bd mov sp, r7
  8623. 800323c: b004 add sp, #16
  8624. 800323e: bd80 pop {r7, pc}
  8625. 8003240: 10008200 .word 0x10008200
  8626. 8003244: 40020880 .word 0x40020880
  8627. 08003248 <DMA_CalcDMAMUXRequestGenBaseAndMask>:
  8628. * the configuration information for the specified DMA Channel.
  8629. * @retval None
  8630. */
  8631. static void DMA_CalcDMAMUXRequestGenBaseAndMask(DMA_HandleTypeDef *hdma)
  8632. {
  8633. 8003248: b580 push {r7, lr}
  8634. 800324a: b084 sub sp, #16
  8635. 800324c: af00 add r7, sp, #0
  8636. 800324e: 6078 str r0, [r7, #4]
  8637. uint32_t request = hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID;
  8638. 8003250: 687b ldr r3, [r7, #4]
  8639. 8003252: 685b ldr r3, [r3, #4]
  8640. 8003254: 223f movs r2, #63 @ 0x3f
  8641. 8003256: 4013 ands r3, r2
  8642. 8003258: 60fb str r3, [r7, #12]
  8643. /* DMA Channels are connected to DMAMUX1 request generator blocks*/
  8644. hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_RequestGenerator0) + ((request - 1U) * 4U)));
  8645. 800325a: 68fb ldr r3, [r7, #12]
  8646. 800325c: 4a0a ldr r2, [pc, #40] @ (8003288 <DMA_CalcDMAMUXRequestGenBaseAndMask+0x40>)
  8647. 800325e: 4694 mov ip, r2
  8648. 8003260: 4463 add r3, ip
  8649. 8003262: 009b lsls r3, r3, #2
  8650. 8003264: 001a movs r2, r3
  8651. 8003266: 687b ldr r3, [r7, #4]
  8652. 8003268: 651a str r2, [r3, #80] @ 0x50
  8653. hdma->DMAmuxRequestGenStatus = DMAMUX1_RequestGenStatus;
  8654. 800326a: 687b ldr r3, [r7, #4]
  8655. 800326c: 4a07 ldr r2, [pc, #28] @ (800328c <DMA_CalcDMAMUXRequestGenBaseAndMask+0x44>)
  8656. 800326e: 655a str r2, [r3, #84] @ 0x54
  8657. /* here "Request" is either DMA_REQUEST_GENERATOR0 to DMA_REQUEST_GENERATOR3, i.e. <= 4*/
  8658. hdma->DMAmuxRequestGenStatusMask = 1UL << ((request - 1U) & 0x3U);
  8659. 8003270: 68fb ldr r3, [r7, #12]
  8660. 8003272: 3b01 subs r3, #1
  8661. 8003274: 2203 movs r2, #3
  8662. 8003276: 4013 ands r3, r2
  8663. 8003278: 2201 movs r2, #1
  8664. 800327a: 409a lsls r2, r3
  8665. 800327c: 687b ldr r3, [r7, #4]
  8666. 800327e: 659a str r2, [r3, #88] @ 0x58
  8667. }
  8668. 8003280: 46c0 nop @ (mov r8, r8)
  8669. 8003282: 46bd mov sp, r7
  8670. 8003284: b004 add sp, #16
  8671. 8003286: bd80 pop {r7, pc}
  8672. 8003288: 1000823f .word 0x1000823f
  8673. 800328c: 40020940 .word 0x40020940
  8674. 08003290 <HAL_FLASH_Program>:
  8675. * TypeProgram = FLASH_TYPEPROGRAM_FAST (32-bit).
  8676. *
  8677. * @retval HAL_StatusTypeDef HAL Status
  8678. */
  8679. HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data)
  8680. {
  8681. 8003290: b5b0 push {r4, r5, r7, lr}
  8682. 8003292: b086 sub sp, #24
  8683. 8003294: af00 add r7, sp, #0
  8684. 8003296: 60f8 str r0, [r7, #12]
  8685. 8003298: 60b9 str r1, [r7, #8]
  8686. 800329a: 603a str r2, [r7, #0]
  8687. 800329c: 607b str r3, [r7, #4]
  8688. /* Check the parameters */
  8689. assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram));
  8690. /* Process Locked */
  8691. __HAL_LOCK(&pFlash);
  8692. 800329e: 4b21 ldr r3, [pc, #132] @ (8003324 <HAL_FLASH_Program+0x94>)
  8693. 80032a0: 781b ldrb r3, [r3, #0]
  8694. 80032a2: 2b01 cmp r3, #1
  8695. 80032a4: d101 bne.n 80032aa <HAL_FLASH_Program+0x1a>
  8696. 80032a6: 2302 movs r3, #2
  8697. 80032a8: e038 b.n 800331c <HAL_FLASH_Program+0x8c>
  8698. 80032aa: 4b1e ldr r3, [pc, #120] @ (8003324 <HAL_FLASH_Program+0x94>)
  8699. 80032ac: 2201 movs r2, #1
  8700. 80032ae: 701a strb r2, [r3, #0]
  8701. /* Reset error code */
  8702. pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;
  8703. 80032b0: 4b1c ldr r3, [pc, #112] @ (8003324 <HAL_FLASH_Program+0x94>)
  8704. 80032b2: 2200 movs r2, #0
  8705. 80032b4: 605a str r2, [r3, #4]
  8706. /* Wait for last operation to be completed */
  8707. status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
  8708. 80032b6: 2517 movs r5, #23
  8709. 80032b8: 197c adds r4, r7, r5
  8710. 80032ba: 23fa movs r3, #250 @ 0xfa
  8711. 80032bc: 009b lsls r3, r3, #2
  8712. 80032be: 0018 movs r0, r3
  8713. 80032c0: f000 f87a bl 80033b8 <FLASH_WaitForLastOperation>
  8714. 80032c4: 0003 movs r3, r0
  8715. 80032c6: 7023 strb r3, [r4, #0]
  8716. if (status == HAL_OK)
  8717. 80032c8: 197b adds r3, r7, r5
  8718. 80032ca: 781b ldrb r3, [r3, #0]
  8719. 80032cc: 2b00 cmp r3, #0
  8720. 80032ce: d11f bne.n 8003310 <HAL_FLASH_Program+0x80>
  8721. {
  8722. if (TypeProgram == FLASH_TYPEPROGRAM_DOUBLEWORD)
  8723. 80032d0: 68fb ldr r3, [r7, #12]
  8724. 80032d2: 2b01 cmp r3, #1
  8725. 80032d4: d106 bne.n 80032e4 <HAL_FLASH_Program+0x54>
  8726. {
  8727. /* Check the parameters */
  8728. assert_param(IS_FLASH_PROGRAM_ADDRESS(Address));
  8729. /* Program double-word (64-bit) at a specified address */
  8730. FLASH_Program_DoubleWord(Address, Data);
  8731. 80032d6: 683a ldr r2, [r7, #0]
  8732. 80032d8: 687b ldr r3, [r7, #4]
  8733. 80032da: 68b9 ldr r1, [r7, #8]
  8734. 80032dc: 0008 movs r0, r1
  8735. 80032de: f000 f8b9 bl 8003454 <FLASH_Program_DoubleWord>
  8736. 80032e2: e005 b.n 80032f0 <HAL_FLASH_Program+0x60>
  8737. {
  8738. /* Check the parameters */
  8739. assert_param(IS_FLASH_FAST_PROGRAM_ADDRESS(Address));
  8740. /* Fast program a 32 row double-word (64-bit) at a specified address */
  8741. FLASH_Program_Fast(Address, (uint32_t)Data);
  8742. 80032e4: 683a ldr r2, [r7, #0]
  8743. 80032e6: 68bb ldr r3, [r7, #8]
  8744. 80032e8: 0011 movs r1, r2
  8745. 80032ea: 0018 movs r0, r3
  8746. 80032ec: f002 feb0 bl 8006050 <__FLASH_Program_Fast_veneer>
  8747. }
  8748. /* Wait for last operation to be completed */
  8749. status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
  8750. 80032f0: 2317 movs r3, #23
  8751. 80032f2: 18fc adds r4, r7, r3
  8752. 80032f4: 23fa movs r3, #250 @ 0xfa
  8753. 80032f6: 009b lsls r3, r3, #2
  8754. 80032f8: 0018 movs r0, r3
  8755. 80032fa: f000 f85d bl 80033b8 <FLASH_WaitForLastOperation>
  8756. 80032fe: 0003 movs r3, r0
  8757. 8003300: 7023 strb r3, [r4, #0]
  8758. /* If the program operation is completed, disable the PG or FSTPG Bit */
  8759. CLEAR_BIT(FLASH->CR, TypeProgram);
  8760. 8003302: 4b09 ldr r3, [pc, #36] @ (8003328 <HAL_FLASH_Program+0x98>)
  8761. 8003304: 695a ldr r2, [r3, #20]
  8762. 8003306: 68fb ldr r3, [r7, #12]
  8763. 8003308: 43d9 mvns r1, r3
  8764. 800330a: 4b07 ldr r3, [pc, #28] @ (8003328 <HAL_FLASH_Program+0x98>)
  8765. 800330c: 400a ands r2, r1
  8766. 800330e: 615a str r2, [r3, #20]
  8767. }
  8768. /* Process Unlocked */
  8769. __HAL_UNLOCK(&pFlash);
  8770. 8003310: 4b04 ldr r3, [pc, #16] @ (8003324 <HAL_FLASH_Program+0x94>)
  8771. 8003312: 2200 movs r2, #0
  8772. 8003314: 701a strb r2, [r3, #0]
  8773. /* return status */
  8774. return status;
  8775. 8003316: 2317 movs r3, #23
  8776. 8003318: 18fb adds r3, r7, r3
  8777. 800331a: 781b ldrb r3, [r3, #0]
  8778. }
  8779. 800331c: 0018 movs r0, r3
  8780. 800331e: 46bd mov sp, r7
  8781. 8003320: b006 add sp, #24
  8782. 8003322: bdb0 pop {r4, r5, r7, pc}
  8783. 8003324: 20000514 .word 0x20000514
  8784. 8003328: 40022000 .word 0x40022000
  8785. 0800332c <HAL_FLASH_Unlock>:
  8786. /**
  8787. * @brief Unlock the FLASH control register access.
  8788. * @retval HAL Status
  8789. */
  8790. HAL_StatusTypeDef HAL_FLASH_Unlock(void)
  8791. {
  8792. 800332c: b580 push {r7, lr}
  8793. 800332e: b082 sub sp, #8
  8794. 8003330: af00 add r7, sp, #0
  8795. HAL_StatusTypeDef status = HAL_OK;
  8796. 8003332: 1dfb adds r3, r7, #7
  8797. 8003334: 2200 movs r2, #0
  8798. 8003336: 701a strb r2, [r3, #0]
  8799. if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0x00U)
  8800. 8003338: 4b0b ldr r3, [pc, #44] @ (8003368 <HAL_FLASH_Unlock+0x3c>)
  8801. 800333a: 695b ldr r3, [r3, #20]
  8802. 800333c: 2b00 cmp r3, #0
  8803. 800333e: da0c bge.n 800335a <HAL_FLASH_Unlock+0x2e>
  8804. {
  8805. /* Authorize the FLASH Registers access */
  8806. WRITE_REG(FLASH->KEYR, FLASH_KEY1);
  8807. 8003340: 4b09 ldr r3, [pc, #36] @ (8003368 <HAL_FLASH_Unlock+0x3c>)
  8808. 8003342: 4a0a ldr r2, [pc, #40] @ (800336c <HAL_FLASH_Unlock+0x40>)
  8809. 8003344: 609a str r2, [r3, #8]
  8810. WRITE_REG(FLASH->KEYR, FLASH_KEY2);
  8811. 8003346: 4b08 ldr r3, [pc, #32] @ (8003368 <HAL_FLASH_Unlock+0x3c>)
  8812. 8003348: 4a09 ldr r2, [pc, #36] @ (8003370 <HAL_FLASH_Unlock+0x44>)
  8813. 800334a: 609a str r2, [r3, #8]
  8814. /* verify Flash is unlock */
  8815. if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0x00U)
  8816. 800334c: 4b06 ldr r3, [pc, #24] @ (8003368 <HAL_FLASH_Unlock+0x3c>)
  8817. 800334e: 695b ldr r3, [r3, #20]
  8818. 8003350: 2b00 cmp r3, #0
  8819. 8003352: da02 bge.n 800335a <HAL_FLASH_Unlock+0x2e>
  8820. {
  8821. status = HAL_ERROR;
  8822. 8003354: 1dfb adds r3, r7, #7
  8823. 8003356: 2201 movs r2, #1
  8824. 8003358: 701a strb r2, [r3, #0]
  8825. }
  8826. }
  8827. return status;
  8828. 800335a: 1dfb adds r3, r7, #7
  8829. 800335c: 781b ldrb r3, [r3, #0]
  8830. }
  8831. 800335e: 0018 movs r0, r3
  8832. 8003360: 46bd mov sp, r7
  8833. 8003362: b002 add sp, #8
  8834. 8003364: bd80 pop {r7, pc}
  8835. 8003366: 46c0 nop @ (mov r8, r8)
  8836. 8003368: 40022000 .word 0x40022000
  8837. 800336c: 45670123 .word 0x45670123
  8838. 8003370: cdef89ab .word 0xcdef89ab
  8839. 08003374 <HAL_FLASH_Lock>:
  8840. /**
  8841. * @brief Lock the FLASH control register access.
  8842. * @retval HAL Status
  8843. */
  8844. HAL_StatusTypeDef HAL_FLASH_Lock(void)
  8845. {
  8846. 8003374: b580 push {r7, lr}
  8847. 8003376: b082 sub sp, #8
  8848. 8003378: af00 add r7, sp, #0
  8849. HAL_StatusTypeDef status = HAL_ERROR;
  8850. 800337a: 1dfb adds r3, r7, #7
  8851. 800337c: 2201 movs r2, #1
  8852. 800337e: 701a strb r2, [r3, #0]
  8853. /* Wait for last operation to be completed */
  8854. (void)FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
  8855. 8003380: 23fa movs r3, #250 @ 0xfa
  8856. 8003382: 009b lsls r3, r3, #2
  8857. 8003384: 0018 movs r0, r3
  8858. 8003386: f000 f817 bl 80033b8 <FLASH_WaitForLastOperation>
  8859. /* Set the LOCK Bit to lock the FLASH Registers access */
  8860. SET_BIT(FLASH->CR, FLASH_CR_LOCK);
  8861. 800338a: 4b0a ldr r3, [pc, #40] @ (80033b4 <HAL_FLASH_Lock+0x40>)
  8862. 800338c: 695a ldr r2, [r3, #20]
  8863. 800338e: 4b09 ldr r3, [pc, #36] @ (80033b4 <HAL_FLASH_Lock+0x40>)
  8864. 8003390: 2180 movs r1, #128 @ 0x80
  8865. 8003392: 0609 lsls r1, r1, #24
  8866. 8003394: 430a orrs r2, r1
  8867. 8003396: 615a str r2, [r3, #20]
  8868. /* verify Flash is locked */
  8869. if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0x00u)
  8870. 8003398: 4b06 ldr r3, [pc, #24] @ (80033b4 <HAL_FLASH_Lock+0x40>)
  8871. 800339a: 695b ldr r3, [r3, #20]
  8872. 800339c: 2b00 cmp r3, #0
  8873. 800339e: da02 bge.n 80033a6 <HAL_FLASH_Lock+0x32>
  8874. {
  8875. status = HAL_OK;
  8876. 80033a0: 1dfb adds r3, r7, #7
  8877. 80033a2: 2200 movs r2, #0
  8878. 80033a4: 701a strb r2, [r3, #0]
  8879. }
  8880. return status;
  8881. 80033a6: 1dfb adds r3, r7, #7
  8882. 80033a8: 781b ldrb r3, [r3, #0]
  8883. }
  8884. 80033aa: 0018 movs r0, r3
  8885. 80033ac: 46bd mov sp, r7
  8886. 80033ae: b002 add sp, #8
  8887. 80033b0: bd80 pop {r7, pc}
  8888. 80033b2: 46c0 nop @ (mov r8, r8)
  8889. 80033b4: 40022000 .word 0x40022000
  8890. 080033b8 <FLASH_WaitForLastOperation>:
  8891. * @brief Wait for a FLASH operation to complete.
  8892. * @param Timeout maximum flash operation timeout
  8893. * @retval HAL_StatusTypeDef HAL Status
  8894. */
  8895. HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout)
  8896. {
  8897. 80033b8: b580 push {r7, lr}
  8898. 80033ba: b084 sub sp, #16
  8899. 80033bc: af00 add r7, sp, #0
  8900. 80033be: 6078 str r0, [r7, #4]
  8901. uint32_t error;
  8902. uint32_t tickstart = HAL_GetTick();
  8903. 80033c0: f7fe fa52 bl 8001868 <HAL_GetTick>
  8904. 80033c4: 0003 movs r3, r0
  8905. 80033c6: 60fb str r3, [r7, #12]
  8906. flag will be set */
  8907. #if defined(FLASH_DBANK_SUPPORT)
  8908. error = (FLASH_SR_BSY1 | FLASH_SR_BSY2);
  8909. #else
  8910. error = FLASH_SR_BSY1;
  8911. 80033c8: 2380 movs r3, #128 @ 0x80
  8912. 80033ca: 025b lsls r3, r3, #9
  8913. 80033cc: 60bb str r3, [r7, #8]
  8914. #endif /* FLASH_DBANK_SUPPORT */
  8915. while ((FLASH->SR & error) != 0x00U)
  8916. 80033ce: e00c b.n 80033ea <FLASH_WaitForLastOperation+0x32>
  8917. {
  8918. if(Timeout != HAL_MAX_DELAY)
  8919. 80033d0: 687b ldr r3, [r7, #4]
  8920. 80033d2: 3301 adds r3, #1
  8921. 80033d4: d009 beq.n 80033ea <FLASH_WaitForLastOperation+0x32>
  8922. {
  8923. if ((HAL_GetTick() - tickstart) >= Timeout)
  8924. 80033d6: f7fe fa47 bl 8001868 <HAL_GetTick>
  8925. 80033da: 0002 movs r2, r0
  8926. 80033dc: 68fb ldr r3, [r7, #12]
  8927. 80033de: 1ad3 subs r3, r2, r3
  8928. 80033e0: 687a ldr r2, [r7, #4]
  8929. 80033e2: 429a cmp r2, r3
  8930. 80033e4: d801 bhi.n 80033ea <FLASH_WaitForLastOperation+0x32>
  8931. {
  8932. return HAL_TIMEOUT;
  8933. 80033e6: 2303 movs r3, #3
  8934. 80033e8: e028 b.n 800343c <FLASH_WaitForLastOperation+0x84>
  8935. while ((FLASH->SR & error) != 0x00U)
  8936. 80033ea: 4b16 ldr r3, [pc, #88] @ (8003444 <FLASH_WaitForLastOperation+0x8c>)
  8937. 80033ec: 691b ldr r3, [r3, #16]
  8938. 80033ee: 68ba ldr r2, [r7, #8]
  8939. 80033f0: 4013 ands r3, r2
  8940. 80033f2: d1ed bne.n 80033d0 <FLASH_WaitForLastOperation+0x18>
  8941. }
  8942. }
  8943. }
  8944. /* check flash errors */
  8945. error = (FLASH->SR & FLASH_SR_ERRORS);
  8946. 80033f4: 4b13 ldr r3, [pc, #76] @ (8003444 <FLASH_WaitForLastOperation+0x8c>)
  8947. 80033f6: 691b ldr r3, [r3, #16]
  8948. 80033f8: 4a13 ldr r2, [pc, #76] @ (8003448 <FLASH_WaitForLastOperation+0x90>)
  8949. 80033fa: 4013 ands r3, r2
  8950. 80033fc: 60bb str r3, [r7, #8]
  8951. /* Clear SR register */
  8952. FLASH->SR = FLASH_SR_CLEAR;
  8953. 80033fe: 4b11 ldr r3, [pc, #68] @ (8003444 <FLASH_WaitForLastOperation+0x8c>)
  8954. 8003400: 4a12 ldr r2, [pc, #72] @ (800344c <FLASH_WaitForLastOperation+0x94>)
  8955. 8003402: 611a str r2, [r3, #16]
  8956. if (error != 0x00U)
  8957. 8003404: 68bb ldr r3, [r7, #8]
  8958. 8003406: 2b00 cmp r3, #0
  8959. 8003408: d011 beq.n 800342e <FLASH_WaitForLastOperation+0x76>
  8960. {
  8961. /*Save the error code*/
  8962. pFlash.ErrorCode = error;
  8963. 800340a: 4b11 ldr r3, [pc, #68] @ (8003450 <FLASH_WaitForLastOperation+0x98>)
  8964. 800340c: 68ba ldr r2, [r7, #8]
  8965. 800340e: 605a str r2, [r3, #4]
  8966. return HAL_ERROR;
  8967. 8003410: 2301 movs r3, #1
  8968. 8003412: e013 b.n 800343c <FLASH_WaitForLastOperation+0x84>
  8969. }
  8970. /* Wait for control register to be written */
  8971. while ((FLASH->SR & FLASH_SR_CFGBSY) != 0x00U)
  8972. {
  8973. if(Timeout != HAL_MAX_DELAY)
  8974. 8003414: 687b ldr r3, [r7, #4]
  8975. 8003416: 3301 adds r3, #1
  8976. 8003418: d009 beq.n 800342e <FLASH_WaitForLastOperation+0x76>
  8977. {
  8978. if ((HAL_GetTick() - tickstart) >= Timeout)
  8979. 800341a: f7fe fa25 bl 8001868 <HAL_GetTick>
  8980. 800341e: 0002 movs r2, r0
  8981. 8003420: 68fb ldr r3, [r7, #12]
  8982. 8003422: 1ad3 subs r3, r2, r3
  8983. 8003424: 687a ldr r2, [r7, #4]
  8984. 8003426: 429a cmp r2, r3
  8985. 8003428: d801 bhi.n 800342e <FLASH_WaitForLastOperation+0x76>
  8986. {
  8987. return HAL_TIMEOUT;
  8988. 800342a: 2303 movs r3, #3
  8989. 800342c: e006 b.n 800343c <FLASH_WaitForLastOperation+0x84>
  8990. while ((FLASH->SR & FLASH_SR_CFGBSY) != 0x00U)
  8991. 800342e: 4b05 ldr r3, [pc, #20] @ (8003444 <FLASH_WaitForLastOperation+0x8c>)
  8992. 8003430: 691a ldr r2, [r3, #16]
  8993. 8003432: 2380 movs r3, #128 @ 0x80
  8994. 8003434: 02db lsls r3, r3, #11
  8995. 8003436: 4013 ands r3, r2
  8996. 8003438: d1ec bne.n 8003414 <FLASH_WaitForLastOperation+0x5c>
  8997. }
  8998. }
  8999. }
  9000. return HAL_OK;
  9001. 800343a: 2300 movs r3, #0
  9002. }
  9003. 800343c: 0018 movs r0, r3
  9004. 800343e: 46bd mov sp, r7
  9005. 8003440: b004 add sp, #16
  9006. 8003442: bd80 pop {r7, pc}
  9007. 8003444: 40022000 .word 0x40022000
  9008. 8003448: 000083fa .word 0x000083fa
  9009. 800344c: 000083fb .word 0x000083fb
  9010. 8003450: 20000514 .word 0x20000514
  9011. 08003454 <FLASH_Program_DoubleWord>:
  9012. * @param Address Specifies the address to be programmed.
  9013. * @param Data Specifies the data to be programmed.
  9014. * @retval None
  9015. */
  9016. static void FLASH_Program_DoubleWord(uint32_t Address, uint64_t Data)
  9017. {
  9018. 8003454: b5b0 push {r4, r5, r7, lr}
  9019. 8003456: b084 sub sp, #16
  9020. 8003458: af00 add r7, sp, #0
  9021. 800345a: 60f8 str r0, [r7, #12]
  9022. 800345c: 603a str r2, [r7, #0]
  9023. 800345e: 607b str r3, [r7, #4]
  9024. /* Set PG bit */
  9025. SET_BIT(FLASH->CR, FLASH_CR_PG);
  9026. 8003460: 4b0b ldr r3, [pc, #44] @ (8003490 <FLASH_Program_DoubleWord+0x3c>)
  9027. 8003462: 695a ldr r2, [r3, #20]
  9028. 8003464: 4b0a ldr r3, [pc, #40] @ (8003490 <FLASH_Program_DoubleWord+0x3c>)
  9029. 8003466: 2101 movs r1, #1
  9030. 8003468: 430a orrs r2, r1
  9031. 800346a: 615a str r2, [r3, #20]
  9032. /* Program first word */
  9033. *(uint32_t *)Address = (uint32_t)Data;
  9034. 800346c: 68fb ldr r3, [r7, #12]
  9035. 800346e: 683a ldr r2, [r7, #0]
  9036. 8003470: 601a str r2, [r3, #0]
  9037. so that all instructions following the ISB are fetched from cache or memory,
  9038. after the instruction has been completed.
  9039. */
  9040. __STATIC_FORCEINLINE void __ISB(void)
  9041. {
  9042. __ASM volatile ("isb 0xF":::"memory");
  9043. 8003472: f3bf 8f6f isb sy
  9044. }
  9045. 8003476: 46c0 nop @ (mov r8, r8)
  9046. /* Barrier to ensure programming is performed in 2 steps, in right order
  9047. (independently of compiler optimization behavior) */
  9048. __ISB();
  9049. /* Program second word */
  9050. *(uint32_t *)(Address + 4U) = (uint32_t)(Data >> 32U);
  9051. 8003478: 687b ldr r3, [r7, #4]
  9052. 800347a: 001c movs r4, r3
  9053. 800347c: 2300 movs r3, #0
  9054. 800347e: 001d movs r5, r3
  9055. 8003480: 68fb ldr r3, [r7, #12]
  9056. 8003482: 3304 adds r3, #4
  9057. 8003484: 0022 movs r2, r4
  9058. 8003486: 601a str r2, [r3, #0]
  9059. }
  9060. 8003488: 46c0 nop @ (mov r8, r8)
  9061. 800348a: 46bd mov sp, r7
  9062. 800348c: b004 add sp, #16
  9063. 800348e: bdb0 pop {r4, r5, r7, pc}
  9064. 8003490: 40022000 .word 0x40022000
  9065. 08003494 <HAL_FLASHEx_Erase>:
  9066. * information on faulty page in case of error (0xFFFFFFFF means that all
  9067. * the pages have been correctly erased)
  9068. * @retval HAL Status
  9069. */
  9070. HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError)
  9071. {
  9072. 8003494: b5b0 push {r4, r5, r7, lr}
  9073. 8003496: b084 sub sp, #16
  9074. 8003498: af00 add r7, sp, #0
  9075. 800349a: 6078 str r0, [r7, #4]
  9076. 800349c: 6039 str r1, [r7, #0]
  9077. /* Check the parameters */
  9078. assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
  9079. /* Process Locked */
  9080. __HAL_LOCK(&pFlash);
  9081. 800349e: 4b35 ldr r3, [pc, #212] @ (8003574 <HAL_FLASHEx_Erase+0xe0>)
  9082. 80034a0: 781b ldrb r3, [r3, #0]
  9083. 80034a2: 2b01 cmp r3, #1
  9084. 80034a4: d101 bne.n 80034aa <HAL_FLASHEx_Erase+0x16>
  9085. 80034a6: 2302 movs r3, #2
  9086. 80034a8: e05f b.n 800356a <HAL_FLASHEx_Erase+0xd6>
  9087. 80034aa: 4b32 ldr r3, [pc, #200] @ (8003574 <HAL_FLASHEx_Erase+0xe0>)
  9088. 80034ac: 2201 movs r2, #1
  9089. 80034ae: 701a strb r2, [r3, #0]
  9090. /* Reset error code */
  9091. pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;
  9092. 80034b0: 4b30 ldr r3, [pc, #192] @ (8003574 <HAL_FLASHEx_Erase+0xe0>)
  9093. 80034b2: 2200 movs r2, #0
  9094. 80034b4: 605a str r2, [r3, #4]
  9095. /* Wait for last operation to be completed */
  9096. status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
  9097. 80034b6: 250f movs r5, #15
  9098. 80034b8: 197c adds r4, r7, r5
  9099. 80034ba: 23fa movs r3, #250 @ 0xfa
  9100. 80034bc: 009b lsls r3, r3, #2
  9101. 80034be: 0018 movs r0, r3
  9102. 80034c0: f7ff ff7a bl 80033b8 <FLASH_WaitForLastOperation>
  9103. 80034c4: 0003 movs r3, r0
  9104. 80034c6: 7023 strb r3, [r4, #0]
  9105. if (status == HAL_OK)
  9106. 80034c8: 002c movs r4, r5
  9107. 80034ca: 193b adds r3, r7, r4
  9108. 80034cc: 781b ldrb r3, [r3, #0]
  9109. 80034ce: 2b00 cmp r3, #0
  9110. 80034d0: d145 bne.n 800355e <HAL_FLASHEx_Erase+0xca>
  9111. {
  9112. #if !defined(FLASH_DBANK_SUPPORT)
  9113. /* For single bank product force Banks to Bank 1 */
  9114. pEraseInit->Banks = FLASH_BANK_1;
  9115. 80034d2: 687b ldr r3, [r7, #4]
  9116. 80034d4: 2204 movs r2, #4
  9117. 80034d6: 605a str r2, [r3, #4]
  9118. #endif /* FLASH_DBANK_SUPPORT */
  9119. if (pEraseInit->TypeErase == FLASH_TYPEERASE_MASS)
  9120. 80034d8: 687b ldr r3, [r7, #4]
  9121. 80034da: 681b ldr r3, [r3, #0]
  9122. 80034dc: 2b04 cmp r3, #4
  9123. 80034de: d10d bne.n 80034fc <HAL_FLASHEx_Erase+0x68>
  9124. {
  9125. /* Proceed to Mass Erase */
  9126. FLASH_MassErase(pEraseInit->Banks);
  9127. 80034e0: 687b ldr r3, [r7, #4]
  9128. 80034e2: 685b ldr r3, [r3, #4]
  9129. 80034e4: 0018 movs r0, r3
  9130. 80034e6: f000 f849 bl 800357c <FLASH_MassErase>
  9131. /* Wait for last operation to be completed */
  9132. status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
  9133. 80034ea: 193c adds r4, r7, r4
  9134. 80034ec: 23fa movs r3, #250 @ 0xfa
  9135. 80034ee: 009b lsls r3, r3, #2
  9136. 80034f0: 0018 movs r0, r3
  9137. 80034f2: f7ff ff61 bl 80033b8 <FLASH_WaitForLastOperation>
  9138. 80034f6: 0003 movs r3, r0
  9139. 80034f8: 7023 strb r3, [r4, #0]
  9140. 80034fa: e030 b.n 800355e <HAL_FLASHEx_Erase+0xca>
  9141. }
  9142. else
  9143. {
  9144. /*Initialization of PageError variable*/
  9145. *PageError = 0xFFFFFFFFU;
  9146. 80034fc: 683b ldr r3, [r7, #0]
  9147. 80034fe: 2201 movs r2, #1
  9148. 8003500: 4252 negs r2, r2
  9149. 8003502: 601a str r2, [r3, #0]
  9150. for (index = pEraseInit->Page; index < (pEraseInit->Page + pEraseInit->NbPages); index++)
  9151. 8003504: 687b ldr r3, [r7, #4]
  9152. 8003506: 689b ldr r3, [r3, #8]
  9153. 8003508: 60bb str r3, [r7, #8]
  9154. 800350a: e01a b.n 8003542 <HAL_FLASHEx_Erase+0xae>
  9155. {
  9156. /* Start erase page */
  9157. FLASH_PageErase(pEraseInit->Banks, index);
  9158. 800350c: 687b ldr r3, [r7, #4]
  9159. 800350e: 685b ldr r3, [r3, #4]
  9160. 8003510: 68ba ldr r2, [r7, #8]
  9161. 8003512: 0011 movs r1, r2
  9162. 8003514: 0018 movs r0, r3
  9163. 8003516: f000 f845 bl 80035a4 <FLASH_PageErase>
  9164. /* Wait for last operation to be completed */
  9165. status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
  9166. 800351a: 250f movs r5, #15
  9167. 800351c: 197c adds r4, r7, r5
  9168. 800351e: 23fa movs r3, #250 @ 0xfa
  9169. 8003520: 009b lsls r3, r3, #2
  9170. 8003522: 0018 movs r0, r3
  9171. 8003524: f7ff ff48 bl 80033b8 <FLASH_WaitForLastOperation>
  9172. 8003528: 0003 movs r3, r0
  9173. 800352a: 7023 strb r3, [r4, #0]
  9174. if (status != HAL_OK)
  9175. 800352c: 197b adds r3, r7, r5
  9176. 800352e: 781b ldrb r3, [r3, #0]
  9177. 8003530: 2b00 cmp r3, #0
  9178. 8003532: d003 beq.n 800353c <HAL_FLASHEx_Erase+0xa8>
  9179. {
  9180. /* In case of error, stop erase procedure and return the faulty address */
  9181. *PageError = index;
  9182. 8003534: 683b ldr r3, [r7, #0]
  9183. 8003536: 68ba ldr r2, [r7, #8]
  9184. 8003538: 601a str r2, [r3, #0]
  9185. break;
  9186. 800353a: e00a b.n 8003552 <HAL_FLASHEx_Erase+0xbe>
  9187. for (index = pEraseInit->Page; index < (pEraseInit->Page + pEraseInit->NbPages); index++)
  9188. 800353c: 68bb ldr r3, [r7, #8]
  9189. 800353e: 3301 adds r3, #1
  9190. 8003540: 60bb str r3, [r7, #8]
  9191. 8003542: 687b ldr r3, [r7, #4]
  9192. 8003544: 689a ldr r2, [r3, #8]
  9193. 8003546: 687b ldr r3, [r7, #4]
  9194. 8003548: 68db ldr r3, [r3, #12]
  9195. 800354a: 18d3 adds r3, r2, r3
  9196. 800354c: 68ba ldr r2, [r7, #8]
  9197. 800354e: 429a cmp r2, r3
  9198. 8003550: d3dc bcc.n 800350c <HAL_FLASHEx_Erase+0x78>
  9199. }
  9200. }
  9201. /* If operation is completed or interrupted, disable the Page Erase Bit */
  9202. CLEAR_BIT(FLASH->CR, FLASH_CR_PER);
  9203. 8003552: 4b09 ldr r3, [pc, #36] @ (8003578 <HAL_FLASHEx_Erase+0xe4>)
  9204. 8003554: 695a ldr r2, [r3, #20]
  9205. 8003556: 4b08 ldr r3, [pc, #32] @ (8003578 <HAL_FLASHEx_Erase+0xe4>)
  9206. 8003558: 2102 movs r1, #2
  9207. 800355a: 438a bics r2, r1
  9208. 800355c: 615a str r2, [r3, #20]
  9209. }
  9210. }
  9211. /* Process Unlocked */
  9212. __HAL_UNLOCK(&pFlash);
  9213. 800355e: 4b05 ldr r3, [pc, #20] @ (8003574 <HAL_FLASHEx_Erase+0xe0>)
  9214. 8003560: 2200 movs r2, #0
  9215. 8003562: 701a strb r2, [r3, #0]
  9216. /* return status */
  9217. return status;
  9218. 8003564: 230f movs r3, #15
  9219. 8003566: 18fb adds r3, r7, r3
  9220. 8003568: 781b ldrb r3, [r3, #0]
  9221. }
  9222. 800356a: 0018 movs r0, r3
  9223. 800356c: 46bd mov sp, r7
  9224. 800356e: b004 add sp, #16
  9225. 8003570: bdb0 pop {r4, r5, r7, pc}
  9226. 8003572: 46c0 nop @ (mov r8, r8)
  9227. 8003574: 20000514 .word 0x20000514
  9228. 8003578: 40022000 .word 0x40022000
  9229. 0800357c <FLASH_MassErase>:
  9230. * @arg FLASH_BANK_2: Bank2 to be erased*
  9231. * @note (*) availability depends on devices
  9232. * @retval None
  9233. */
  9234. static void FLASH_MassErase(uint32_t Banks)
  9235. {
  9236. 800357c: b580 push {r7, lr}
  9237. 800357e: b082 sub sp, #8
  9238. 8003580: af00 add r7, sp, #0
  9239. 8003582: 6078 str r0, [r7, #4]
  9240. /* Check the parameters */
  9241. assert_param(IS_FLASH_BANK(Banks));
  9242. /* Set the Mass Erase Bit and start bit */
  9243. FLASH->CR |= (FLASH_CR_STRT | Banks);
  9244. 8003584: 4b06 ldr r3, [pc, #24] @ (80035a0 <FLASH_MassErase+0x24>)
  9245. 8003586: 695a ldr r2, [r3, #20]
  9246. 8003588: 687b ldr r3, [r7, #4]
  9247. 800358a: 431a orrs r2, r3
  9248. 800358c: 4b04 ldr r3, [pc, #16] @ (80035a0 <FLASH_MassErase+0x24>)
  9249. 800358e: 2180 movs r1, #128 @ 0x80
  9250. 8003590: 0249 lsls r1, r1, #9
  9251. 8003592: 430a orrs r2, r1
  9252. 8003594: 615a str r2, [r3, #20]
  9253. }
  9254. 8003596: 46c0 nop @ (mov r8, r8)
  9255. 8003598: 46bd mov sp, r7
  9256. 800359a: b002 add sp, #8
  9257. 800359c: bd80 pop {r7, pc}
  9258. 800359e: 46c0 nop @ (mov r8, r8)
  9259. 80035a0: 40022000 .word 0x40022000
  9260. 080035a4 <FLASH_PageErase>:
  9261. * This parameter must be a value between 0 and (max number of pages in Flash - 1)
  9262. * @note (*) availability depends on devices
  9263. * @retval None
  9264. */
  9265. void FLASH_PageErase(uint32_t Banks, uint32_t Page)
  9266. {
  9267. 80035a4: b580 push {r7, lr}
  9268. 80035a6: b084 sub sp, #16
  9269. 80035a8: af00 add r7, sp, #0
  9270. 80035aa: 6078 str r0, [r7, #4]
  9271. 80035ac: 6039 str r1, [r7, #0]
  9272. /* Check the parameters */
  9273. assert_param(IS_FLASH_BANK(Banks));
  9274. assert_param(IS_FLASH_PAGE(Page));
  9275. /* Get configuration register, then clear page number */
  9276. tmp = (FLASH->CR & ~FLASH_CR_PNB);
  9277. 80035ae: 4b08 ldr r3, [pc, #32] @ (80035d0 <FLASH_PageErase+0x2c>)
  9278. 80035b0: 695b ldr r3, [r3, #20]
  9279. 80035b2: 4a08 ldr r2, [pc, #32] @ (80035d4 <FLASH_PageErase+0x30>)
  9280. 80035b4: 4013 ands r3, r2
  9281. 80035b6: 60fb str r3, [r7, #12]
  9282. /* Prevent unused argument(s) compilation warning */
  9283. UNUSED(Banks);
  9284. #endif /* FLASH_DBANK_SUPPORT */
  9285. /* Set page number, Page Erase bit & Start bit */
  9286. FLASH->CR = (tmp | (FLASH_CR_STRT | (Page << FLASH_CR_PNB_Pos) | FLASH_CR_PER));
  9287. 80035b8: 683b ldr r3, [r7, #0]
  9288. 80035ba: 00da lsls r2, r3, #3
  9289. 80035bc: 68fb ldr r3, [r7, #12]
  9290. 80035be: 431a orrs r2, r3
  9291. 80035c0: 4b03 ldr r3, [pc, #12] @ (80035d0 <FLASH_PageErase+0x2c>)
  9292. 80035c2: 4905 ldr r1, [pc, #20] @ (80035d8 <FLASH_PageErase+0x34>)
  9293. 80035c4: 430a orrs r2, r1
  9294. 80035c6: 615a str r2, [r3, #20]
  9295. }
  9296. 80035c8: 46c0 nop @ (mov r8, r8)
  9297. 80035ca: 46bd mov sp, r7
  9298. 80035cc: b004 add sp, #16
  9299. 80035ce: bd80 pop {r7, pc}
  9300. 80035d0: 40022000 .word 0x40022000
  9301. 80035d4: ffffe007 .word 0xffffe007
  9302. 80035d8: 00010002 .word 0x00010002
  9303. 080035dc <HAL_GPIO_Init>:
  9304. * @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
  9305. * the configuration information for the specified GPIO peripheral.
  9306. * @retval None
  9307. */
  9308. void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
  9309. {
  9310. 80035dc: b580 push {r7, lr}
  9311. 80035de: b086 sub sp, #24
  9312. 80035e0: af00 add r7, sp, #0
  9313. 80035e2: 6078 str r0, [r7, #4]
  9314. 80035e4: 6039 str r1, [r7, #0]
  9315. uint32_t position = 0x00u;
  9316. 80035e6: 2300 movs r3, #0
  9317. 80035e8: 617b str r3, [r7, #20]
  9318. assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
  9319. assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
  9320. assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
  9321. /* Configure the port pins */
  9322. while (((GPIO_Init->Pin) >> position) != 0x00u)
  9323. 80035ea: e147 b.n 800387c <HAL_GPIO_Init+0x2a0>
  9324. {
  9325. /* Get current io position */
  9326. iocurrent = (GPIO_Init->Pin) & (1uL << position);
  9327. 80035ec: 683b ldr r3, [r7, #0]
  9328. 80035ee: 681b ldr r3, [r3, #0]
  9329. 80035f0: 2101 movs r1, #1
  9330. 80035f2: 697a ldr r2, [r7, #20]
  9331. 80035f4: 4091 lsls r1, r2
  9332. 80035f6: 000a movs r2, r1
  9333. 80035f8: 4013 ands r3, r2
  9334. 80035fa: 60fb str r3, [r7, #12]
  9335. if (iocurrent != 0x00u)
  9336. 80035fc: 68fb ldr r3, [r7, #12]
  9337. 80035fe: 2b00 cmp r3, #0
  9338. 8003600: d100 bne.n 8003604 <HAL_GPIO_Init+0x28>
  9339. 8003602: e138 b.n 8003876 <HAL_GPIO_Init+0x29a>
  9340. {
  9341. /*--------------------- GPIO Mode Configuration ------------------------*/
  9342. /* In case of Output or Alternate function mode selection */
  9343. if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF))
  9344. 8003604: 683b ldr r3, [r7, #0]
  9345. 8003606: 685b ldr r3, [r3, #4]
  9346. 8003608: 2203 movs r2, #3
  9347. 800360a: 4013 ands r3, r2
  9348. 800360c: 2b01 cmp r3, #1
  9349. 800360e: d005 beq.n 800361c <HAL_GPIO_Init+0x40>
  9350. 8003610: 683b ldr r3, [r7, #0]
  9351. 8003612: 685b ldr r3, [r3, #4]
  9352. 8003614: 2203 movs r2, #3
  9353. 8003616: 4013 ands r3, r2
  9354. 8003618: 2b02 cmp r3, #2
  9355. 800361a: d130 bne.n 800367e <HAL_GPIO_Init+0xa2>
  9356. {
  9357. /* Check the Speed parameter */
  9358. assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
  9359. /* Configure the IO Speed */
  9360. temp = GPIOx->OSPEEDR;
  9361. 800361c: 687b ldr r3, [r7, #4]
  9362. 800361e: 689b ldr r3, [r3, #8]
  9363. 8003620: 613b str r3, [r7, #16]
  9364. temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u));
  9365. 8003622: 697b ldr r3, [r7, #20]
  9366. 8003624: 005b lsls r3, r3, #1
  9367. 8003626: 2203 movs r2, #3
  9368. 8003628: 409a lsls r2, r3
  9369. 800362a: 0013 movs r3, r2
  9370. 800362c: 43da mvns r2, r3
  9371. 800362e: 693b ldr r3, [r7, #16]
  9372. 8003630: 4013 ands r3, r2
  9373. 8003632: 613b str r3, [r7, #16]
  9374. temp |= (GPIO_Init->Speed << (position * 2u));
  9375. 8003634: 683b ldr r3, [r7, #0]
  9376. 8003636: 68da ldr r2, [r3, #12]
  9377. 8003638: 697b ldr r3, [r7, #20]
  9378. 800363a: 005b lsls r3, r3, #1
  9379. 800363c: 409a lsls r2, r3
  9380. 800363e: 0013 movs r3, r2
  9381. 8003640: 693a ldr r2, [r7, #16]
  9382. 8003642: 4313 orrs r3, r2
  9383. 8003644: 613b str r3, [r7, #16]
  9384. GPIOx->OSPEEDR = temp;
  9385. 8003646: 687b ldr r3, [r7, #4]
  9386. 8003648: 693a ldr r2, [r7, #16]
  9387. 800364a: 609a str r2, [r3, #8]
  9388. /* Configure the IO Output Type */
  9389. temp = GPIOx->OTYPER;
  9390. 800364c: 687b ldr r3, [r7, #4]
  9391. 800364e: 685b ldr r3, [r3, #4]
  9392. 8003650: 613b str r3, [r7, #16]
  9393. temp &= ~(GPIO_OTYPER_OT0 << position) ;
  9394. 8003652: 2201 movs r2, #1
  9395. 8003654: 697b ldr r3, [r7, #20]
  9396. 8003656: 409a lsls r2, r3
  9397. 8003658: 0013 movs r3, r2
  9398. 800365a: 43da mvns r2, r3
  9399. 800365c: 693b ldr r3, [r7, #16]
  9400. 800365e: 4013 ands r3, r2
  9401. 8003660: 613b str r3, [r7, #16]
  9402. temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
  9403. 8003662: 683b ldr r3, [r7, #0]
  9404. 8003664: 685b ldr r3, [r3, #4]
  9405. 8003666: 091b lsrs r3, r3, #4
  9406. 8003668: 2201 movs r2, #1
  9407. 800366a: 401a ands r2, r3
  9408. 800366c: 697b ldr r3, [r7, #20]
  9409. 800366e: 409a lsls r2, r3
  9410. 8003670: 0013 movs r3, r2
  9411. 8003672: 693a ldr r2, [r7, #16]
  9412. 8003674: 4313 orrs r3, r2
  9413. 8003676: 613b str r3, [r7, #16]
  9414. GPIOx->OTYPER = temp;
  9415. 8003678: 687b ldr r3, [r7, #4]
  9416. 800367a: 693a ldr r2, [r7, #16]
  9417. 800367c: 605a str r2, [r3, #4]
  9418. }
  9419. if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
  9420. 800367e: 683b ldr r3, [r7, #0]
  9421. 8003680: 685b ldr r3, [r3, #4]
  9422. 8003682: 2203 movs r2, #3
  9423. 8003684: 4013 ands r3, r2
  9424. 8003686: 2b03 cmp r3, #3
  9425. 8003688: d017 beq.n 80036ba <HAL_GPIO_Init+0xde>
  9426. {
  9427. /* Check the Pull parameter */
  9428. assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
  9429. /* Activate the Pull-up or Pull down resistor for the current IO */
  9430. temp = GPIOx->PUPDR;
  9431. 800368a: 687b ldr r3, [r7, #4]
  9432. 800368c: 68db ldr r3, [r3, #12]
  9433. 800368e: 613b str r3, [r7, #16]
  9434. temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2u));
  9435. 8003690: 697b ldr r3, [r7, #20]
  9436. 8003692: 005b lsls r3, r3, #1
  9437. 8003694: 2203 movs r2, #3
  9438. 8003696: 409a lsls r2, r3
  9439. 8003698: 0013 movs r3, r2
  9440. 800369a: 43da mvns r2, r3
  9441. 800369c: 693b ldr r3, [r7, #16]
  9442. 800369e: 4013 ands r3, r2
  9443. 80036a0: 613b str r3, [r7, #16]
  9444. temp |= ((GPIO_Init->Pull) << (position * 2u));
  9445. 80036a2: 683b ldr r3, [r7, #0]
  9446. 80036a4: 689a ldr r2, [r3, #8]
  9447. 80036a6: 697b ldr r3, [r7, #20]
  9448. 80036a8: 005b lsls r3, r3, #1
  9449. 80036aa: 409a lsls r2, r3
  9450. 80036ac: 0013 movs r3, r2
  9451. 80036ae: 693a ldr r2, [r7, #16]
  9452. 80036b0: 4313 orrs r3, r2
  9453. 80036b2: 613b str r3, [r7, #16]
  9454. GPIOx->PUPDR = temp;
  9455. 80036b4: 687b ldr r3, [r7, #4]
  9456. 80036b6: 693a ldr r2, [r7, #16]
  9457. 80036b8: 60da str r2, [r3, #12]
  9458. }
  9459. /* In case of Alternate function mode selection */
  9460. if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
  9461. 80036ba: 683b ldr r3, [r7, #0]
  9462. 80036bc: 685b ldr r3, [r3, #4]
  9463. 80036be: 2203 movs r2, #3
  9464. 80036c0: 4013 ands r3, r2
  9465. 80036c2: 2b02 cmp r3, #2
  9466. 80036c4: d123 bne.n 800370e <HAL_GPIO_Init+0x132>
  9467. /* Check the Alternate function parameters */
  9468. assert_param(IS_GPIO_AF_INSTANCE(GPIOx));
  9469. assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
  9470. /* Configure Alternate function mapped with the current IO */
  9471. temp = GPIOx->AFR[position >> 3u];
  9472. 80036c6: 697b ldr r3, [r7, #20]
  9473. 80036c8: 08da lsrs r2, r3, #3
  9474. 80036ca: 687b ldr r3, [r7, #4]
  9475. 80036cc: 3208 adds r2, #8
  9476. 80036ce: 0092 lsls r2, r2, #2
  9477. 80036d0: 58d3 ldr r3, [r2, r3]
  9478. 80036d2: 613b str r3, [r7, #16]
  9479. temp &= ~(0xFu << ((position & 0x07u) * 4u));
  9480. 80036d4: 697b ldr r3, [r7, #20]
  9481. 80036d6: 2207 movs r2, #7
  9482. 80036d8: 4013 ands r3, r2
  9483. 80036da: 009b lsls r3, r3, #2
  9484. 80036dc: 220f movs r2, #15
  9485. 80036de: 409a lsls r2, r3
  9486. 80036e0: 0013 movs r3, r2
  9487. 80036e2: 43da mvns r2, r3
  9488. 80036e4: 693b ldr r3, [r7, #16]
  9489. 80036e6: 4013 ands r3, r2
  9490. 80036e8: 613b str r3, [r7, #16]
  9491. temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u));
  9492. 80036ea: 683b ldr r3, [r7, #0]
  9493. 80036ec: 691a ldr r2, [r3, #16]
  9494. 80036ee: 697b ldr r3, [r7, #20]
  9495. 80036f0: 2107 movs r1, #7
  9496. 80036f2: 400b ands r3, r1
  9497. 80036f4: 009b lsls r3, r3, #2
  9498. 80036f6: 409a lsls r2, r3
  9499. 80036f8: 0013 movs r3, r2
  9500. 80036fa: 693a ldr r2, [r7, #16]
  9501. 80036fc: 4313 orrs r3, r2
  9502. 80036fe: 613b str r3, [r7, #16]
  9503. GPIOx->AFR[position >> 3u] = temp;
  9504. 8003700: 697b ldr r3, [r7, #20]
  9505. 8003702: 08da lsrs r2, r3, #3
  9506. 8003704: 687b ldr r3, [r7, #4]
  9507. 8003706: 3208 adds r2, #8
  9508. 8003708: 0092 lsls r2, r2, #2
  9509. 800370a: 6939 ldr r1, [r7, #16]
  9510. 800370c: 50d1 str r1, [r2, r3]
  9511. }
  9512. /* Configure IO Direction mode (Input, Output, Alternate or Analog) */
  9513. temp = GPIOx->MODER;
  9514. 800370e: 687b ldr r3, [r7, #4]
  9515. 8003710: 681b ldr r3, [r3, #0]
  9516. 8003712: 613b str r3, [r7, #16]
  9517. temp &= ~(GPIO_MODER_MODE0 << (position * 2u));
  9518. 8003714: 697b ldr r3, [r7, #20]
  9519. 8003716: 005b lsls r3, r3, #1
  9520. 8003718: 2203 movs r2, #3
  9521. 800371a: 409a lsls r2, r3
  9522. 800371c: 0013 movs r3, r2
  9523. 800371e: 43da mvns r2, r3
  9524. 8003720: 693b ldr r3, [r7, #16]
  9525. 8003722: 4013 ands r3, r2
  9526. 8003724: 613b str r3, [r7, #16]
  9527. temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u));
  9528. 8003726: 683b ldr r3, [r7, #0]
  9529. 8003728: 685b ldr r3, [r3, #4]
  9530. 800372a: 2203 movs r2, #3
  9531. 800372c: 401a ands r2, r3
  9532. 800372e: 697b ldr r3, [r7, #20]
  9533. 8003730: 005b lsls r3, r3, #1
  9534. 8003732: 409a lsls r2, r3
  9535. 8003734: 0013 movs r3, r2
  9536. 8003736: 693a ldr r2, [r7, #16]
  9537. 8003738: 4313 orrs r3, r2
  9538. 800373a: 613b str r3, [r7, #16]
  9539. GPIOx->MODER = temp;
  9540. 800373c: 687b ldr r3, [r7, #4]
  9541. 800373e: 693a ldr r2, [r7, #16]
  9542. 8003740: 601a str r2, [r3, #0]
  9543. /*--------------------- EXTI Mode Configuration ------------------------*/
  9544. /* Configure the External Interrupt or event for the current IO */
  9545. if ((GPIO_Init->Mode & EXTI_MODE) != 0x00u)
  9546. 8003742: 683b ldr r3, [r7, #0]
  9547. 8003744: 685a ldr r2, [r3, #4]
  9548. 8003746: 23c0 movs r3, #192 @ 0xc0
  9549. 8003748: 029b lsls r3, r3, #10
  9550. 800374a: 4013 ands r3, r2
  9551. 800374c: d100 bne.n 8003750 <HAL_GPIO_Init+0x174>
  9552. 800374e: e092 b.n 8003876 <HAL_GPIO_Init+0x29a>
  9553. {
  9554. temp = EXTI->EXTICR[position >> 2u];
  9555. 8003750: 4a50 ldr r2, [pc, #320] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9556. 8003752: 697b ldr r3, [r7, #20]
  9557. 8003754: 089b lsrs r3, r3, #2
  9558. 8003756: 3318 adds r3, #24
  9559. 8003758: 009b lsls r3, r3, #2
  9560. 800375a: 589b ldr r3, [r3, r2]
  9561. 800375c: 613b str r3, [r7, #16]
  9562. temp &= ~(0x0FuL << (8u * (position & 0x03u)));
  9563. 800375e: 697b ldr r3, [r7, #20]
  9564. 8003760: 2203 movs r2, #3
  9565. 8003762: 4013 ands r3, r2
  9566. 8003764: 00db lsls r3, r3, #3
  9567. 8003766: 220f movs r2, #15
  9568. 8003768: 409a lsls r2, r3
  9569. 800376a: 0013 movs r3, r2
  9570. 800376c: 43da mvns r2, r3
  9571. 800376e: 693b ldr r3, [r7, #16]
  9572. 8003770: 4013 ands r3, r2
  9573. 8003772: 613b str r3, [r7, #16]
  9574. temp |= (GPIO_GET_INDEX(GPIOx) << (8u * (position & 0x03u)));
  9575. 8003774: 687a ldr r2, [r7, #4]
  9576. 8003776: 23a0 movs r3, #160 @ 0xa0
  9577. 8003778: 05db lsls r3, r3, #23
  9578. 800377a: 429a cmp r2, r3
  9579. 800377c: d013 beq.n 80037a6 <HAL_GPIO_Init+0x1ca>
  9580. 800377e: 687b ldr r3, [r7, #4]
  9581. 8003780: 4a45 ldr r2, [pc, #276] @ (8003898 <HAL_GPIO_Init+0x2bc>)
  9582. 8003782: 4293 cmp r3, r2
  9583. 8003784: d00d beq.n 80037a2 <HAL_GPIO_Init+0x1c6>
  9584. 8003786: 687b ldr r3, [r7, #4]
  9585. 8003788: 4a44 ldr r2, [pc, #272] @ (800389c <HAL_GPIO_Init+0x2c0>)
  9586. 800378a: 4293 cmp r3, r2
  9587. 800378c: d007 beq.n 800379e <HAL_GPIO_Init+0x1c2>
  9588. 800378e: 687b ldr r3, [r7, #4]
  9589. 8003790: 4a43 ldr r2, [pc, #268] @ (80038a0 <HAL_GPIO_Init+0x2c4>)
  9590. 8003792: 4293 cmp r3, r2
  9591. 8003794: d101 bne.n 800379a <HAL_GPIO_Init+0x1be>
  9592. 8003796: 2303 movs r3, #3
  9593. 8003798: e006 b.n 80037a8 <HAL_GPIO_Init+0x1cc>
  9594. 800379a: 2305 movs r3, #5
  9595. 800379c: e004 b.n 80037a8 <HAL_GPIO_Init+0x1cc>
  9596. 800379e: 2302 movs r3, #2
  9597. 80037a0: e002 b.n 80037a8 <HAL_GPIO_Init+0x1cc>
  9598. 80037a2: 2301 movs r3, #1
  9599. 80037a4: e000 b.n 80037a8 <HAL_GPIO_Init+0x1cc>
  9600. 80037a6: 2300 movs r3, #0
  9601. 80037a8: 697a ldr r2, [r7, #20]
  9602. 80037aa: 2103 movs r1, #3
  9603. 80037ac: 400a ands r2, r1
  9604. 80037ae: 00d2 lsls r2, r2, #3
  9605. 80037b0: 4093 lsls r3, r2
  9606. 80037b2: 693a ldr r2, [r7, #16]
  9607. 80037b4: 4313 orrs r3, r2
  9608. 80037b6: 613b str r3, [r7, #16]
  9609. EXTI->EXTICR[position >> 2u] = temp;
  9610. 80037b8: 4936 ldr r1, [pc, #216] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9611. 80037ba: 697b ldr r3, [r7, #20]
  9612. 80037bc: 089b lsrs r3, r3, #2
  9613. 80037be: 3318 adds r3, #24
  9614. 80037c0: 009b lsls r3, r3, #2
  9615. 80037c2: 693a ldr r2, [r7, #16]
  9616. 80037c4: 505a str r2, [r3, r1]
  9617. /* Clear Rising Falling edge configuration */
  9618. temp = EXTI->RTSR1;
  9619. 80037c6: 4b33 ldr r3, [pc, #204] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9620. 80037c8: 681b ldr r3, [r3, #0]
  9621. 80037ca: 613b str r3, [r7, #16]
  9622. temp &= ~(iocurrent);
  9623. 80037cc: 68fb ldr r3, [r7, #12]
  9624. 80037ce: 43da mvns r2, r3
  9625. 80037d0: 693b ldr r3, [r7, #16]
  9626. 80037d2: 4013 ands r3, r2
  9627. 80037d4: 613b str r3, [r7, #16]
  9628. if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u)
  9629. 80037d6: 683b ldr r3, [r7, #0]
  9630. 80037d8: 685a ldr r2, [r3, #4]
  9631. 80037da: 2380 movs r3, #128 @ 0x80
  9632. 80037dc: 035b lsls r3, r3, #13
  9633. 80037de: 4013 ands r3, r2
  9634. 80037e0: d003 beq.n 80037ea <HAL_GPIO_Init+0x20e>
  9635. {
  9636. temp |= iocurrent;
  9637. 80037e2: 693a ldr r2, [r7, #16]
  9638. 80037e4: 68fb ldr r3, [r7, #12]
  9639. 80037e6: 4313 orrs r3, r2
  9640. 80037e8: 613b str r3, [r7, #16]
  9641. }
  9642. EXTI->RTSR1 = temp;
  9643. 80037ea: 4b2a ldr r3, [pc, #168] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9644. 80037ec: 693a ldr r2, [r7, #16]
  9645. 80037ee: 601a str r2, [r3, #0]
  9646. temp = EXTI->FTSR1;
  9647. 80037f0: 4b28 ldr r3, [pc, #160] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9648. 80037f2: 685b ldr r3, [r3, #4]
  9649. 80037f4: 613b str r3, [r7, #16]
  9650. temp &= ~(iocurrent);
  9651. 80037f6: 68fb ldr r3, [r7, #12]
  9652. 80037f8: 43da mvns r2, r3
  9653. 80037fa: 693b ldr r3, [r7, #16]
  9654. 80037fc: 4013 ands r3, r2
  9655. 80037fe: 613b str r3, [r7, #16]
  9656. if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u)
  9657. 8003800: 683b ldr r3, [r7, #0]
  9658. 8003802: 685a ldr r2, [r3, #4]
  9659. 8003804: 2380 movs r3, #128 @ 0x80
  9660. 8003806: 039b lsls r3, r3, #14
  9661. 8003808: 4013 ands r3, r2
  9662. 800380a: d003 beq.n 8003814 <HAL_GPIO_Init+0x238>
  9663. {
  9664. temp |= iocurrent;
  9665. 800380c: 693a ldr r2, [r7, #16]
  9666. 800380e: 68fb ldr r3, [r7, #12]
  9667. 8003810: 4313 orrs r3, r2
  9668. 8003812: 613b str r3, [r7, #16]
  9669. }
  9670. EXTI->FTSR1 = temp;
  9671. 8003814: 4b1f ldr r3, [pc, #124] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9672. 8003816: 693a ldr r2, [r7, #16]
  9673. 8003818: 605a str r2, [r3, #4]
  9674. /* Clear EXTI line configuration */
  9675. temp = EXTI->EMR1;
  9676. 800381a: 4a1e ldr r2, [pc, #120] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9677. 800381c: 2384 movs r3, #132 @ 0x84
  9678. 800381e: 58d3 ldr r3, [r2, r3]
  9679. 8003820: 613b str r3, [r7, #16]
  9680. temp &= ~(iocurrent);
  9681. 8003822: 68fb ldr r3, [r7, #12]
  9682. 8003824: 43da mvns r2, r3
  9683. 8003826: 693b ldr r3, [r7, #16]
  9684. 8003828: 4013 ands r3, r2
  9685. 800382a: 613b str r3, [r7, #16]
  9686. if ((GPIO_Init->Mode & EXTI_EVT) != 0x00u)
  9687. 800382c: 683b ldr r3, [r7, #0]
  9688. 800382e: 685a ldr r2, [r3, #4]
  9689. 8003830: 2380 movs r3, #128 @ 0x80
  9690. 8003832: 029b lsls r3, r3, #10
  9691. 8003834: 4013 ands r3, r2
  9692. 8003836: d003 beq.n 8003840 <HAL_GPIO_Init+0x264>
  9693. {
  9694. temp |= iocurrent;
  9695. 8003838: 693a ldr r2, [r7, #16]
  9696. 800383a: 68fb ldr r3, [r7, #12]
  9697. 800383c: 4313 orrs r3, r2
  9698. 800383e: 613b str r3, [r7, #16]
  9699. }
  9700. EXTI->EMR1 = temp;
  9701. 8003840: 4914 ldr r1, [pc, #80] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9702. 8003842: 2284 movs r2, #132 @ 0x84
  9703. 8003844: 693b ldr r3, [r7, #16]
  9704. 8003846: 508b str r3, [r1, r2]
  9705. temp = EXTI->IMR1;
  9706. 8003848: 4a12 ldr r2, [pc, #72] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9707. 800384a: 2380 movs r3, #128 @ 0x80
  9708. 800384c: 58d3 ldr r3, [r2, r3]
  9709. 800384e: 613b str r3, [r7, #16]
  9710. temp &= ~(iocurrent);
  9711. 8003850: 68fb ldr r3, [r7, #12]
  9712. 8003852: 43da mvns r2, r3
  9713. 8003854: 693b ldr r3, [r7, #16]
  9714. 8003856: 4013 ands r3, r2
  9715. 8003858: 613b str r3, [r7, #16]
  9716. if ((GPIO_Init->Mode & EXTI_IT) != 0x00u)
  9717. 800385a: 683b ldr r3, [r7, #0]
  9718. 800385c: 685a ldr r2, [r3, #4]
  9719. 800385e: 2380 movs r3, #128 @ 0x80
  9720. 8003860: 025b lsls r3, r3, #9
  9721. 8003862: 4013 ands r3, r2
  9722. 8003864: d003 beq.n 800386e <HAL_GPIO_Init+0x292>
  9723. {
  9724. temp |= iocurrent;
  9725. 8003866: 693a ldr r2, [r7, #16]
  9726. 8003868: 68fb ldr r3, [r7, #12]
  9727. 800386a: 4313 orrs r3, r2
  9728. 800386c: 613b str r3, [r7, #16]
  9729. }
  9730. EXTI->IMR1 = temp;
  9731. 800386e: 4909 ldr r1, [pc, #36] @ (8003894 <HAL_GPIO_Init+0x2b8>)
  9732. 8003870: 2280 movs r2, #128 @ 0x80
  9733. 8003872: 693b ldr r3, [r7, #16]
  9734. 8003874: 508b str r3, [r1, r2]
  9735. }
  9736. }
  9737. position++;
  9738. 8003876: 697b ldr r3, [r7, #20]
  9739. 8003878: 3301 adds r3, #1
  9740. 800387a: 617b str r3, [r7, #20]
  9741. while (((GPIO_Init->Pin) >> position) != 0x00u)
  9742. 800387c: 683b ldr r3, [r7, #0]
  9743. 800387e: 681a ldr r2, [r3, #0]
  9744. 8003880: 697b ldr r3, [r7, #20]
  9745. 8003882: 40da lsrs r2, r3
  9746. 8003884: 1e13 subs r3, r2, #0
  9747. 8003886: d000 beq.n 800388a <HAL_GPIO_Init+0x2ae>
  9748. 8003888: e6b0 b.n 80035ec <HAL_GPIO_Init+0x10>
  9749. }
  9750. }
  9751. 800388a: 46c0 nop @ (mov r8, r8)
  9752. 800388c: 46c0 nop @ (mov r8, r8)
  9753. 800388e: 46bd mov sp, r7
  9754. 8003890: b006 add sp, #24
  9755. 8003892: bd80 pop {r7, pc}
  9756. 8003894: 40021800 .word 0x40021800
  9757. 8003898: 50000400 .word 0x50000400
  9758. 800389c: 50000800 .word 0x50000800
  9759. 80038a0: 50000c00 .word 0x50000c00
  9760. 080038a4 <HAL_GPIO_ReadPin>:
  9761. * @param GPIO_Pin specifies the port bit to read.
  9762. * This parameter can be any combination of GPIO_Pin_x where x can be (0..15).
  9763. * @retval The input port pin value.
  9764. */
  9765. GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
  9766. {
  9767. 80038a4: b580 push {r7, lr}
  9768. 80038a6: b084 sub sp, #16
  9769. 80038a8: af00 add r7, sp, #0
  9770. 80038aa: 6078 str r0, [r7, #4]
  9771. 80038ac: 000a movs r2, r1
  9772. 80038ae: 1cbb adds r3, r7, #2
  9773. 80038b0: 801a strh r2, [r3, #0]
  9774. GPIO_PinState bitstatus;
  9775. /* Check the parameters */
  9776. assert_param(IS_GPIO_PIN(GPIO_Pin));
  9777. if ((GPIOx->IDR & GPIO_Pin) != 0x00u)
  9778. 80038b2: 687b ldr r3, [r7, #4]
  9779. 80038b4: 691b ldr r3, [r3, #16]
  9780. 80038b6: 1cba adds r2, r7, #2
  9781. 80038b8: 8812 ldrh r2, [r2, #0]
  9782. 80038ba: 4013 ands r3, r2
  9783. 80038bc: d004 beq.n 80038c8 <HAL_GPIO_ReadPin+0x24>
  9784. {
  9785. bitstatus = GPIO_PIN_SET;
  9786. 80038be: 230f movs r3, #15
  9787. 80038c0: 18fb adds r3, r7, r3
  9788. 80038c2: 2201 movs r2, #1
  9789. 80038c4: 701a strb r2, [r3, #0]
  9790. 80038c6: e003 b.n 80038d0 <HAL_GPIO_ReadPin+0x2c>
  9791. }
  9792. else
  9793. {
  9794. bitstatus = GPIO_PIN_RESET;
  9795. 80038c8: 230f movs r3, #15
  9796. 80038ca: 18fb adds r3, r7, r3
  9797. 80038cc: 2200 movs r2, #0
  9798. 80038ce: 701a strb r2, [r3, #0]
  9799. }
  9800. return bitstatus;
  9801. 80038d0: 230f movs r3, #15
  9802. 80038d2: 18fb adds r3, r7, r3
  9803. 80038d4: 781b ldrb r3, [r3, #0]
  9804. }
  9805. 80038d6: 0018 movs r0, r3
  9806. 80038d8: 46bd mov sp, r7
  9807. 80038da: b004 add sp, #16
  9808. 80038dc: bd80 pop {r7, pc}
  9809. ...
  9810. 080038e0 <HAL_PWREx_ControlVoltageScaling>:
  9811. * cleared before returning the status. If the flag is not cleared within
  9812. * 6 microseconds, HAL_TIMEOUT status is reported.
  9813. * @retval HAL Status
  9814. */
  9815. HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling)
  9816. {
  9817. 80038e0: b580 push {r7, lr}
  9818. 80038e2: b084 sub sp, #16
  9819. 80038e4: af00 add r7, sp, #0
  9820. 80038e6: 6078 str r0, [r7, #4]
  9821. uint32_t wait_loop_index;
  9822. assert_param(IS_PWR_VOLTAGE_SCALING_RANGE(VoltageScaling));
  9823. /* Modify voltage scaling range */
  9824. MODIFY_REG(PWR->CR1, PWR_CR1_VOS, VoltageScaling);
  9825. 80038e8: 4b19 ldr r3, [pc, #100] @ (8003950 <HAL_PWREx_ControlVoltageScaling+0x70>)
  9826. 80038ea: 681b ldr r3, [r3, #0]
  9827. 80038ec: 4a19 ldr r2, [pc, #100] @ (8003954 <HAL_PWREx_ControlVoltageScaling+0x74>)
  9828. 80038ee: 4013 ands r3, r2
  9829. 80038f0: 0019 movs r1, r3
  9830. 80038f2: 4b17 ldr r3, [pc, #92] @ (8003950 <HAL_PWREx_ControlVoltageScaling+0x70>)
  9831. 80038f4: 687a ldr r2, [r7, #4]
  9832. 80038f6: 430a orrs r2, r1
  9833. 80038f8: 601a str r2, [r3, #0]
  9834. /* In case of Range 1 selected, we need to ensure that main regulator reaches new value */
  9835. if (VoltageScaling == PWR_REGULATOR_VOLTAGE_SCALE1)
  9836. 80038fa: 687a ldr r2, [r7, #4]
  9837. 80038fc: 2380 movs r3, #128 @ 0x80
  9838. 80038fe: 009b lsls r3, r3, #2
  9839. 8003900: 429a cmp r2, r3
  9840. 8003902: d11f bne.n 8003944 <HAL_PWREx_ControlVoltageScaling+0x64>
  9841. {
  9842. /* Set timeout value */
  9843. wait_loop_index = ((PWR_VOSF_SETTING_DELAY_6_US * SystemCoreClock) / 1000000U) + 1U;
  9844. 8003904: 4b14 ldr r3, [pc, #80] @ (8003958 <HAL_PWREx_ControlVoltageScaling+0x78>)
  9845. 8003906: 681a ldr r2, [r3, #0]
  9846. 8003908: 0013 movs r3, r2
  9847. 800390a: 005b lsls r3, r3, #1
  9848. 800390c: 189b adds r3, r3, r2
  9849. 800390e: 005b lsls r3, r3, #1
  9850. 8003910: 4912 ldr r1, [pc, #72] @ (800395c <HAL_PWREx_ControlVoltageScaling+0x7c>)
  9851. 8003912: 0018 movs r0, r3
  9852. 8003914: f7fc fbf4 bl 8000100 <__udivsi3>
  9853. 8003918: 0003 movs r3, r0
  9854. 800391a: 3301 adds r3, #1
  9855. 800391c: 60fb str r3, [r7, #12]
  9856. /* Wait until VOSF is reset */
  9857. while (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF))
  9858. 800391e: e008 b.n 8003932 <HAL_PWREx_ControlVoltageScaling+0x52>
  9859. {
  9860. if (wait_loop_index != 0U)
  9861. 8003920: 68fb ldr r3, [r7, #12]
  9862. 8003922: 2b00 cmp r3, #0
  9863. 8003924: d003 beq.n 800392e <HAL_PWREx_ControlVoltageScaling+0x4e>
  9864. {
  9865. wait_loop_index--;
  9866. 8003926: 68fb ldr r3, [r7, #12]
  9867. 8003928: 3b01 subs r3, #1
  9868. 800392a: 60fb str r3, [r7, #12]
  9869. 800392c: e001 b.n 8003932 <HAL_PWREx_ControlVoltageScaling+0x52>
  9870. }
  9871. else
  9872. {
  9873. return HAL_TIMEOUT;
  9874. 800392e: 2303 movs r3, #3
  9875. 8003930: e009 b.n 8003946 <HAL_PWREx_ControlVoltageScaling+0x66>
  9876. while (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF))
  9877. 8003932: 4b07 ldr r3, [pc, #28] @ (8003950 <HAL_PWREx_ControlVoltageScaling+0x70>)
  9878. 8003934: 695a ldr r2, [r3, #20]
  9879. 8003936: 2380 movs r3, #128 @ 0x80
  9880. 8003938: 00db lsls r3, r3, #3
  9881. 800393a: 401a ands r2, r3
  9882. 800393c: 2380 movs r3, #128 @ 0x80
  9883. 800393e: 00db lsls r3, r3, #3
  9884. 8003940: 429a cmp r2, r3
  9885. 8003942: d0ed beq.n 8003920 <HAL_PWREx_ControlVoltageScaling+0x40>
  9886. }
  9887. }
  9888. }
  9889. return HAL_OK;
  9890. 8003944: 2300 movs r3, #0
  9891. }
  9892. 8003946: 0018 movs r0, r3
  9893. 8003948: 46bd mov sp, r7
  9894. 800394a: b004 add sp, #16
  9895. 800394c: bd80 pop {r7, pc}
  9896. 800394e: 46c0 nop @ (mov r8, r8)
  9897. 8003950: 40007000 .word 0x40007000
  9898. 8003954: fffff9ff .word 0xfffff9ff
  9899. 8003958: 20000000 .word 0x20000000
  9900. 800395c: 000f4240 .word 0x000f4240
  9901. 08003960 <LL_RCC_GetAPB1Prescaler>:
  9902. * @arg @ref LL_RCC_APB1_DIV_4
  9903. * @arg @ref LL_RCC_APB1_DIV_8
  9904. * @arg @ref LL_RCC_APB1_DIV_16
  9905. */
  9906. __STATIC_INLINE uint32_t LL_RCC_GetAPB1Prescaler(void)
  9907. {
  9908. 8003960: b580 push {r7, lr}
  9909. 8003962: af00 add r7, sp, #0
  9910. return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PPRE));
  9911. 8003964: 4b03 ldr r3, [pc, #12] @ (8003974 <LL_RCC_GetAPB1Prescaler+0x14>)
  9912. 8003966: 689a ldr r2, [r3, #8]
  9913. 8003968: 23e0 movs r3, #224 @ 0xe0
  9914. 800396a: 01db lsls r3, r3, #7
  9915. 800396c: 4013 ands r3, r2
  9916. }
  9917. 800396e: 0018 movs r0, r3
  9918. 8003970: 46bd mov sp, r7
  9919. 8003972: bd80 pop {r7, pc}
  9920. 8003974: 40021000 .word 0x40021000
  9921. 08003978 <HAL_RCC_OscConfig>:
  9922. * supported by this function. User should request a transition to LSE Off
  9923. * first and then to LSE On or LSE Bypass.
  9924. * @retval HAL status
  9925. */
  9926. HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
  9927. {
  9928. 8003978: b580 push {r7, lr}
  9929. 800397a: b088 sub sp, #32
  9930. 800397c: af00 add r7, sp, #0
  9931. 800397e: 6078 str r0, [r7, #4]
  9932. uint32_t tickstart;
  9933. uint32_t temp_sysclksrc;
  9934. uint32_t temp_pllckcfg;
  9935. /* Check Null pointer */
  9936. if (RCC_OscInitStruct == NULL)
  9937. 8003980: 687b ldr r3, [r7, #4]
  9938. 8003982: 2b00 cmp r3, #0
  9939. 8003984: d101 bne.n 800398a <HAL_RCC_OscConfig+0x12>
  9940. {
  9941. return HAL_ERROR;
  9942. 8003986: 2301 movs r3, #1
  9943. 8003988: e2f3 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  9944. /* Check the parameters */
  9945. assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
  9946. /*------------------------------- HSE Configuration ------------------------*/
  9947. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
  9948. 800398a: 687b ldr r3, [r7, #4]
  9949. 800398c: 681b ldr r3, [r3, #0]
  9950. 800398e: 2201 movs r2, #1
  9951. 8003990: 4013 ands r3, r2
  9952. 8003992: d100 bne.n 8003996 <HAL_RCC_OscConfig+0x1e>
  9953. 8003994: e07c b.n 8003a90 <HAL_RCC_OscConfig+0x118>
  9954. {
  9955. /* Check the parameters */
  9956. assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
  9957. temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
  9958. 8003996: 4bc3 ldr r3, [pc, #780] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  9959. 8003998: 689b ldr r3, [r3, #8]
  9960. 800399a: 2238 movs r2, #56 @ 0x38
  9961. 800399c: 4013 ands r3, r2
  9962. 800399e: 61bb str r3, [r7, #24]
  9963. temp_pllckcfg = __HAL_RCC_GET_PLL_OSCSOURCE();
  9964. 80039a0: 4bc0 ldr r3, [pc, #768] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  9965. 80039a2: 68db ldr r3, [r3, #12]
  9966. 80039a4: 2203 movs r2, #3
  9967. 80039a6: 4013 ands r3, r2
  9968. 80039a8: 617b str r3, [r7, #20]
  9969. /* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */
  9970. if (((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_pllckcfg == RCC_PLLSOURCE_HSE))
  9971. 80039aa: 69bb ldr r3, [r7, #24]
  9972. 80039ac: 2b10 cmp r3, #16
  9973. 80039ae: d102 bne.n 80039b6 <HAL_RCC_OscConfig+0x3e>
  9974. 80039b0: 697b ldr r3, [r7, #20]
  9975. 80039b2: 2b03 cmp r3, #3
  9976. 80039b4: d002 beq.n 80039bc <HAL_RCC_OscConfig+0x44>
  9977. || (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSE))
  9978. 80039b6: 69bb ldr r3, [r7, #24]
  9979. 80039b8: 2b08 cmp r3, #8
  9980. 80039ba: d10b bne.n 80039d4 <HAL_RCC_OscConfig+0x5c>
  9981. {
  9982. if ((READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
  9983. 80039bc: 4bb9 ldr r3, [pc, #740] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  9984. 80039be: 681a ldr r2, [r3, #0]
  9985. 80039c0: 2380 movs r3, #128 @ 0x80
  9986. 80039c2: 029b lsls r3, r3, #10
  9987. 80039c4: 4013 ands r3, r2
  9988. 80039c6: d062 beq.n 8003a8e <HAL_RCC_OscConfig+0x116>
  9989. 80039c8: 687b ldr r3, [r7, #4]
  9990. 80039ca: 685b ldr r3, [r3, #4]
  9991. 80039cc: 2b00 cmp r3, #0
  9992. 80039ce: d15e bne.n 8003a8e <HAL_RCC_OscConfig+0x116>
  9993. {
  9994. return HAL_ERROR;
  9995. 80039d0: 2301 movs r3, #1
  9996. 80039d2: e2ce b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  9997. }
  9998. }
  9999. else
  10000. {
  10001. /* Set the new HSE configuration ---------------------------------------*/
  10002. __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
  10003. 80039d4: 687b ldr r3, [r7, #4]
  10004. 80039d6: 685a ldr r2, [r3, #4]
  10005. 80039d8: 2380 movs r3, #128 @ 0x80
  10006. 80039da: 025b lsls r3, r3, #9
  10007. 80039dc: 429a cmp r2, r3
  10008. 80039de: d107 bne.n 80039f0 <HAL_RCC_OscConfig+0x78>
  10009. 80039e0: 4bb0 ldr r3, [pc, #704] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10010. 80039e2: 681a ldr r2, [r3, #0]
  10011. 80039e4: 4baf ldr r3, [pc, #700] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10012. 80039e6: 2180 movs r1, #128 @ 0x80
  10013. 80039e8: 0249 lsls r1, r1, #9
  10014. 80039ea: 430a orrs r2, r1
  10015. 80039ec: 601a str r2, [r3, #0]
  10016. 80039ee: e020 b.n 8003a32 <HAL_RCC_OscConfig+0xba>
  10017. 80039f0: 687b ldr r3, [r7, #4]
  10018. 80039f2: 685a ldr r2, [r3, #4]
  10019. 80039f4: 23a0 movs r3, #160 @ 0xa0
  10020. 80039f6: 02db lsls r3, r3, #11
  10021. 80039f8: 429a cmp r2, r3
  10022. 80039fa: d10e bne.n 8003a1a <HAL_RCC_OscConfig+0xa2>
  10023. 80039fc: 4ba9 ldr r3, [pc, #676] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10024. 80039fe: 681a ldr r2, [r3, #0]
  10025. 8003a00: 4ba8 ldr r3, [pc, #672] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10026. 8003a02: 2180 movs r1, #128 @ 0x80
  10027. 8003a04: 02c9 lsls r1, r1, #11
  10028. 8003a06: 430a orrs r2, r1
  10029. 8003a08: 601a str r2, [r3, #0]
  10030. 8003a0a: 4ba6 ldr r3, [pc, #664] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10031. 8003a0c: 681a ldr r2, [r3, #0]
  10032. 8003a0e: 4ba5 ldr r3, [pc, #660] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10033. 8003a10: 2180 movs r1, #128 @ 0x80
  10034. 8003a12: 0249 lsls r1, r1, #9
  10035. 8003a14: 430a orrs r2, r1
  10036. 8003a16: 601a str r2, [r3, #0]
  10037. 8003a18: e00b b.n 8003a32 <HAL_RCC_OscConfig+0xba>
  10038. 8003a1a: 4ba2 ldr r3, [pc, #648] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10039. 8003a1c: 681a ldr r2, [r3, #0]
  10040. 8003a1e: 4ba1 ldr r3, [pc, #644] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10041. 8003a20: 49a1 ldr r1, [pc, #644] @ (8003ca8 <HAL_RCC_OscConfig+0x330>)
  10042. 8003a22: 400a ands r2, r1
  10043. 8003a24: 601a str r2, [r3, #0]
  10044. 8003a26: 4b9f ldr r3, [pc, #636] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10045. 8003a28: 681a ldr r2, [r3, #0]
  10046. 8003a2a: 4b9e ldr r3, [pc, #632] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10047. 8003a2c: 499f ldr r1, [pc, #636] @ (8003cac <HAL_RCC_OscConfig+0x334>)
  10048. 8003a2e: 400a ands r2, r1
  10049. 8003a30: 601a str r2, [r3, #0]
  10050. /* Check the HSE State */
  10051. if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
  10052. 8003a32: 687b ldr r3, [r7, #4]
  10053. 8003a34: 685b ldr r3, [r3, #4]
  10054. 8003a36: 2b00 cmp r3, #0
  10055. 8003a38: d014 beq.n 8003a64 <HAL_RCC_OscConfig+0xec>
  10056. {
  10057. /* Get Start Tick*/
  10058. tickstart = HAL_GetTick();
  10059. 8003a3a: f7fd ff15 bl 8001868 <HAL_GetTick>
  10060. 8003a3e: 0003 movs r3, r0
  10061. 8003a40: 613b str r3, [r7, #16]
  10062. /* Wait till HSE is ready */
  10063. while (READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
  10064. 8003a42: e008 b.n 8003a56 <HAL_RCC_OscConfig+0xde>
  10065. {
  10066. if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
  10067. 8003a44: f7fd ff10 bl 8001868 <HAL_GetTick>
  10068. 8003a48: 0002 movs r2, r0
  10069. 8003a4a: 693b ldr r3, [r7, #16]
  10070. 8003a4c: 1ad3 subs r3, r2, r3
  10071. 8003a4e: 2b64 cmp r3, #100 @ 0x64
  10072. 8003a50: d901 bls.n 8003a56 <HAL_RCC_OscConfig+0xde>
  10073. {
  10074. return HAL_TIMEOUT;
  10075. 8003a52: 2303 movs r3, #3
  10076. 8003a54: e28d b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10077. while (READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
  10078. 8003a56: 4b93 ldr r3, [pc, #588] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10079. 8003a58: 681a ldr r2, [r3, #0]
  10080. 8003a5a: 2380 movs r3, #128 @ 0x80
  10081. 8003a5c: 029b lsls r3, r3, #10
  10082. 8003a5e: 4013 ands r3, r2
  10083. 8003a60: d0f0 beq.n 8003a44 <HAL_RCC_OscConfig+0xcc>
  10084. 8003a62: e015 b.n 8003a90 <HAL_RCC_OscConfig+0x118>
  10085. }
  10086. }
  10087. else
  10088. {
  10089. /* Get Start Tick*/
  10090. tickstart = HAL_GetTick();
  10091. 8003a64: f7fd ff00 bl 8001868 <HAL_GetTick>
  10092. 8003a68: 0003 movs r3, r0
  10093. 8003a6a: 613b str r3, [r7, #16]
  10094. /* Wait till HSE is disabled */
  10095. while (READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U)
  10096. 8003a6c: e008 b.n 8003a80 <HAL_RCC_OscConfig+0x108>
  10097. {
  10098. if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
  10099. 8003a6e: f7fd fefb bl 8001868 <HAL_GetTick>
  10100. 8003a72: 0002 movs r2, r0
  10101. 8003a74: 693b ldr r3, [r7, #16]
  10102. 8003a76: 1ad3 subs r3, r2, r3
  10103. 8003a78: 2b64 cmp r3, #100 @ 0x64
  10104. 8003a7a: d901 bls.n 8003a80 <HAL_RCC_OscConfig+0x108>
  10105. {
  10106. return HAL_TIMEOUT;
  10107. 8003a7c: 2303 movs r3, #3
  10108. 8003a7e: e278 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10109. while (READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U)
  10110. 8003a80: 4b88 ldr r3, [pc, #544] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10111. 8003a82: 681a ldr r2, [r3, #0]
  10112. 8003a84: 2380 movs r3, #128 @ 0x80
  10113. 8003a86: 029b lsls r3, r3, #10
  10114. 8003a88: 4013 ands r3, r2
  10115. 8003a8a: d1f0 bne.n 8003a6e <HAL_RCC_OscConfig+0xf6>
  10116. 8003a8c: e000 b.n 8003a90 <HAL_RCC_OscConfig+0x118>
  10117. if ((READ_BIT(RCC->CR, RCC_CR_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
  10118. 8003a8e: 46c0 nop @ (mov r8, r8)
  10119. }
  10120. }
  10121. }
  10122. }
  10123. /*----------------------------- HSI Configuration --------------------------*/
  10124. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
  10125. 8003a90: 687b ldr r3, [r7, #4]
  10126. 8003a92: 681b ldr r3, [r3, #0]
  10127. 8003a94: 2202 movs r2, #2
  10128. 8003a96: 4013 ands r3, r2
  10129. 8003a98: d100 bne.n 8003a9c <HAL_RCC_OscConfig+0x124>
  10130. 8003a9a: e099 b.n 8003bd0 <HAL_RCC_OscConfig+0x258>
  10131. assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
  10132. assert_param(IS_RCC_HSI_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
  10133. assert_param(IS_RCC_HSIDIV(RCC_OscInitStruct->HSIDiv));
  10134. /* Check if HSI16 is used as system clock or as PLL source when PLL is selected as system clock */
  10135. temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
  10136. 8003a9c: 4b81 ldr r3, [pc, #516] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10137. 8003a9e: 689b ldr r3, [r3, #8]
  10138. 8003aa0: 2238 movs r2, #56 @ 0x38
  10139. 8003aa2: 4013 ands r3, r2
  10140. 8003aa4: 61bb str r3, [r7, #24]
  10141. temp_pllckcfg = __HAL_RCC_GET_PLL_OSCSOURCE();
  10142. 8003aa6: 4b7f ldr r3, [pc, #508] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10143. 8003aa8: 68db ldr r3, [r3, #12]
  10144. 8003aaa: 2203 movs r2, #3
  10145. 8003aac: 4013 ands r3, r2
  10146. 8003aae: 617b str r3, [r7, #20]
  10147. if (((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_pllckcfg == RCC_PLLSOURCE_HSI))
  10148. 8003ab0: 69bb ldr r3, [r7, #24]
  10149. 8003ab2: 2b10 cmp r3, #16
  10150. 8003ab4: d102 bne.n 8003abc <HAL_RCC_OscConfig+0x144>
  10151. 8003ab6: 697b ldr r3, [r7, #20]
  10152. 8003ab8: 2b02 cmp r3, #2
  10153. 8003aba: d002 beq.n 8003ac2 <HAL_RCC_OscConfig+0x14a>
  10154. || (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI))
  10155. 8003abc: 69bb ldr r3, [r7, #24]
  10156. 8003abe: 2b00 cmp r3, #0
  10157. 8003ac0: d135 bne.n 8003b2e <HAL_RCC_OscConfig+0x1b6>
  10158. {
  10159. /* When HSI is used as system clock or as PLL input clock it can not be disabled */
  10160. if ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
  10161. 8003ac2: 4b78 ldr r3, [pc, #480] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10162. 8003ac4: 681a ldr r2, [r3, #0]
  10163. 8003ac6: 2380 movs r3, #128 @ 0x80
  10164. 8003ac8: 00db lsls r3, r3, #3
  10165. 8003aca: 4013 ands r3, r2
  10166. 8003acc: d005 beq.n 8003ada <HAL_RCC_OscConfig+0x162>
  10167. 8003ace: 687b ldr r3, [r7, #4]
  10168. 8003ad0: 68db ldr r3, [r3, #12]
  10169. 8003ad2: 2b00 cmp r3, #0
  10170. 8003ad4: d101 bne.n 8003ada <HAL_RCC_OscConfig+0x162>
  10171. {
  10172. return HAL_ERROR;
  10173. 8003ad6: 2301 movs r3, #1
  10174. 8003ad8: e24b b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10175. }
  10176. /* Otherwise, just the calibration is allowed */
  10177. else
  10178. {
  10179. /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
  10180. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  10181. 8003ada: 4b72 ldr r3, [pc, #456] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10182. 8003adc: 685b ldr r3, [r3, #4]
  10183. 8003ade: 4a74 ldr r2, [pc, #464] @ (8003cb0 <HAL_RCC_OscConfig+0x338>)
  10184. 8003ae0: 4013 ands r3, r2
  10185. 8003ae2: 0019 movs r1, r3
  10186. 8003ae4: 687b ldr r3, [r7, #4]
  10187. 8003ae6: 695b ldr r3, [r3, #20]
  10188. 8003ae8: 021a lsls r2, r3, #8
  10189. 8003aea: 4b6e ldr r3, [pc, #440] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10190. 8003aec: 430a orrs r2, r1
  10191. 8003aee: 605a str r2, [r3, #4]
  10192. if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI)
  10193. 8003af0: 69bb ldr r3, [r7, #24]
  10194. 8003af2: 2b00 cmp r3, #0
  10195. 8003af4: d112 bne.n 8003b1c <HAL_RCC_OscConfig+0x1a4>
  10196. {
  10197. /* Adjust the HSI16 division factor */
  10198. __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIDiv);
  10199. 8003af6: 4b6b ldr r3, [pc, #428] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10200. 8003af8: 681b ldr r3, [r3, #0]
  10201. 8003afa: 4a6e ldr r2, [pc, #440] @ (8003cb4 <HAL_RCC_OscConfig+0x33c>)
  10202. 8003afc: 4013 ands r3, r2
  10203. 8003afe: 0019 movs r1, r3
  10204. 8003b00: 687b ldr r3, [r7, #4]
  10205. 8003b02: 691a ldr r2, [r3, #16]
  10206. 8003b04: 4b67 ldr r3, [pc, #412] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10207. 8003b06: 430a orrs r2, r1
  10208. 8003b08: 601a str r2, [r3, #0]
  10209. /* Update the SystemCoreClock global variable with HSISYS value */
  10210. SystemCoreClock = (HSI_VALUE / (1UL << ((READ_BIT(RCC->CR, RCC_CR_HSIDIV)) >> RCC_CR_HSIDIV_Pos)));
  10211. 8003b0a: 4b66 ldr r3, [pc, #408] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10212. 8003b0c: 681b ldr r3, [r3, #0]
  10213. 8003b0e: 0adb lsrs r3, r3, #11
  10214. 8003b10: 2207 movs r2, #7
  10215. 8003b12: 4013 ands r3, r2
  10216. 8003b14: 4a68 ldr r2, [pc, #416] @ (8003cb8 <HAL_RCC_OscConfig+0x340>)
  10217. 8003b16: 40da lsrs r2, r3
  10218. 8003b18: 4b68 ldr r3, [pc, #416] @ (8003cbc <HAL_RCC_OscConfig+0x344>)
  10219. 8003b1a: 601a str r2, [r3, #0]
  10220. }
  10221. /* Adapt Systick interrupt period */
  10222. if (HAL_InitTick(uwTickPrio) != HAL_OK)
  10223. 8003b1c: 4b68 ldr r3, [pc, #416] @ (8003cc0 <HAL_RCC_OscConfig+0x348>)
  10224. 8003b1e: 681b ldr r3, [r3, #0]
  10225. 8003b20: 0018 movs r0, r3
  10226. 8003b22: f7fd fe45 bl 80017b0 <HAL_InitTick>
  10227. 8003b26: 1e03 subs r3, r0, #0
  10228. 8003b28: d051 beq.n 8003bce <HAL_RCC_OscConfig+0x256>
  10229. {
  10230. return HAL_ERROR;
  10231. 8003b2a: 2301 movs r3, #1
  10232. 8003b2c: e221 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10233. }
  10234. }
  10235. else
  10236. {
  10237. /* Check the HSI State */
  10238. if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF)
  10239. 8003b2e: 687b ldr r3, [r7, #4]
  10240. 8003b30: 68db ldr r3, [r3, #12]
  10241. 8003b32: 2b00 cmp r3, #0
  10242. 8003b34: d030 beq.n 8003b98 <HAL_RCC_OscConfig+0x220>
  10243. {
  10244. /* Configure the HSI16 division factor */
  10245. __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIDiv);
  10246. 8003b36: 4b5b ldr r3, [pc, #364] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10247. 8003b38: 681b ldr r3, [r3, #0]
  10248. 8003b3a: 4a5e ldr r2, [pc, #376] @ (8003cb4 <HAL_RCC_OscConfig+0x33c>)
  10249. 8003b3c: 4013 ands r3, r2
  10250. 8003b3e: 0019 movs r1, r3
  10251. 8003b40: 687b ldr r3, [r7, #4]
  10252. 8003b42: 691a ldr r2, [r3, #16]
  10253. 8003b44: 4b57 ldr r3, [pc, #348] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10254. 8003b46: 430a orrs r2, r1
  10255. 8003b48: 601a str r2, [r3, #0]
  10256. /* Enable the Internal High Speed oscillator (HSI16). */
  10257. __HAL_RCC_HSI_ENABLE();
  10258. 8003b4a: 4b56 ldr r3, [pc, #344] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10259. 8003b4c: 681a ldr r2, [r3, #0]
  10260. 8003b4e: 4b55 ldr r3, [pc, #340] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10261. 8003b50: 2180 movs r1, #128 @ 0x80
  10262. 8003b52: 0049 lsls r1, r1, #1
  10263. 8003b54: 430a orrs r2, r1
  10264. 8003b56: 601a str r2, [r3, #0]
  10265. /* Get Start Tick*/
  10266. tickstart = HAL_GetTick();
  10267. 8003b58: f7fd fe86 bl 8001868 <HAL_GetTick>
  10268. 8003b5c: 0003 movs r3, r0
  10269. 8003b5e: 613b str r3, [r7, #16]
  10270. /* Wait till HSI is ready */
  10271. while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
  10272. 8003b60: e008 b.n 8003b74 <HAL_RCC_OscConfig+0x1fc>
  10273. {
  10274. if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
  10275. 8003b62: f7fd fe81 bl 8001868 <HAL_GetTick>
  10276. 8003b66: 0002 movs r2, r0
  10277. 8003b68: 693b ldr r3, [r7, #16]
  10278. 8003b6a: 1ad3 subs r3, r2, r3
  10279. 8003b6c: 2b02 cmp r3, #2
  10280. 8003b6e: d901 bls.n 8003b74 <HAL_RCC_OscConfig+0x1fc>
  10281. {
  10282. return HAL_TIMEOUT;
  10283. 8003b70: 2303 movs r3, #3
  10284. 8003b72: e1fe b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10285. while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
  10286. 8003b74: 4b4b ldr r3, [pc, #300] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10287. 8003b76: 681a ldr r2, [r3, #0]
  10288. 8003b78: 2380 movs r3, #128 @ 0x80
  10289. 8003b7a: 00db lsls r3, r3, #3
  10290. 8003b7c: 4013 ands r3, r2
  10291. 8003b7e: d0f0 beq.n 8003b62 <HAL_RCC_OscConfig+0x1ea>
  10292. }
  10293. }
  10294. /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
  10295. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  10296. 8003b80: 4b48 ldr r3, [pc, #288] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10297. 8003b82: 685b ldr r3, [r3, #4]
  10298. 8003b84: 4a4a ldr r2, [pc, #296] @ (8003cb0 <HAL_RCC_OscConfig+0x338>)
  10299. 8003b86: 4013 ands r3, r2
  10300. 8003b88: 0019 movs r1, r3
  10301. 8003b8a: 687b ldr r3, [r7, #4]
  10302. 8003b8c: 695b ldr r3, [r3, #20]
  10303. 8003b8e: 021a lsls r2, r3, #8
  10304. 8003b90: 4b44 ldr r3, [pc, #272] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10305. 8003b92: 430a orrs r2, r1
  10306. 8003b94: 605a str r2, [r3, #4]
  10307. 8003b96: e01b b.n 8003bd0 <HAL_RCC_OscConfig+0x258>
  10308. }
  10309. else
  10310. {
  10311. /* Disable the Internal High Speed oscillator (HSI16). */
  10312. __HAL_RCC_HSI_DISABLE();
  10313. 8003b98: 4b42 ldr r3, [pc, #264] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10314. 8003b9a: 681a ldr r2, [r3, #0]
  10315. 8003b9c: 4b41 ldr r3, [pc, #260] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10316. 8003b9e: 4949 ldr r1, [pc, #292] @ (8003cc4 <HAL_RCC_OscConfig+0x34c>)
  10317. 8003ba0: 400a ands r2, r1
  10318. 8003ba2: 601a str r2, [r3, #0]
  10319. /* Get Start Tick*/
  10320. tickstart = HAL_GetTick();
  10321. 8003ba4: f7fd fe60 bl 8001868 <HAL_GetTick>
  10322. 8003ba8: 0003 movs r3, r0
  10323. 8003baa: 613b str r3, [r7, #16]
  10324. /* Wait till HSI is disabled */
  10325. while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U)
  10326. 8003bac: e008 b.n 8003bc0 <HAL_RCC_OscConfig+0x248>
  10327. {
  10328. if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
  10329. 8003bae: f7fd fe5b bl 8001868 <HAL_GetTick>
  10330. 8003bb2: 0002 movs r2, r0
  10331. 8003bb4: 693b ldr r3, [r7, #16]
  10332. 8003bb6: 1ad3 subs r3, r2, r3
  10333. 8003bb8: 2b02 cmp r3, #2
  10334. 8003bba: d901 bls.n 8003bc0 <HAL_RCC_OscConfig+0x248>
  10335. {
  10336. return HAL_TIMEOUT;
  10337. 8003bbc: 2303 movs r3, #3
  10338. 8003bbe: e1d8 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10339. while (READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U)
  10340. 8003bc0: 4b38 ldr r3, [pc, #224] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10341. 8003bc2: 681a ldr r2, [r3, #0]
  10342. 8003bc4: 2380 movs r3, #128 @ 0x80
  10343. 8003bc6: 00db lsls r3, r3, #3
  10344. 8003bc8: 4013 ands r3, r2
  10345. 8003bca: d1f0 bne.n 8003bae <HAL_RCC_OscConfig+0x236>
  10346. 8003bcc: e000 b.n 8003bd0 <HAL_RCC_OscConfig+0x258>
  10347. if ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
  10348. 8003bce: 46c0 nop @ (mov r8, r8)
  10349. }
  10350. }
  10351. }
  10352. }
  10353. /*------------------------------ LSI Configuration -------------------------*/
  10354. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
  10355. 8003bd0: 687b ldr r3, [r7, #4]
  10356. 8003bd2: 681b ldr r3, [r3, #0]
  10357. 8003bd4: 2208 movs r2, #8
  10358. 8003bd6: 4013 ands r3, r2
  10359. 8003bd8: d047 beq.n 8003c6a <HAL_RCC_OscConfig+0x2f2>
  10360. {
  10361. /* Check the parameters */
  10362. assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
  10363. /* Check if LSI is used as system clock */
  10364. if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSI)
  10365. 8003bda: 4b32 ldr r3, [pc, #200] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10366. 8003bdc: 689b ldr r3, [r3, #8]
  10367. 8003bde: 2238 movs r2, #56 @ 0x38
  10368. 8003be0: 4013 ands r3, r2
  10369. 8003be2: 2b18 cmp r3, #24
  10370. 8003be4: d10a bne.n 8003bfc <HAL_RCC_OscConfig+0x284>
  10371. {
  10372. /* When LSI is used as system clock it will not be disabled */
  10373. if ((((RCC->CSR) & RCC_CSR_LSIRDY) != 0U) && (RCC_OscInitStruct->LSIState == RCC_LSI_OFF))
  10374. 8003be6: 4b2f ldr r3, [pc, #188] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10375. 8003be8: 6e1b ldr r3, [r3, #96] @ 0x60
  10376. 8003bea: 2202 movs r2, #2
  10377. 8003bec: 4013 ands r3, r2
  10378. 8003bee: d03c beq.n 8003c6a <HAL_RCC_OscConfig+0x2f2>
  10379. 8003bf0: 687b ldr r3, [r7, #4]
  10380. 8003bf2: 699b ldr r3, [r3, #24]
  10381. 8003bf4: 2b00 cmp r3, #0
  10382. 8003bf6: d138 bne.n 8003c6a <HAL_RCC_OscConfig+0x2f2>
  10383. {
  10384. return HAL_ERROR;
  10385. 8003bf8: 2301 movs r3, #1
  10386. 8003bfa: e1ba b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10387. }
  10388. }
  10389. else
  10390. {
  10391. /* Check the LSI State */
  10392. if (RCC_OscInitStruct->LSIState != RCC_LSI_OFF)
  10393. 8003bfc: 687b ldr r3, [r7, #4]
  10394. 8003bfe: 699b ldr r3, [r3, #24]
  10395. 8003c00: 2b00 cmp r3, #0
  10396. 8003c02: d019 beq.n 8003c38 <HAL_RCC_OscConfig+0x2c0>
  10397. {
  10398. /* Enable the Internal Low Speed oscillator (LSI). */
  10399. __HAL_RCC_LSI_ENABLE();
  10400. 8003c04: 4b27 ldr r3, [pc, #156] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10401. 8003c06: 6e1a ldr r2, [r3, #96] @ 0x60
  10402. 8003c08: 4b26 ldr r3, [pc, #152] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10403. 8003c0a: 2101 movs r1, #1
  10404. 8003c0c: 430a orrs r2, r1
  10405. 8003c0e: 661a str r2, [r3, #96] @ 0x60
  10406. /* Get Start Tick*/
  10407. tickstart = HAL_GetTick();
  10408. 8003c10: f7fd fe2a bl 8001868 <HAL_GetTick>
  10409. 8003c14: 0003 movs r3, r0
  10410. 8003c16: 613b str r3, [r7, #16]
  10411. /* Wait till LSI is ready */
  10412. while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
  10413. 8003c18: e008 b.n 8003c2c <HAL_RCC_OscConfig+0x2b4>
  10414. {
  10415. if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
  10416. 8003c1a: f7fd fe25 bl 8001868 <HAL_GetTick>
  10417. 8003c1e: 0002 movs r2, r0
  10418. 8003c20: 693b ldr r3, [r7, #16]
  10419. 8003c22: 1ad3 subs r3, r2, r3
  10420. 8003c24: 2b02 cmp r3, #2
  10421. 8003c26: d901 bls.n 8003c2c <HAL_RCC_OscConfig+0x2b4>
  10422. {
  10423. return HAL_TIMEOUT;
  10424. 8003c28: 2303 movs r3, #3
  10425. 8003c2a: e1a2 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10426. while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
  10427. 8003c2c: 4b1d ldr r3, [pc, #116] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10428. 8003c2e: 6e1b ldr r3, [r3, #96] @ 0x60
  10429. 8003c30: 2202 movs r2, #2
  10430. 8003c32: 4013 ands r3, r2
  10431. 8003c34: d0f1 beq.n 8003c1a <HAL_RCC_OscConfig+0x2a2>
  10432. 8003c36: e018 b.n 8003c6a <HAL_RCC_OscConfig+0x2f2>
  10433. }
  10434. }
  10435. else
  10436. {
  10437. /* Disable the Internal Low Speed oscillator (LSI). */
  10438. __HAL_RCC_LSI_DISABLE();
  10439. 8003c38: 4b1a ldr r3, [pc, #104] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10440. 8003c3a: 6e1a ldr r2, [r3, #96] @ 0x60
  10441. 8003c3c: 4b19 ldr r3, [pc, #100] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10442. 8003c3e: 2101 movs r1, #1
  10443. 8003c40: 438a bics r2, r1
  10444. 8003c42: 661a str r2, [r3, #96] @ 0x60
  10445. /* Get Start Tick*/
  10446. tickstart = HAL_GetTick();
  10447. 8003c44: f7fd fe10 bl 8001868 <HAL_GetTick>
  10448. 8003c48: 0003 movs r3, r0
  10449. 8003c4a: 613b str r3, [r7, #16]
  10450. /* Wait till LSI is disabled */
  10451. while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) != 0U)
  10452. 8003c4c: e008 b.n 8003c60 <HAL_RCC_OscConfig+0x2e8>
  10453. {
  10454. if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
  10455. 8003c4e: f7fd fe0b bl 8001868 <HAL_GetTick>
  10456. 8003c52: 0002 movs r2, r0
  10457. 8003c54: 693b ldr r3, [r7, #16]
  10458. 8003c56: 1ad3 subs r3, r2, r3
  10459. 8003c58: 2b02 cmp r3, #2
  10460. 8003c5a: d901 bls.n 8003c60 <HAL_RCC_OscConfig+0x2e8>
  10461. {
  10462. return HAL_TIMEOUT;
  10463. 8003c5c: 2303 movs r3, #3
  10464. 8003c5e: e188 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10465. while (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) != 0U)
  10466. 8003c60: 4b10 ldr r3, [pc, #64] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10467. 8003c62: 6e1b ldr r3, [r3, #96] @ 0x60
  10468. 8003c64: 2202 movs r2, #2
  10469. 8003c66: 4013 ands r3, r2
  10470. 8003c68: d1f1 bne.n 8003c4e <HAL_RCC_OscConfig+0x2d6>
  10471. }
  10472. }
  10473. }
  10474. }
  10475. /*------------------------------ LSE Configuration -------------------------*/
  10476. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
  10477. 8003c6a: 687b ldr r3, [r7, #4]
  10478. 8003c6c: 681b ldr r3, [r3, #0]
  10479. 8003c6e: 2204 movs r2, #4
  10480. 8003c70: 4013 ands r3, r2
  10481. 8003c72: d100 bne.n 8003c76 <HAL_RCC_OscConfig+0x2fe>
  10482. 8003c74: e0c6 b.n 8003e04 <HAL_RCC_OscConfig+0x48c>
  10483. {
  10484. FlagStatus pwrclkchanged = RESET;
  10485. 8003c76: 231f movs r3, #31
  10486. 8003c78: 18fb adds r3, r7, r3
  10487. 8003c7a: 2200 movs r2, #0
  10488. 8003c7c: 701a strb r2, [r3, #0]
  10489. /* Check the parameters */
  10490. assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
  10491. /* When the LSE is used as system clock, it is not allowed disable it */
  10492. if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSE)
  10493. 8003c7e: 4b09 ldr r3, [pc, #36] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10494. 8003c80: 689b ldr r3, [r3, #8]
  10495. 8003c82: 2238 movs r2, #56 @ 0x38
  10496. 8003c84: 4013 ands r3, r2
  10497. 8003c86: 2b20 cmp r3, #32
  10498. 8003c88: d11e bne.n 8003cc8 <HAL_RCC_OscConfig+0x350>
  10499. {
  10500. if ((((RCC->BDCR) & RCC_BDCR_LSERDY) != 0U) && (RCC_OscInitStruct->LSEState == RCC_LSE_OFF))
  10501. 8003c8a: 4b06 ldr r3, [pc, #24] @ (8003ca4 <HAL_RCC_OscConfig+0x32c>)
  10502. 8003c8c: 6ddb ldr r3, [r3, #92] @ 0x5c
  10503. 8003c8e: 2202 movs r2, #2
  10504. 8003c90: 4013 ands r3, r2
  10505. 8003c92: d100 bne.n 8003c96 <HAL_RCC_OscConfig+0x31e>
  10506. 8003c94: e0b6 b.n 8003e04 <HAL_RCC_OscConfig+0x48c>
  10507. 8003c96: 687b ldr r3, [r7, #4]
  10508. 8003c98: 689b ldr r3, [r3, #8]
  10509. 8003c9a: 2b00 cmp r3, #0
  10510. 8003c9c: d000 beq.n 8003ca0 <HAL_RCC_OscConfig+0x328>
  10511. 8003c9e: e0b1 b.n 8003e04 <HAL_RCC_OscConfig+0x48c>
  10512. {
  10513. return HAL_ERROR;
  10514. 8003ca0: 2301 movs r3, #1
  10515. 8003ca2: e166 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10516. 8003ca4: 40021000 .word 0x40021000
  10517. 8003ca8: fffeffff .word 0xfffeffff
  10518. 8003cac: fffbffff .word 0xfffbffff
  10519. 8003cb0: ffff80ff .word 0xffff80ff
  10520. 8003cb4: ffffc7ff .word 0xffffc7ff
  10521. 8003cb8: 00f42400 .word 0x00f42400
  10522. 8003cbc: 20000000 .word 0x20000000
  10523. 8003cc0: 20000104 .word 0x20000104
  10524. 8003cc4: fffffeff .word 0xfffffeff
  10525. }
  10526. else
  10527. {
  10528. /* Update LSE configuration in Backup Domain control register */
  10529. /* Requires to enable write access to Backup Domain of necessary */
  10530. if (__HAL_RCC_PWR_IS_CLK_DISABLED() != 0U)
  10531. 8003cc8: 4bac ldr r3, [pc, #688] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10532. 8003cca: 6bda ldr r2, [r3, #60] @ 0x3c
  10533. 8003ccc: 2380 movs r3, #128 @ 0x80
  10534. 8003cce: 055b lsls r3, r3, #21
  10535. 8003cd0: 4013 ands r3, r2
  10536. 8003cd2: d101 bne.n 8003cd8 <HAL_RCC_OscConfig+0x360>
  10537. 8003cd4: 2301 movs r3, #1
  10538. 8003cd6: e000 b.n 8003cda <HAL_RCC_OscConfig+0x362>
  10539. 8003cd8: 2300 movs r3, #0
  10540. 8003cda: 2b00 cmp r3, #0
  10541. 8003cdc: d011 beq.n 8003d02 <HAL_RCC_OscConfig+0x38a>
  10542. {
  10543. __HAL_RCC_PWR_CLK_ENABLE();
  10544. 8003cde: 4ba7 ldr r3, [pc, #668] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10545. 8003ce0: 6bda ldr r2, [r3, #60] @ 0x3c
  10546. 8003ce2: 4ba6 ldr r3, [pc, #664] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10547. 8003ce4: 2180 movs r1, #128 @ 0x80
  10548. 8003ce6: 0549 lsls r1, r1, #21
  10549. 8003ce8: 430a orrs r2, r1
  10550. 8003cea: 63da str r2, [r3, #60] @ 0x3c
  10551. 8003cec: 4ba3 ldr r3, [pc, #652] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10552. 8003cee: 6bda ldr r2, [r3, #60] @ 0x3c
  10553. 8003cf0: 2380 movs r3, #128 @ 0x80
  10554. 8003cf2: 055b lsls r3, r3, #21
  10555. 8003cf4: 4013 ands r3, r2
  10556. 8003cf6: 60fb str r3, [r7, #12]
  10557. 8003cf8: 68fb ldr r3, [r7, #12]
  10558. pwrclkchanged = SET;
  10559. 8003cfa: 231f movs r3, #31
  10560. 8003cfc: 18fb adds r3, r7, r3
  10561. 8003cfe: 2201 movs r2, #1
  10562. 8003d00: 701a strb r2, [r3, #0]
  10563. }
  10564. if (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
  10565. 8003d02: 4b9f ldr r3, [pc, #636] @ (8003f80 <HAL_RCC_OscConfig+0x608>)
  10566. 8003d04: 681a ldr r2, [r3, #0]
  10567. 8003d06: 2380 movs r3, #128 @ 0x80
  10568. 8003d08: 005b lsls r3, r3, #1
  10569. 8003d0a: 4013 ands r3, r2
  10570. 8003d0c: d11a bne.n 8003d44 <HAL_RCC_OscConfig+0x3cc>
  10571. {
  10572. /* Enable write access to Backup domain */
  10573. SET_BIT(PWR->CR1, PWR_CR1_DBP);
  10574. 8003d0e: 4b9c ldr r3, [pc, #624] @ (8003f80 <HAL_RCC_OscConfig+0x608>)
  10575. 8003d10: 681a ldr r2, [r3, #0]
  10576. 8003d12: 4b9b ldr r3, [pc, #620] @ (8003f80 <HAL_RCC_OscConfig+0x608>)
  10577. 8003d14: 2180 movs r1, #128 @ 0x80
  10578. 8003d16: 0049 lsls r1, r1, #1
  10579. 8003d18: 430a orrs r2, r1
  10580. 8003d1a: 601a str r2, [r3, #0]
  10581. /* Wait for Backup domain Write protection disable */
  10582. tickstart = HAL_GetTick();
  10583. 8003d1c: f7fd fda4 bl 8001868 <HAL_GetTick>
  10584. 8003d20: 0003 movs r3, r0
  10585. 8003d22: 613b str r3, [r7, #16]
  10586. while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
  10587. 8003d24: e008 b.n 8003d38 <HAL_RCC_OscConfig+0x3c0>
  10588. {
  10589. if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
  10590. 8003d26: f7fd fd9f bl 8001868 <HAL_GetTick>
  10591. 8003d2a: 0002 movs r2, r0
  10592. 8003d2c: 693b ldr r3, [r7, #16]
  10593. 8003d2e: 1ad3 subs r3, r2, r3
  10594. 8003d30: 2b02 cmp r3, #2
  10595. 8003d32: d901 bls.n 8003d38 <HAL_RCC_OscConfig+0x3c0>
  10596. {
  10597. return HAL_TIMEOUT;
  10598. 8003d34: 2303 movs r3, #3
  10599. 8003d36: e11c b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10600. while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP))
  10601. 8003d38: 4b91 ldr r3, [pc, #580] @ (8003f80 <HAL_RCC_OscConfig+0x608>)
  10602. 8003d3a: 681a ldr r2, [r3, #0]
  10603. 8003d3c: 2380 movs r3, #128 @ 0x80
  10604. 8003d3e: 005b lsls r3, r3, #1
  10605. 8003d40: 4013 ands r3, r2
  10606. 8003d42: d0f0 beq.n 8003d26 <HAL_RCC_OscConfig+0x3ae>
  10607. }
  10608. }
  10609. }
  10610. /* Set the new LSE configuration -----------------------------------------*/
  10611. __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
  10612. 8003d44: 687b ldr r3, [r7, #4]
  10613. 8003d46: 689b ldr r3, [r3, #8]
  10614. 8003d48: 2b01 cmp r3, #1
  10615. 8003d4a: d106 bne.n 8003d5a <HAL_RCC_OscConfig+0x3e2>
  10616. 8003d4c: 4b8b ldr r3, [pc, #556] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10617. 8003d4e: 6dda ldr r2, [r3, #92] @ 0x5c
  10618. 8003d50: 4b8a ldr r3, [pc, #552] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10619. 8003d52: 2101 movs r1, #1
  10620. 8003d54: 430a orrs r2, r1
  10621. 8003d56: 65da str r2, [r3, #92] @ 0x5c
  10622. 8003d58: e01c b.n 8003d94 <HAL_RCC_OscConfig+0x41c>
  10623. 8003d5a: 687b ldr r3, [r7, #4]
  10624. 8003d5c: 689b ldr r3, [r3, #8]
  10625. 8003d5e: 2b05 cmp r3, #5
  10626. 8003d60: d10c bne.n 8003d7c <HAL_RCC_OscConfig+0x404>
  10627. 8003d62: 4b86 ldr r3, [pc, #536] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10628. 8003d64: 6dda ldr r2, [r3, #92] @ 0x5c
  10629. 8003d66: 4b85 ldr r3, [pc, #532] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10630. 8003d68: 2104 movs r1, #4
  10631. 8003d6a: 430a orrs r2, r1
  10632. 8003d6c: 65da str r2, [r3, #92] @ 0x5c
  10633. 8003d6e: 4b83 ldr r3, [pc, #524] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10634. 8003d70: 6dda ldr r2, [r3, #92] @ 0x5c
  10635. 8003d72: 4b82 ldr r3, [pc, #520] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10636. 8003d74: 2101 movs r1, #1
  10637. 8003d76: 430a orrs r2, r1
  10638. 8003d78: 65da str r2, [r3, #92] @ 0x5c
  10639. 8003d7a: e00b b.n 8003d94 <HAL_RCC_OscConfig+0x41c>
  10640. 8003d7c: 4b7f ldr r3, [pc, #508] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10641. 8003d7e: 6dda ldr r2, [r3, #92] @ 0x5c
  10642. 8003d80: 4b7e ldr r3, [pc, #504] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10643. 8003d82: 2101 movs r1, #1
  10644. 8003d84: 438a bics r2, r1
  10645. 8003d86: 65da str r2, [r3, #92] @ 0x5c
  10646. 8003d88: 4b7c ldr r3, [pc, #496] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10647. 8003d8a: 6dda ldr r2, [r3, #92] @ 0x5c
  10648. 8003d8c: 4b7b ldr r3, [pc, #492] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10649. 8003d8e: 2104 movs r1, #4
  10650. 8003d90: 438a bics r2, r1
  10651. 8003d92: 65da str r2, [r3, #92] @ 0x5c
  10652. /* Check the LSE State */
  10653. if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF)
  10654. 8003d94: 687b ldr r3, [r7, #4]
  10655. 8003d96: 689b ldr r3, [r3, #8]
  10656. 8003d98: 2b00 cmp r3, #0
  10657. 8003d9a: d014 beq.n 8003dc6 <HAL_RCC_OscConfig+0x44e>
  10658. {
  10659. /* Get Start Tick*/
  10660. tickstart = HAL_GetTick();
  10661. 8003d9c: f7fd fd64 bl 8001868 <HAL_GetTick>
  10662. 8003da0: 0003 movs r3, r0
  10663. 8003da2: 613b str r3, [r7, #16]
  10664. /* Wait till LSE is ready */
  10665. while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
  10666. 8003da4: e009 b.n 8003dba <HAL_RCC_OscConfig+0x442>
  10667. {
  10668. if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
  10669. 8003da6: f7fd fd5f bl 8001868 <HAL_GetTick>
  10670. 8003daa: 0002 movs r2, r0
  10671. 8003dac: 693b ldr r3, [r7, #16]
  10672. 8003dae: 1ad3 subs r3, r2, r3
  10673. 8003db0: 4a74 ldr r2, [pc, #464] @ (8003f84 <HAL_RCC_OscConfig+0x60c>)
  10674. 8003db2: 4293 cmp r3, r2
  10675. 8003db4: d901 bls.n 8003dba <HAL_RCC_OscConfig+0x442>
  10676. {
  10677. return HAL_TIMEOUT;
  10678. 8003db6: 2303 movs r3, #3
  10679. 8003db8: e0db b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10680. while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
  10681. 8003dba: 4b70 ldr r3, [pc, #448] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10682. 8003dbc: 6ddb ldr r3, [r3, #92] @ 0x5c
  10683. 8003dbe: 2202 movs r2, #2
  10684. 8003dc0: 4013 ands r3, r2
  10685. 8003dc2: d0f0 beq.n 8003da6 <HAL_RCC_OscConfig+0x42e>
  10686. 8003dc4: e013 b.n 8003dee <HAL_RCC_OscConfig+0x476>
  10687. }
  10688. }
  10689. else
  10690. {
  10691. /* Get Start Tick*/
  10692. tickstart = HAL_GetTick();
  10693. 8003dc6: f7fd fd4f bl 8001868 <HAL_GetTick>
  10694. 8003dca: 0003 movs r3, r0
  10695. 8003dcc: 613b str r3, [r7, #16]
  10696. /* Wait till LSE is disabled */
  10697. while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) != 0U)
  10698. 8003dce: e009 b.n 8003de4 <HAL_RCC_OscConfig+0x46c>
  10699. {
  10700. if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
  10701. 8003dd0: f7fd fd4a bl 8001868 <HAL_GetTick>
  10702. 8003dd4: 0002 movs r2, r0
  10703. 8003dd6: 693b ldr r3, [r7, #16]
  10704. 8003dd8: 1ad3 subs r3, r2, r3
  10705. 8003dda: 4a6a ldr r2, [pc, #424] @ (8003f84 <HAL_RCC_OscConfig+0x60c>)
  10706. 8003ddc: 4293 cmp r3, r2
  10707. 8003dde: d901 bls.n 8003de4 <HAL_RCC_OscConfig+0x46c>
  10708. {
  10709. return HAL_TIMEOUT;
  10710. 8003de0: 2303 movs r3, #3
  10711. 8003de2: e0c6 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10712. while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) != 0U)
  10713. 8003de4: 4b65 ldr r3, [pc, #404] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10714. 8003de6: 6ddb ldr r3, [r3, #92] @ 0x5c
  10715. 8003de8: 2202 movs r2, #2
  10716. 8003dea: 4013 ands r3, r2
  10717. 8003dec: d1f0 bne.n 8003dd0 <HAL_RCC_OscConfig+0x458>
  10718. }
  10719. }
  10720. }
  10721. /* Restore clock configuration if changed */
  10722. if (pwrclkchanged == SET)
  10723. 8003dee: 231f movs r3, #31
  10724. 8003df0: 18fb adds r3, r7, r3
  10725. 8003df2: 781b ldrb r3, [r3, #0]
  10726. 8003df4: 2b01 cmp r3, #1
  10727. 8003df6: d105 bne.n 8003e04 <HAL_RCC_OscConfig+0x48c>
  10728. {
  10729. __HAL_RCC_PWR_CLK_DISABLE();
  10730. 8003df8: 4b60 ldr r3, [pc, #384] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10731. 8003dfa: 6bda ldr r2, [r3, #60] @ 0x3c
  10732. 8003dfc: 4b5f ldr r3, [pc, #380] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10733. 8003dfe: 4962 ldr r1, [pc, #392] @ (8003f88 <HAL_RCC_OscConfig+0x610>)
  10734. 8003e00: 400a ands r2, r1
  10735. 8003e02: 63da str r2, [r3, #60] @ 0x3c
  10736. #endif /* RCC_HSI48_SUPPORT */
  10737. /*-------------------------------- PLL Configuration -----------------------*/
  10738. /* Check the parameters */
  10739. assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
  10740. if (RCC_OscInitStruct->PLL.PLLState != RCC_PLL_NONE)
  10741. 8003e04: 687b ldr r3, [r7, #4]
  10742. 8003e06: 69db ldr r3, [r3, #28]
  10743. 8003e08: 2b00 cmp r3, #0
  10744. 8003e0a: d100 bne.n 8003e0e <HAL_RCC_OscConfig+0x496>
  10745. 8003e0c: e0b0 b.n 8003f70 <HAL_RCC_OscConfig+0x5f8>
  10746. {
  10747. /* Check if the PLL is used as system clock or not */
  10748. if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
  10749. 8003e0e: 4b5b ldr r3, [pc, #364] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10750. 8003e10: 689b ldr r3, [r3, #8]
  10751. 8003e12: 2238 movs r2, #56 @ 0x38
  10752. 8003e14: 4013 ands r3, r2
  10753. 8003e16: 2b10 cmp r3, #16
  10754. 8003e18: d100 bne.n 8003e1c <HAL_RCC_OscConfig+0x4a4>
  10755. 8003e1a: e078 b.n 8003f0e <HAL_RCC_OscConfig+0x596>
  10756. {
  10757. if (RCC_OscInitStruct->PLL.PLLState == RCC_PLL_ON)
  10758. 8003e1c: 687b ldr r3, [r7, #4]
  10759. 8003e1e: 69db ldr r3, [r3, #28]
  10760. 8003e20: 2b02 cmp r3, #2
  10761. 8003e22: d153 bne.n 8003ecc <HAL_RCC_OscConfig+0x554>
  10762. assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ));
  10763. #endif /* RCC_PLLQ_SUPPORT */
  10764. assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR));
  10765. /* Disable the main PLL. */
  10766. __HAL_RCC_PLL_DISABLE();
  10767. 8003e24: 4b55 ldr r3, [pc, #340] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10768. 8003e26: 681a ldr r2, [r3, #0]
  10769. 8003e28: 4b54 ldr r3, [pc, #336] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10770. 8003e2a: 4958 ldr r1, [pc, #352] @ (8003f8c <HAL_RCC_OscConfig+0x614>)
  10771. 8003e2c: 400a ands r2, r1
  10772. 8003e2e: 601a str r2, [r3, #0]
  10773. /* Get Start Tick*/
  10774. tickstart = HAL_GetTick();
  10775. 8003e30: f7fd fd1a bl 8001868 <HAL_GetTick>
  10776. 8003e34: 0003 movs r3, r0
  10777. 8003e36: 613b str r3, [r7, #16]
  10778. /* Wait till PLL is ready */
  10779. while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
  10780. 8003e38: e008 b.n 8003e4c <HAL_RCC_OscConfig+0x4d4>
  10781. {
  10782. if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
  10783. 8003e3a: f7fd fd15 bl 8001868 <HAL_GetTick>
  10784. 8003e3e: 0002 movs r2, r0
  10785. 8003e40: 693b ldr r3, [r7, #16]
  10786. 8003e42: 1ad3 subs r3, r2, r3
  10787. 8003e44: 2b02 cmp r3, #2
  10788. 8003e46: d901 bls.n 8003e4c <HAL_RCC_OscConfig+0x4d4>
  10789. {
  10790. return HAL_TIMEOUT;
  10791. 8003e48: 2303 movs r3, #3
  10792. 8003e4a: e092 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10793. while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
  10794. 8003e4c: 4b4b ldr r3, [pc, #300] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10795. 8003e4e: 681a ldr r2, [r3, #0]
  10796. 8003e50: 2380 movs r3, #128 @ 0x80
  10797. 8003e52: 049b lsls r3, r3, #18
  10798. 8003e54: 4013 ands r3, r2
  10799. 8003e56: d1f0 bne.n 8003e3a <HAL_RCC_OscConfig+0x4c2>
  10800. RCC_OscInitStruct->PLL.PLLN,
  10801. RCC_OscInitStruct->PLL.PLLP,
  10802. RCC_OscInitStruct->PLL.PLLQ,
  10803. RCC_OscInitStruct->PLL.PLLR);
  10804. #else /* !RCC_PLLQ_SUPPORT */
  10805. __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
  10806. 8003e58: 4b48 ldr r3, [pc, #288] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10807. 8003e5a: 68db ldr r3, [r3, #12]
  10808. 8003e5c: 4a4c ldr r2, [pc, #304] @ (8003f90 <HAL_RCC_OscConfig+0x618>)
  10809. 8003e5e: 4013 ands r3, r2
  10810. 8003e60: 0019 movs r1, r3
  10811. 8003e62: 687b ldr r3, [r7, #4]
  10812. 8003e64: 6a1a ldr r2, [r3, #32]
  10813. 8003e66: 687b ldr r3, [r7, #4]
  10814. 8003e68: 6a5b ldr r3, [r3, #36] @ 0x24
  10815. 8003e6a: 431a orrs r2, r3
  10816. 8003e6c: 687b ldr r3, [r7, #4]
  10817. 8003e6e: 6a9b ldr r3, [r3, #40] @ 0x28
  10818. 8003e70: 021b lsls r3, r3, #8
  10819. 8003e72: 431a orrs r2, r3
  10820. 8003e74: 687b ldr r3, [r7, #4]
  10821. 8003e76: 6adb ldr r3, [r3, #44] @ 0x2c
  10822. 8003e78: 431a orrs r2, r3
  10823. 8003e7a: 687b ldr r3, [r7, #4]
  10824. 8003e7c: 6b1b ldr r3, [r3, #48] @ 0x30
  10825. 8003e7e: 431a orrs r2, r3
  10826. 8003e80: 4b3e ldr r3, [pc, #248] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10827. 8003e82: 430a orrs r2, r1
  10828. 8003e84: 60da str r2, [r3, #12]
  10829. RCC_OscInitStruct->PLL.PLLP,
  10830. RCC_OscInitStruct->PLL.PLLR);
  10831. #endif /* RCC_PLLQ_SUPPORT */
  10832. /* Enable the main PLL. */
  10833. __HAL_RCC_PLL_ENABLE();
  10834. 8003e86: 4b3d ldr r3, [pc, #244] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10835. 8003e88: 681a ldr r2, [r3, #0]
  10836. 8003e8a: 4b3c ldr r3, [pc, #240] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10837. 8003e8c: 2180 movs r1, #128 @ 0x80
  10838. 8003e8e: 0449 lsls r1, r1, #17
  10839. 8003e90: 430a orrs r2, r1
  10840. 8003e92: 601a str r2, [r3, #0]
  10841. /* Enable PLLR Clock output. */
  10842. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLRCLK);
  10843. 8003e94: 4b39 ldr r3, [pc, #228] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10844. 8003e96: 68da ldr r2, [r3, #12]
  10845. 8003e98: 4b38 ldr r3, [pc, #224] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10846. 8003e9a: 2180 movs r1, #128 @ 0x80
  10847. 8003e9c: 0549 lsls r1, r1, #21
  10848. 8003e9e: 430a orrs r2, r1
  10849. 8003ea0: 60da str r2, [r3, #12]
  10850. /* Get Start Tick*/
  10851. tickstart = HAL_GetTick();
  10852. 8003ea2: f7fd fce1 bl 8001868 <HAL_GetTick>
  10853. 8003ea6: 0003 movs r3, r0
  10854. 8003ea8: 613b str r3, [r7, #16]
  10855. /* Wait till PLL is ready */
  10856. while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
  10857. 8003eaa: e008 b.n 8003ebe <HAL_RCC_OscConfig+0x546>
  10858. {
  10859. if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
  10860. 8003eac: f7fd fcdc bl 8001868 <HAL_GetTick>
  10861. 8003eb0: 0002 movs r2, r0
  10862. 8003eb2: 693b ldr r3, [r7, #16]
  10863. 8003eb4: 1ad3 subs r3, r2, r3
  10864. 8003eb6: 2b02 cmp r3, #2
  10865. 8003eb8: d901 bls.n 8003ebe <HAL_RCC_OscConfig+0x546>
  10866. {
  10867. return HAL_TIMEOUT;
  10868. 8003eba: 2303 movs r3, #3
  10869. 8003ebc: e059 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10870. while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
  10871. 8003ebe: 4b2f ldr r3, [pc, #188] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10872. 8003ec0: 681a ldr r2, [r3, #0]
  10873. 8003ec2: 2380 movs r3, #128 @ 0x80
  10874. 8003ec4: 049b lsls r3, r3, #18
  10875. 8003ec6: 4013 ands r3, r2
  10876. 8003ec8: d0f0 beq.n 8003eac <HAL_RCC_OscConfig+0x534>
  10877. 8003eca: e051 b.n 8003f70 <HAL_RCC_OscConfig+0x5f8>
  10878. }
  10879. }
  10880. else
  10881. {
  10882. /* Disable the main PLL. */
  10883. __HAL_RCC_PLL_DISABLE();
  10884. 8003ecc: 4b2b ldr r3, [pc, #172] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10885. 8003ece: 681a ldr r2, [r3, #0]
  10886. 8003ed0: 4b2a ldr r3, [pc, #168] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10887. 8003ed2: 492e ldr r1, [pc, #184] @ (8003f8c <HAL_RCC_OscConfig+0x614>)
  10888. 8003ed4: 400a ands r2, r1
  10889. 8003ed6: 601a str r2, [r3, #0]
  10890. /* Get Start Tick*/
  10891. tickstart = HAL_GetTick();
  10892. 8003ed8: f7fd fcc6 bl 8001868 <HAL_GetTick>
  10893. 8003edc: 0003 movs r3, r0
  10894. 8003ede: 613b str r3, [r7, #16]
  10895. /* Wait till PLL is disabled */
  10896. while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
  10897. 8003ee0: e008 b.n 8003ef4 <HAL_RCC_OscConfig+0x57c>
  10898. {
  10899. if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
  10900. 8003ee2: f7fd fcc1 bl 8001868 <HAL_GetTick>
  10901. 8003ee6: 0002 movs r2, r0
  10902. 8003ee8: 693b ldr r3, [r7, #16]
  10903. 8003eea: 1ad3 subs r3, r2, r3
  10904. 8003eec: 2b02 cmp r3, #2
  10905. 8003eee: d901 bls.n 8003ef4 <HAL_RCC_OscConfig+0x57c>
  10906. {
  10907. return HAL_TIMEOUT;
  10908. 8003ef0: 2303 movs r3, #3
  10909. 8003ef2: e03e b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10910. while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U)
  10911. 8003ef4: 4b21 ldr r3, [pc, #132] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10912. 8003ef6: 681a ldr r2, [r3, #0]
  10913. 8003ef8: 2380 movs r3, #128 @ 0x80
  10914. 8003efa: 049b lsls r3, r3, #18
  10915. 8003efc: 4013 ands r3, r2
  10916. 8003efe: d1f0 bne.n 8003ee2 <HAL_RCC_OscConfig+0x56a>
  10917. }
  10918. /* Unselect main PLL clock source and disable main PLL outputs to save power */
  10919. #if defined(RCC_PLLQ_SUPPORT)
  10920. RCC->PLLCFGR &= ~(RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLPEN | RCC_PLLCFGR_PLLQEN | RCC_PLLCFGR_PLLREN);
  10921. #else
  10922. RCC->PLLCFGR &= ~(RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLPEN | RCC_PLLCFGR_PLLREN);
  10923. 8003f00: 4b1e ldr r3, [pc, #120] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10924. 8003f02: 68da ldr r2, [r3, #12]
  10925. 8003f04: 4b1d ldr r3, [pc, #116] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10926. 8003f06: 4923 ldr r1, [pc, #140] @ (8003f94 <HAL_RCC_OscConfig+0x61c>)
  10927. 8003f08: 400a ands r2, r1
  10928. 8003f0a: 60da str r2, [r3, #12]
  10929. 8003f0c: e030 b.n 8003f70 <HAL_RCC_OscConfig+0x5f8>
  10930. }
  10931. }
  10932. else
  10933. {
  10934. /* Check if there is a request to disable the PLL used as System clock source */
  10935. if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
  10936. 8003f0e: 687b ldr r3, [r7, #4]
  10937. 8003f10: 69db ldr r3, [r3, #28]
  10938. 8003f12: 2b01 cmp r3, #1
  10939. 8003f14: d101 bne.n 8003f1a <HAL_RCC_OscConfig+0x5a2>
  10940. {
  10941. return HAL_ERROR;
  10942. 8003f16: 2301 movs r3, #1
  10943. 8003f18: e02b b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  10944. }
  10945. else
  10946. {
  10947. /* Do not return HAL_ERROR if request repeats the current configuration */
  10948. temp_pllckcfg = RCC->PLLCFGR;
  10949. 8003f1a: 4b18 ldr r3, [pc, #96] @ (8003f7c <HAL_RCC_OscConfig+0x604>)
  10950. 8003f1c: 68db ldr r3, [r3, #12]
  10951. 8003f1e: 617b str r3, [r7, #20]
  10952. if ((READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  10953. 8003f20: 697b ldr r3, [r7, #20]
  10954. 8003f22: 2203 movs r2, #3
  10955. 8003f24: 401a ands r2, r3
  10956. 8003f26: 687b ldr r3, [r7, #4]
  10957. 8003f28: 6a1b ldr r3, [r3, #32]
  10958. 8003f2a: 429a cmp r2, r3
  10959. 8003f2c: d11e bne.n 8003f6c <HAL_RCC_OscConfig+0x5f4>
  10960. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
  10961. 8003f2e: 697b ldr r3, [r7, #20]
  10962. 8003f30: 2270 movs r2, #112 @ 0x70
  10963. 8003f32: 401a ands r2, r3
  10964. 8003f34: 687b ldr r3, [r7, #4]
  10965. 8003f36: 6a5b ldr r3, [r3, #36] @ 0x24
  10966. if ((READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  10967. 8003f38: 429a cmp r2, r3
  10968. 8003f3a: d117 bne.n 8003f6c <HAL_RCC_OscConfig+0x5f4>
  10969. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
  10970. 8003f3c: 697a ldr r2, [r7, #20]
  10971. 8003f3e: 23fe movs r3, #254 @ 0xfe
  10972. 8003f40: 01db lsls r3, r3, #7
  10973. 8003f42: 401a ands r2, r3
  10974. 8003f44: 687b ldr r3, [r7, #4]
  10975. 8003f46: 6a9b ldr r3, [r3, #40] @ 0x28
  10976. 8003f48: 021b lsls r3, r3, #8
  10977. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
  10978. 8003f4a: 429a cmp r2, r3
  10979. 8003f4c: d10e bne.n 8003f6c <HAL_RCC_OscConfig+0x5f4>
  10980. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) ||
  10981. 8003f4e: 697a ldr r2, [r7, #20]
  10982. 8003f50: 23f8 movs r3, #248 @ 0xf8
  10983. 8003f52: 039b lsls r3, r3, #14
  10984. 8003f54: 401a ands r2, r3
  10985. 8003f56: 687b ldr r3, [r7, #4]
  10986. 8003f58: 6adb ldr r3, [r3, #44] @ 0x2c
  10987. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
  10988. 8003f5a: 429a cmp r2, r3
  10989. 8003f5c: d106 bne.n 8003f6c <HAL_RCC_OscConfig+0x5f4>
  10990. #if defined (RCC_PLLQ_SUPPORT)
  10991. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLQ) != RCC_OscInitStruct->PLL.PLLQ) ||
  10992. #endif /* RCC_PLLQ_SUPPORT */
  10993. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLR) != RCC_OscInitStruct->PLL.PLLR))
  10994. 8003f5e: 697b ldr r3, [r7, #20]
  10995. 8003f60: 0f5b lsrs r3, r3, #29
  10996. 8003f62: 075a lsls r2, r3, #29
  10997. 8003f64: 687b ldr r3, [r7, #4]
  10998. 8003f66: 6b1b ldr r3, [r3, #48] @ 0x30
  10999. (READ_BIT(temp_pllckcfg, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) ||
  11000. 8003f68: 429a cmp r2, r3
  11001. 8003f6a: d001 beq.n 8003f70 <HAL_RCC_OscConfig+0x5f8>
  11002. {
  11003. return HAL_ERROR;
  11004. 8003f6c: 2301 movs r3, #1
  11005. 8003f6e: e000 b.n 8003f72 <HAL_RCC_OscConfig+0x5fa>
  11006. }
  11007. }
  11008. }
  11009. }
  11010. return HAL_OK;
  11011. 8003f70: 2300 movs r3, #0
  11012. }
  11013. 8003f72: 0018 movs r0, r3
  11014. 8003f74: 46bd mov sp, r7
  11015. 8003f76: b008 add sp, #32
  11016. 8003f78: bd80 pop {r7, pc}
  11017. 8003f7a: 46c0 nop @ (mov r8, r8)
  11018. 8003f7c: 40021000 .word 0x40021000
  11019. 8003f80: 40007000 .word 0x40007000
  11020. 8003f84: 00001388 .word 0x00001388
  11021. 8003f88: efffffff .word 0xefffffff
  11022. 8003f8c: feffffff .word 0xfeffffff
  11023. 8003f90: 1fc1808c .word 0x1fc1808c
  11024. 8003f94: effefffc .word 0xeffefffc
  11025. 08003f98 <HAL_RCC_ClockConfig>:
  11026. * HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
  11027. * (for more details refer to section above "Initialization/de-initialization functions")
  11028. * @retval None
  11029. */
  11030. HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
  11031. {
  11032. 8003f98: b580 push {r7, lr}
  11033. 8003f9a: b084 sub sp, #16
  11034. 8003f9c: af00 add r7, sp, #0
  11035. 8003f9e: 6078 str r0, [r7, #4]
  11036. 8003fa0: 6039 str r1, [r7, #0]
  11037. uint32_t tickstart;
  11038. /* Check Null pointer */
  11039. if (RCC_ClkInitStruct == NULL)
  11040. 8003fa2: 687b ldr r3, [r7, #4]
  11041. 8003fa4: 2b00 cmp r3, #0
  11042. 8003fa6: d101 bne.n 8003fac <HAL_RCC_ClockConfig+0x14>
  11043. {
  11044. return HAL_ERROR;
  11045. 8003fa8: 2301 movs r3, #1
  11046. 8003faa: e0e9 b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11047. /* To correctly read data from FLASH memory, the number of wait states (LATENCY)
  11048. must be correctly programmed according to the frequency of the FLASH clock
  11049. (HCLK) and the supply voltage of the device. */
  11050. /* Increasing the number of wait states because of higher CPU frequency */
  11051. if (FLatency > __HAL_FLASH_GET_LATENCY())
  11052. 8003fac: 4b76 ldr r3, [pc, #472] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11053. 8003fae: 681b ldr r3, [r3, #0]
  11054. 8003fb0: 2207 movs r2, #7
  11055. 8003fb2: 4013 ands r3, r2
  11056. 8003fb4: 683a ldr r2, [r7, #0]
  11057. 8003fb6: 429a cmp r2, r3
  11058. 8003fb8: d91e bls.n 8003ff8 <HAL_RCC_ClockConfig+0x60>
  11059. {
  11060. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  11061. __HAL_FLASH_SET_LATENCY(FLatency);
  11062. 8003fba: 4b73 ldr r3, [pc, #460] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11063. 8003fbc: 681b ldr r3, [r3, #0]
  11064. 8003fbe: 2207 movs r2, #7
  11065. 8003fc0: 4393 bics r3, r2
  11066. 8003fc2: 0019 movs r1, r3
  11067. 8003fc4: 4b70 ldr r3, [pc, #448] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11068. 8003fc6: 683a ldr r2, [r7, #0]
  11069. 8003fc8: 430a orrs r2, r1
  11070. 8003fca: 601a str r2, [r3, #0]
  11071. /* Check that the new number of wait states is taken into account to access the Flash
  11072. memory by polling the FLASH_ACR register */
  11073. tickstart = HAL_GetTick();
  11074. 8003fcc: f7fd fc4c bl 8001868 <HAL_GetTick>
  11075. 8003fd0: 0003 movs r3, r0
  11076. 8003fd2: 60fb str r3, [r7, #12]
  11077. while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
  11078. 8003fd4: e009 b.n 8003fea <HAL_RCC_ClockConfig+0x52>
  11079. {
  11080. if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
  11081. 8003fd6: f7fd fc47 bl 8001868 <HAL_GetTick>
  11082. 8003fda: 0002 movs r2, r0
  11083. 8003fdc: 68fb ldr r3, [r7, #12]
  11084. 8003fde: 1ad3 subs r3, r2, r3
  11085. 8003fe0: 4a6a ldr r2, [pc, #424] @ (800418c <HAL_RCC_ClockConfig+0x1f4>)
  11086. 8003fe2: 4293 cmp r3, r2
  11087. 8003fe4: d901 bls.n 8003fea <HAL_RCC_ClockConfig+0x52>
  11088. {
  11089. return HAL_TIMEOUT;
  11090. 8003fe6: 2303 movs r3, #3
  11091. 8003fe8: e0ca b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11092. while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
  11093. 8003fea: 4b67 ldr r3, [pc, #412] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11094. 8003fec: 681b ldr r3, [r3, #0]
  11095. 8003fee: 2207 movs r2, #7
  11096. 8003ff0: 4013 ands r3, r2
  11097. 8003ff2: 683a ldr r2, [r7, #0]
  11098. 8003ff4: 429a cmp r2, r3
  11099. 8003ff6: d1ee bne.n 8003fd6 <HAL_RCC_ClockConfig+0x3e>
  11100. }
  11101. }
  11102. }
  11103. /*-------------------------- HCLK Configuration --------------------------*/
  11104. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
  11105. 8003ff8: 687b ldr r3, [r7, #4]
  11106. 8003ffa: 681b ldr r3, [r3, #0]
  11107. 8003ffc: 2202 movs r2, #2
  11108. 8003ffe: 4013 ands r3, r2
  11109. 8004000: d015 beq.n 800402e <HAL_RCC_ClockConfig+0x96>
  11110. {
  11111. /* Set the highest APB divider in order to ensure that we do not go through
  11112. a non-spec phase whatever we decrease or increase HCLK. */
  11113. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  11114. 8004002: 687b ldr r3, [r7, #4]
  11115. 8004004: 681b ldr r3, [r3, #0]
  11116. 8004006: 2204 movs r2, #4
  11117. 8004008: 4013 ands r3, r2
  11118. 800400a: d006 beq.n 800401a <HAL_RCC_ClockConfig+0x82>
  11119. {
  11120. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE, RCC_HCLK_DIV16);
  11121. 800400c: 4b60 ldr r3, [pc, #384] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11122. 800400e: 689a ldr r2, [r3, #8]
  11123. 8004010: 4b5f ldr r3, [pc, #380] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11124. 8004012: 21e0 movs r1, #224 @ 0xe0
  11125. 8004014: 01c9 lsls r1, r1, #7
  11126. 8004016: 430a orrs r2, r1
  11127. 8004018: 609a str r2, [r3, #8]
  11128. }
  11129. /* Set the new HCLK clock divider */
  11130. assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
  11131. MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
  11132. 800401a: 4b5d ldr r3, [pc, #372] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11133. 800401c: 689b ldr r3, [r3, #8]
  11134. 800401e: 4a5d ldr r2, [pc, #372] @ (8004194 <HAL_RCC_ClockConfig+0x1fc>)
  11135. 8004020: 4013 ands r3, r2
  11136. 8004022: 0019 movs r1, r3
  11137. 8004024: 687b ldr r3, [r7, #4]
  11138. 8004026: 689a ldr r2, [r3, #8]
  11139. 8004028: 4b59 ldr r3, [pc, #356] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11140. 800402a: 430a orrs r2, r1
  11141. 800402c: 609a str r2, [r3, #8]
  11142. }
  11143. /*------------------------- SYSCLK Configuration ---------------------------*/
  11144. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
  11145. 800402e: 687b ldr r3, [r7, #4]
  11146. 8004030: 681b ldr r3, [r3, #0]
  11147. 8004032: 2201 movs r2, #1
  11148. 8004034: 4013 ands r3, r2
  11149. 8004036: d057 beq.n 80040e8 <HAL_RCC_ClockConfig+0x150>
  11150. {
  11151. assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
  11152. /* HSE is selected as System Clock Source */
  11153. if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
  11154. 8004038: 687b ldr r3, [r7, #4]
  11155. 800403a: 685b ldr r3, [r3, #4]
  11156. 800403c: 2b01 cmp r3, #1
  11157. 800403e: d107 bne.n 8004050 <HAL_RCC_ClockConfig+0xb8>
  11158. {
  11159. /* Check the HSE ready flag */
  11160. if (READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
  11161. 8004040: 4b53 ldr r3, [pc, #332] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11162. 8004042: 681a ldr r2, [r3, #0]
  11163. 8004044: 2380 movs r3, #128 @ 0x80
  11164. 8004046: 029b lsls r3, r3, #10
  11165. 8004048: 4013 ands r3, r2
  11166. 800404a: d12b bne.n 80040a4 <HAL_RCC_ClockConfig+0x10c>
  11167. {
  11168. return HAL_ERROR;
  11169. 800404c: 2301 movs r3, #1
  11170. 800404e: e097 b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11171. }
  11172. }
  11173. /* PLL is selected as System Clock Source */
  11174. else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
  11175. 8004050: 687b ldr r3, [r7, #4]
  11176. 8004052: 685b ldr r3, [r3, #4]
  11177. 8004054: 2b02 cmp r3, #2
  11178. 8004056: d107 bne.n 8004068 <HAL_RCC_ClockConfig+0xd0>
  11179. {
  11180. /* Check the PLL ready flag */
  11181. if (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U)
  11182. 8004058: 4b4d ldr r3, [pc, #308] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11183. 800405a: 681a ldr r2, [r3, #0]
  11184. 800405c: 2380 movs r3, #128 @ 0x80
  11185. 800405e: 049b lsls r3, r3, #18
  11186. 8004060: 4013 ands r3, r2
  11187. 8004062: d11f bne.n 80040a4 <HAL_RCC_ClockConfig+0x10c>
  11188. {
  11189. return HAL_ERROR;
  11190. 8004064: 2301 movs r3, #1
  11191. 8004066: e08b b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11192. }
  11193. }
  11194. /* HSI is selected as System Clock Source */
  11195. else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSI)
  11196. 8004068: 687b ldr r3, [r7, #4]
  11197. 800406a: 685b ldr r3, [r3, #4]
  11198. 800406c: 2b00 cmp r3, #0
  11199. 800406e: d107 bne.n 8004080 <HAL_RCC_ClockConfig+0xe8>
  11200. {
  11201. /* Check the HSI ready flag */
  11202. if (READ_BIT(RCC->CR, RCC_CR_HSIRDY) == 0U)
  11203. 8004070: 4b47 ldr r3, [pc, #284] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11204. 8004072: 681a ldr r2, [r3, #0]
  11205. 8004074: 2380 movs r3, #128 @ 0x80
  11206. 8004076: 00db lsls r3, r3, #3
  11207. 8004078: 4013 ands r3, r2
  11208. 800407a: d113 bne.n 80040a4 <HAL_RCC_ClockConfig+0x10c>
  11209. {
  11210. return HAL_ERROR;
  11211. 800407c: 2301 movs r3, #1
  11212. 800407e: e07f b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11213. }
  11214. }
  11215. /* LSI is selected as System Clock Source */
  11216. else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_LSI)
  11217. 8004080: 687b ldr r3, [r7, #4]
  11218. 8004082: 685b ldr r3, [r3, #4]
  11219. 8004084: 2b03 cmp r3, #3
  11220. 8004086: d106 bne.n 8004096 <HAL_RCC_ClockConfig+0xfe>
  11221. {
  11222. /* Check the LSI ready flag */
  11223. if (READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == 0U)
  11224. 8004088: 4b41 ldr r3, [pc, #260] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11225. 800408a: 6e1b ldr r3, [r3, #96] @ 0x60
  11226. 800408c: 2202 movs r2, #2
  11227. 800408e: 4013 ands r3, r2
  11228. 8004090: d108 bne.n 80040a4 <HAL_RCC_ClockConfig+0x10c>
  11229. {
  11230. return HAL_ERROR;
  11231. 8004092: 2301 movs r3, #1
  11232. 8004094: e074 b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11233. }
  11234. /* LSE is selected as System Clock Source */
  11235. else
  11236. {
  11237. /* Check the LSE ready flag */
  11238. if (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
  11239. 8004096: 4b3e ldr r3, [pc, #248] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11240. 8004098: 6ddb ldr r3, [r3, #92] @ 0x5c
  11241. 800409a: 2202 movs r2, #2
  11242. 800409c: 4013 ands r3, r2
  11243. 800409e: d101 bne.n 80040a4 <HAL_RCC_ClockConfig+0x10c>
  11244. {
  11245. return HAL_ERROR;
  11246. 80040a0: 2301 movs r3, #1
  11247. 80040a2: e06d b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11248. }
  11249. }
  11250. MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource);
  11251. 80040a4: 4b3a ldr r3, [pc, #232] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11252. 80040a6: 689b ldr r3, [r3, #8]
  11253. 80040a8: 2207 movs r2, #7
  11254. 80040aa: 4393 bics r3, r2
  11255. 80040ac: 0019 movs r1, r3
  11256. 80040ae: 687b ldr r3, [r7, #4]
  11257. 80040b0: 685a ldr r2, [r3, #4]
  11258. 80040b2: 4b37 ldr r3, [pc, #220] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11259. 80040b4: 430a orrs r2, r1
  11260. 80040b6: 609a str r2, [r3, #8]
  11261. /* Get Start Tick*/
  11262. tickstart = HAL_GetTick();
  11263. 80040b8: f7fd fbd6 bl 8001868 <HAL_GetTick>
  11264. 80040bc: 0003 movs r3, r0
  11265. 80040be: 60fb str r3, [r7, #12]
  11266. while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
  11267. 80040c0: e009 b.n 80040d6 <HAL_RCC_ClockConfig+0x13e>
  11268. {
  11269. if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
  11270. 80040c2: f7fd fbd1 bl 8001868 <HAL_GetTick>
  11271. 80040c6: 0002 movs r2, r0
  11272. 80040c8: 68fb ldr r3, [r7, #12]
  11273. 80040ca: 1ad3 subs r3, r2, r3
  11274. 80040cc: 4a2f ldr r2, [pc, #188] @ (800418c <HAL_RCC_ClockConfig+0x1f4>)
  11275. 80040ce: 4293 cmp r3, r2
  11276. 80040d0: d901 bls.n 80040d6 <HAL_RCC_ClockConfig+0x13e>
  11277. {
  11278. return HAL_TIMEOUT;
  11279. 80040d2: 2303 movs r3, #3
  11280. 80040d4: e054 b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11281. while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
  11282. 80040d6: 4b2e ldr r3, [pc, #184] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11283. 80040d8: 689b ldr r3, [r3, #8]
  11284. 80040da: 2238 movs r2, #56 @ 0x38
  11285. 80040dc: 401a ands r2, r3
  11286. 80040de: 687b ldr r3, [r7, #4]
  11287. 80040e0: 685b ldr r3, [r3, #4]
  11288. 80040e2: 00db lsls r3, r3, #3
  11289. 80040e4: 429a cmp r2, r3
  11290. 80040e6: d1ec bne.n 80040c2 <HAL_RCC_ClockConfig+0x12a>
  11291. }
  11292. }
  11293. }
  11294. /* Decreasing the number of wait states because of lower CPU frequency */
  11295. if (FLatency < __HAL_FLASH_GET_LATENCY())
  11296. 80040e8: 4b27 ldr r3, [pc, #156] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11297. 80040ea: 681b ldr r3, [r3, #0]
  11298. 80040ec: 2207 movs r2, #7
  11299. 80040ee: 4013 ands r3, r2
  11300. 80040f0: 683a ldr r2, [r7, #0]
  11301. 80040f2: 429a cmp r2, r3
  11302. 80040f4: d21e bcs.n 8004134 <HAL_RCC_ClockConfig+0x19c>
  11303. {
  11304. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  11305. __HAL_FLASH_SET_LATENCY(FLatency);
  11306. 80040f6: 4b24 ldr r3, [pc, #144] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11307. 80040f8: 681b ldr r3, [r3, #0]
  11308. 80040fa: 2207 movs r2, #7
  11309. 80040fc: 4393 bics r3, r2
  11310. 80040fe: 0019 movs r1, r3
  11311. 8004100: 4b21 ldr r3, [pc, #132] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11312. 8004102: 683a ldr r2, [r7, #0]
  11313. 8004104: 430a orrs r2, r1
  11314. 8004106: 601a str r2, [r3, #0]
  11315. /* Check that the new number of wait states is taken into account to access the Flash
  11316. memory by polling the FLASH_ACR register */
  11317. tickstart = HAL_GetTick();
  11318. 8004108: f7fd fbae bl 8001868 <HAL_GetTick>
  11319. 800410c: 0003 movs r3, r0
  11320. 800410e: 60fb str r3, [r7, #12]
  11321. while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
  11322. 8004110: e009 b.n 8004126 <HAL_RCC_ClockConfig+0x18e>
  11323. {
  11324. if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
  11325. 8004112: f7fd fba9 bl 8001868 <HAL_GetTick>
  11326. 8004116: 0002 movs r2, r0
  11327. 8004118: 68fb ldr r3, [r7, #12]
  11328. 800411a: 1ad3 subs r3, r2, r3
  11329. 800411c: 4a1b ldr r2, [pc, #108] @ (800418c <HAL_RCC_ClockConfig+0x1f4>)
  11330. 800411e: 4293 cmp r3, r2
  11331. 8004120: d901 bls.n 8004126 <HAL_RCC_ClockConfig+0x18e>
  11332. {
  11333. return HAL_TIMEOUT;
  11334. 8004122: 2303 movs r3, #3
  11335. 8004124: e02c b.n 8004180 <HAL_RCC_ClockConfig+0x1e8>
  11336. while ((FLASH->ACR & FLASH_ACR_LATENCY) != FLatency)
  11337. 8004126: 4b18 ldr r3, [pc, #96] @ (8004188 <HAL_RCC_ClockConfig+0x1f0>)
  11338. 8004128: 681b ldr r3, [r3, #0]
  11339. 800412a: 2207 movs r2, #7
  11340. 800412c: 4013 ands r3, r2
  11341. 800412e: 683a ldr r2, [r7, #0]
  11342. 8004130: 429a cmp r2, r3
  11343. 8004132: d1ee bne.n 8004112 <HAL_RCC_ClockConfig+0x17a>
  11344. }
  11345. }
  11346. }
  11347. /*-------------------------- PCLK1 Configuration ---------------------------*/
  11348. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  11349. 8004134: 687b ldr r3, [r7, #4]
  11350. 8004136: 681b ldr r3, [r3, #0]
  11351. 8004138: 2204 movs r2, #4
  11352. 800413a: 4013 ands r3, r2
  11353. 800413c: d009 beq.n 8004152 <HAL_RCC_ClockConfig+0x1ba>
  11354. {
  11355. assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
  11356. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE, RCC_ClkInitStruct->APB1CLKDivider);
  11357. 800413e: 4b14 ldr r3, [pc, #80] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11358. 8004140: 689b ldr r3, [r3, #8]
  11359. 8004142: 4a15 ldr r2, [pc, #84] @ (8004198 <HAL_RCC_ClockConfig+0x200>)
  11360. 8004144: 4013 ands r3, r2
  11361. 8004146: 0019 movs r1, r3
  11362. 8004148: 687b ldr r3, [r7, #4]
  11363. 800414a: 68da ldr r2, [r3, #12]
  11364. 800414c: 4b10 ldr r3, [pc, #64] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11365. 800414e: 430a orrs r2, r1
  11366. 8004150: 609a str r2, [r3, #8]
  11367. }
  11368. /* Update the SystemCoreClock global variable */
  11369. SystemCoreClock = (HAL_RCC_GetSysClockFreq() >> ((AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos]) & 0x1FU));
  11370. 8004152: f000 f829 bl 80041a8 <HAL_RCC_GetSysClockFreq>
  11371. 8004156: 0001 movs r1, r0
  11372. 8004158: 4b0d ldr r3, [pc, #52] @ (8004190 <HAL_RCC_ClockConfig+0x1f8>)
  11373. 800415a: 689b ldr r3, [r3, #8]
  11374. 800415c: 0a1b lsrs r3, r3, #8
  11375. 800415e: 220f movs r2, #15
  11376. 8004160: 401a ands r2, r3
  11377. 8004162: 4b0e ldr r3, [pc, #56] @ (800419c <HAL_RCC_ClockConfig+0x204>)
  11378. 8004164: 0092 lsls r2, r2, #2
  11379. 8004166: 58d3 ldr r3, [r2, r3]
  11380. 8004168: 221f movs r2, #31
  11381. 800416a: 4013 ands r3, r2
  11382. 800416c: 000a movs r2, r1
  11383. 800416e: 40da lsrs r2, r3
  11384. 8004170: 4b0b ldr r3, [pc, #44] @ (80041a0 <HAL_RCC_ClockConfig+0x208>)
  11385. 8004172: 601a str r2, [r3, #0]
  11386. /* Configure the source of time base considering new system clocks settings*/
  11387. return HAL_InitTick(uwTickPrio);
  11388. 8004174: 4b0b ldr r3, [pc, #44] @ (80041a4 <HAL_RCC_ClockConfig+0x20c>)
  11389. 8004176: 681b ldr r3, [r3, #0]
  11390. 8004178: 0018 movs r0, r3
  11391. 800417a: f7fd fb19 bl 80017b0 <HAL_InitTick>
  11392. 800417e: 0003 movs r3, r0
  11393. }
  11394. 8004180: 0018 movs r0, r3
  11395. 8004182: 46bd mov sp, r7
  11396. 8004184: b004 add sp, #16
  11397. 8004186: bd80 pop {r7, pc}
  11398. 8004188: 40022000 .word 0x40022000
  11399. 800418c: 00001388 .word 0x00001388
  11400. 8004190: 40021000 .word 0x40021000
  11401. 8004194: fffff0ff .word 0xfffff0ff
  11402. 8004198: ffff8fff .word 0xffff8fff
  11403. 800419c: 08006060 .word 0x08006060
  11404. 80041a0: 20000000 .word 0x20000000
  11405. 80041a4: 20000104 .word 0x20000104
  11406. 080041a8 <HAL_RCC_GetSysClockFreq>:
  11407. *
  11408. *
  11409. * @retval SYSCLK frequency
  11410. */
  11411. uint32_t HAL_RCC_GetSysClockFreq(void)
  11412. {
  11413. 80041a8: b580 push {r7, lr}
  11414. 80041aa: b086 sub sp, #24
  11415. 80041ac: af00 add r7, sp, #0
  11416. uint32_t pllvco, pllsource, pllr, pllm, hsidiv;
  11417. uint32_t sysclockfreq;
  11418. if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSI)
  11419. 80041ae: 4b3c ldr r3, [pc, #240] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11420. 80041b0: 689b ldr r3, [r3, #8]
  11421. 80041b2: 2238 movs r2, #56 @ 0x38
  11422. 80041b4: 4013 ands r3, r2
  11423. 80041b6: d10f bne.n 80041d8 <HAL_RCC_GetSysClockFreq+0x30>
  11424. {
  11425. /* HSISYS can be derived for HSI16 */
  11426. hsidiv = (1UL << ((READ_BIT(RCC->CR, RCC_CR_HSIDIV)) >> RCC_CR_HSIDIV_Pos));
  11427. 80041b8: 4b39 ldr r3, [pc, #228] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11428. 80041ba: 681b ldr r3, [r3, #0]
  11429. 80041bc: 0adb lsrs r3, r3, #11
  11430. 80041be: 2207 movs r2, #7
  11431. 80041c0: 4013 ands r3, r2
  11432. 80041c2: 2201 movs r2, #1
  11433. 80041c4: 409a lsls r2, r3
  11434. 80041c6: 0013 movs r3, r2
  11435. 80041c8: 603b str r3, [r7, #0]
  11436. /* HSI used as system clock source */
  11437. sysclockfreq = (HSI_VALUE / hsidiv);
  11438. 80041ca: 6839 ldr r1, [r7, #0]
  11439. 80041cc: 4835 ldr r0, [pc, #212] @ (80042a4 <HAL_RCC_GetSysClockFreq+0xfc>)
  11440. 80041ce: f7fb ff97 bl 8000100 <__udivsi3>
  11441. 80041d2: 0003 movs r3, r0
  11442. 80041d4: 613b str r3, [r7, #16]
  11443. 80041d6: e05d b.n 8004294 <HAL_RCC_GetSysClockFreq+0xec>
  11444. }
  11445. else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSE)
  11446. 80041d8: 4b31 ldr r3, [pc, #196] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11447. 80041da: 689b ldr r3, [r3, #8]
  11448. 80041dc: 2238 movs r2, #56 @ 0x38
  11449. 80041de: 4013 ands r3, r2
  11450. 80041e0: 2b08 cmp r3, #8
  11451. 80041e2: d102 bne.n 80041ea <HAL_RCC_GetSysClockFreq+0x42>
  11452. {
  11453. /* HSE used as system clock source */
  11454. sysclockfreq = HSE_VALUE;
  11455. 80041e4: 4b30 ldr r3, [pc, #192] @ (80042a8 <HAL_RCC_GetSysClockFreq+0x100>)
  11456. 80041e6: 613b str r3, [r7, #16]
  11457. 80041e8: e054 b.n 8004294 <HAL_RCC_GetSysClockFreq+0xec>
  11458. }
  11459. else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK)
  11460. 80041ea: 4b2d ldr r3, [pc, #180] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11461. 80041ec: 689b ldr r3, [r3, #8]
  11462. 80041ee: 2238 movs r2, #56 @ 0x38
  11463. 80041f0: 4013 ands r3, r2
  11464. 80041f2: 2b10 cmp r3, #16
  11465. 80041f4: d138 bne.n 8004268 <HAL_RCC_GetSysClockFreq+0xc0>
  11466. /* PLL used as system clock source */
  11467. /* PLL_VCO = ((HSE_VALUE or HSI_VALUE)/ PLLM) * PLLN
  11468. SYSCLK = PLL_VCO / PLLR
  11469. */
  11470. pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC);
  11471. 80041f6: 4b2a ldr r3, [pc, #168] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11472. 80041f8: 68db ldr r3, [r3, #12]
  11473. 80041fa: 2203 movs r2, #3
  11474. 80041fc: 4013 ands r3, r2
  11475. 80041fe: 60fb str r3, [r7, #12]
  11476. pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1U ;
  11477. 8004200: 4b27 ldr r3, [pc, #156] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11478. 8004202: 68db ldr r3, [r3, #12]
  11479. 8004204: 091b lsrs r3, r3, #4
  11480. 8004206: 2207 movs r2, #7
  11481. 8004208: 4013 ands r3, r2
  11482. 800420a: 3301 adds r3, #1
  11483. 800420c: 60bb str r3, [r7, #8]
  11484. switch (pllsource)
  11485. 800420e: 68fb ldr r3, [r7, #12]
  11486. 8004210: 2b03 cmp r3, #3
  11487. 8004212: d10d bne.n 8004230 <HAL_RCC_GetSysClockFreq+0x88>
  11488. {
  11489. case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */
  11490. pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos);
  11491. 8004214: 68b9 ldr r1, [r7, #8]
  11492. 8004216: 4824 ldr r0, [pc, #144] @ (80042a8 <HAL_RCC_GetSysClockFreq+0x100>)
  11493. 8004218: f7fb ff72 bl 8000100 <__udivsi3>
  11494. 800421c: 0003 movs r3, r0
  11495. 800421e: 0019 movs r1, r3
  11496. 8004220: 4b1f ldr r3, [pc, #124] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11497. 8004222: 68db ldr r3, [r3, #12]
  11498. 8004224: 0a1b lsrs r3, r3, #8
  11499. 8004226: 227f movs r2, #127 @ 0x7f
  11500. 8004228: 4013 ands r3, r2
  11501. 800422a: 434b muls r3, r1
  11502. 800422c: 617b str r3, [r7, #20]
  11503. break;
  11504. 800422e: e00d b.n 800424c <HAL_RCC_GetSysClockFreq+0xa4>
  11505. case RCC_PLLSOURCE_HSI: /* HSI16 used as PLL clock source */
  11506. default: /* HSI16 used as PLL clock source */
  11507. pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos) ;
  11508. 8004230: 68b9 ldr r1, [r7, #8]
  11509. 8004232: 481c ldr r0, [pc, #112] @ (80042a4 <HAL_RCC_GetSysClockFreq+0xfc>)
  11510. 8004234: f7fb ff64 bl 8000100 <__udivsi3>
  11511. 8004238: 0003 movs r3, r0
  11512. 800423a: 0019 movs r1, r3
  11513. 800423c: 4b18 ldr r3, [pc, #96] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11514. 800423e: 68db ldr r3, [r3, #12]
  11515. 8004240: 0a1b lsrs r3, r3, #8
  11516. 8004242: 227f movs r2, #127 @ 0x7f
  11517. 8004244: 4013 ands r3, r2
  11518. 8004246: 434b muls r3, r1
  11519. 8004248: 617b str r3, [r7, #20]
  11520. break;
  11521. 800424a: 46c0 nop @ (mov r8, r8)
  11522. }
  11523. pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> RCC_PLLCFGR_PLLR_Pos) + 1U);
  11524. 800424c: 4b14 ldr r3, [pc, #80] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11525. 800424e: 68db ldr r3, [r3, #12]
  11526. 8004250: 0f5b lsrs r3, r3, #29
  11527. 8004252: 2207 movs r2, #7
  11528. 8004254: 4013 ands r3, r2
  11529. 8004256: 3301 adds r3, #1
  11530. 8004258: 607b str r3, [r7, #4]
  11531. sysclockfreq = pllvco / pllr;
  11532. 800425a: 6879 ldr r1, [r7, #4]
  11533. 800425c: 6978 ldr r0, [r7, #20]
  11534. 800425e: f7fb ff4f bl 8000100 <__udivsi3>
  11535. 8004262: 0003 movs r3, r0
  11536. 8004264: 613b str r3, [r7, #16]
  11537. 8004266: e015 b.n 8004294 <HAL_RCC_GetSysClockFreq+0xec>
  11538. }
  11539. else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSE)
  11540. 8004268: 4b0d ldr r3, [pc, #52] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11541. 800426a: 689b ldr r3, [r3, #8]
  11542. 800426c: 2238 movs r2, #56 @ 0x38
  11543. 800426e: 4013 ands r3, r2
  11544. 8004270: 2b20 cmp r3, #32
  11545. 8004272: d103 bne.n 800427c <HAL_RCC_GetSysClockFreq+0xd4>
  11546. {
  11547. /* LSE used as system clock source */
  11548. sysclockfreq = LSE_VALUE;
  11549. 8004274: 2380 movs r3, #128 @ 0x80
  11550. 8004276: 021b lsls r3, r3, #8
  11551. 8004278: 613b str r3, [r7, #16]
  11552. 800427a: e00b b.n 8004294 <HAL_RCC_GetSysClockFreq+0xec>
  11553. }
  11554. else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_LSI)
  11555. 800427c: 4b08 ldr r3, [pc, #32] @ (80042a0 <HAL_RCC_GetSysClockFreq+0xf8>)
  11556. 800427e: 689b ldr r3, [r3, #8]
  11557. 8004280: 2238 movs r2, #56 @ 0x38
  11558. 8004282: 4013 ands r3, r2
  11559. 8004284: 2b18 cmp r3, #24
  11560. 8004286: d103 bne.n 8004290 <HAL_RCC_GetSysClockFreq+0xe8>
  11561. {
  11562. /* LSI used as system clock source */
  11563. sysclockfreq = LSI_VALUE;
  11564. 8004288: 23fa movs r3, #250 @ 0xfa
  11565. 800428a: 01db lsls r3, r3, #7
  11566. 800428c: 613b str r3, [r7, #16]
  11567. 800428e: e001 b.n 8004294 <HAL_RCC_GetSysClockFreq+0xec>
  11568. }
  11569. else
  11570. {
  11571. sysclockfreq = 0U;
  11572. 8004290: 2300 movs r3, #0
  11573. 8004292: 613b str r3, [r7, #16]
  11574. }
  11575. return sysclockfreq;
  11576. 8004294: 693b ldr r3, [r7, #16]
  11577. }
  11578. 8004296: 0018 movs r0, r3
  11579. 8004298: 46bd mov sp, r7
  11580. 800429a: b006 add sp, #24
  11581. 800429c: bd80 pop {r7, pc}
  11582. 800429e: 46c0 nop @ (mov r8, r8)
  11583. 80042a0: 40021000 .word 0x40021000
  11584. 80042a4: 00f42400 .word 0x00f42400
  11585. 80042a8: 007a1200 .word 0x007a1200
  11586. 080042ac <HAL_RCC_GetHCLKFreq>:
  11587. *
  11588. * @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency.
  11589. * @retval HCLK frequency in Hz
  11590. */
  11591. uint32_t HAL_RCC_GetHCLKFreq(void)
  11592. {
  11593. 80042ac: b580 push {r7, lr}
  11594. 80042ae: af00 add r7, sp, #0
  11595. return SystemCoreClock;
  11596. 80042b0: 4b02 ldr r3, [pc, #8] @ (80042bc <HAL_RCC_GetHCLKFreq+0x10>)
  11597. 80042b2: 681b ldr r3, [r3, #0]
  11598. }
  11599. 80042b4: 0018 movs r0, r3
  11600. 80042b6: 46bd mov sp, r7
  11601. 80042b8: bd80 pop {r7, pc}
  11602. 80042ba: 46c0 nop @ (mov r8, r8)
  11603. 80042bc: 20000000 .word 0x20000000
  11604. 080042c0 <HAL_RCC_GetPCLK1Freq>:
  11605. * @note Each time PCLK1 changes, this function must be called to update the
  11606. * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
  11607. * @retval PCLK1 frequency in Hz
  11608. */
  11609. uint32_t HAL_RCC_GetPCLK1Freq(void)
  11610. {
  11611. 80042c0: b5b0 push {r4, r5, r7, lr}
  11612. 80042c2: af00 add r7, sp, #0
  11613. /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
  11614. return ((uint32_t)(__LL_RCC_CALC_PCLK1_FREQ(HAL_RCC_GetHCLKFreq(), LL_RCC_GetAPB1Prescaler())));
  11615. 80042c4: f7ff fff2 bl 80042ac <HAL_RCC_GetHCLKFreq>
  11616. 80042c8: 0004 movs r4, r0
  11617. 80042ca: f7ff fb49 bl 8003960 <LL_RCC_GetAPB1Prescaler>
  11618. 80042ce: 0003 movs r3, r0
  11619. 80042d0: 0b1a lsrs r2, r3, #12
  11620. 80042d2: 4b05 ldr r3, [pc, #20] @ (80042e8 <HAL_RCC_GetPCLK1Freq+0x28>)
  11621. 80042d4: 0092 lsls r2, r2, #2
  11622. 80042d6: 58d3 ldr r3, [r2, r3]
  11623. 80042d8: 221f movs r2, #31
  11624. 80042da: 4013 ands r3, r2
  11625. 80042dc: 40dc lsrs r4, r3
  11626. 80042de: 0023 movs r3, r4
  11627. }
  11628. 80042e0: 0018 movs r0, r3
  11629. 80042e2: 46bd mov sp, r7
  11630. 80042e4: bdb0 pop {r4, r5, r7, pc}
  11631. 80042e6: 46c0 nop @ (mov r8, r8)
  11632. 80042e8: 080060a0 .word 0x080060a0
  11633. 080042ec <HAL_RCCEx_PeriphCLKConfig>:
  11634. * the RTC clock source: in this case the access to Backup domain is enabled.
  11635. *
  11636. * @retval HAL status
  11637. */
  11638. HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
  11639. {
  11640. 80042ec: b580 push {r7, lr}
  11641. 80042ee: b086 sub sp, #24
  11642. 80042f0: af00 add r7, sp, #0
  11643. 80042f2: 6078 str r0, [r7, #4]
  11644. uint32_t tmpregister;
  11645. uint32_t tickstart;
  11646. HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */
  11647. 80042f4: 2313 movs r3, #19
  11648. 80042f6: 18fb adds r3, r7, r3
  11649. 80042f8: 2200 movs r2, #0
  11650. 80042fa: 701a strb r2, [r3, #0]
  11651. HAL_StatusTypeDef status = HAL_OK; /* Final status */
  11652. 80042fc: 2312 movs r3, #18
  11653. 80042fe: 18fb adds r3, r7, r3
  11654. 8004300: 2200 movs r2, #0
  11655. 8004302: 701a strb r2, [r3, #0]
  11656. /* Check the parameters */
  11657. assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection));
  11658. /*-------------------------- RTC clock source configuration ----------------------*/
  11659. if ((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC)
  11660. 8004304: 687b ldr r3, [r7, #4]
  11661. 8004306: 681a ldr r2, [r3, #0]
  11662. 8004308: 2380 movs r3, #128 @ 0x80
  11663. 800430a: 029b lsls r3, r3, #10
  11664. 800430c: 4013 ands r3, r2
  11665. 800430e: d100 bne.n 8004312 <HAL_RCCEx_PeriphCLKConfig+0x26>
  11666. 8004310: e0a3 b.n 800445a <HAL_RCCEx_PeriphCLKConfig+0x16e>
  11667. {
  11668. FlagStatus pwrclkchanged = RESET;
  11669. 8004312: 2011 movs r0, #17
  11670. 8004314: 183b adds r3, r7, r0
  11671. 8004316: 2200 movs r2, #0
  11672. 8004318: 701a strb r2, [r3, #0]
  11673. /* Check for RTC Parameters used to output RTCCLK */
  11674. assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection));
  11675. /* Enable Power Clock */
  11676. if (__HAL_RCC_PWR_IS_CLK_DISABLED())
  11677. 800431a: 4b7f ldr r3, [pc, #508] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11678. 800431c: 6bda ldr r2, [r3, #60] @ 0x3c
  11679. 800431e: 2380 movs r3, #128 @ 0x80
  11680. 8004320: 055b lsls r3, r3, #21
  11681. 8004322: 4013 ands r3, r2
  11682. 8004324: d110 bne.n 8004348 <HAL_RCCEx_PeriphCLKConfig+0x5c>
  11683. {
  11684. __HAL_RCC_PWR_CLK_ENABLE();
  11685. 8004326: 4b7c ldr r3, [pc, #496] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11686. 8004328: 6bda ldr r2, [r3, #60] @ 0x3c
  11687. 800432a: 4b7b ldr r3, [pc, #492] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11688. 800432c: 2180 movs r1, #128 @ 0x80
  11689. 800432e: 0549 lsls r1, r1, #21
  11690. 8004330: 430a orrs r2, r1
  11691. 8004332: 63da str r2, [r3, #60] @ 0x3c
  11692. 8004334: 4b78 ldr r3, [pc, #480] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11693. 8004336: 6bda ldr r2, [r3, #60] @ 0x3c
  11694. 8004338: 2380 movs r3, #128 @ 0x80
  11695. 800433a: 055b lsls r3, r3, #21
  11696. 800433c: 4013 ands r3, r2
  11697. 800433e: 60bb str r3, [r7, #8]
  11698. 8004340: 68bb ldr r3, [r7, #8]
  11699. pwrclkchanged = SET;
  11700. 8004342: 183b adds r3, r7, r0
  11701. 8004344: 2201 movs r2, #1
  11702. 8004346: 701a strb r2, [r3, #0]
  11703. }
  11704. /* Enable write access to Backup domain */
  11705. SET_BIT(PWR->CR1, PWR_CR1_DBP);
  11706. 8004348: 4b74 ldr r3, [pc, #464] @ (800451c <HAL_RCCEx_PeriphCLKConfig+0x230>)
  11707. 800434a: 681a ldr r2, [r3, #0]
  11708. 800434c: 4b73 ldr r3, [pc, #460] @ (800451c <HAL_RCCEx_PeriphCLKConfig+0x230>)
  11709. 800434e: 2180 movs r1, #128 @ 0x80
  11710. 8004350: 0049 lsls r1, r1, #1
  11711. 8004352: 430a orrs r2, r1
  11712. 8004354: 601a str r2, [r3, #0]
  11713. /* Wait for Backup domain Write protection disable */
  11714. tickstart = HAL_GetTick();
  11715. 8004356: f7fd fa87 bl 8001868 <HAL_GetTick>
  11716. 800435a: 0003 movs r3, r0
  11717. 800435c: 60fb str r3, [r7, #12]
  11718. while ((PWR->CR1 & PWR_CR1_DBP) == 0U)
  11719. 800435e: e00b b.n 8004378 <HAL_RCCEx_PeriphCLKConfig+0x8c>
  11720. {
  11721. if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
  11722. 8004360: f7fd fa82 bl 8001868 <HAL_GetTick>
  11723. 8004364: 0002 movs r2, r0
  11724. 8004366: 68fb ldr r3, [r7, #12]
  11725. 8004368: 1ad3 subs r3, r2, r3
  11726. 800436a: 2b02 cmp r3, #2
  11727. 800436c: d904 bls.n 8004378 <HAL_RCCEx_PeriphCLKConfig+0x8c>
  11728. {
  11729. ret = HAL_TIMEOUT;
  11730. 800436e: 2313 movs r3, #19
  11731. 8004370: 18fb adds r3, r7, r3
  11732. 8004372: 2203 movs r2, #3
  11733. 8004374: 701a strb r2, [r3, #0]
  11734. break;
  11735. 8004376: e005 b.n 8004384 <HAL_RCCEx_PeriphCLKConfig+0x98>
  11736. while ((PWR->CR1 & PWR_CR1_DBP) == 0U)
  11737. 8004378: 4b68 ldr r3, [pc, #416] @ (800451c <HAL_RCCEx_PeriphCLKConfig+0x230>)
  11738. 800437a: 681a ldr r2, [r3, #0]
  11739. 800437c: 2380 movs r3, #128 @ 0x80
  11740. 800437e: 005b lsls r3, r3, #1
  11741. 8004380: 4013 ands r3, r2
  11742. 8004382: d0ed beq.n 8004360 <HAL_RCCEx_PeriphCLKConfig+0x74>
  11743. }
  11744. }
  11745. if (ret == HAL_OK)
  11746. 8004384: 2313 movs r3, #19
  11747. 8004386: 18fb adds r3, r7, r3
  11748. 8004388: 781b ldrb r3, [r3, #0]
  11749. 800438a: 2b00 cmp r3, #0
  11750. 800438c: d154 bne.n 8004438 <HAL_RCCEx_PeriphCLKConfig+0x14c>
  11751. {
  11752. /* Reset the Backup domain only if the RTC Clock source selection is modified from default */
  11753. tmpregister = READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL);
  11754. 800438e: 4b62 ldr r3, [pc, #392] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11755. 8004390: 6dda ldr r2, [r3, #92] @ 0x5c
  11756. 8004392: 23c0 movs r3, #192 @ 0xc0
  11757. 8004394: 009b lsls r3, r3, #2
  11758. 8004396: 4013 ands r3, r2
  11759. 8004398: 617b str r3, [r7, #20]
  11760. /* Reset the Backup domain only if the RTC Clock source selection is modified */
  11761. if ((tmpregister != RCC_RTCCLKSOURCE_NONE) && (tmpregister != PeriphClkInit->RTCClockSelection))
  11762. 800439a: 697b ldr r3, [r7, #20]
  11763. 800439c: 2b00 cmp r3, #0
  11764. 800439e: d019 beq.n 80043d4 <HAL_RCCEx_PeriphCLKConfig+0xe8>
  11765. 80043a0: 687b ldr r3, [r7, #4]
  11766. 80043a2: 695b ldr r3, [r3, #20]
  11767. 80043a4: 697a ldr r2, [r7, #20]
  11768. 80043a6: 429a cmp r2, r3
  11769. 80043a8: d014 beq.n 80043d4 <HAL_RCCEx_PeriphCLKConfig+0xe8>
  11770. {
  11771. /* Store the content of BDCR register before the reset of Backup Domain */
  11772. tmpregister = READ_BIT(RCC->BDCR, ~(RCC_BDCR_RTCSEL));
  11773. 80043aa: 4b5b ldr r3, [pc, #364] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11774. 80043ac: 6ddb ldr r3, [r3, #92] @ 0x5c
  11775. 80043ae: 4a5c ldr r2, [pc, #368] @ (8004520 <HAL_RCCEx_PeriphCLKConfig+0x234>)
  11776. 80043b0: 4013 ands r3, r2
  11777. 80043b2: 617b str r3, [r7, #20]
  11778. /* RTC Clock selection can be changed only if the Backup Domain is reset */
  11779. __HAL_RCC_BACKUPRESET_FORCE();
  11780. 80043b4: 4b58 ldr r3, [pc, #352] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11781. 80043b6: 6dda ldr r2, [r3, #92] @ 0x5c
  11782. 80043b8: 4b57 ldr r3, [pc, #348] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11783. 80043ba: 2180 movs r1, #128 @ 0x80
  11784. 80043bc: 0249 lsls r1, r1, #9
  11785. 80043be: 430a orrs r2, r1
  11786. 80043c0: 65da str r2, [r3, #92] @ 0x5c
  11787. __HAL_RCC_BACKUPRESET_RELEASE();
  11788. 80043c2: 4b55 ldr r3, [pc, #340] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11789. 80043c4: 6dda ldr r2, [r3, #92] @ 0x5c
  11790. 80043c6: 4b54 ldr r3, [pc, #336] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11791. 80043c8: 4956 ldr r1, [pc, #344] @ (8004524 <HAL_RCCEx_PeriphCLKConfig+0x238>)
  11792. 80043ca: 400a ands r2, r1
  11793. 80043cc: 65da str r2, [r3, #92] @ 0x5c
  11794. /* Restore the Content of BDCR register */
  11795. RCC->BDCR = tmpregister;
  11796. 80043ce: 4b52 ldr r3, [pc, #328] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11797. 80043d0: 697a ldr r2, [r7, #20]
  11798. 80043d2: 65da str r2, [r3, #92] @ 0x5c
  11799. }
  11800. /* Wait for LSE reactivation if LSE was enable prior to Backup Domain reset */
  11801. if (HAL_IS_BIT_SET(tmpregister, RCC_BDCR_LSEON))
  11802. 80043d4: 697b ldr r3, [r7, #20]
  11803. 80043d6: 2201 movs r2, #1
  11804. 80043d8: 4013 ands r3, r2
  11805. 80043da: d016 beq.n 800440a <HAL_RCCEx_PeriphCLKConfig+0x11e>
  11806. {
  11807. /* Get Start Tick*/
  11808. tickstart = HAL_GetTick();
  11809. 80043dc: f7fd fa44 bl 8001868 <HAL_GetTick>
  11810. 80043e0: 0003 movs r3, r0
  11811. 80043e2: 60fb str r3, [r7, #12]
  11812. /* Wait till LSE is ready */
  11813. while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
  11814. 80043e4: e00c b.n 8004400 <HAL_RCCEx_PeriphCLKConfig+0x114>
  11815. {
  11816. if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
  11817. 80043e6: f7fd fa3f bl 8001868 <HAL_GetTick>
  11818. 80043ea: 0002 movs r2, r0
  11819. 80043ec: 68fb ldr r3, [r7, #12]
  11820. 80043ee: 1ad3 subs r3, r2, r3
  11821. 80043f0: 4a4d ldr r2, [pc, #308] @ (8004528 <HAL_RCCEx_PeriphCLKConfig+0x23c>)
  11822. 80043f2: 4293 cmp r3, r2
  11823. 80043f4: d904 bls.n 8004400 <HAL_RCCEx_PeriphCLKConfig+0x114>
  11824. {
  11825. ret = HAL_TIMEOUT;
  11826. 80043f6: 2313 movs r3, #19
  11827. 80043f8: 18fb adds r3, r7, r3
  11828. 80043fa: 2203 movs r2, #3
  11829. 80043fc: 701a strb r2, [r3, #0]
  11830. break;
  11831. 80043fe: e004 b.n 800440a <HAL_RCCEx_PeriphCLKConfig+0x11e>
  11832. while (READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == 0U)
  11833. 8004400: 4b45 ldr r3, [pc, #276] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11834. 8004402: 6ddb ldr r3, [r3, #92] @ 0x5c
  11835. 8004404: 2202 movs r2, #2
  11836. 8004406: 4013 ands r3, r2
  11837. 8004408: d0ed beq.n 80043e6 <HAL_RCCEx_PeriphCLKConfig+0xfa>
  11838. }
  11839. }
  11840. }
  11841. if (ret == HAL_OK)
  11842. 800440a: 2313 movs r3, #19
  11843. 800440c: 18fb adds r3, r7, r3
  11844. 800440e: 781b ldrb r3, [r3, #0]
  11845. 8004410: 2b00 cmp r3, #0
  11846. 8004412: d10a bne.n 800442a <HAL_RCCEx_PeriphCLKConfig+0x13e>
  11847. {
  11848. /* Apply new RTC clock source selection */
  11849. __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
  11850. 8004414: 4b40 ldr r3, [pc, #256] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11851. 8004416: 6ddb ldr r3, [r3, #92] @ 0x5c
  11852. 8004418: 4a41 ldr r2, [pc, #260] @ (8004520 <HAL_RCCEx_PeriphCLKConfig+0x234>)
  11853. 800441a: 4013 ands r3, r2
  11854. 800441c: 0019 movs r1, r3
  11855. 800441e: 687b ldr r3, [r7, #4]
  11856. 8004420: 695a ldr r2, [r3, #20]
  11857. 8004422: 4b3d ldr r3, [pc, #244] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11858. 8004424: 430a orrs r2, r1
  11859. 8004426: 65da str r2, [r3, #92] @ 0x5c
  11860. 8004428: e00c b.n 8004444 <HAL_RCCEx_PeriphCLKConfig+0x158>
  11861. }
  11862. else
  11863. {
  11864. /* set overall return value */
  11865. status = ret;
  11866. 800442a: 2312 movs r3, #18
  11867. 800442c: 18fb adds r3, r7, r3
  11868. 800442e: 2213 movs r2, #19
  11869. 8004430: 18ba adds r2, r7, r2
  11870. 8004432: 7812 ldrb r2, [r2, #0]
  11871. 8004434: 701a strb r2, [r3, #0]
  11872. 8004436: e005 b.n 8004444 <HAL_RCCEx_PeriphCLKConfig+0x158>
  11873. }
  11874. }
  11875. else
  11876. {
  11877. /* set overall return value */
  11878. status = ret;
  11879. 8004438: 2312 movs r3, #18
  11880. 800443a: 18fb adds r3, r7, r3
  11881. 800443c: 2213 movs r2, #19
  11882. 800443e: 18ba adds r2, r7, r2
  11883. 8004440: 7812 ldrb r2, [r2, #0]
  11884. 8004442: 701a strb r2, [r3, #0]
  11885. }
  11886. /* Restore clock configuration if changed */
  11887. if (pwrclkchanged == SET)
  11888. 8004444: 2311 movs r3, #17
  11889. 8004446: 18fb adds r3, r7, r3
  11890. 8004448: 781b ldrb r3, [r3, #0]
  11891. 800444a: 2b01 cmp r3, #1
  11892. 800444c: d105 bne.n 800445a <HAL_RCCEx_PeriphCLKConfig+0x16e>
  11893. {
  11894. __HAL_RCC_PWR_CLK_DISABLE();
  11895. 800444e: 4b32 ldr r3, [pc, #200] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11896. 8004450: 6bda ldr r2, [r3, #60] @ 0x3c
  11897. 8004452: 4b31 ldr r3, [pc, #196] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11898. 8004454: 4935 ldr r1, [pc, #212] @ (800452c <HAL_RCCEx_PeriphCLKConfig+0x240>)
  11899. 8004456: 400a ands r2, r1
  11900. 8004458: 63da str r2, [r3, #60] @ 0x3c
  11901. }
  11902. }
  11903. /*-------------------------- USART1 clock source configuration -------------------*/
  11904. if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1)
  11905. 800445a: 687b ldr r3, [r7, #4]
  11906. 800445c: 681b ldr r3, [r3, #0]
  11907. 800445e: 2201 movs r2, #1
  11908. 8004460: 4013 ands r3, r2
  11909. 8004462: d009 beq.n 8004478 <HAL_RCCEx_PeriphCLKConfig+0x18c>
  11910. {
  11911. /* Check the parameters */
  11912. assert_param(IS_RCC_USART1CLKSOURCE(PeriphClkInit->Usart1ClockSelection));
  11913. /* Configure the USART1 clock source */
  11914. __HAL_RCC_USART1_CONFIG(PeriphClkInit->Usart1ClockSelection);
  11915. 8004464: 4b2c ldr r3, [pc, #176] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11916. 8004466: 6d5b ldr r3, [r3, #84] @ 0x54
  11917. 8004468: 2203 movs r2, #3
  11918. 800446a: 4393 bics r3, r2
  11919. 800446c: 0019 movs r1, r3
  11920. 800446e: 687b ldr r3, [r7, #4]
  11921. 8004470: 685a ldr r2, [r3, #4]
  11922. 8004472: 4b29 ldr r3, [pc, #164] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11923. 8004474: 430a orrs r2, r1
  11924. 8004476: 655a str r2, [r3, #84] @ 0x54
  11925. __HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection);
  11926. }
  11927. #endif /* RCC_CCIPR_LPTIM2SEL */
  11928. /*-------------------------- I2C1 clock source configuration ---------------------*/
  11929. if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1)
  11930. 8004478: 687b ldr r3, [r7, #4]
  11931. 800447a: 681b ldr r3, [r3, #0]
  11932. 800447c: 2220 movs r2, #32
  11933. 800447e: 4013 ands r3, r2
  11934. 8004480: d009 beq.n 8004496 <HAL_RCCEx_PeriphCLKConfig+0x1aa>
  11935. {
  11936. /* Check the parameters */
  11937. assert_param(IS_RCC_I2C1CLKSOURCE(PeriphClkInit->I2c1ClockSelection));
  11938. /* Configure the I2C1 clock source */
  11939. __HAL_RCC_I2C1_CONFIG(PeriphClkInit->I2c1ClockSelection);
  11940. 8004482: 4b25 ldr r3, [pc, #148] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11941. 8004484: 6d5b ldr r3, [r3, #84] @ 0x54
  11942. 8004486: 4a2a ldr r2, [pc, #168] @ (8004530 <HAL_RCCEx_PeriphCLKConfig+0x244>)
  11943. 8004488: 4013 ands r3, r2
  11944. 800448a: 0019 movs r1, r3
  11945. 800448c: 687b ldr r3, [r7, #4]
  11946. 800448e: 689a ldr r2, [r3, #8]
  11947. 8004490: 4b21 ldr r3, [pc, #132] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11948. 8004492: 430a orrs r2, r1
  11949. 8004494: 655a str r2, [r3, #84] @ 0x54
  11950. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLQCLK);
  11951. }
  11952. }
  11953. #endif /* RNG */
  11954. /*-------------------------- ADC clock source configuration ----------------------*/
  11955. if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC)
  11956. 8004496: 687b ldr r3, [r7, #4]
  11957. 8004498: 681a ldr r2, [r3, #0]
  11958. 800449a: 2380 movs r3, #128 @ 0x80
  11959. 800449c: 01db lsls r3, r3, #7
  11960. 800449e: 4013 ands r3, r2
  11961. 80044a0: d015 beq.n 80044ce <HAL_RCCEx_PeriphCLKConfig+0x1e2>
  11962. {
  11963. /* Check the parameters */
  11964. assert_param(IS_RCC_ADCCLKSOURCE(PeriphClkInit->AdcClockSelection));
  11965. /* Configure the ADC interface clock source */
  11966. __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection);
  11967. 80044a2: 4b1d ldr r3, [pc, #116] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11968. 80044a4: 6d5b ldr r3, [r3, #84] @ 0x54
  11969. 80044a6: 009b lsls r3, r3, #2
  11970. 80044a8: 0899 lsrs r1, r3, #2
  11971. 80044aa: 687b ldr r3, [r7, #4]
  11972. 80044ac: 691a ldr r2, [r3, #16]
  11973. 80044ae: 4b1a ldr r3, [pc, #104] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11974. 80044b0: 430a orrs r2, r1
  11975. 80044b2: 655a str r2, [r3, #84] @ 0x54
  11976. if (PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLLADC)
  11977. 80044b4: 687b ldr r3, [r7, #4]
  11978. 80044b6: 691a ldr r2, [r3, #16]
  11979. 80044b8: 2380 movs r3, #128 @ 0x80
  11980. 80044ba: 05db lsls r3, r3, #23
  11981. 80044bc: 429a cmp r2, r3
  11982. 80044be: d106 bne.n 80044ce <HAL_RCCEx_PeriphCLKConfig+0x1e2>
  11983. {
  11984. /* Enable PLLPCLK output */
  11985. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLPCLK);
  11986. 80044c0: 4b15 ldr r3, [pc, #84] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11987. 80044c2: 68da ldr r2, [r3, #12]
  11988. 80044c4: 4b14 ldr r3, [pc, #80] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  11989. 80044c6: 2180 movs r1, #128 @ 0x80
  11990. 80044c8: 0249 lsls r1, r1, #9
  11991. 80044ca: 430a orrs r2, r1
  11992. 80044cc: 60da str r2, [r3, #12]
  11993. }
  11994. }
  11995. #endif /* RCC_CCIPR_TIM15SEL */
  11996. /*-------------------------- I2S1 clock source configuration ---------------------*/
  11997. if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S1) == RCC_PERIPHCLK_I2S1)
  11998. 80044ce: 687b ldr r3, [r7, #4]
  11999. 80044d0: 681a ldr r2, [r3, #0]
  12000. 80044d2: 2380 movs r3, #128 @ 0x80
  12001. 80044d4: 011b lsls r3, r3, #4
  12002. 80044d6: 4013 ands r3, r2
  12003. 80044d8: d016 beq.n 8004508 <HAL_RCCEx_PeriphCLKConfig+0x21c>
  12004. {
  12005. /* Check the parameters */
  12006. assert_param(IS_RCC_I2S1CLKSOURCE(PeriphClkInit->I2s1ClockSelection));
  12007. /* Configure the I2S1 clock source */
  12008. __HAL_RCC_I2S1_CONFIG(PeriphClkInit->I2s1ClockSelection);
  12009. 80044da: 4b0f ldr r3, [pc, #60] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  12010. 80044dc: 6d5b ldr r3, [r3, #84] @ 0x54
  12011. 80044de: 4a15 ldr r2, [pc, #84] @ (8004534 <HAL_RCCEx_PeriphCLKConfig+0x248>)
  12012. 80044e0: 4013 ands r3, r2
  12013. 80044e2: 0019 movs r1, r3
  12014. 80044e4: 687b ldr r3, [r7, #4]
  12015. 80044e6: 68da ldr r2, [r3, #12]
  12016. 80044e8: 4b0b ldr r3, [pc, #44] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  12017. 80044ea: 430a orrs r2, r1
  12018. 80044ec: 655a str r2, [r3, #84] @ 0x54
  12019. if (PeriphClkInit->I2s1ClockSelection == RCC_I2S1CLKSOURCE_PLL)
  12020. 80044ee: 687b ldr r3, [r7, #4]
  12021. 80044f0: 68da ldr r2, [r3, #12]
  12022. 80044f2: 2380 movs r3, #128 @ 0x80
  12023. 80044f4: 01db lsls r3, r3, #7
  12024. 80044f6: 429a cmp r2, r3
  12025. 80044f8: d106 bne.n 8004508 <HAL_RCCEx_PeriphCLKConfig+0x21c>
  12026. {
  12027. /* Enable PLLPCLK output */
  12028. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLPCLK);
  12029. 80044fa: 4b07 ldr r3, [pc, #28] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  12030. 80044fc: 68da ldr r2, [r3, #12]
  12031. 80044fe: 4b06 ldr r3, [pc, #24] @ (8004518 <HAL_RCCEx_PeriphCLKConfig+0x22c>)
  12032. 8004500: 2180 movs r1, #128 @ 0x80
  12033. 8004502: 0249 lsls r1, r1, #9
  12034. 8004504: 430a orrs r2, r1
  12035. 8004506: 60da str r2, [r3, #12]
  12036. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLLQCLK);
  12037. }
  12038. }
  12039. #endif /* FDCAN1 || FDCAN2 */
  12040. return status;
  12041. 8004508: 2312 movs r3, #18
  12042. 800450a: 18fb adds r3, r7, r3
  12043. 800450c: 781b ldrb r3, [r3, #0]
  12044. }
  12045. 800450e: 0018 movs r0, r3
  12046. 8004510: 46bd mov sp, r7
  12047. 8004512: b006 add sp, #24
  12048. 8004514: bd80 pop {r7, pc}
  12049. 8004516: 46c0 nop @ (mov r8, r8)
  12050. 8004518: 40021000 .word 0x40021000
  12051. 800451c: 40007000 .word 0x40007000
  12052. 8004520: fffffcff .word 0xfffffcff
  12053. 8004524: fffeffff .word 0xfffeffff
  12054. 8004528: 00001388 .word 0x00001388
  12055. 800452c: efffffff .word 0xefffffff
  12056. 8004530: ffffcfff .word 0xffffcfff
  12057. 8004534: ffff3fff .word 0xffff3fff
  12058. 08004538 <HAL_TIM_PWM_Init>:
  12059. * Ex: call @ref HAL_TIM_PWM_DeInit() before HAL_TIM_PWM_Init()
  12060. * @param htim TIM PWM handle
  12061. * @retval HAL status
  12062. */
  12063. HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim)
  12064. {
  12065. 8004538: b580 push {r7, lr}
  12066. 800453a: b082 sub sp, #8
  12067. 800453c: af00 add r7, sp, #0
  12068. 800453e: 6078 str r0, [r7, #4]
  12069. /* Check the TIM handle allocation */
  12070. if (htim == NULL)
  12071. 8004540: 687b ldr r3, [r7, #4]
  12072. 8004542: 2b00 cmp r3, #0
  12073. 8004544: d101 bne.n 800454a <HAL_TIM_PWM_Init+0x12>
  12074. {
  12075. return HAL_ERROR;
  12076. 8004546: 2301 movs r3, #1
  12077. 8004548: e04a b.n 80045e0 <HAL_TIM_PWM_Init+0xa8>
  12078. assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
  12079. assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
  12080. assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
  12081. assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
  12082. if (htim->State == HAL_TIM_STATE_RESET)
  12083. 800454a: 687b ldr r3, [r7, #4]
  12084. 800454c: 223d movs r2, #61 @ 0x3d
  12085. 800454e: 5c9b ldrb r3, [r3, r2]
  12086. 8004550: b2db uxtb r3, r3
  12087. 8004552: 2b00 cmp r3, #0
  12088. 8004554: d107 bne.n 8004566 <HAL_TIM_PWM_Init+0x2e>
  12089. {
  12090. /* Allocate lock resource and initialize it */
  12091. htim->Lock = HAL_UNLOCKED;
  12092. 8004556: 687b ldr r3, [r7, #4]
  12093. 8004558: 223c movs r2, #60 @ 0x3c
  12094. 800455a: 2100 movs r1, #0
  12095. 800455c: 5499 strb r1, [r3, r2]
  12096. }
  12097. /* Init the low level hardware : GPIO, CLOCK, NVIC */
  12098. htim->PWM_MspInitCallback(htim);
  12099. #else
  12100. /* Init the low level hardware : GPIO, CLOCK, NVIC and DMA */
  12101. HAL_TIM_PWM_MspInit(htim);
  12102. 800455e: 687b ldr r3, [r7, #4]
  12103. 8004560: 0018 movs r0, r3
  12104. 8004562: f7fc fab5 bl 8000ad0 <HAL_TIM_PWM_MspInit>
  12105. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  12106. }
  12107. /* Set the TIM state */
  12108. htim->State = HAL_TIM_STATE_BUSY;
  12109. 8004566: 687b ldr r3, [r7, #4]
  12110. 8004568: 223d movs r2, #61 @ 0x3d
  12111. 800456a: 2102 movs r1, #2
  12112. 800456c: 5499 strb r1, [r3, r2]
  12113. /* Init the base time for the PWM */
  12114. TIM_Base_SetConfig(htim->Instance, &htim->Init);
  12115. 800456e: 687b ldr r3, [r7, #4]
  12116. 8004570: 681a ldr r2, [r3, #0]
  12117. 8004572: 687b ldr r3, [r7, #4]
  12118. 8004574: 3304 adds r3, #4
  12119. 8004576: 0019 movs r1, r3
  12120. 8004578: 0010 movs r0, r2
  12121. 800457a: f000 f935 bl 80047e8 <TIM_Base_SetConfig>
  12122. /* Initialize the DMA burst operation state */
  12123. htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
  12124. 800457e: 687b ldr r3, [r7, #4]
  12125. 8004580: 2248 movs r2, #72 @ 0x48
  12126. 8004582: 2101 movs r1, #1
  12127. 8004584: 5499 strb r1, [r3, r2]
  12128. /* Initialize the TIM channels state */
  12129. TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  12130. 8004586: 687b ldr r3, [r7, #4]
  12131. 8004588: 223e movs r2, #62 @ 0x3e
  12132. 800458a: 2101 movs r1, #1
  12133. 800458c: 5499 strb r1, [r3, r2]
  12134. 800458e: 687b ldr r3, [r7, #4]
  12135. 8004590: 223f movs r2, #63 @ 0x3f
  12136. 8004592: 2101 movs r1, #1
  12137. 8004594: 5499 strb r1, [r3, r2]
  12138. 8004596: 687b ldr r3, [r7, #4]
  12139. 8004598: 2240 movs r2, #64 @ 0x40
  12140. 800459a: 2101 movs r1, #1
  12141. 800459c: 5499 strb r1, [r3, r2]
  12142. 800459e: 687b ldr r3, [r7, #4]
  12143. 80045a0: 2241 movs r2, #65 @ 0x41
  12144. 80045a2: 2101 movs r1, #1
  12145. 80045a4: 5499 strb r1, [r3, r2]
  12146. 80045a6: 687b ldr r3, [r7, #4]
  12147. 80045a8: 2242 movs r2, #66 @ 0x42
  12148. 80045aa: 2101 movs r1, #1
  12149. 80045ac: 5499 strb r1, [r3, r2]
  12150. 80045ae: 687b ldr r3, [r7, #4]
  12151. 80045b0: 2243 movs r2, #67 @ 0x43
  12152. 80045b2: 2101 movs r1, #1
  12153. 80045b4: 5499 strb r1, [r3, r2]
  12154. TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  12155. 80045b6: 687b ldr r3, [r7, #4]
  12156. 80045b8: 2244 movs r2, #68 @ 0x44
  12157. 80045ba: 2101 movs r1, #1
  12158. 80045bc: 5499 strb r1, [r3, r2]
  12159. 80045be: 687b ldr r3, [r7, #4]
  12160. 80045c0: 2245 movs r2, #69 @ 0x45
  12161. 80045c2: 2101 movs r1, #1
  12162. 80045c4: 5499 strb r1, [r3, r2]
  12163. 80045c6: 687b ldr r3, [r7, #4]
  12164. 80045c8: 2246 movs r2, #70 @ 0x46
  12165. 80045ca: 2101 movs r1, #1
  12166. 80045cc: 5499 strb r1, [r3, r2]
  12167. 80045ce: 687b ldr r3, [r7, #4]
  12168. 80045d0: 2247 movs r2, #71 @ 0x47
  12169. 80045d2: 2101 movs r1, #1
  12170. 80045d4: 5499 strb r1, [r3, r2]
  12171. /* Initialize the TIM state*/
  12172. htim->State = HAL_TIM_STATE_READY;
  12173. 80045d6: 687b ldr r3, [r7, #4]
  12174. 80045d8: 223d movs r2, #61 @ 0x3d
  12175. 80045da: 2101 movs r1, #1
  12176. 80045dc: 5499 strb r1, [r3, r2]
  12177. return HAL_OK;
  12178. 80045de: 2300 movs r3, #0
  12179. }
  12180. 80045e0: 0018 movs r0, r3
  12181. 80045e2: 46bd mov sp, r7
  12182. 80045e4: b002 add sp, #8
  12183. 80045e6: bd80 pop {r7, pc}
  12184. 080045e8 <HAL_TIM_PWM_ConfigChannel>:
  12185. * @retval HAL status
  12186. */
  12187. HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
  12188. const TIM_OC_InitTypeDef *sConfig,
  12189. uint32_t Channel)
  12190. {
  12191. 80045e8: b580 push {r7, lr}
  12192. 80045ea: b086 sub sp, #24
  12193. 80045ec: af00 add r7, sp, #0
  12194. 80045ee: 60f8 str r0, [r7, #12]
  12195. 80045f0: 60b9 str r1, [r7, #8]
  12196. 80045f2: 607a str r2, [r7, #4]
  12197. HAL_StatusTypeDef status = HAL_OK;
  12198. 80045f4: 2317 movs r3, #23
  12199. 80045f6: 18fb adds r3, r7, r3
  12200. 80045f8: 2200 movs r2, #0
  12201. 80045fa: 701a strb r2, [r3, #0]
  12202. assert_param(IS_TIM_PWM_MODE(sConfig->OCMode));
  12203. assert_param(IS_TIM_OC_POLARITY(sConfig->OCPolarity));
  12204. assert_param(IS_TIM_FAST_STATE(sConfig->OCFastMode));
  12205. /* Process Locked */
  12206. __HAL_LOCK(htim);
  12207. 80045fc: 68fb ldr r3, [r7, #12]
  12208. 80045fe: 223c movs r2, #60 @ 0x3c
  12209. 8004600: 5c9b ldrb r3, [r3, r2]
  12210. 8004602: 2b01 cmp r3, #1
  12211. 8004604: d101 bne.n 800460a <HAL_TIM_PWM_ConfigChannel+0x22>
  12212. 8004606: 2302 movs r3, #2
  12213. 8004608: e0e5 b.n 80047d6 <HAL_TIM_PWM_ConfigChannel+0x1ee>
  12214. 800460a: 68fb ldr r3, [r7, #12]
  12215. 800460c: 223c movs r2, #60 @ 0x3c
  12216. 800460e: 2101 movs r1, #1
  12217. 8004610: 5499 strb r1, [r3, r2]
  12218. switch (Channel)
  12219. 8004612: 687b ldr r3, [r7, #4]
  12220. 8004614: 2b14 cmp r3, #20
  12221. 8004616: d900 bls.n 800461a <HAL_TIM_PWM_ConfigChannel+0x32>
  12222. 8004618: e0d1 b.n 80047be <HAL_TIM_PWM_ConfigChannel+0x1d6>
  12223. 800461a: 687b ldr r3, [r7, #4]
  12224. 800461c: 009a lsls r2, r3, #2
  12225. 800461e: 4b70 ldr r3, [pc, #448] @ (80047e0 <HAL_TIM_PWM_ConfigChannel+0x1f8>)
  12226. 8004620: 18d3 adds r3, r2, r3
  12227. 8004622: 681b ldr r3, [r3, #0]
  12228. 8004624: 469f mov pc, r3
  12229. {
  12230. /* Check the parameters */
  12231. assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
  12232. /* Configure the Channel 1 in PWM mode */
  12233. TIM_OC1_SetConfig(htim->Instance, sConfig);
  12234. 8004626: 68fb ldr r3, [r7, #12]
  12235. 8004628: 681b ldr r3, [r3, #0]
  12236. 800462a: 68ba ldr r2, [r7, #8]
  12237. 800462c: 0011 movs r1, r2
  12238. 800462e: 0018 movs r0, r3
  12239. 8004630: f000 f954 bl 80048dc <TIM_OC1_SetConfig>
  12240. /* Set the Preload enable bit for channel1 */
  12241. htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE;
  12242. 8004634: 68fb ldr r3, [r7, #12]
  12243. 8004636: 681b ldr r3, [r3, #0]
  12244. 8004638: 699a ldr r2, [r3, #24]
  12245. 800463a: 68fb ldr r3, [r7, #12]
  12246. 800463c: 681b ldr r3, [r3, #0]
  12247. 800463e: 2108 movs r1, #8
  12248. 8004640: 430a orrs r2, r1
  12249. 8004642: 619a str r2, [r3, #24]
  12250. /* Configure the Output Fast mode */
  12251. htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE;
  12252. 8004644: 68fb ldr r3, [r7, #12]
  12253. 8004646: 681b ldr r3, [r3, #0]
  12254. 8004648: 699a ldr r2, [r3, #24]
  12255. 800464a: 68fb ldr r3, [r7, #12]
  12256. 800464c: 681b ldr r3, [r3, #0]
  12257. 800464e: 2104 movs r1, #4
  12258. 8004650: 438a bics r2, r1
  12259. 8004652: 619a str r2, [r3, #24]
  12260. htim->Instance->CCMR1 |= sConfig->OCFastMode;
  12261. 8004654: 68fb ldr r3, [r7, #12]
  12262. 8004656: 681b ldr r3, [r3, #0]
  12263. 8004658: 6999 ldr r1, [r3, #24]
  12264. 800465a: 68bb ldr r3, [r7, #8]
  12265. 800465c: 691a ldr r2, [r3, #16]
  12266. 800465e: 68fb ldr r3, [r7, #12]
  12267. 8004660: 681b ldr r3, [r3, #0]
  12268. 8004662: 430a orrs r2, r1
  12269. 8004664: 619a str r2, [r3, #24]
  12270. break;
  12271. 8004666: e0af b.n 80047c8 <HAL_TIM_PWM_ConfigChannel+0x1e0>
  12272. {
  12273. /* Check the parameters */
  12274. assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
  12275. /* Configure the Channel 2 in PWM mode */
  12276. TIM_OC2_SetConfig(htim->Instance, sConfig);
  12277. 8004668: 68fb ldr r3, [r7, #12]
  12278. 800466a: 681b ldr r3, [r3, #0]
  12279. 800466c: 68ba ldr r2, [r7, #8]
  12280. 800466e: 0011 movs r1, r2
  12281. 8004670: 0018 movs r0, r3
  12282. 8004672: f000 f9b3 bl 80049dc <TIM_OC2_SetConfig>
  12283. /* Set the Preload enable bit for channel2 */
  12284. htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE;
  12285. 8004676: 68fb ldr r3, [r7, #12]
  12286. 8004678: 681b ldr r3, [r3, #0]
  12287. 800467a: 699a ldr r2, [r3, #24]
  12288. 800467c: 68fb ldr r3, [r7, #12]
  12289. 800467e: 681b ldr r3, [r3, #0]
  12290. 8004680: 2180 movs r1, #128 @ 0x80
  12291. 8004682: 0109 lsls r1, r1, #4
  12292. 8004684: 430a orrs r2, r1
  12293. 8004686: 619a str r2, [r3, #24]
  12294. /* Configure the Output Fast mode */
  12295. htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE;
  12296. 8004688: 68fb ldr r3, [r7, #12]
  12297. 800468a: 681b ldr r3, [r3, #0]
  12298. 800468c: 699a ldr r2, [r3, #24]
  12299. 800468e: 68fb ldr r3, [r7, #12]
  12300. 8004690: 681b ldr r3, [r3, #0]
  12301. 8004692: 4954 ldr r1, [pc, #336] @ (80047e4 <HAL_TIM_PWM_ConfigChannel+0x1fc>)
  12302. 8004694: 400a ands r2, r1
  12303. 8004696: 619a str r2, [r3, #24]
  12304. htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U;
  12305. 8004698: 68fb ldr r3, [r7, #12]
  12306. 800469a: 681b ldr r3, [r3, #0]
  12307. 800469c: 6999 ldr r1, [r3, #24]
  12308. 800469e: 68bb ldr r3, [r7, #8]
  12309. 80046a0: 691b ldr r3, [r3, #16]
  12310. 80046a2: 021a lsls r2, r3, #8
  12311. 80046a4: 68fb ldr r3, [r7, #12]
  12312. 80046a6: 681b ldr r3, [r3, #0]
  12313. 80046a8: 430a orrs r2, r1
  12314. 80046aa: 619a str r2, [r3, #24]
  12315. break;
  12316. 80046ac: e08c b.n 80047c8 <HAL_TIM_PWM_ConfigChannel+0x1e0>
  12317. {
  12318. /* Check the parameters */
  12319. assert_param(IS_TIM_CC3_INSTANCE(htim->Instance));
  12320. /* Configure the Channel 3 in PWM mode */
  12321. TIM_OC3_SetConfig(htim->Instance, sConfig);
  12322. 80046ae: 68fb ldr r3, [r7, #12]
  12323. 80046b0: 681b ldr r3, [r3, #0]
  12324. 80046b2: 68ba ldr r2, [r7, #8]
  12325. 80046b4: 0011 movs r1, r2
  12326. 80046b6: 0018 movs r0, r3
  12327. 80046b8: f000 fa0e bl 8004ad8 <TIM_OC3_SetConfig>
  12328. /* Set the Preload enable bit for channel3 */
  12329. htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE;
  12330. 80046bc: 68fb ldr r3, [r7, #12]
  12331. 80046be: 681b ldr r3, [r3, #0]
  12332. 80046c0: 69da ldr r2, [r3, #28]
  12333. 80046c2: 68fb ldr r3, [r7, #12]
  12334. 80046c4: 681b ldr r3, [r3, #0]
  12335. 80046c6: 2108 movs r1, #8
  12336. 80046c8: 430a orrs r2, r1
  12337. 80046ca: 61da str r2, [r3, #28]
  12338. /* Configure the Output Fast mode */
  12339. htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE;
  12340. 80046cc: 68fb ldr r3, [r7, #12]
  12341. 80046ce: 681b ldr r3, [r3, #0]
  12342. 80046d0: 69da ldr r2, [r3, #28]
  12343. 80046d2: 68fb ldr r3, [r7, #12]
  12344. 80046d4: 681b ldr r3, [r3, #0]
  12345. 80046d6: 2104 movs r1, #4
  12346. 80046d8: 438a bics r2, r1
  12347. 80046da: 61da str r2, [r3, #28]
  12348. htim->Instance->CCMR2 |= sConfig->OCFastMode;
  12349. 80046dc: 68fb ldr r3, [r7, #12]
  12350. 80046de: 681b ldr r3, [r3, #0]
  12351. 80046e0: 69d9 ldr r1, [r3, #28]
  12352. 80046e2: 68bb ldr r3, [r7, #8]
  12353. 80046e4: 691a ldr r2, [r3, #16]
  12354. 80046e6: 68fb ldr r3, [r7, #12]
  12355. 80046e8: 681b ldr r3, [r3, #0]
  12356. 80046ea: 430a orrs r2, r1
  12357. 80046ec: 61da str r2, [r3, #28]
  12358. break;
  12359. 80046ee: e06b b.n 80047c8 <HAL_TIM_PWM_ConfigChannel+0x1e0>
  12360. {
  12361. /* Check the parameters */
  12362. assert_param(IS_TIM_CC4_INSTANCE(htim->Instance));
  12363. /* Configure the Channel 4 in PWM mode */
  12364. TIM_OC4_SetConfig(htim->Instance, sConfig);
  12365. 80046f0: 68fb ldr r3, [r7, #12]
  12366. 80046f2: 681b ldr r3, [r3, #0]
  12367. 80046f4: 68ba ldr r2, [r7, #8]
  12368. 80046f6: 0011 movs r1, r2
  12369. 80046f8: 0018 movs r0, r3
  12370. 80046fa: f000 fa6f bl 8004bdc <TIM_OC4_SetConfig>
  12371. /* Set the Preload enable bit for channel4 */
  12372. htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE;
  12373. 80046fe: 68fb ldr r3, [r7, #12]
  12374. 8004700: 681b ldr r3, [r3, #0]
  12375. 8004702: 69da ldr r2, [r3, #28]
  12376. 8004704: 68fb ldr r3, [r7, #12]
  12377. 8004706: 681b ldr r3, [r3, #0]
  12378. 8004708: 2180 movs r1, #128 @ 0x80
  12379. 800470a: 0109 lsls r1, r1, #4
  12380. 800470c: 430a orrs r2, r1
  12381. 800470e: 61da str r2, [r3, #28]
  12382. /* Configure the Output Fast mode */
  12383. htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE;
  12384. 8004710: 68fb ldr r3, [r7, #12]
  12385. 8004712: 681b ldr r3, [r3, #0]
  12386. 8004714: 69da ldr r2, [r3, #28]
  12387. 8004716: 68fb ldr r3, [r7, #12]
  12388. 8004718: 681b ldr r3, [r3, #0]
  12389. 800471a: 4932 ldr r1, [pc, #200] @ (80047e4 <HAL_TIM_PWM_ConfigChannel+0x1fc>)
  12390. 800471c: 400a ands r2, r1
  12391. 800471e: 61da str r2, [r3, #28]
  12392. htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U;
  12393. 8004720: 68fb ldr r3, [r7, #12]
  12394. 8004722: 681b ldr r3, [r3, #0]
  12395. 8004724: 69d9 ldr r1, [r3, #28]
  12396. 8004726: 68bb ldr r3, [r7, #8]
  12397. 8004728: 691b ldr r3, [r3, #16]
  12398. 800472a: 021a lsls r2, r3, #8
  12399. 800472c: 68fb ldr r3, [r7, #12]
  12400. 800472e: 681b ldr r3, [r3, #0]
  12401. 8004730: 430a orrs r2, r1
  12402. 8004732: 61da str r2, [r3, #28]
  12403. break;
  12404. 8004734: e048 b.n 80047c8 <HAL_TIM_PWM_ConfigChannel+0x1e0>
  12405. {
  12406. /* Check the parameters */
  12407. assert_param(IS_TIM_CC5_INSTANCE(htim->Instance));
  12408. /* Configure the Channel 5 in PWM mode */
  12409. TIM_OC5_SetConfig(htim->Instance, sConfig);
  12410. 8004736: 68fb ldr r3, [r7, #12]
  12411. 8004738: 681b ldr r3, [r3, #0]
  12412. 800473a: 68ba ldr r2, [r7, #8]
  12413. 800473c: 0011 movs r1, r2
  12414. 800473e: 0018 movs r0, r3
  12415. 8004740: f000 fab0 bl 8004ca4 <TIM_OC5_SetConfig>
  12416. /* Set the Preload enable bit for channel5*/
  12417. htim->Instance->CCMR3 |= TIM_CCMR3_OC5PE;
  12418. 8004744: 68fb ldr r3, [r7, #12]
  12419. 8004746: 681b ldr r3, [r3, #0]
  12420. 8004748: 6d5a ldr r2, [r3, #84] @ 0x54
  12421. 800474a: 68fb ldr r3, [r7, #12]
  12422. 800474c: 681b ldr r3, [r3, #0]
  12423. 800474e: 2108 movs r1, #8
  12424. 8004750: 430a orrs r2, r1
  12425. 8004752: 655a str r2, [r3, #84] @ 0x54
  12426. /* Configure the Output Fast mode */
  12427. htim->Instance->CCMR3 &= ~TIM_CCMR3_OC5FE;
  12428. 8004754: 68fb ldr r3, [r7, #12]
  12429. 8004756: 681b ldr r3, [r3, #0]
  12430. 8004758: 6d5a ldr r2, [r3, #84] @ 0x54
  12431. 800475a: 68fb ldr r3, [r7, #12]
  12432. 800475c: 681b ldr r3, [r3, #0]
  12433. 800475e: 2104 movs r1, #4
  12434. 8004760: 438a bics r2, r1
  12435. 8004762: 655a str r2, [r3, #84] @ 0x54
  12436. htim->Instance->CCMR3 |= sConfig->OCFastMode;
  12437. 8004764: 68fb ldr r3, [r7, #12]
  12438. 8004766: 681b ldr r3, [r3, #0]
  12439. 8004768: 6d59 ldr r1, [r3, #84] @ 0x54
  12440. 800476a: 68bb ldr r3, [r7, #8]
  12441. 800476c: 691a ldr r2, [r3, #16]
  12442. 800476e: 68fb ldr r3, [r7, #12]
  12443. 8004770: 681b ldr r3, [r3, #0]
  12444. 8004772: 430a orrs r2, r1
  12445. 8004774: 655a str r2, [r3, #84] @ 0x54
  12446. break;
  12447. 8004776: e027 b.n 80047c8 <HAL_TIM_PWM_ConfigChannel+0x1e0>
  12448. {
  12449. /* Check the parameters */
  12450. assert_param(IS_TIM_CC6_INSTANCE(htim->Instance));
  12451. /* Configure the Channel 6 in PWM mode */
  12452. TIM_OC6_SetConfig(htim->Instance, sConfig);
  12453. 8004778: 68fb ldr r3, [r7, #12]
  12454. 800477a: 681b ldr r3, [r3, #0]
  12455. 800477c: 68ba ldr r2, [r7, #8]
  12456. 800477e: 0011 movs r1, r2
  12457. 8004780: 0018 movs r0, r3
  12458. 8004782: f000 fae9 bl 8004d58 <TIM_OC6_SetConfig>
  12459. /* Set the Preload enable bit for channel6 */
  12460. htim->Instance->CCMR3 |= TIM_CCMR3_OC6PE;
  12461. 8004786: 68fb ldr r3, [r7, #12]
  12462. 8004788: 681b ldr r3, [r3, #0]
  12463. 800478a: 6d5a ldr r2, [r3, #84] @ 0x54
  12464. 800478c: 68fb ldr r3, [r7, #12]
  12465. 800478e: 681b ldr r3, [r3, #0]
  12466. 8004790: 2180 movs r1, #128 @ 0x80
  12467. 8004792: 0109 lsls r1, r1, #4
  12468. 8004794: 430a orrs r2, r1
  12469. 8004796: 655a str r2, [r3, #84] @ 0x54
  12470. /* Configure the Output Fast mode */
  12471. htim->Instance->CCMR3 &= ~TIM_CCMR3_OC6FE;
  12472. 8004798: 68fb ldr r3, [r7, #12]
  12473. 800479a: 681b ldr r3, [r3, #0]
  12474. 800479c: 6d5a ldr r2, [r3, #84] @ 0x54
  12475. 800479e: 68fb ldr r3, [r7, #12]
  12476. 80047a0: 681b ldr r3, [r3, #0]
  12477. 80047a2: 4910 ldr r1, [pc, #64] @ (80047e4 <HAL_TIM_PWM_ConfigChannel+0x1fc>)
  12478. 80047a4: 400a ands r2, r1
  12479. 80047a6: 655a str r2, [r3, #84] @ 0x54
  12480. htim->Instance->CCMR3 |= sConfig->OCFastMode << 8U;
  12481. 80047a8: 68fb ldr r3, [r7, #12]
  12482. 80047aa: 681b ldr r3, [r3, #0]
  12483. 80047ac: 6d59 ldr r1, [r3, #84] @ 0x54
  12484. 80047ae: 68bb ldr r3, [r7, #8]
  12485. 80047b0: 691b ldr r3, [r3, #16]
  12486. 80047b2: 021a lsls r2, r3, #8
  12487. 80047b4: 68fb ldr r3, [r7, #12]
  12488. 80047b6: 681b ldr r3, [r3, #0]
  12489. 80047b8: 430a orrs r2, r1
  12490. 80047ba: 655a str r2, [r3, #84] @ 0x54
  12491. break;
  12492. 80047bc: e004 b.n 80047c8 <HAL_TIM_PWM_ConfigChannel+0x1e0>
  12493. }
  12494. default:
  12495. status = HAL_ERROR;
  12496. 80047be: 2317 movs r3, #23
  12497. 80047c0: 18fb adds r3, r7, r3
  12498. 80047c2: 2201 movs r2, #1
  12499. 80047c4: 701a strb r2, [r3, #0]
  12500. break;
  12501. 80047c6: 46c0 nop @ (mov r8, r8)
  12502. }
  12503. __HAL_UNLOCK(htim);
  12504. 80047c8: 68fb ldr r3, [r7, #12]
  12505. 80047ca: 223c movs r2, #60 @ 0x3c
  12506. 80047cc: 2100 movs r1, #0
  12507. 80047ce: 5499 strb r1, [r3, r2]
  12508. return status;
  12509. 80047d0: 2317 movs r3, #23
  12510. 80047d2: 18fb adds r3, r7, r3
  12511. 80047d4: 781b ldrb r3, [r3, #0]
  12512. }
  12513. 80047d6: 0018 movs r0, r3
  12514. 80047d8: 46bd mov sp, r7
  12515. 80047da: b006 add sp, #24
  12516. 80047dc: bd80 pop {r7, pc}
  12517. 80047de: 46c0 nop @ (mov r8, r8)
  12518. 80047e0: 080060d4 .word 0x080060d4
  12519. 80047e4: fffffbff .word 0xfffffbff
  12520. 080047e8 <TIM_Base_SetConfig>:
  12521. * @param TIMx TIM peripheral
  12522. * @param Structure TIM Base configuration structure
  12523. * @retval None
  12524. */
  12525. void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure)
  12526. {
  12527. 80047e8: b580 push {r7, lr}
  12528. 80047ea: b084 sub sp, #16
  12529. 80047ec: af00 add r7, sp, #0
  12530. 80047ee: 6078 str r0, [r7, #4]
  12531. 80047f0: 6039 str r1, [r7, #0]
  12532. uint32_t tmpcr1;
  12533. tmpcr1 = TIMx->CR1;
  12534. 80047f2: 687b ldr r3, [r7, #4]
  12535. 80047f4: 681b ldr r3, [r3, #0]
  12536. 80047f6: 60fb str r3, [r7, #12]
  12537. /* Set TIM Time Base Unit parameters ---------------------------------------*/
  12538. if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
  12539. 80047f8: 687b ldr r3, [r7, #4]
  12540. 80047fa: 4a32 ldr r2, [pc, #200] @ (80048c4 <TIM_Base_SetConfig+0xdc>)
  12541. 80047fc: 4293 cmp r3, r2
  12542. 80047fe: d003 beq.n 8004808 <TIM_Base_SetConfig+0x20>
  12543. 8004800: 687b ldr r3, [r7, #4]
  12544. 8004802: 4a31 ldr r2, [pc, #196] @ (80048c8 <TIM_Base_SetConfig+0xe0>)
  12545. 8004804: 4293 cmp r3, r2
  12546. 8004806: d108 bne.n 800481a <TIM_Base_SetConfig+0x32>
  12547. {
  12548. /* Select the Counter Mode */
  12549. tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
  12550. 8004808: 68fb ldr r3, [r7, #12]
  12551. 800480a: 2270 movs r2, #112 @ 0x70
  12552. 800480c: 4393 bics r3, r2
  12553. 800480e: 60fb str r3, [r7, #12]
  12554. tmpcr1 |= Structure->CounterMode;
  12555. 8004810: 683b ldr r3, [r7, #0]
  12556. 8004812: 685b ldr r3, [r3, #4]
  12557. 8004814: 68fa ldr r2, [r7, #12]
  12558. 8004816: 4313 orrs r3, r2
  12559. 8004818: 60fb str r3, [r7, #12]
  12560. }
  12561. if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
  12562. 800481a: 687b ldr r3, [r7, #4]
  12563. 800481c: 4a29 ldr r2, [pc, #164] @ (80048c4 <TIM_Base_SetConfig+0xdc>)
  12564. 800481e: 4293 cmp r3, r2
  12565. 8004820: d00f beq.n 8004842 <TIM_Base_SetConfig+0x5a>
  12566. 8004822: 687b ldr r3, [r7, #4]
  12567. 8004824: 4a28 ldr r2, [pc, #160] @ (80048c8 <TIM_Base_SetConfig+0xe0>)
  12568. 8004826: 4293 cmp r3, r2
  12569. 8004828: d00b beq.n 8004842 <TIM_Base_SetConfig+0x5a>
  12570. 800482a: 687b ldr r3, [r7, #4]
  12571. 800482c: 4a27 ldr r2, [pc, #156] @ (80048cc <TIM_Base_SetConfig+0xe4>)
  12572. 800482e: 4293 cmp r3, r2
  12573. 8004830: d007 beq.n 8004842 <TIM_Base_SetConfig+0x5a>
  12574. 8004832: 687b ldr r3, [r7, #4]
  12575. 8004834: 4a26 ldr r2, [pc, #152] @ (80048d0 <TIM_Base_SetConfig+0xe8>)
  12576. 8004836: 4293 cmp r3, r2
  12577. 8004838: d003 beq.n 8004842 <TIM_Base_SetConfig+0x5a>
  12578. 800483a: 687b ldr r3, [r7, #4]
  12579. 800483c: 4a25 ldr r2, [pc, #148] @ (80048d4 <TIM_Base_SetConfig+0xec>)
  12580. 800483e: 4293 cmp r3, r2
  12581. 8004840: d108 bne.n 8004854 <TIM_Base_SetConfig+0x6c>
  12582. {
  12583. /* Set the clock division */
  12584. tmpcr1 &= ~TIM_CR1_CKD;
  12585. 8004842: 68fb ldr r3, [r7, #12]
  12586. 8004844: 4a24 ldr r2, [pc, #144] @ (80048d8 <TIM_Base_SetConfig+0xf0>)
  12587. 8004846: 4013 ands r3, r2
  12588. 8004848: 60fb str r3, [r7, #12]
  12589. tmpcr1 |= (uint32_t)Structure->ClockDivision;
  12590. 800484a: 683b ldr r3, [r7, #0]
  12591. 800484c: 68db ldr r3, [r3, #12]
  12592. 800484e: 68fa ldr r2, [r7, #12]
  12593. 8004850: 4313 orrs r3, r2
  12594. 8004852: 60fb str r3, [r7, #12]
  12595. }
  12596. /* Set the auto-reload preload */
  12597. MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
  12598. 8004854: 68fb ldr r3, [r7, #12]
  12599. 8004856: 2280 movs r2, #128 @ 0x80
  12600. 8004858: 4393 bics r3, r2
  12601. 800485a: 001a movs r2, r3
  12602. 800485c: 683b ldr r3, [r7, #0]
  12603. 800485e: 695b ldr r3, [r3, #20]
  12604. 8004860: 4313 orrs r3, r2
  12605. 8004862: 60fb str r3, [r7, #12]
  12606. TIMx->CR1 = tmpcr1;
  12607. 8004864: 687b ldr r3, [r7, #4]
  12608. 8004866: 68fa ldr r2, [r7, #12]
  12609. 8004868: 601a str r2, [r3, #0]
  12610. /* Set the Autoreload value */
  12611. TIMx->ARR = (uint32_t)Structure->Period ;
  12612. 800486a: 683b ldr r3, [r7, #0]
  12613. 800486c: 689a ldr r2, [r3, #8]
  12614. 800486e: 687b ldr r3, [r7, #4]
  12615. 8004870: 62da str r2, [r3, #44] @ 0x2c
  12616. /* Set the Prescaler value */
  12617. TIMx->PSC = Structure->Prescaler;
  12618. 8004872: 683b ldr r3, [r7, #0]
  12619. 8004874: 681a ldr r2, [r3, #0]
  12620. 8004876: 687b ldr r3, [r7, #4]
  12621. 8004878: 629a str r2, [r3, #40] @ 0x28
  12622. if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
  12623. 800487a: 687b ldr r3, [r7, #4]
  12624. 800487c: 4a11 ldr r2, [pc, #68] @ (80048c4 <TIM_Base_SetConfig+0xdc>)
  12625. 800487e: 4293 cmp r3, r2
  12626. 8004880: d007 beq.n 8004892 <TIM_Base_SetConfig+0xaa>
  12627. 8004882: 687b ldr r3, [r7, #4]
  12628. 8004884: 4a12 ldr r2, [pc, #72] @ (80048d0 <TIM_Base_SetConfig+0xe8>)
  12629. 8004886: 4293 cmp r3, r2
  12630. 8004888: d003 beq.n 8004892 <TIM_Base_SetConfig+0xaa>
  12631. 800488a: 687b ldr r3, [r7, #4]
  12632. 800488c: 4a11 ldr r2, [pc, #68] @ (80048d4 <TIM_Base_SetConfig+0xec>)
  12633. 800488e: 4293 cmp r3, r2
  12634. 8004890: d103 bne.n 800489a <TIM_Base_SetConfig+0xb2>
  12635. {
  12636. /* Set the Repetition Counter value */
  12637. TIMx->RCR = Structure->RepetitionCounter;
  12638. 8004892: 683b ldr r3, [r7, #0]
  12639. 8004894: 691a ldr r2, [r3, #16]
  12640. 8004896: 687b ldr r3, [r7, #4]
  12641. 8004898: 631a str r2, [r3, #48] @ 0x30
  12642. }
  12643. /* Generate an update event to reload the Prescaler
  12644. and the repetition counter (only for advanced timer) value immediately */
  12645. TIMx->EGR = TIM_EGR_UG;
  12646. 800489a: 687b ldr r3, [r7, #4]
  12647. 800489c: 2201 movs r2, #1
  12648. 800489e: 615a str r2, [r3, #20]
  12649. /* Check if the update flag is set after the Update Generation, if so clear the UIF flag */
  12650. if (HAL_IS_BIT_SET(TIMx->SR, TIM_FLAG_UPDATE))
  12651. 80048a0: 687b ldr r3, [r7, #4]
  12652. 80048a2: 691b ldr r3, [r3, #16]
  12653. 80048a4: 2201 movs r2, #1
  12654. 80048a6: 4013 ands r3, r2
  12655. 80048a8: 2b01 cmp r3, #1
  12656. 80048aa: d106 bne.n 80048ba <TIM_Base_SetConfig+0xd2>
  12657. {
  12658. /* Clear the update flag */
  12659. CLEAR_BIT(TIMx->SR, TIM_FLAG_UPDATE);
  12660. 80048ac: 687b ldr r3, [r7, #4]
  12661. 80048ae: 691b ldr r3, [r3, #16]
  12662. 80048b0: 2201 movs r2, #1
  12663. 80048b2: 4393 bics r3, r2
  12664. 80048b4: 001a movs r2, r3
  12665. 80048b6: 687b ldr r3, [r7, #4]
  12666. 80048b8: 611a str r2, [r3, #16]
  12667. }
  12668. }
  12669. 80048ba: 46c0 nop @ (mov r8, r8)
  12670. 80048bc: 46bd mov sp, r7
  12671. 80048be: b004 add sp, #16
  12672. 80048c0: bd80 pop {r7, pc}
  12673. 80048c2: 46c0 nop @ (mov r8, r8)
  12674. 80048c4: 40012c00 .word 0x40012c00
  12675. 80048c8: 40000400 .word 0x40000400
  12676. 80048cc: 40002000 .word 0x40002000
  12677. 80048d0: 40014400 .word 0x40014400
  12678. 80048d4: 40014800 .word 0x40014800
  12679. 80048d8: fffffcff .word 0xfffffcff
  12680. 080048dc <TIM_OC1_SetConfig>:
  12681. * @param TIMx to select the TIM peripheral
  12682. * @param OC_Config The output configuration structure
  12683. * @retval None
  12684. */
  12685. static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
  12686. {
  12687. 80048dc: b580 push {r7, lr}
  12688. 80048de: b086 sub sp, #24
  12689. 80048e0: af00 add r7, sp, #0
  12690. 80048e2: 6078 str r0, [r7, #4]
  12691. 80048e4: 6039 str r1, [r7, #0]
  12692. uint32_t tmpccmrx;
  12693. uint32_t tmpccer;
  12694. uint32_t tmpcr2;
  12695. /* Get the TIMx CCER register value */
  12696. tmpccer = TIMx->CCER;
  12697. 80048e6: 687b ldr r3, [r7, #4]
  12698. 80048e8: 6a1b ldr r3, [r3, #32]
  12699. 80048ea: 617b str r3, [r7, #20]
  12700. /* Disable the Channel 1: Reset the CC1E Bit */
  12701. TIMx->CCER &= ~TIM_CCER_CC1E;
  12702. 80048ec: 687b ldr r3, [r7, #4]
  12703. 80048ee: 6a1b ldr r3, [r3, #32]
  12704. 80048f0: 2201 movs r2, #1
  12705. 80048f2: 4393 bics r3, r2
  12706. 80048f4: 001a movs r2, r3
  12707. 80048f6: 687b ldr r3, [r7, #4]
  12708. 80048f8: 621a str r2, [r3, #32]
  12709. /* Get the TIMx CR2 register value */
  12710. tmpcr2 = TIMx->CR2;
  12711. 80048fa: 687b ldr r3, [r7, #4]
  12712. 80048fc: 685b ldr r3, [r3, #4]
  12713. 80048fe: 613b str r3, [r7, #16]
  12714. /* Get the TIMx CCMR1 register value */
  12715. tmpccmrx = TIMx->CCMR1;
  12716. 8004900: 687b ldr r3, [r7, #4]
  12717. 8004902: 699b ldr r3, [r3, #24]
  12718. 8004904: 60fb str r3, [r7, #12]
  12719. /* Reset the Output Compare Mode Bits */
  12720. tmpccmrx &= ~TIM_CCMR1_OC1M;
  12721. 8004906: 68fb ldr r3, [r7, #12]
  12722. 8004908: 4a2e ldr r2, [pc, #184] @ (80049c4 <TIM_OC1_SetConfig+0xe8>)
  12723. 800490a: 4013 ands r3, r2
  12724. 800490c: 60fb str r3, [r7, #12]
  12725. tmpccmrx &= ~TIM_CCMR1_CC1S;
  12726. 800490e: 68fb ldr r3, [r7, #12]
  12727. 8004910: 2203 movs r2, #3
  12728. 8004912: 4393 bics r3, r2
  12729. 8004914: 60fb str r3, [r7, #12]
  12730. /* Select the Output Compare Mode */
  12731. tmpccmrx |= OC_Config->OCMode;
  12732. 8004916: 683b ldr r3, [r7, #0]
  12733. 8004918: 681b ldr r3, [r3, #0]
  12734. 800491a: 68fa ldr r2, [r7, #12]
  12735. 800491c: 4313 orrs r3, r2
  12736. 800491e: 60fb str r3, [r7, #12]
  12737. /* Reset the Output Polarity level */
  12738. tmpccer &= ~TIM_CCER_CC1P;
  12739. 8004920: 697b ldr r3, [r7, #20]
  12740. 8004922: 2202 movs r2, #2
  12741. 8004924: 4393 bics r3, r2
  12742. 8004926: 617b str r3, [r7, #20]
  12743. /* Set the Output Compare Polarity */
  12744. tmpccer |= OC_Config->OCPolarity;
  12745. 8004928: 683b ldr r3, [r7, #0]
  12746. 800492a: 689b ldr r3, [r3, #8]
  12747. 800492c: 697a ldr r2, [r7, #20]
  12748. 800492e: 4313 orrs r3, r2
  12749. 8004930: 617b str r3, [r7, #20]
  12750. if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_1))
  12751. 8004932: 687b ldr r3, [r7, #4]
  12752. 8004934: 4a24 ldr r2, [pc, #144] @ (80049c8 <TIM_OC1_SetConfig+0xec>)
  12753. 8004936: 4293 cmp r3, r2
  12754. 8004938: d007 beq.n 800494a <TIM_OC1_SetConfig+0x6e>
  12755. 800493a: 687b ldr r3, [r7, #4]
  12756. 800493c: 4a23 ldr r2, [pc, #140] @ (80049cc <TIM_OC1_SetConfig+0xf0>)
  12757. 800493e: 4293 cmp r3, r2
  12758. 8004940: d003 beq.n 800494a <TIM_OC1_SetConfig+0x6e>
  12759. 8004942: 687b ldr r3, [r7, #4]
  12760. 8004944: 4a22 ldr r2, [pc, #136] @ (80049d0 <TIM_OC1_SetConfig+0xf4>)
  12761. 8004946: 4293 cmp r3, r2
  12762. 8004948: d10c bne.n 8004964 <TIM_OC1_SetConfig+0x88>
  12763. {
  12764. /* Check parameters */
  12765. assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
  12766. /* Reset the Output N Polarity level */
  12767. tmpccer &= ~TIM_CCER_CC1NP;
  12768. 800494a: 697b ldr r3, [r7, #20]
  12769. 800494c: 2208 movs r2, #8
  12770. 800494e: 4393 bics r3, r2
  12771. 8004950: 617b str r3, [r7, #20]
  12772. /* Set the Output N Polarity */
  12773. tmpccer |= OC_Config->OCNPolarity;
  12774. 8004952: 683b ldr r3, [r7, #0]
  12775. 8004954: 68db ldr r3, [r3, #12]
  12776. 8004956: 697a ldr r2, [r7, #20]
  12777. 8004958: 4313 orrs r3, r2
  12778. 800495a: 617b str r3, [r7, #20]
  12779. /* Reset the Output N State */
  12780. tmpccer &= ~TIM_CCER_CC1NE;
  12781. 800495c: 697b ldr r3, [r7, #20]
  12782. 800495e: 2204 movs r2, #4
  12783. 8004960: 4393 bics r3, r2
  12784. 8004962: 617b str r3, [r7, #20]
  12785. }
  12786. if (IS_TIM_BREAK_INSTANCE(TIMx))
  12787. 8004964: 687b ldr r3, [r7, #4]
  12788. 8004966: 4a18 ldr r2, [pc, #96] @ (80049c8 <TIM_OC1_SetConfig+0xec>)
  12789. 8004968: 4293 cmp r3, r2
  12790. 800496a: d007 beq.n 800497c <TIM_OC1_SetConfig+0xa0>
  12791. 800496c: 687b ldr r3, [r7, #4]
  12792. 800496e: 4a17 ldr r2, [pc, #92] @ (80049cc <TIM_OC1_SetConfig+0xf0>)
  12793. 8004970: 4293 cmp r3, r2
  12794. 8004972: d003 beq.n 800497c <TIM_OC1_SetConfig+0xa0>
  12795. 8004974: 687b ldr r3, [r7, #4]
  12796. 8004976: 4a16 ldr r2, [pc, #88] @ (80049d0 <TIM_OC1_SetConfig+0xf4>)
  12797. 8004978: 4293 cmp r3, r2
  12798. 800497a: d111 bne.n 80049a0 <TIM_OC1_SetConfig+0xc4>
  12799. /* Check parameters */
  12800. assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
  12801. assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
  12802. /* Reset the Output Compare and Output Compare N IDLE State */
  12803. tmpcr2 &= ~TIM_CR2_OIS1;
  12804. 800497c: 693b ldr r3, [r7, #16]
  12805. 800497e: 4a15 ldr r2, [pc, #84] @ (80049d4 <TIM_OC1_SetConfig+0xf8>)
  12806. 8004980: 4013 ands r3, r2
  12807. 8004982: 613b str r3, [r7, #16]
  12808. tmpcr2 &= ~TIM_CR2_OIS1N;
  12809. 8004984: 693b ldr r3, [r7, #16]
  12810. 8004986: 4a14 ldr r2, [pc, #80] @ (80049d8 <TIM_OC1_SetConfig+0xfc>)
  12811. 8004988: 4013 ands r3, r2
  12812. 800498a: 613b str r3, [r7, #16]
  12813. /* Set the Output Idle state */
  12814. tmpcr2 |= OC_Config->OCIdleState;
  12815. 800498c: 683b ldr r3, [r7, #0]
  12816. 800498e: 695b ldr r3, [r3, #20]
  12817. 8004990: 693a ldr r2, [r7, #16]
  12818. 8004992: 4313 orrs r3, r2
  12819. 8004994: 613b str r3, [r7, #16]
  12820. /* Set the Output N Idle state */
  12821. tmpcr2 |= OC_Config->OCNIdleState;
  12822. 8004996: 683b ldr r3, [r7, #0]
  12823. 8004998: 699b ldr r3, [r3, #24]
  12824. 800499a: 693a ldr r2, [r7, #16]
  12825. 800499c: 4313 orrs r3, r2
  12826. 800499e: 613b str r3, [r7, #16]
  12827. }
  12828. /* Write to TIMx CR2 */
  12829. TIMx->CR2 = tmpcr2;
  12830. 80049a0: 687b ldr r3, [r7, #4]
  12831. 80049a2: 693a ldr r2, [r7, #16]
  12832. 80049a4: 605a str r2, [r3, #4]
  12833. /* Write to TIMx CCMR1 */
  12834. TIMx->CCMR1 = tmpccmrx;
  12835. 80049a6: 687b ldr r3, [r7, #4]
  12836. 80049a8: 68fa ldr r2, [r7, #12]
  12837. 80049aa: 619a str r2, [r3, #24]
  12838. /* Set the Capture Compare Register value */
  12839. TIMx->CCR1 = OC_Config->Pulse;
  12840. 80049ac: 683b ldr r3, [r7, #0]
  12841. 80049ae: 685a ldr r2, [r3, #4]
  12842. 80049b0: 687b ldr r3, [r7, #4]
  12843. 80049b2: 635a str r2, [r3, #52] @ 0x34
  12844. /* Write to TIMx CCER */
  12845. TIMx->CCER = tmpccer;
  12846. 80049b4: 687b ldr r3, [r7, #4]
  12847. 80049b6: 697a ldr r2, [r7, #20]
  12848. 80049b8: 621a str r2, [r3, #32]
  12849. }
  12850. 80049ba: 46c0 nop @ (mov r8, r8)
  12851. 80049bc: 46bd mov sp, r7
  12852. 80049be: b006 add sp, #24
  12853. 80049c0: bd80 pop {r7, pc}
  12854. 80049c2: 46c0 nop @ (mov r8, r8)
  12855. 80049c4: fffeff8f .word 0xfffeff8f
  12856. 80049c8: 40012c00 .word 0x40012c00
  12857. 80049cc: 40014400 .word 0x40014400
  12858. 80049d0: 40014800 .word 0x40014800
  12859. 80049d4: fffffeff .word 0xfffffeff
  12860. 80049d8: fffffdff .word 0xfffffdff
  12861. 080049dc <TIM_OC2_SetConfig>:
  12862. * @param TIMx to select the TIM peripheral
  12863. * @param OC_Config The output configuration structure
  12864. * @retval None
  12865. */
  12866. void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
  12867. {
  12868. 80049dc: b580 push {r7, lr}
  12869. 80049de: b086 sub sp, #24
  12870. 80049e0: af00 add r7, sp, #0
  12871. 80049e2: 6078 str r0, [r7, #4]
  12872. 80049e4: 6039 str r1, [r7, #0]
  12873. uint32_t tmpccmrx;
  12874. uint32_t tmpccer;
  12875. uint32_t tmpcr2;
  12876. /* Get the TIMx CCER register value */
  12877. tmpccer = TIMx->CCER;
  12878. 80049e6: 687b ldr r3, [r7, #4]
  12879. 80049e8: 6a1b ldr r3, [r3, #32]
  12880. 80049ea: 617b str r3, [r7, #20]
  12881. /* Disable the Channel 2: Reset the CC2E Bit */
  12882. TIMx->CCER &= ~TIM_CCER_CC2E;
  12883. 80049ec: 687b ldr r3, [r7, #4]
  12884. 80049ee: 6a1b ldr r3, [r3, #32]
  12885. 80049f0: 2210 movs r2, #16
  12886. 80049f2: 4393 bics r3, r2
  12887. 80049f4: 001a movs r2, r3
  12888. 80049f6: 687b ldr r3, [r7, #4]
  12889. 80049f8: 621a str r2, [r3, #32]
  12890. /* Get the TIMx CR2 register value */
  12891. tmpcr2 = TIMx->CR2;
  12892. 80049fa: 687b ldr r3, [r7, #4]
  12893. 80049fc: 685b ldr r3, [r3, #4]
  12894. 80049fe: 613b str r3, [r7, #16]
  12895. /* Get the TIMx CCMR1 register value */
  12896. tmpccmrx = TIMx->CCMR1;
  12897. 8004a00: 687b ldr r3, [r7, #4]
  12898. 8004a02: 699b ldr r3, [r3, #24]
  12899. 8004a04: 60fb str r3, [r7, #12]
  12900. /* Reset the Output Compare mode and Capture/Compare selection Bits */
  12901. tmpccmrx &= ~TIM_CCMR1_OC2M;
  12902. 8004a06: 68fb ldr r3, [r7, #12]
  12903. 8004a08: 4a2c ldr r2, [pc, #176] @ (8004abc <TIM_OC2_SetConfig+0xe0>)
  12904. 8004a0a: 4013 ands r3, r2
  12905. 8004a0c: 60fb str r3, [r7, #12]
  12906. tmpccmrx &= ~TIM_CCMR1_CC2S;
  12907. 8004a0e: 68fb ldr r3, [r7, #12]
  12908. 8004a10: 4a2b ldr r2, [pc, #172] @ (8004ac0 <TIM_OC2_SetConfig+0xe4>)
  12909. 8004a12: 4013 ands r3, r2
  12910. 8004a14: 60fb str r3, [r7, #12]
  12911. /* Select the Output Compare Mode */
  12912. tmpccmrx |= (OC_Config->OCMode << 8U);
  12913. 8004a16: 683b ldr r3, [r7, #0]
  12914. 8004a18: 681b ldr r3, [r3, #0]
  12915. 8004a1a: 021b lsls r3, r3, #8
  12916. 8004a1c: 68fa ldr r2, [r7, #12]
  12917. 8004a1e: 4313 orrs r3, r2
  12918. 8004a20: 60fb str r3, [r7, #12]
  12919. /* Reset the Output Polarity level */
  12920. tmpccer &= ~TIM_CCER_CC2P;
  12921. 8004a22: 697b ldr r3, [r7, #20]
  12922. 8004a24: 2220 movs r2, #32
  12923. 8004a26: 4393 bics r3, r2
  12924. 8004a28: 617b str r3, [r7, #20]
  12925. /* Set the Output Compare Polarity */
  12926. tmpccer |= (OC_Config->OCPolarity << 4U);
  12927. 8004a2a: 683b ldr r3, [r7, #0]
  12928. 8004a2c: 689b ldr r3, [r3, #8]
  12929. 8004a2e: 011b lsls r3, r3, #4
  12930. 8004a30: 697a ldr r2, [r7, #20]
  12931. 8004a32: 4313 orrs r3, r2
  12932. 8004a34: 617b str r3, [r7, #20]
  12933. if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_2))
  12934. 8004a36: 687b ldr r3, [r7, #4]
  12935. 8004a38: 4a22 ldr r2, [pc, #136] @ (8004ac4 <TIM_OC2_SetConfig+0xe8>)
  12936. 8004a3a: 4293 cmp r3, r2
  12937. 8004a3c: d10d bne.n 8004a5a <TIM_OC2_SetConfig+0x7e>
  12938. {
  12939. assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
  12940. /* Reset the Output N Polarity level */
  12941. tmpccer &= ~TIM_CCER_CC2NP;
  12942. 8004a3e: 697b ldr r3, [r7, #20]
  12943. 8004a40: 2280 movs r2, #128 @ 0x80
  12944. 8004a42: 4393 bics r3, r2
  12945. 8004a44: 617b str r3, [r7, #20]
  12946. /* Set the Output N Polarity */
  12947. tmpccer |= (OC_Config->OCNPolarity << 4U);
  12948. 8004a46: 683b ldr r3, [r7, #0]
  12949. 8004a48: 68db ldr r3, [r3, #12]
  12950. 8004a4a: 011b lsls r3, r3, #4
  12951. 8004a4c: 697a ldr r2, [r7, #20]
  12952. 8004a4e: 4313 orrs r3, r2
  12953. 8004a50: 617b str r3, [r7, #20]
  12954. /* Reset the Output N State */
  12955. tmpccer &= ~TIM_CCER_CC2NE;
  12956. 8004a52: 697b ldr r3, [r7, #20]
  12957. 8004a54: 2240 movs r2, #64 @ 0x40
  12958. 8004a56: 4393 bics r3, r2
  12959. 8004a58: 617b str r3, [r7, #20]
  12960. }
  12961. if (IS_TIM_BREAK_INSTANCE(TIMx))
  12962. 8004a5a: 687b ldr r3, [r7, #4]
  12963. 8004a5c: 4a19 ldr r2, [pc, #100] @ (8004ac4 <TIM_OC2_SetConfig+0xe8>)
  12964. 8004a5e: 4293 cmp r3, r2
  12965. 8004a60: d007 beq.n 8004a72 <TIM_OC2_SetConfig+0x96>
  12966. 8004a62: 687b ldr r3, [r7, #4]
  12967. 8004a64: 4a18 ldr r2, [pc, #96] @ (8004ac8 <TIM_OC2_SetConfig+0xec>)
  12968. 8004a66: 4293 cmp r3, r2
  12969. 8004a68: d003 beq.n 8004a72 <TIM_OC2_SetConfig+0x96>
  12970. 8004a6a: 687b ldr r3, [r7, #4]
  12971. 8004a6c: 4a17 ldr r2, [pc, #92] @ (8004acc <TIM_OC2_SetConfig+0xf0>)
  12972. 8004a6e: 4293 cmp r3, r2
  12973. 8004a70: d113 bne.n 8004a9a <TIM_OC2_SetConfig+0xbe>
  12974. /* Check parameters */
  12975. assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
  12976. assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
  12977. /* Reset the Output Compare and Output Compare N IDLE State */
  12978. tmpcr2 &= ~TIM_CR2_OIS2;
  12979. 8004a72: 693b ldr r3, [r7, #16]
  12980. 8004a74: 4a16 ldr r2, [pc, #88] @ (8004ad0 <TIM_OC2_SetConfig+0xf4>)
  12981. 8004a76: 4013 ands r3, r2
  12982. 8004a78: 613b str r3, [r7, #16]
  12983. tmpcr2 &= ~TIM_CR2_OIS2N;
  12984. 8004a7a: 693b ldr r3, [r7, #16]
  12985. 8004a7c: 4a15 ldr r2, [pc, #84] @ (8004ad4 <TIM_OC2_SetConfig+0xf8>)
  12986. 8004a7e: 4013 ands r3, r2
  12987. 8004a80: 613b str r3, [r7, #16]
  12988. /* Set the Output Idle state */
  12989. tmpcr2 |= (OC_Config->OCIdleState << 2U);
  12990. 8004a82: 683b ldr r3, [r7, #0]
  12991. 8004a84: 695b ldr r3, [r3, #20]
  12992. 8004a86: 009b lsls r3, r3, #2
  12993. 8004a88: 693a ldr r2, [r7, #16]
  12994. 8004a8a: 4313 orrs r3, r2
  12995. 8004a8c: 613b str r3, [r7, #16]
  12996. /* Set the Output N Idle state */
  12997. tmpcr2 |= (OC_Config->OCNIdleState << 2U);
  12998. 8004a8e: 683b ldr r3, [r7, #0]
  12999. 8004a90: 699b ldr r3, [r3, #24]
  13000. 8004a92: 009b lsls r3, r3, #2
  13001. 8004a94: 693a ldr r2, [r7, #16]
  13002. 8004a96: 4313 orrs r3, r2
  13003. 8004a98: 613b str r3, [r7, #16]
  13004. }
  13005. /* Write to TIMx CR2 */
  13006. TIMx->CR2 = tmpcr2;
  13007. 8004a9a: 687b ldr r3, [r7, #4]
  13008. 8004a9c: 693a ldr r2, [r7, #16]
  13009. 8004a9e: 605a str r2, [r3, #4]
  13010. /* Write to TIMx CCMR1 */
  13011. TIMx->CCMR1 = tmpccmrx;
  13012. 8004aa0: 687b ldr r3, [r7, #4]
  13013. 8004aa2: 68fa ldr r2, [r7, #12]
  13014. 8004aa4: 619a str r2, [r3, #24]
  13015. /* Set the Capture Compare Register value */
  13016. TIMx->CCR2 = OC_Config->Pulse;
  13017. 8004aa6: 683b ldr r3, [r7, #0]
  13018. 8004aa8: 685a ldr r2, [r3, #4]
  13019. 8004aaa: 687b ldr r3, [r7, #4]
  13020. 8004aac: 639a str r2, [r3, #56] @ 0x38
  13021. /* Write to TIMx CCER */
  13022. TIMx->CCER = tmpccer;
  13023. 8004aae: 687b ldr r3, [r7, #4]
  13024. 8004ab0: 697a ldr r2, [r7, #20]
  13025. 8004ab2: 621a str r2, [r3, #32]
  13026. }
  13027. 8004ab4: 46c0 nop @ (mov r8, r8)
  13028. 8004ab6: 46bd mov sp, r7
  13029. 8004ab8: b006 add sp, #24
  13030. 8004aba: bd80 pop {r7, pc}
  13031. 8004abc: feff8fff .word 0xfeff8fff
  13032. 8004ac0: fffffcff .word 0xfffffcff
  13033. 8004ac4: 40012c00 .word 0x40012c00
  13034. 8004ac8: 40014400 .word 0x40014400
  13035. 8004acc: 40014800 .word 0x40014800
  13036. 8004ad0: fffffbff .word 0xfffffbff
  13037. 8004ad4: fffff7ff .word 0xfffff7ff
  13038. 08004ad8 <TIM_OC3_SetConfig>:
  13039. * @param TIMx to select the TIM peripheral
  13040. * @param OC_Config The output configuration structure
  13041. * @retval None
  13042. */
  13043. static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
  13044. {
  13045. 8004ad8: b580 push {r7, lr}
  13046. 8004ada: b086 sub sp, #24
  13047. 8004adc: af00 add r7, sp, #0
  13048. 8004ade: 6078 str r0, [r7, #4]
  13049. 8004ae0: 6039 str r1, [r7, #0]
  13050. uint32_t tmpccmrx;
  13051. uint32_t tmpccer;
  13052. uint32_t tmpcr2;
  13053. /* Get the TIMx CCER register value */
  13054. tmpccer = TIMx->CCER;
  13055. 8004ae2: 687b ldr r3, [r7, #4]
  13056. 8004ae4: 6a1b ldr r3, [r3, #32]
  13057. 8004ae6: 617b str r3, [r7, #20]
  13058. /* Disable the Channel 3: Reset the CC2E Bit */
  13059. TIMx->CCER &= ~TIM_CCER_CC3E;
  13060. 8004ae8: 687b ldr r3, [r7, #4]
  13061. 8004aea: 6a1b ldr r3, [r3, #32]
  13062. 8004aec: 4a31 ldr r2, [pc, #196] @ (8004bb4 <TIM_OC3_SetConfig+0xdc>)
  13063. 8004aee: 401a ands r2, r3
  13064. 8004af0: 687b ldr r3, [r7, #4]
  13065. 8004af2: 621a str r2, [r3, #32]
  13066. /* Get the TIMx CR2 register value */
  13067. tmpcr2 = TIMx->CR2;
  13068. 8004af4: 687b ldr r3, [r7, #4]
  13069. 8004af6: 685b ldr r3, [r3, #4]
  13070. 8004af8: 613b str r3, [r7, #16]
  13071. /* Get the TIMx CCMR2 register value */
  13072. tmpccmrx = TIMx->CCMR2;
  13073. 8004afa: 687b ldr r3, [r7, #4]
  13074. 8004afc: 69db ldr r3, [r3, #28]
  13075. 8004afe: 60fb str r3, [r7, #12]
  13076. /* Reset the Output Compare mode and Capture/Compare selection Bits */
  13077. tmpccmrx &= ~TIM_CCMR2_OC3M;
  13078. 8004b00: 68fb ldr r3, [r7, #12]
  13079. 8004b02: 4a2d ldr r2, [pc, #180] @ (8004bb8 <TIM_OC3_SetConfig+0xe0>)
  13080. 8004b04: 4013 ands r3, r2
  13081. 8004b06: 60fb str r3, [r7, #12]
  13082. tmpccmrx &= ~TIM_CCMR2_CC3S;
  13083. 8004b08: 68fb ldr r3, [r7, #12]
  13084. 8004b0a: 2203 movs r2, #3
  13085. 8004b0c: 4393 bics r3, r2
  13086. 8004b0e: 60fb str r3, [r7, #12]
  13087. /* Select the Output Compare Mode */
  13088. tmpccmrx |= OC_Config->OCMode;
  13089. 8004b10: 683b ldr r3, [r7, #0]
  13090. 8004b12: 681b ldr r3, [r3, #0]
  13091. 8004b14: 68fa ldr r2, [r7, #12]
  13092. 8004b16: 4313 orrs r3, r2
  13093. 8004b18: 60fb str r3, [r7, #12]
  13094. /* Reset the Output Polarity level */
  13095. tmpccer &= ~TIM_CCER_CC3P;
  13096. 8004b1a: 697b ldr r3, [r7, #20]
  13097. 8004b1c: 4a27 ldr r2, [pc, #156] @ (8004bbc <TIM_OC3_SetConfig+0xe4>)
  13098. 8004b1e: 4013 ands r3, r2
  13099. 8004b20: 617b str r3, [r7, #20]
  13100. /* Set the Output Compare Polarity */
  13101. tmpccer |= (OC_Config->OCPolarity << 8U);
  13102. 8004b22: 683b ldr r3, [r7, #0]
  13103. 8004b24: 689b ldr r3, [r3, #8]
  13104. 8004b26: 021b lsls r3, r3, #8
  13105. 8004b28: 697a ldr r2, [r7, #20]
  13106. 8004b2a: 4313 orrs r3, r2
  13107. 8004b2c: 617b str r3, [r7, #20]
  13108. if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_3))
  13109. 8004b2e: 687b ldr r3, [r7, #4]
  13110. 8004b30: 4a23 ldr r2, [pc, #140] @ (8004bc0 <TIM_OC3_SetConfig+0xe8>)
  13111. 8004b32: 4293 cmp r3, r2
  13112. 8004b34: d10d bne.n 8004b52 <TIM_OC3_SetConfig+0x7a>
  13113. {
  13114. assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity));
  13115. /* Reset the Output N Polarity level */
  13116. tmpccer &= ~TIM_CCER_CC3NP;
  13117. 8004b36: 697b ldr r3, [r7, #20]
  13118. 8004b38: 4a22 ldr r2, [pc, #136] @ (8004bc4 <TIM_OC3_SetConfig+0xec>)
  13119. 8004b3a: 4013 ands r3, r2
  13120. 8004b3c: 617b str r3, [r7, #20]
  13121. /* Set the Output N Polarity */
  13122. tmpccer |= (OC_Config->OCNPolarity << 8U);
  13123. 8004b3e: 683b ldr r3, [r7, #0]
  13124. 8004b40: 68db ldr r3, [r3, #12]
  13125. 8004b42: 021b lsls r3, r3, #8
  13126. 8004b44: 697a ldr r2, [r7, #20]
  13127. 8004b46: 4313 orrs r3, r2
  13128. 8004b48: 617b str r3, [r7, #20]
  13129. /* Reset the Output N State */
  13130. tmpccer &= ~TIM_CCER_CC3NE;
  13131. 8004b4a: 697b ldr r3, [r7, #20]
  13132. 8004b4c: 4a1e ldr r2, [pc, #120] @ (8004bc8 <TIM_OC3_SetConfig+0xf0>)
  13133. 8004b4e: 4013 ands r3, r2
  13134. 8004b50: 617b str r3, [r7, #20]
  13135. }
  13136. if (IS_TIM_BREAK_INSTANCE(TIMx))
  13137. 8004b52: 687b ldr r3, [r7, #4]
  13138. 8004b54: 4a1a ldr r2, [pc, #104] @ (8004bc0 <TIM_OC3_SetConfig+0xe8>)
  13139. 8004b56: 4293 cmp r3, r2
  13140. 8004b58: d007 beq.n 8004b6a <TIM_OC3_SetConfig+0x92>
  13141. 8004b5a: 687b ldr r3, [r7, #4]
  13142. 8004b5c: 4a1b ldr r2, [pc, #108] @ (8004bcc <TIM_OC3_SetConfig+0xf4>)
  13143. 8004b5e: 4293 cmp r3, r2
  13144. 8004b60: d003 beq.n 8004b6a <TIM_OC3_SetConfig+0x92>
  13145. 8004b62: 687b ldr r3, [r7, #4]
  13146. 8004b64: 4a1a ldr r2, [pc, #104] @ (8004bd0 <TIM_OC3_SetConfig+0xf8>)
  13147. 8004b66: 4293 cmp r3, r2
  13148. 8004b68: d113 bne.n 8004b92 <TIM_OC3_SetConfig+0xba>
  13149. /* Check parameters */
  13150. assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState));
  13151. assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
  13152. /* Reset the Output Compare and Output Compare N IDLE State */
  13153. tmpcr2 &= ~TIM_CR2_OIS3;
  13154. 8004b6a: 693b ldr r3, [r7, #16]
  13155. 8004b6c: 4a19 ldr r2, [pc, #100] @ (8004bd4 <TIM_OC3_SetConfig+0xfc>)
  13156. 8004b6e: 4013 ands r3, r2
  13157. 8004b70: 613b str r3, [r7, #16]
  13158. tmpcr2 &= ~TIM_CR2_OIS3N;
  13159. 8004b72: 693b ldr r3, [r7, #16]
  13160. 8004b74: 4a18 ldr r2, [pc, #96] @ (8004bd8 <TIM_OC3_SetConfig+0x100>)
  13161. 8004b76: 4013 ands r3, r2
  13162. 8004b78: 613b str r3, [r7, #16]
  13163. /* Set the Output Idle state */
  13164. tmpcr2 |= (OC_Config->OCIdleState << 4U);
  13165. 8004b7a: 683b ldr r3, [r7, #0]
  13166. 8004b7c: 695b ldr r3, [r3, #20]
  13167. 8004b7e: 011b lsls r3, r3, #4
  13168. 8004b80: 693a ldr r2, [r7, #16]
  13169. 8004b82: 4313 orrs r3, r2
  13170. 8004b84: 613b str r3, [r7, #16]
  13171. /* Set the Output N Idle state */
  13172. tmpcr2 |= (OC_Config->OCNIdleState << 4U);
  13173. 8004b86: 683b ldr r3, [r7, #0]
  13174. 8004b88: 699b ldr r3, [r3, #24]
  13175. 8004b8a: 011b lsls r3, r3, #4
  13176. 8004b8c: 693a ldr r2, [r7, #16]
  13177. 8004b8e: 4313 orrs r3, r2
  13178. 8004b90: 613b str r3, [r7, #16]
  13179. }
  13180. /* Write to TIMx CR2 */
  13181. TIMx->CR2 = tmpcr2;
  13182. 8004b92: 687b ldr r3, [r7, #4]
  13183. 8004b94: 693a ldr r2, [r7, #16]
  13184. 8004b96: 605a str r2, [r3, #4]
  13185. /* Write to TIMx CCMR2 */
  13186. TIMx->CCMR2 = tmpccmrx;
  13187. 8004b98: 687b ldr r3, [r7, #4]
  13188. 8004b9a: 68fa ldr r2, [r7, #12]
  13189. 8004b9c: 61da str r2, [r3, #28]
  13190. /* Set the Capture Compare Register value */
  13191. TIMx->CCR3 = OC_Config->Pulse;
  13192. 8004b9e: 683b ldr r3, [r7, #0]
  13193. 8004ba0: 685a ldr r2, [r3, #4]
  13194. 8004ba2: 687b ldr r3, [r7, #4]
  13195. 8004ba4: 63da str r2, [r3, #60] @ 0x3c
  13196. /* Write to TIMx CCER */
  13197. TIMx->CCER = tmpccer;
  13198. 8004ba6: 687b ldr r3, [r7, #4]
  13199. 8004ba8: 697a ldr r2, [r7, #20]
  13200. 8004baa: 621a str r2, [r3, #32]
  13201. }
  13202. 8004bac: 46c0 nop @ (mov r8, r8)
  13203. 8004bae: 46bd mov sp, r7
  13204. 8004bb0: b006 add sp, #24
  13205. 8004bb2: bd80 pop {r7, pc}
  13206. 8004bb4: fffffeff .word 0xfffffeff
  13207. 8004bb8: fffeff8f .word 0xfffeff8f
  13208. 8004bbc: fffffdff .word 0xfffffdff
  13209. 8004bc0: 40012c00 .word 0x40012c00
  13210. 8004bc4: fffff7ff .word 0xfffff7ff
  13211. 8004bc8: fffffbff .word 0xfffffbff
  13212. 8004bcc: 40014400 .word 0x40014400
  13213. 8004bd0: 40014800 .word 0x40014800
  13214. 8004bd4: ffffefff .word 0xffffefff
  13215. 8004bd8: ffffdfff .word 0xffffdfff
  13216. 08004bdc <TIM_OC4_SetConfig>:
  13217. * @param TIMx to select the TIM peripheral
  13218. * @param OC_Config The output configuration structure
  13219. * @retval None
  13220. */
  13221. static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
  13222. {
  13223. 8004bdc: b580 push {r7, lr}
  13224. 8004bde: b086 sub sp, #24
  13225. 8004be0: af00 add r7, sp, #0
  13226. 8004be2: 6078 str r0, [r7, #4]
  13227. 8004be4: 6039 str r1, [r7, #0]
  13228. uint32_t tmpccmrx;
  13229. uint32_t tmpccer;
  13230. uint32_t tmpcr2;
  13231. /* Get the TIMx CCER register value */
  13232. tmpccer = TIMx->CCER;
  13233. 8004be6: 687b ldr r3, [r7, #4]
  13234. 8004be8: 6a1b ldr r3, [r3, #32]
  13235. 8004bea: 613b str r3, [r7, #16]
  13236. /* Disable the Channel 4: Reset the CC4E Bit */
  13237. TIMx->CCER &= ~TIM_CCER_CC4E;
  13238. 8004bec: 687b ldr r3, [r7, #4]
  13239. 8004bee: 6a1b ldr r3, [r3, #32]
  13240. 8004bf0: 4a24 ldr r2, [pc, #144] @ (8004c84 <TIM_OC4_SetConfig+0xa8>)
  13241. 8004bf2: 401a ands r2, r3
  13242. 8004bf4: 687b ldr r3, [r7, #4]
  13243. 8004bf6: 621a str r2, [r3, #32]
  13244. /* Get the TIMx CR2 register value */
  13245. tmpcr2 = TIMx->CR2;
  13246. 8004bf8: 687b ldr r3, [r7, #4]
  13247. 8004bfa: 685b ldr r3, [r3, #4]
  13248. 8004bfc: 617b str r3, [r7, #20]
  13249. /* Get the TIMx CCMR2 register value */
  13250. tmpccmrx = TIMx->CCMR2;
  13251. 8004bfe: 687b ldr r3, [r7, #4]
  13252. 8004c00: 69db ldr r3, [r3, #28]
  13253. 8004c02: 60fb str r3, [r7, #12]
  13254. /* Reset the Output Compare mode and Capture/Compare selection Bits */
  13255. tmpccmrx &= ~TIM_CCMR2_OC4M;
  13256. 8004c04: 68fb ldr r3, [r7, #12]
  13257. 8004c06: 4a20 ldr r2, [pc, #128] @ (8004c88 <TIM_OC4_SetConfig+0xac>)
  13258. 8004c08: 4013 ands r3, r2
  13259. 8004c0a: 60fb str r3, [r7, #12]
  13260. tmpccmrx &= ~TIM_CCMR2_CC4S;
  13261. 8004c0c: 68fb ldr r3, [r7, #12]
  13262. 8004c0e: 4a1f ldr r2, [pc, #124] @ (8004c8c <TIM_OC4_SetConfig+0xb0>)
  13263. 8004c10: 4013 ands r3, r2
  13264. 8004c12: 60fb str r3, [r7, #12]
  13265. /* Select the Output Compare Mode */
  13266. tmpccmrx |= (OC_Config->OCMode << 8U);
  13267. 8004c14: 683b ldr r3, [r7, #0]
  13268. 8004c16: 681b ldr r3, [r3, #0]
  13269. 8004c18: 021b lsls r3, r3, #8
  13270. 8004c1a: 68fa ldr r2, [r7, #12]
  13271. 8004c1c: 4313 orrs r3, r2
  13272. 8004c1e: 60fb str r3, [r7, #12]
  13273. /* Reset the Output Polarity level */
  13274. tmpccer &= ~TIM_CCER_CC4P;
  13275. 8004c20: 693b ldr r3, [r7, #16]
  13276. 8004c22: 4a1b ldr r2, [pc, #108] @ (8004c90 <TIM_OC4_SetConfig+0xb4>)
  13277. 8004c24: 4013 ands r3, r2
  13278. 8004c26: 613b str r3, [r7, #16]
  13279. /* Set the Output Compare Polarity */
  13280. tmpccer |= (OC_Config->OCPolarity << 12U);
  13281. 8004c28: 683b ldr r3, [r7, #0]
  13282. 8004c2a: 689b ldr r3, [r3, #8]
  13283. 8004c2c: 031b lsls r3, r3, #12
  13284. 8004c2e: 693a ldr r2, [r7, #16]
  13285. 8004c30: 4313 orrs r3, r2
  13286. 8004c32: 613b str r3, [r7, #16]
  13287. if (IS_TIM_BREAK_INSTANCE(TIMx))
  13288. 8004c34: 687b ldr r3, [r7, #4]
  13289. 8004c36: 4a17 ldr r2, [pc, #92] @ (8004c94 <TIM_OC4_SetConfig+0xb8>)
  13290. 8004c38: 4293 cmp r3, r2
  13291. 8004c3a: d007 beq.n 8004c4c <TIM_OC4_SetConfig+0x70>
  13292. 8004c3c: 687b ldr r3, [r7, #4]
  13293. 8004c3e: 4a16 ldr r2, [pc, #88] @ (8004c98 <TIM_OC4_SetConfig+0xbc>)
  13294. 8004c40: 4293 cmp r3, r2
  13295. 8004c42: d003 beq.n 8004c4c <TIM_OC4_SetConfig+0x70>
  13296. 8004c44: 687b ldr r3, [r7, #4]
  13297. 8004c46: 4a15 ldr r2, [pc, #84] @ (8004c9c <TIM_OC4_SetConfig+0xc0>)
  13298. 8004c48: 4293 cmp r3, r2
  13299. 8004c4a: d109 bne.n 8004c60 <TIM_OC4_SetConfig+0x84>
  13300. {
  13301. /* Check parameters */
  13302. assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState));
  13303. /* Reset the Output Compare IDLE State */
  13304. tmpcr2 &= ~TIM_CR2_OIS4;
  13305. 8004c4c: 697b ldr r3, [r7, #20]
  13306. 8004c4e: 4a14 ldr r2, [pc, #80] @ (8004ca0 <TIM_OC4_SetConfig+0xc4>)
  13307. 8004c50: 4013 ands r3, r2
  13308. 8004c52: 617b str r3, [r7, #20]
  13309. /* Set the Output Idle state */
  13310. tmpcr2 |= (OC_Config->OCIdleState << 6U);
  13311. 8004c54: 683b ldr r3, [r7, #0]
  13312. 8004c56: 695b ldr r3, [r3, #20]
  13313. 8004c58: 019b lsls r3, r3, #6
  13314. 8004c5a: 697a ldr r2, [r7, #20]
  13315. 8004c5c: 4313 orrs r3, r2
  13316. 8004c5e: 617b str r3, [r7, #20]
  13317. }
  13318. /* Write to TIMx CR2 */
  13319. TIMx->CR2 = tmpcr2;
  13320. 8004c60: 687b ldr r3, [r7, #4]
  13321. 8004c62: 697a ldr r2, [r7, #20]
  13322. 8004c64: 605a str r2, [r3, #4]
  13323. /* Write to TIMx CCMR2 */
  13324. TIMx->CCMR2 = tmpccmrx;
  13325. 8004c66: 687b ldr r3, [r7, #4]
  13326. 8004c68: 68fa ldr r2, [r7, #12]
  13327. 8004c6a: 61da str r2, [r3, #28]
  13328. /* Set the Capture Compare Register value */
  13329. TIMx->CCR4 = OC_Config->Pulse;
  13330. 8004c6c: 683b ldr r3, [r7, #0]
  13331. 8004c6e: 685a ldr r2, [r3, #4]
  13332. 8004c70: 687b ldr r3, [r7, #4]
  13333. 8004c72: 641a str r2, [r3, #64] @ 0x40
  13334. /* Write to TIMx CCER */
  13335. TIMx->CCER = tmpccer;
  13336. 8004c74: 687b ldr r3, [r7, #4]
  13337. 8004c76: 693a ldr r2, [r7, #16]
  13338. 8004c78: 621a str r2, [r3, #32]
  13339. }
  13340. 8004c7a: 46c0 nop @ (mov r8, r8)
  13341. 8004c7c: 46bd mov sp, r7
  13342. 8004c7e: b006 add sp, #24
  13343. 8004c80: bd80 pop {r7, pc}
  13344. 8004c82: 46c0 nop @ (mov r8, r8)
  13345. 8004c84: ffffefff .word 0xffffefff
  13346. 8004c88: feff8fff .word 0xfeff8fff
  13347. 8004c8c: fffffcff .word 0xfffffcff
  13348. 8004c90: ffffdfff .word 0xffffdfff
  13349. 8004c94: 40012c00 .word 0x40012c00
  13350. 8004c98: 40014400 .word 0x40014400
  13351. 8004c9c: 40014800 .word 0x40014800
  13352. 8004ca0: ffffbfff .word 0xffffbfff
  13353. 08004ca4 <TIM_OC5_SetConfig>:
  13354. * @param OC_Config The output configuration structure
  13355. * @retval None
  13356. */
  13357. static void TIM_OC5_SetConfig(TIM_TypeDef *TIMx,
  13358. const TIM_OC_InitTypeDef *OC_Config)
  13359. {
  13360. 8004ca4: b580 push {r7, lr}
  13361. 8004ca6: b086 sub sp, #24
  13362. 8004ca8: af00 add r7, sp, #0
  13363. 8004caa: 6078 str r0, [r7, #4]
  13364. 8004cac: 6039 str r1, [r7, #0]
  13365. uint32_t tmpccmrx;
  13366. uint32_t tmpccer;
  13367. uint32_t tmpcr2;
  13368. /* Get the TIMx CCER register value */
  13369. tmpccer = TIMx->CCER;
  13370. 8004cae: 687b ldr r3, [r7, #4]
  13371. 8004cb0: 6a1b ldr r3, [r3, #32]
  13372. 8004cb2: 613b str r3, [r7, #16]
  13373. /* Disable the output: Reset the CCxE Bit */
  13374. TIMx->CCER &= ~TIM_CCER_CC5E;
  13375. 8004cb4: 687b ldr r3, [r7, #4]
  13376. 8004cb6: 6a1b ldr r3, [r3, #32]
  13377. 8004cb8: 4a21 ldr r2, [pc, #132] @ (8004d40 <TIM_OC5_SetConfig+0x9c>)
  13378. 8004cba: 401a ands r2, r3
  13379. 8004cbc: 687b ldr r3, [r7, #4]
  13380. 8004cbe: 621a str r2, [r3, #32]
  13381. /* Get the TIMx CR2 register value */
  13382. tmpcr2 = TIMx->CR2;
  13383. 8004cc0: 687b ldr r3, [r7, #4]
  13384. 8004cc2: 685b ldr r3, [r3, #4]
  13385. 8004cc4: 617b str r3, [r7, #20]
  13386. /* Get the TIMx CCMR1 register value */
  13387. tmpccmrx = TIMx->CCMR3;
  13388. 8004cc6: 687b ldr r3, [r7, #4]
  13389. 8004cc8: 6d5b ldr r3, [r3, #84] @ 0x54
  13390. 8004cca: 60fb str r3, [r7, #12]
  13391. /* Reset the Output Compare Mode Bits */
  13392. tmpccmrx &= ~(TIM_CCMR3_OC5M);
  13393. 8004ccc: 68fb ldr r3, [r7, #12]
  13394. 8004cce: 4a1d ldr r2, [pc, #116] @ (8004d44 <TIM_OC5_SetConfig+0xa0>)
  13395. 8004cd0: 4013 ands r3, r2
  13396. 8004cd2: 60fb str r3, [r7, #12]
  13397. /* Select the Output Compare Mode */
  13398. tmpccmrx |= OC_Config->OCMode;
  13399. 8004cd4: 683b ldr r3, [r7, #0]
  13400. 8004cd6: 681b ldr r3, [r3, #0]
  13401. 8004cd8: 68fa ldr r2, [r7, #12]
  13402. 8004cda: 4313 orrs r3, r2
  13403. 8004cdc: 60fb str r3, [r7, #12]
  13404. /* Reset the Output Polarity level */
  13405. tmpccer &= ~TIM_CCER_CC5P;
  13406. 8004cde: 693b ldr r3, [r7, #16]
  13407. 8004ce0: 4a19 ldr r2, [pc, #100] @ (8004d48 <TIM_OC5_SetConfig+0xa4>)
  13408. 8004ce2: 4013 ands r3, r2
  13409. 8004ce4: 613b str r3, [r7, #16]
  13410. /* Set the Output Compare Polarity */
  13411. tmpccer |= (OC_Config->OCPolarity << 16U);
  13412. 8004ce6: 683b ldr r3, [r7, #0]
  13413. 8004ce8: 689b ldr r3, [r3, #8]
  13414. 8004cea: 041b lsls r3, r3, #16
  13415. 8004cec: 693a ldr r2, [r7, #16]
  13416. 8004cee: 4313 orrs r3, r2
  13417. 8004cf0: 613b str r3, [r7, #16]
  13418. if (IS_TIM_BREAK_INSTANCE(TIMx))
  13419. 8004cf2: 687b ldr r3, [r7, #4]
  13420. 8004cf4: 4a15 ldr r2, [pc, #84] @ (8004d4c <TIM_OC5_SetConfig+0xa8>)
  13421. 8004cf6: 4293 cmp r3, r2
  13422. 8004cf8: d007 beq.n 8004d0a <TIM_OC5_SetConfig+0x66>
  13423. 8004cfa: 687b ldr r3, [r7, #4]
  13424. 8004cfc: 4a14 ldr r2, [pc, #80] @ (8004d50 <TIM_OC5_SetConfig+0xac>)
  13425. 8004cfe: 4293 cmp r3, r2
  13426. 8004d00: d003 beq.n 8004d0a <TIM_OC5_SetConfig+0x66>
  13427. 8004d02: 687b ldr r3, [r7, #4]
  13428. 8004d04: 4a13 ldr r2, [pc, #76] @ (8004d54 <TIM_OC5_SetConfig+0xb0>)
  13429. 8004d06: 4293 cmp r3, r2
  13430. 8004d08: d109 bne.n 8004d1e <TIM_OC5_SetConfig+0x7a>
  13431. {
  13432. /* Reset the Output Compare IDLE State */
  13433. tmpcr2 &= ~TIM_CR2_OIS5;
  13434. 8004d0a: 697b ldr r3, [r7, #20]
  13435. 8004d0c: 4a0c ldr r2, [pc, #48] @ (8004d40 <TIM_OC5_SetConfig+0x9c>)
  13436. 8004d0e: 4013 ands r3, r2
  13437. 8004d10: 617b str r3, [r7, #20]
  13438. /* Set the Output Idle state */
  13439. tmpcr2 |= (OC_Config->OCIdleState << 8U);
  13440. 8004d12: 683b ldr r3, [r7, #0]
  13441. 8004d14: 695b ldr r3, [r3, #20]
  13442. 8004d16: 021b lsls r3, r3, #8
  13443. 8004d18: 697a ldr r2, [r7, #20]
  13444. 8004d1a: 4313 orrs r3, r2
  13445. 8004d1c: 617b str r3, [r7, #20]
  13446. }
  13447. /* Write to TIMx CR2 */
  13448. TIMx->CR2 = tmpcr2;
  13449. 8004d1e: 687b ldr r3, [r7, #4]
  13450. 8004d20: 697a ldr r2, [r7, #20]
  13451. 8004d22: 605a str r2, [r3, #4]
  13452. /* Write to TIMx CCMR3 */
  13453. TIMx->CCMR3 = tmpccmrx;
  13454. 8004d24: 687b ldr r3, [r7, #4]
  13455. 8004d26: 68fa ldr r2, [r7, #12]
  13456. 8004d28: 655a str r2, [r3, #84] @ 0x54
  13457. /* Set the Capture Compare Register value */
  13458. TIMx->CCR5 = OC_Config->Pulse;
  13459. 8004d2a: 683b ldr r3, [r7, #0]
  13460. 8004d2c: 685a ldr r2, [r3, #4]
  13461. 8004d2e: 687b ldr r3, [r7, #4]
  13462. 8004d30: 659a str r2, [r3, #88] @ 0x58
  13463. /* Write to TIMx CCER */
  13464. TIMx->CCER = tmpccer;
  13465. 8004d32: 687b ldr r3, [r7, #4]
  13466. 8004d34: 693a ldr r2, [r7, #16]
  13467. 8004d36: 621a str r2, [r3, #32]
  13468. }
  13469. 8004d38: 46c0 nop @ (mov r8, r8)
  13470. 8004d3a: 46bd mov sp, r7
  13471. 8004d3c: b006 add sp, #24
  13472. 8004d3e: bd80 pop {r7, pc}
  13473. 8004d40: fffeffff .word 0xfffeffff
  13474. 8004d44: fffeff8f .word 0xfffeff8f
  13475. 8004d48: fffdffff .word 0xfffdffff
  13476. 8004d4c: 40012c00 .word 0x40012c00
  13477. 8004d50: 40014400 .word 0x40014400
  13478. 8004d54: 40014800 .word 0x40014800
  13479. 08004d58 <TIM_OC6_SetConfig>:
  13480. * @param OC_Config The output configuration structure
  13481. * @retval None
  13482. */
  13483. static void TIM_OC6_SetConfig(TIM_TypeDef *TIMx,
  13484. const TIM_OC_InitTypeDef *OC_Config)
  13485. {
  13486. 8004d58: b580 push {r7, lr}
  13487. 8004d5a: b086 sub sp, #24
  13488. 8004d5c: af00 add r7, sp, #0
  13489. 8004d5e: 6078 str r0, [r7, #4]
  13490. 8004d60: 6039 str r1, [r7, #0]
  13491. uint32_t tmpccmrx;
  13492. uint32_t tmpccer;
  13493. uint32_t tmpcr2;
  13494. /* Get the TIMx CCER register value */
  13495. tmpccer = TIMx->CCER;
  13496. 8004d62: 687b ldr r3, [r7, #4]
  13497. 8004d64: 6a1b ldr r3, [r3, #32]
  13498. 8004d66: 613b str r3, [r7, #16]
  13499. /* Disable the output: Reset the CCxE Bit */
  13500. TIMx->CCER &= ~TIM_CCER_CC6E;
  13501. 8004d68: 687b ldr r3, [r7, #4]
  13502. 8004d6a: 6a1b ldr r3, [r3, #32]
  13503. 8004d6c: 4a22 ldr r2, [pc, #136] @ (8004df8 <TIM_OC6_SetConfig+0xa0>)
  13504. 8004d6e: 401a ands r2, r3
  13505. 8004d70: 687b ldr r3, [r7, #4]
  13506. 8004d72: 621a str r2, [r3, #32]
  13507. /* Get the TIMx CR2 register value */
  13508. tmpcr2 = TIMx->CR2;
  13509. 8004d74: 687b ldr r3, [r7, #4]
  13510. 8004d76: 685b ldr r3, [r3, #4]
  13511. 8004d78: 617b str r3, [r7, #20]
  13512. /* Get the TIMx CCMR1 register value */
  13513. tmpccmrx = TIMx->CCMR3;
  13514. 8004d7a: 687b ldr r3, [r7, #4]
  13515. 8004d7c: 6d5b ldr r3, [r3, #84] @ 0x54
  13516. 8004d7e: 60fb str r3, [r7, #12]
  13517. /* Reset the Output Compare Mode Bits */
  13518. tmpccmrx &= ~(TIM_CCMR3_OC6M);
  13519. 8004d80: 68fb ldr r3, [r7, #12]
  13520. 8004d82: 4a1e ldr r2, [pc, #120] @ (8004dfc <TIM_OC6_SetConfig+0xa4>)
  13521. 8004d84: 4013 ands r3, r2
  13522. 8004d86: 60fb str r3, [r7, #12]
  13523. /* Select the Output Compare Mode */
  13524. tmpccmrx |= (OC_Config->OCMode << 8U);
  13525. 8004d88: 683b ldr r3, [r7, #0]
  13526. 8004d8a: 681b ldr r3, [r3, #0]
  13527. 8004d8c: 021b lsls r3, r3, #8
  13528. 8004d8e: 68fa ldr r2, [r7, #12]
  13529. 8004d90: 4313 orrs r3, r2
  13530. 8004d92: 60fb str r3, [r7, #12]
  13531. /* Reset the Output Polarity level */
  13532. tmpccer &= (uint32_t)~TIM_CCER_CC6P;
  13533. 8004d94: 693b ldr r3, [r7, #16]
  13534. 8004d96: 4a1a ldr r2, [pc, #104] @ (8004e00 <TIM_OC6_SetConfig+0xa8>)
  13535. 8004d98: 4013 ands r3, r2
  13536. 8004d9a: 613b str r3, [r7, #16]
  13537. /* Set the Output Compare Polarity */
  13538. tmpccer |= (OC_Config->OCPolarity << 20U);
  13539. 8004d9c: 683b ldr r3, [r7, #0]
  13540. 8004d9e: 689b ldr r3, [r3, #8]
  13541. 8004da0: 051b lsls r3, r3, #20
  13542. 8004da2: 693a ldr r2, [r7, #16]
  13543. 8004da4: 4313 orrs r3, r2
  13544. 8004da6: 613b str r3, [r7, #16]
  13545. if (IS_TIM_BREAK_INSTANCE(TIMx))
  13546. 8004da8: 687b ldr r3, [r7, #4]
  13547. 8004daa: 4a16 ldr r2, [pc, #88] @ (8004e04 <TIM_OC6_SetConfig+0xac>)
  13548. 8004dac: 4293 cmp r3, r2
  13549. 8004dae: d007 beq.n 8004dc0 <TIM_OC6_SetConfig+0x68>
  13550. 8004db0: 687b ldr r3, [r7, #4]
  13551. 8004db2: 4a15 ldr r2, [pc, #84] @ (8004e08 <TIM_OC6_SetConfig+0xb0>)
  13552. 8004db4: 4293 cmp r3, r2
  13553. 8004db6: d003 beq.n 8004dc0 <TIM_OC6_SetConfig+0x68>
  13554. 8004db8: 687b ldr r3, [r7, #4]
  13555. 8004dba: 4a14 ldr r2, [pc, #80] @ (8004e0c <TIM_OC6_SetConfig+0xb4>)
  13556. 8004dbc: 4293 cmp r3, r2
  13557. 8004dbe: d109 bne.n 8004dd4 <TIM_OC6_SetConfig+0x7c>
  13558. {
  13559. /* Reset the Output Compare IDLE State */
  13560. tmpcr2 &= ~TIM_CR2_OIS6;
  13561. 8004dc0: 697b ldr r3, [r7, #20]
  13562. 8004dc2: 4a13 ldr r2, [pc, #76] @ (8004e10 <TIM_OC6_SetConfig+0xb8>)
  13563. 8004dc4: 4013 ands r3, r2
  13564. 8004dc6: 617b str r3, [r7, #20]
  13565. /* Set the Output Idle state */
  13566. tmpcr2 |= (OC_Config->OCIdleState << 10U);
  13567. 8004dc8: 683b ldr r3, [r7, #0]
  13568. 8004dca: 695b ldr r3, [r3, #20]
  13569. 8004dcc: 029b lsls r3, r3, #10
  13570. 8004dce: 697a ldr r2, [r7, #20]
  13571. 8004dd0: 4313 orrs r3, r2
  13572. 8004dd2: 617b str r3, [r7, #20]
  13573. }
  13574. /* Write to TIMx CR2 */
  13575. TIMx->CR2 = tmpcr2;
  13576. 8004dd4: 687b ldr r3, [r7, #4]
  13577. 8004dd6: 697a ldr r2, [r7, #20]
  13578. 8004dd8: 605a str r2, [r3, #4]
  13579. /* Write to TIMx CCMR3 */
  13580. TIMx->CCMR3 = tmpccmrx;
  13581. 8004dda: 687b ldr r3, [r7, #4]
  13582. 8004ddc: 68fa ldr r2, [r7, #12]
  13583. 8004dde: 655a str r2, [r3, #84] @ 0x54
  13584. /* Set the Capture Compare Register value */
  13585. TIMx->CCR6 = OC_Config->Pulse;
  13586. 8004de0: 683b ldr r3, [r7, #0]
  13587. 8004de2: 685a ldr r2, [r3, #4]
  13588. 8004de4: 687b ldr r3, [r7, #4]
  13589. 8004de6: 65da str r2, [r3, #92] @ 0x5c
  13590. /* Write to TIMx CCER */
  13591. TIMx->CCER = tmpccer;
  13592. 8004de8: 687b ldr r3, [r7, #4]
  13593. 8004dea: 693a ldr r2, [r7, #16]
  13594. 8004dec: 621a str r2, [r3, #32]
  13595. }
  13596. 8004dee: 46c0 nop @ (mov r8, r8)
  13597. 8004df0: 46bd mov sp, r7
  13598. 8004df2: b006 add sp, #24
  13599. 8004df4: bd80 pop {r7, pc}
  13600. 8004df6: 46c0 nop @ (mov r8, r8)
  13601. 8004df8: ffefffff .word 0xffefffff
  13602. 8004dfc: feff8fff .word 0xfeff8fff
  13603. 8004e00: ffdfffff .word 0xffdfffff
  13604. 8004e04: 40012c00 .word 0x40012c00
  13605. 8004e08: 40014400 .word 0x40014400
  13606. 8004e0c: 40014800 .word 0x40014800
  13607. 8004e10: fffbffff .word 0xfffbffff
  13608. 08004e14 <HAL_TIMEx_MasterConfigSynchronization>:
  13609. * mode.
  13610. * @retval HAL status
  13611. */
  13612. HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
  13613. const TIM_MasterConfigTypeDef *sMasterConfig)
  13614. {
  13615. 8004e14: b580 push {r7, lr}
  13616. 8004e16: b084 sub sp, #16
  13617. 8004e18: af00 add r7, sp, #0
  13618. 8004e1a: 6078 str r0, [r7, #4]
  13619. 8004e1c: 6039 str r1, [r7, #0]
  13620. assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance));
  13621. assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger));
  13622. assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode));
  13623. /* Check input state */
  13624. __HAL_LOCK(htim);
  13625. 8004e1e: 687b ldr r3, [r7, #4]
  13626. 8004e20: 223c movs r2, #60 @ 0x3c
  13627. 8004e22: 5c9b ldrb r3, [r3, r2]
  13628. 8004e24: 2b01 cmp r3, #1
  13629. 8004e26: d101 bne.n 8004e2c <HAL_TIMEx_MasterConfigSynchronization+0x18>
  13630. 8004e28: 2302 movs r3, #2
  13631. 8004e2a: e04a b.n 8004ec2 <HAL_TIMEx_MasterConfigSynchronization+0xae>
  13632. 8004e2c: 687b ldr r3, [r7, #4]
  13633. 8004e2e: 223c movs r2, #60 @ 0x3c
  13634. 8004e30: 2101 movs r1, #1
  13635. 8004e32: 5499 strb r1, [r3, r2]
  13636. /* Change the handler state */
  13637. htim->State = HAL_TIM_STATE_BUSY;
  13638. 8004e34: 687b ldr r3, [r7, #4]
  13639. 8004e36: 223d movs r2, #61 @ 0x3d
  13640. 8004e38: 2102 movs r1, #2
  13641. 8004e3a: 5499 strb r1, [r3, r2]
  13642. /* Get the TIMx CR2 register value */
  13643. tmpcr2 = htim->Instance->CR2;
  13644. 8004e3c: 687b ldr r3, [r7, #4]
  13645. 8004e3e: 681b ldr r3, [r3, #0]
  13646. 8004e40: 685b ldr r3, [r3, #4]
  13647. 8004e42: 60fb str r3, [r7, #12]
  13648. /* Get the TIMx SMCR register value */
  13649. tmpsmcr = htim->Instance->SMCR;
  13650. 8004e44: 687b ldr r3, [r7, #4]
  13651. 8004e46: 681b ldr r3, [r3, #0]
  13652. 8004e48: 689b ldr r3, [r3, #8]
  13653. 8004e4a: 60bb str r3, [r7, #8]
  13654. /* If the timer supports ADC synchronization through TRGO2, set the master mode selection 2 */
  13655. if (IS_TIM_TRGO2_INSTANCE(htim->Instance))
  13656. 8004e4c: 687b ldr r3, [r7, #4]
  13657. 8004e4e: 681b ldr r3, [r3, #0]
  13658. 8004e50: 4a1e ldr r2, [pc, #120] @ (8004ecc <HAL_TIMEx_MasterConfigSynchronization+0xb8>)
  13659. 8004e52: 4293 cmp r3, r2
  13660. 8004e54: d108 bne.n 8004e68 <HAL_TIMEx_MasterConfigSynchronization+0x54>
  13661. {
  13662. /* Check the parameters */
  13663. assert_param(IS_TIM_TRGO2_SOURCE(sMasterConfig->MasterOutputTrigger2));
  13664. /* Clear the MMS2 bits */
  13665. tmpcr2 &= ~TIM_CR2_MMS2;
  13666. 8004e56: 68fb ldr r3, [r7, #12]
  13667. 8004e58: 4a1d ldr r2, [pc, #116] @ (8004ed0 <HAL_TIMEx_MasterConfigSynchronization+0xbc>)
  13668. 8004e5a: 4013 ands r3, r2
  13669. 8004e5c: 60fb str r3, [r7, #12]
  13670. /* Select the TRGO2 source*/
  13671. tmpcr2 |= sMasterConfig->MasterOutputTrigger2;
  13672. 8004e5e: 683b ldr r3, [r7, #0]
  13673. 8004e60: 685b ldr r3, [r3, #4]
  13674. 8004e62: 68fa ldr r2, [r7, #12]
  13675. 8004e64: 4313 orrs r3, r2
  13676. 8004e66: 60fb str r3, [r7, #12]
  13677. }
  13678. /* Reset the MMS Bits */
  13679. tmpcr2 &= ~TIM_CR2_MMS;
  13680. 8004e68: 68fb ldr r3, [r7, #12]
  13681. 8004e6a: 2270 movs r2, #112 @ 0x70
  13682. 8004e6c: 4393 bics r3, r2
  13683. 8004e6e: 60fb str r3, [r7, #12]
  13684. /* Select the TRGO source */
  13685. tmpcr2 |= sMasterConfig->MasterOutputTrigger;
  13686. 8004e70: 683b ldr r3, [r7, #0]
  13687. 8004e72: 681b ldr r3, [r3, #0]
  13688. 8004e74: 68fa ldr r2, [r7, #12]
  13689. 8004e76: 4313 orrs r3, r2
  13690. 8004e78: 60fb str r3, [r7, #12]
  13691. /* Update TIMx CR2 */
  13692. htim->Instance->CR2 = tmpcr2;
  13693. 8004e7a: 687b ldr r3, [r7, #4]
  13694. 8004e7c: 681b ldr r3, [r3, #0]
  13695. 8004e7e: 68fa ldr r2, [r7, #12]
  13696. 8004e80: 605a str r2, [r3, #4]
  13697. if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
  13698. 8004e82: 687b ldr r3, [r7, #4]
  13699. 8004e84: 681b ldr r3, [r3, #0]
  13700. 8004e86: 4a11 ldr r2, [pc, #68] @ (8004ecc <HAL_TIMEx_MasterConfigSynchronization+0xb8>)
  13701. 8004e88: 4293 cmp r3, r2
  13702. 8004e8a: d004 beq.n 8004e96 <HAL_TIMEx_MasterConfigSynchronization+0x82>
  13703. 8004e8c: 687b ldr r3, [r7, #4]
  13704. 8004e8e: 681b ldr r3, [r3, #0]
  13705. 8004e90: 4a10 ldr r2, [pc, #64] @ (8004ed4 <HAL_TIMEx_MasterConfigSynchronization+0xc0>)
  13706. 8004e92: 4293 cmp r3, r2
  13707. 8004e94: d10c bne.n 8004eb0 <HAL_TIMEx_MasterConfigSynchronization+0x9c>
  13708. {
  13709. /* Reset the MSM Bit */
  13710. tmpsmcr &= ~TIM_SMCR_MSM;
  13711. 8004e96: 68bb ldr r3, [r7, #8]
  13712. 8004e98: 2280 movs r2, #128 @ 0x80
  13713. 8004e9a: 4393 bics r3, r2
  13714. 8004e9c: 60bb str r3, [r7, #8]
  13715. /* Set master mode */
  13716. tmpsmcr |= sMasterConfig->MasterSlaveMode;
  13717. 8004e9e: 683b ldr r3, [r7, #0]
  13718. 8004ea0: 689b ldr r3, [r3, #8]
  13719. 8004ea2: 68ba ldr r2, [r7, #8]
  13720. 8004ea4: 4313 orrs r3, r2
  13721. 8004ea6: 60bb str r3, [r7, #8]
  13722. /* Update TIMx SMCR */
  13723. htim->Instance->SMCR = tmpsmcr;
  13724. 8004ea8: 687b ldr r3, [r7, #4]
  13725. 8004eaa: 681b ldr r3, [r3, #0]
  13726. 8004eac: 68ba ldr r2, [r7, #8]
  13727. 8004eae: 609a str r2, [r3, #8]
  13728. }
  13729. /* Change the htim state */
  13730. htim->State = HAL_TIM_STATE_READY;
  13731. 8004eb0: 687b ldr r3, [r7, #4]
  13732. 8004eb2: 223d movs r2, #61 @ 0x3d
  13733. 8004eb4: 2101 movs r1, #1
  13734. 8004eb6: 5499 strb r1, [r3, r2]
  13735. __HAL_UNLOCK(htim);
  13736. 8004eb8: 687b ldr r3, [r7, #4]
  13737. 8004eba: 223c movs r2, #60 @ 0x3c
  13738. 8004ebc: 2100 movs r1, #0
  13739. 8004ebe: 5499 strb r1, [r3, r2]
  13740. return HAL_OK;
  13741. 8004ec0: 2300 movs r3, #0
  13742. }
  13743. 8004ec2: 0018 movs r0, r3
  13744. 8004ec4: 46bd mov sp, r7
  13745. 8004ec6: b004 add sp, #16
  13746. 8004ec8: bd80 pop {r7, pc}
  13747. 8004eca: 46c0 nop @ (mov r8, r8)
  13748. 8004ecc: 40012c00 .word 0x40012c00
  13749. 8004ed0: ff0fffff .word 0xff0fffff
  13750. 8004ed4: 40000400 .word 0x40000400
  13751. 08004ed8 <HAL_TIMEx_ConfigBreakDeadTime>:
  13752. * interrupt can be enabled by calling the @ref __HAL_TIM_ENABLE_IT macro.
  13753. * @retval HAL status
  13754. */
  13755. HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
  13756. const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig)
  13757. {
  13758. 8004ed8: b580 push {r7, lr}
  13759. 8004eda: b084 sub sp, #16
  13760. 8004edc: af00 add r7, sp, #0
  13761. 8004ede: 6078 str r0, [r7, #4]
  13762. 8004ee0: 6039 str r1, [r7, #0]
  13763. /* Keep this variable initialized to 0 as it is used to configure BDTR register */
  13764. uint32_t tmpbdtr = 0U;
  13765. 8004ee2: 2300 movs r3, #0
  13766. 8004ee4: 60fb str r3, [r7, #12]
  13767. assert_param(IS_TIM_BREAK_FILTER(sBreakDeadTimeConfig->BreakFilter));
  13768. assert_param(IS_TIM_AUTOMATIC_OUTPUT_STATE(sBreakDeadTimeConfig->AutomaticOutput));
  13769. assert_param(IS_TIM_BREAK_AFMODE(sBreakDeadTimeConfig->BreakAFMode));
  13770. /* Check input state */
  13771. __HAL_LOCK(htim);
  13772. 8004ee6: 687b ldr r3, [r7, #4]
  13773. 8004ee8: 223c movs r2, #60 @ 0x3c
  13774. 8004eea: 5c9b ldrb r3, [r3, r2]
  13775. 8004eec: 2b01 cmp r3, #1
  13776. 8004eee: d101 bne.n 8004ef4 <HAL_TIMEx_ConfigBreakDeadTime+0x1c>
  13777. 8004ef0: 2302 movs r3, #2
  13778. 8004ef2: e06f b.n 8004fd4 <HAL_TIMEx_ConfigBreakDeadTime+0xfc>
  13779. 8004ef4: 687b ldr r3, [r7, #4]
  13780. 8004ef6: 223c movs r2, #60 @ 0x3c
  13781. 8004ef8: 2101 movs r1, #1
  13782. 8004efa: 5499 strb r1, [r3, r2]
  13783. /* Set the Lock level, the Break enable Bit and the Polarity, the OSSR State,
  13784. the OSSI State, the dead time value and the Automatic Output Enable Bit */
  13785. /* Set the BDTR bits */
  13786. MODIFY_REG(tmpbdtr, TIM_BDTR_DTG, sBreakDeadTimeConfig->DeadTime);
  13787. 8004efc: 68fb ldr r3, [r7, #12]
  13788. 8004efe: 22ff movs r2, #255 @ 0xff
  13789. 8004f00: 4393 bics r3, r2
  13790. 8004f02: 001a movs r2, r3
  13791. 8004f04: 683b ldr r3, [r7, #0]
  13792. 8004f06: 68db ldr r3, [r3, #12]
  13793. 8004f08: 4313 orrs r3, r2
  13794. 8004f0a: 60fb str r3, [r7, #12]
  13795. MODIFY_REG(tmpbdtr, TIM_BDTR_LOCK, sBreakDeadTimeConfig->LockLevel);
  13796. 8004f0c: 68fb ldr r3, [r7, #12]
  13797. 8004f0e: 4a33 ldr r2, [pc, #204] @ (8004fdc <HAL_TIMEx_ConfigBreakDeadTime+0x104>)
  13798. 8004f10: 401a ands r2, r3
  13799. 8004f12: 683b ldr r3, [r7, #0]
  13800. 8004f14: 689b ldr r3, [r3, #8]
  13801. 8004f16: 4313 orrs r3, r2
  13802. 8004f18: 60fb str r3, [r7, #12]
  13803. MODIFY_REG(tmpbdtr, TIM_BDTR_OSSI, sBreakDeadTimeConfig->OffStateIDLEMode);
  13804. 8004f1a: 68fb ldr r3, [r7, #12]
  13805. 8004f1c: 4a30 ldr r2, [pc, #192] @ (8004fe0 <HAL_TIMEx_ConfigBreakDeadTime+0x108>)
  13806. 8004f1e: 401a ands r2, r3
  13807. 8004f20: 683b ldr r3, [r7, #0]
  13808. 8004f22: 685b ldr r3, [r3, #4]
  13809. 8004f24: 4313 orrs r3, r2
  13810. 8004f26: 60fb str r3, [r7, #12]
  13811. MODIFY_REG(tmpbdtr, TIM_BDTR_OSSR, sBreakDeadTimeConfig->OffStateRunMode);
  13812. 8004f28: 68fb ldr r3, [r7, #12]
  13813. 8004f2a: 4a2e ldr r2, [pc, #184] @ (8004fe4 <HAL_TIMEx_ConfigBreakDeadTime+0x10c>)
  13814. 8004f2c: 401a ands r2, r3
  13815. 8004f2e: 683b ldr r3, [r7, #0]
  13816. 8004f30: 681b ldr r3, [r3, #0]
  13817. 8004f32: 4313 orrs r3, r2
  13818. 8004f34: 60fb str r3, [r7, #12]
  13819. MODIFY_REG(tmpbdtr, TIM_BDTR_BKE, sBreakDeadTimeConfig->BreakState);
  13820. 8004f36: 68fb ldr r3, [r7, #12]
  13821. 8004f38: 4a2b ldr r2, [pc, #172] @ (8004fe8 <HAL_TIMEx_ConfigBreakDeadTime+0x110>)
  13822. 8004f3a: 401a ands r2, r3
  13823. 8004f3c: 683b ldr r3, [r7, #0]
  13824. 8004f3e: 691b ldr r3, [r3, #16]
  13825. 8004f40: 4313 orrs r3, r2
  13826. 8004f42: 60fb str r3, [r7, #12]
  13827. MODIFY_REG(tmpbdtr, TIM_BDTR_BKP, sBreakDeadTimeConfig->BreakPolarity);
  13828. 8004f44: 68fb ldr r3, [r7, #12]
  13829. 8004f46: 4a29 ldr r2, [pc, #164] @ (8004fec <HAL_TIMEx_ConfigBreakDeadTime+0x114>)
  13830. 8004f48: 401a ands r2, r3
  13831. 8004f4a: 683b ldr r3, [r7, #0]
  13832. 8004f4c: 695b ldr r3, [r3, #20]
  13833. 8004f4e: 4313 orrs r3, r2
  13834. 8004f50: 60fb str r3, [r7, #12]
  13835. MODIFY_REG(tmpbdtr, TIM_BDTR_AOE, sBreakDeadTimeConfig->AutomaticOutput);
  13836. 8004f52: 68fb ldr r3, [r7, #12]
  13837. 8004f54: 4a26 ldr r2, [pc, #152] @ (8004ff0 <HAL_TIMEx_ConfigBreakDeadTime+0x118>)
  13838. 8004f56: 401a ands r2, r3
  13839. 8004f58: 683b ldr r3, [r7, #0]
  13840. 8004f5a: 6b1b ldr r3, [r3, #48] @ 0x30
  13841. 8004f5c: 4313 orrs r3, r2
  13842. 8004f5e: 60fb str r3, [r7, #12]
  13843. MODIFY_REG(tmpbdtr, TIM_BDTR_BKF, (sBreakDeadTimeConfig->BreakFilter << TIM_BDTR_BKF_Pos));
  13844. 8004f60: 68fb ldr r3, [r7, #12]
  13845. 8004f62: 4a24 ldr r2, [pc, #144] @ (8004ff4 <HAL_TIMEx_ConfigBreakDeadTime+0x11c>)
  13846. 8004f64: 401a ands r2, r3
  13847. 8004f66: 683b ldr r3, [r7, #0]
  13848. 8004f68: 699b ldr r3, [r3, #24]
  13849. 8004f6a: 041b lsls r3, r3, #16
  13850. 8004f6c: 4313 orrs r3, r2
  13851. 8004f6e: 60fb str r3, [r7, #12]
  13852. MODIFY_REG(tmpbdtr, TIM_BDTR_BKBID, sBreakDeadTimeConfig->BreakAFMode);
  13853. 8004f70: 68fb ldr r3, [r7, #12]
  13854. 8004f72: 4a21 ldr r2, [pc, #132] @ (8004ff8 <HAL_TIMEx_ConfigBreakDeadTime+0x120>)
  13855. 8004f74: 401a ands r2, r3
  13856. 8004f76: 683b ldr r3, [r7, #0]
  13857. 8004f78: 69db ldr r3, [r3, #28]
  13858. 8004f7a: 4313 orrs r3, r2
  13859. 8004f7c: 60fb str r3, [r7, #12]
  13860. if (IS_TIM_BKIN2_INSTANCE(htim->Instance))
  13861. 8004f7e: 687b ldr r3, [r7, #4]
  13862. 8004f80: 681b ldr r3, [r3, #0]
  13863. 8004f82: 4a1e ldr r2, [pc, #120] @ (8004ffc <HAL_TIMEx_ConfigBreakDeadTime+0x124>)
  13864. 8004f84: 4293 cmp r3, r2
  13865. 8004f86: d11c bne.n 8004fc2 <HAL_TIMEx_ConfigBreakDeadTime+0xea>
  13866. assert_param(IS_TIM_BREAK2_POLARITY(sBreakDeadTimeConfig->Break2Polarity));
  13867. assert_param(IS_TIM_BREAK_FILTER(sBreakDeadTimeConfig->Break2Filter));
  13868. assert_param(IS_TIM_BREAK2_AFMODE(sBreakDeadTimeConfig->Break2AFMode));
  13869. /* Set the BREAK2 input related BDTR bits */
  13870. MODIFY_REG(tmpbdtr, TIM_BDTR_BK2F, (sBreakDeadTimeConfig->Break2Filter << TIM_BDTR_BK2F_Pos));
  13871. 8004f88: 68fb ldr r3, [r7, #12]
  13872. 8004f8a: 4a1d ldr r2, [pc, #116] @ (8005000 <HAL_TIMEx_ConfigBreakDeadTime+0x128>)
  13873. 8004f8c: 401a ands r2, r3
  13874. 8004f8e: 683b ldr r3, [r7, #0]
  13875. 8004f90: 6a9b ldr r3, [r3, #40] @ 0x28
  13876. 8004f92: 051b lsls r3, r3, #20
  13877. 8004f94: 4313 orrs r3, r2
  13878. 8004f96: 60fb str r3, [r7, #12]
  13879. MODIFY_REG(tmpbdtr, TIM_BDTR_BK2E, sBreakDeadTimeConfig->Break2State);
  13880. 8004f98: 68fb ldr r3, [r7, #12]
  13881. 8004f9a: 4a1a ldr r2, [pc, #104] @ (8005004 <HAL_TIMEx_ConfigBreakDeadTime+0x12c>)
  13882. 8004f9c: 401a ands r2, r3
  13883. 8004f9e: 683b ldr r3, [r7, #0]
  13884. 8004fa0: 6a1b ldr r3, [r3, #32]
  13885. 8004fa2: 4313 orrs r3, r2
  13886. 8004fa4: 60fb str r3, [r7, #12]
  13887. MODIFY_REG(tmpbdtr, TIM_BDTR_BK2P, sBreakDeadTimeConfig->Break2Polarity);
  13888. 8004fa6: 68fb ldr r3, [r7, #12]
  13889. 8004fa8: 4a17 ldr r2, [pc, #92] @ (8005008 <HAL_TIMEx_ConfigBreakDeadTime+0x130>)
  13890. 8004faa: 401a ands r2, r3
  13891. 8004fac: 683b ldr r3, [r7, #0]
  13892. 8004fae: 6a5b ldr r3, [r3, #36] @ 0x24
  13893. 8004fb0: 4313 orrs r3, r2
  13894. 8004fb2: 60fb str r3, [r7, #12]
  13895. MODIFY_REG(tmpbdtr, TIM_BDTR_BK2BID, sBreakDeadTimeConfig->Break2AFMode);
  13896. 8004fb4: 68fb ldr r3, [r7, #12]
  13897. 8004fb6: 4a15 ldr r2, [pc, #84] @ (800500c <HAL_TIMEx_ConfigBreakDeadTime+0x134>)
  13898. 8004fb8: 401a ands r2, r3
  13899. 8004fba: 683b ldr r3, [r7, #0]
  13900. 8004fbc: 6adb ldr r3, [r3, #44] @ 0x2c
  13901. 8004fbe: 4313 orrs r3, r2
  13902. 8004fc0: 60fb str r3, [r7, #12]
  13903. }
  13904. /* Set TIMx_BDTR */
  13905. htim->Instance->BDTR = tmpbdtr;
  13906. 8004fc2: 687b ldr r3, [r7, #4]
  13907. 8004fc4: 681b ldr r3, [r3, #0]
  13908. 8004fc6: 68fa ldr r2, [r7, #12]
  13909. 8004fc8: 645a str r2, [r3, #68] @ 0x44
  13910. __HAL_UNLOCK(htim);
  13911. 8004fca: 687b ldr r3, [r7, #4]
  13912. 8004fcc: 223c movs r2, #60 @ 0x3c
  13913. 8004fce: 2100 movs r1, #0
  13914. 8004fd0: 5499 strb r1, [r3, r2]
  13915. return HAL_OK;
  13916. 8004fd2: 2300 movs r3, #0
  13917. }
  13918. 8004fd4: 0018 movs r0, r3
  13919. 8004fd6: 46bd mov sp, r7
  13920. 8004fd8: b004 add sp, #16
  13921. 8004fda: bd80 pop {r7, pc}
  13922. 8004fdc: fffffcff .word 0xfffffcff
  13923. 8004fe0: fffffbff .word 0xfffffbff
  13924. 8004fe4: fffff7ff .word 0xfffff7ff
  13925. 8004fe8: ffffefff .word 0xffffefff
  13926. 8004fec: ffffdfff .word 0xffffdfff
  13927. 8004ff0: ffffbfff .word 0xffffbfff
  13928. 8004ff4: fff0ffff .word 0xfff0ffff
  13929. 8004ff8: efffffff .word 0xefffffff
  13930. 8004ffc: 40012c00 .word 0x40012c00
  13931. 8005000: ff0fffff .word 0xff0fffff
  13932. 8005004: feffffff .word 0xfeffffff
  13933. 8005008: fdffffff .word 0xfdffffff
  13934. 800500c: dfffffff .word 0xdfffffff
  13935. 08005010 <HAL_UART_Init>:
  13936. * parameters in the UART_InitTypeDef and initialize the associated handle.
  13937. * @param huart UART handle.
  13938. * @retval HAL status
  13939. */
  13940. HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
  13941. {
  13942. 8005010: b580 push {r7, lr}
  13943. 8005012: b082 sub sp, #8
  13944. 8005014: af00 add r7, sp, #0
  13945. 8005016: 6078 str r0, [r7, #4]
  13946. /* Check the UART handle allocation */
  13947. if (huart == NULL)
  13948. 8005018: 687b ldr r3, [r7, #4]
  13949. 800501a: 2b00 cmp r3, #0
  13950. 800501c: d101 bne.n 8005022 <HAL_UART_Init+0x12>
  13951. {
  13952. return HAL_ERROR;
  13953. 800501e: 2301 movs r3, #1
  13954. 8005020: e046 b.n 80050b0 <HAL_UART_Init+0xa0>
  13955. {
  13956. /* Check the parameters */
  13957. assert_param((IS_UART_INSTANCE(huart->Instance)) || (IS_LPUART_INSTANCE(huart->Instance)));
  13958. }
  13959. if (huart->gState == HAL_UART_STATE_RESET)
  13960. 8005022: 687b ldr r3, [r7, #4]
  13961. 8005024: 2288 movs r2, #136 @ 0x88
  13962. 8005026: 589b ldr r3, [r3, r2]
  13963. 8005028: 2b00 cmp r3, #0
  13964. 800502a: d107 bne.n 800503c <HAL_UART_Init+0x2c>
  13965. {
  13966. /* Allocate lock resource and initialize it */
  13967. huart->Lock = HAL_UNLOCKED;
  13968. 800502c: 687b ldr r3, [r7, #4]
  13969. 800502e: 2284 movs r2, #132 @ 0x84
  13970. 8005030: 2100 movs r1, #0
  13971. 8005032: 5499 strb r1, [r3, r2]
  13972. /* Init the low level hardware */
  13973. huart->MspInitCallback(huart);
  13974. #else
  13975. /* Init the low level hardware : GPIO, CLOCK */
  13976. HAL_UART_MspInit(huart);
  13977. 8005034: 687b ldr r3, [r7, #4]
  13978. 8005036: 0018 movs r0, r3
  13979. 8005038: f7fb fe0a bl 8000c50 <HAL_UART_MspInit>
  13980. #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
  13981. }
  13982. huart->gState = HAL_UART_STATE_BUSY;
  13983. 800503c: 687b ldr r3, [r7, #4]
  13984. 800503e: 2288 movs r2, #136 @ 0x88
  13985. 8005040: 2124 movs r1, #36 @ 0x24
  13986. 8005042: 5099 str r1, [r3, r2]
  13987. __HAL_UART_DISABLE(huart);
  13988. 8005044: 687b ldr r3, [r7, #4]
  13989. 8005046: 681b ldr r3, [r3, #0]
  13990. 8005048: 681a ldr r2, [r3, #0]
  13991. 800504a: 687b ldr r3, [r7, #4]
  13992. 800504c: 681b ldr r3, [r3, #0]
  13993. 800504e: 2101 movs r1, #1
  13994. 8005050: 438a bics r2, r1
  13995. 8005052: 601a str r2, [r3, #0]
  13996. /* Perform advanced settings configuration */
  13997. /* For some items, configuration requires to be done prior TE and RE bits are set */
  13998. if (huart->AdvancedInit.AdvFeatureInit != UART_ADVFEATURE_NO_INIT)
  13999. 8005054: 687b ldr r3, [r7, #4]
  14000. 8005056: 6a9b ldr r3, [r3, #40] @ 0x28
  14001. 8005058: 2b00 cmp r3, #0
  14002. 800505a: d003 beq.n 8005064 <HAL_UART_Init+0x54>
  14003. {
  14004. UART_AdvFeatureConfig(huart);
  14005. 800505c: 687b ldr r3, [r7, #4]
  14006. 800505e: 0018 movs r0, r3
  14007. 8005060: f000 fae4 bl 800562c <UART_AdvFeatureConfig>
  14008. }
  14009. /* Set the UART Communication parameters */
  14010. if (UART_SetConfig(huart) == HAL_ERROR)
  14011. 8005064: 687b ldr r3, [r7, #4]
  14012. 8005066: 0018 movs r0, r3
  14013. 8005068: f000 f976 bl 8005358 <UART_SetConfig>
  14014. 800506c: 0003 movs r3, r0
  14015. 800506e: 2b01 cmp r3, #1
  14016. 8005070: d101 bne.n 8005076 <HAL_UART_Init+0x66>
  14017. {
  14018. return HAL_ERROR;
  14019. 8005072: 2301 movs r3, #1
  14020. 8005074: e01c b.n 80050b0 <HAL_UART_Init+0xa0>
  14021. }
  14022. /* In asynchronous mode, the following bits must be kept cleared:
  14023. - LINEN and CLKEN bits in the USART_CR2 register,
  14024. - SCEN, HDSEL and IREN bits in the USART_CR3 register.*/
  14025. CLEAR_BIT(huart->Instance->CR2, (USART_CR2_LINEN | USART_CR2_CLKEN));
  14026. 8005076: 687b ldr r3, [r7, #4]
  14027. 8005078: 681b ldr r3, [r3, #0]
  14028. 800507a: 685a ldr r2, [r3, #4]
  14029. 800507c: 687b ldr r3, [r7, #4]
  14030. 800507e: 681b ldr r3, [r3, #0]
  14031. 8005080: 490d ldr r1, [pc, #52] @ (80050b8 <HAL_UART_Init+0xa8>)
  14032. 8005082: 400a ands r2, r1
  14033. 8005084: 605a str r2, [r3, #4]
  14034. CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
  14035. 8005086: 687b ldr r3, [r7, #4]
  14036. 8005088: 681b ldr r3, [r3, #0]
  14037. 800508a: 689a ldr r2, [r3, #8]
  14038. 800508c: 687b ldr r3, [r7, #4]
  14039. 800508e: 681b ldr r3, [r3, #0]
  14040. 8005090: 212a movs r1, #42 @ 0x2a
  14041. 8005092: 438a bics r2, r1
  14042. 8005094: 609a str r2, [r3, #8]
  14043. __HAL_UART_ENABLE(huart);
  14044. 8005096: 687b ldr r3, [r7, #4]
  14045. 8005098: 681b ldr r3, [r3, #0]
  14046. 800509a: 681a ldr r2, [r3, #0]
  14047. 800509c: 687b ldr r3, [r7, #4]
  14048. 800509e: 681b ldr r3, [r3, #0]
  14049. 80050a0: 2101 movs r1, #1
  14050. 80050a2: 430a orrs r2, r1
  14051. 80050a4: 601a str r2, [r3, #0]
  14052. /* TEACK and/or REACK to check before moving huart->gState and huart->RxState to Ready */
  14053. return (UART_CheckIdleState(huart));
  14054. 80050a6: 687b ldr r3, [r7, #4]
  14055. 80050a8: 0018 movs r0, r3
  14056. 80050aa: f000 fb73 bl 8005794 <UART_CheckIdleState>
  14057. 80050ae: 0003 movs r3, r0
  14058. }
  14059. 80050b0: 0018 movs r0, r3
  14060. 80050b2: 46bd mov sp, r7
  14061. 80050b4: b002 add sp, #8
  14062. 80050b6: bd80 pop {r7, pc}
  14063. 80050b8: ffffb7ff .word 0xffffb7ff
  14064. 080050bc <HAL_UART_Transmit_DMA>:
  14065. * @param pData Pointer to data buffer (u8 or u16 data elements).
  14066. * @param Size Amount of data elements (u8 or u16) to be sent.
  14067. * @retval HAL status
  14068. */
  14069. HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size)
  14070. {
  14071. 80050bc: b580 push {r7, lr}
  14072. 80050be: b088 sub sp, #32
  14073. 80050c0: af00 add r7, sp, #0
  14074. 80050c2: 60f8 str r0, [r7, #12]
  14075. 80050c4: 60b9 str r1, [r7, #8]
  14076. 80050c6: 1dbb adds r3, r7, #6
  14077. 80050c8: 801a strh r2, [r3, #0]
  14078. /* Check that a Tx process is not already ongoing */
  14079. if (huart->gState == HAL_UART_STATE_READY)
  14080. 80050ca: 68fb ldr r3, [r7, #12]
  14081. 80050cc: 2288 movs r2, #136 @ 0x88
  14082. 80050ce: 589b ldr r3, [r3, r2]
  14083. 80050d0: 2b20 cmp r3, #32
  14084. 80050d2: d000 beq.n 80050d6 <HAL_UART_Transmit_DMA+0x1a>
  14085. 80050d4: e079 b.n 80051ca <HAL_UART_Transmit_DMA+0x10e>
  14086. {
  14087. if ((pData == NULL) || (Size == 0U))
  14088. 80050d6: 68bb ldr r3, [r7, #8]
  14089. 80050d8: 2b00 cmp r3, #0
  14090. 80050da: d003 beq.n 80050e4 <HAL_UART_Transmit_DMA+0x28>
  14091. 80050dc: 1dbb adds r3, r7, #6
  14092. 80050de: 881b ldrh r3, [r3, #0]
  14093. 80050e0: 2b00 cmp r3, #0
  14094. 80050e2: d101 bne.n 80050e8 <HAL_UART_Transmit_DMA+0x2c>
  14095. {
  14096. return HAL_ERROR;
  14097. 80050e4: 2301 movs r3, #1
  14098. 80050e6: e071 b.n 80051cc <HAL_UART_Transmit_DMA+0x110>
  14099. }
  14100. /* In case of 9bits/No Parity transfer, pData buffer provided as input parameter
  14101. should be aligned on a u16 frontier, as data copy into TDR will be
  14102. handled by DMA from a u16 frontier. */
  14103. if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
  14104. 80050e8: 68fb ldr r3, [r7, #12]
  14105. 80050ea: 689a ldr r2, [r3, #8]
  14106. 80050ec: 2380 movs r3, #128 @ 0x80
  14107. 80050ee: 015b lsls r3, r3, #5
  14108. 80050f0: 429a cmp r2, r3
  14109. 80050f2: d109 bne.n 8005108 <HAL_UART_Transmit_DMA+0x4c>
  14110. 80050f4: 68fb ldr r3, [r7, #12]
  14111. 80050f6: 691b ldr r3, [r3, #16]
  14112. 80050f8: 2b00 cmp r3, #0
  14113. 80050fa: d105 bne.n 8005108 <HAL_UART_Transmit_DMA+0x4c>
  14114. {
  14115. if ((((uint32_t)pData) & 1U) != 0U)
  14116. 80050fc: 68bb ldr r3, [r7, #8]
  14117. 80050fe: 2201 movs r2, #1
  14118. 8005100: 4013 ands r3, r2
  14119. 8005102: d001 beq.n 8005108 <HAL_UART_Transmit_DMA+0x4c>
  14120. {
  14121. return HAL_ERROR;
  14122. 8005104: 2301 movs r3, #1
  14123. 8005106: e061 b.n 80051cc <HAL_UART_Transmit_DMA+0x110>
  14124. }
  14125. }
  14126. huart->pTxBuffPtr = pData;
  14127. 8005108: 68fb ldr r3, [r7, #12]
  14128. 800510a: 68ba ldr r2, [r7, #8]
  14129. 800510c: 651a str r2, [r3, #80] @ 0x50
  14130. huart->TxXferSize = Size;
  14131. 800510e: 68fb ldr r3, [r7, #12]
  14132. 8005110: 1dba adds r2, r7, #6
  14133. 8005112: 2154 movs r1, #84 @ 0x54
  14134. 8005114: 8812 ldrh r2, [r2, #0]
  14135. 8005116: 525a strh r2, [r3, r1]
  14136. huart->TxXferCount = Size;
  14137. 8005118: 68fb ldr r3, [r7, #12]
  14138. 800511a: 1dba adds r2, r7, #6
  14139. 800511c: 2156 movs r1, #86 @ 0x56
  14140. 800511e: 8812 ldrh r2, [r2, #0]
  14141. 8005120: 525a strh r2, [r3, r1]
  14142. huart->ErrorCode = HAL_UART_ERROR_NONE;
  14143. 8005122: 68fb ldr r3, [r7, #12]
  14144. 8005124: 2290 movs r2, #144 @ 0x90
  14145. 8005126: 2100 movs r1, #0
  14146. 8005128: 5099 str r1, [r3, r2]
  14147. huart->gState = HAL_UART_STATE_BUSY_TX;
  14148. 800512a: 68fb ldr r3, [r7, #12]
  14149. 800512c: 2288 movs r2, #136 @ 0x88
  14150. 800512e: 2121 movs r1, #33 @ 0x21
  14151. 8005130: 5099 str r1, [r3, r2]
  14152. if (huart->hdmatx != NULL)
  14153. 8005132: 68fb ldr r3, [r7, #12]
  14154. 8005134: 6fdb ldr r3, [r3, #124] @ 0x7c
  14155. 8005136: 2b00 cmp r3, #0
  14156. 8005138: d028 beq.n 800518c <HAL_UART_Transmit_DMA+0xd0>
  14157. {
  14158. /* Set the UART DMA transfer complete callback */
  14159. huart->hdmatx->XferCpltCallback = UART_DMATransmitCplt;
  14160. 800513a: 68fb ldr r3, [r7, #12]
  14161. 800513c: 6fdb ldr r3, [r3, #124] @ 0x7c
  14162. 800513e: 4a25 ldr r2, [pc, #148] @ (80051d4 <HAL_UART_Transmit_DMA+0x118>)
  14163. 8005140: 62da str r2, [r3, #44] @ 0x2c
  14164. /* Set the UART DMA Half transfer complete callback */
  14165. huart->hdmatx->XferHalfCpltCallback = UART_DMATxHalfCplt;
  14166. 8005142: 68fb ldr r3, [r7, #12]
  14167. 8005144: 6fdb ldr r3, [r3, #124] @ 0x7c
  14168. 8005146: 4a24 ldr r2, [pc, #144] @ (80051d8 <HAL_UART_Transmit_DMA+0x11c>)
  14169. 8005148: 631a str r2, [r3, #48] @ 0x30
  14170. /* Set the DMA error callback */
  14171. huart->hdmatx->XferErrorCallback = UART_DMAError;
  14172. 800514a: 68fb ldr r3, [r7, #12]
  14173. 800514c: 6fdb ldr r3, [r3, #124] @ 0x7c
  14174. 800514e: 4a23 ldr r2, [pc, #140] @ (80051dc <HAL_UART_Transmit_DMA+0x120>)
  14175. 8005150: 635a str r2, [r3, #52] @ 0x34
  14176. /* Set the DMA abort callback */
  14177. huart->hdmatx->XferAbortCallback = NULL;
  14178. 8005152: 68fb ldr r3, [r7, #12]
  14179. 8005154: 6fdb ldr r3, [r3, #124] @ 0x7c
  14180. 8005156: 2200 movs r2, #0
  14181. 8005158: 639a str r2, [r3, #56] @ 0x38
  14182. /* Enable the UART transmit DMA channel */
  14183. if (HAL_DMA_Start_IT(huart->hdmatx, (uint32_t)huart->pTxBuffPtr, (uint32_t)&huart->Instance->TDR, Size) != HAL_OK)
  14184. 800515a: 68fb ldr r3, [r7, #12]
  14185. 800515c: 6fd8 ldr r0, [r3, #124] @ 0x7c
  14186. 800515e: 68fb ldr r3, [r7, #12]
  14187. 8005160: 6d1b ldr r3, [r3, #80] @ 0x50
  14188. 8005162: 0019 movs r1, r3
  14189. 8005164: 68fb ldr r3, [r7, #12]
  14190. 8005166: 681b ldr r3, [r3, #0]
  14191. 8005168: 3328 adds r3, #40 @ 0x28
  14192. 800516a: 001a movs r2, r3
  14193. 800516c: 1dbb adds r3, r7, #6
  14194. 800516e: 881b ldrh r3, [r3, #0]
  14195. 8005170: f7fd fe5a bl 8002e28 <HAL_DMA_Start_IT>
  14196. 8005174: 1e03 subs r3, r0, #0
  14197. 8005176: d009 beq.n 800518c <HAL_UART_Transmit_DMA+0xd0>
  14198. {
  14199. /* Set error code to DMA */
  14200. huart->ErrorCode = HAL_UART_ERROR_DMA;
  14201. 8005178: 68fb ldr r3, [r7, #12]
  14202. 800517a: 2290 movs r2, #144 @ 0x90
  14203. 800517c: 2110 movs r1, #16
  14204. 800517e: 5099 str r1, [r3, r2]
  14205. /* Restore huart->gState to ready */
  14206. huart->gState = HAL_UART_STATE_READY;
  14207. 8005180: 68fb ldr r3, [r7, #12]
  14208. 8005182: 2288 movs r2, #136 @ 0x88
  14209. 8005184: 2120 movs r1, #32
  14210. 8005186: 5099 str r1, [r3, r2]
  14211. return HAL_ERROR;
  14212. 8005188: 2301 movs r3, #1
  14213. 800518a: e01f b.n 80051cc <HAL_UART_Transmit_DMA+0x110>
  14214. }
  14215. }
  14216. /* Clear the TC flag in the ICR register */
  14217. __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_TCF);
  14218. 800518c: 68fb ldr r3, [r7, #12]
  14219. 800518e: 681b ldr r3, [r3, #0]
  14220. 8005190: 2240 movs r2, #64 @ 0x40
  14221. 8005192: 621a str r2, [r3, #32]
  14222. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  14223. 8005194: f3ef 8310 mrs r3, PRIMASK
  14224. 8005198: 613b str r3, [r7, #16]
  14225. return(result);
  14226. 800519a: 693b ldr r3, [r7, #16]
  14227. /* Enable the DMA transfer for transmit request by setting the DMAT bit
  14228. in the UART CR3 register */
  14229. ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_DMAT);
  14230. 800519c: 61fb str r3, [r7, #28]
  14231. 800519e: 2301 movs r3, #1
  14232. 80051a0: 617b str r3, [r7, #20]
  14233. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  14234. 80051a2: 697b ldr r3, [r7, #20]
  14235. 80051a4: f383 8810 msr PRIMASK, r3
  14236. }
  14237. 80051a8: 46c0 nop @ (mov r8, r8)
  14238. 80051aa: 68fb ldr r3, [r7, #12]
  14239. 80051ac: 681b ldr r3, [r3, #0]
  14240. 80051ae: 689a ldr r2, [r3, #8]
  14241. 80051b0: 68fb ldr r3, [r7, #12]
  14242. 80051b2: 681b ldr r3, [r3, #0]
  14243. 80051b4: 2180 movs r1, #128 @ 0x80
  14244. 80051b6: 430a orrs r2, r1
  14245. 80051b8: 609a str r2, [r3, #8]
  14246. 80051ba: 69fb ldr r3, [r7, #28]
  14247. 80051bc: 61bb str r3, [r7, #24]
  14248. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  14249. 80051be: 69bb ldr r3, [r7, #24]
  14250. 80051c0: f383 8810 msr PRIMASK, r3
  14251. }
  14252. 80051c4: 46c0 nop @ (mov r8, r8)
  14253. return HAL_OK;
  14254. 80051c6: 2300 movs r3, #0
  14255. 80051c8: e000 b.n 80051cc <HAL_UART_Transmit_DMA+0x110>
  14256. }
  14257. else
  14258. {
  14259. return HAL_BUSY;
  14260. 80051ca: 2302 movs r3, #2
  14261. }
  14262. }
  14263. 80051cc: 0018 movs r0, r3
  14264. 80051ce: 46bd mov sp, r7
  14265. 80051d0: b008 add sp, #32
  14266. 80051d2: bd80 pop {r7, pc}
  14267. 80051d4: 08005c61 .word 0x08005c61
  14268. 80051d8: 08005cf9 .word 0x08005cf9
  14269. 80051dc: 08005e8b .word 0x08005e8b
  14270. 080051e0 <HAL_UART_DMAStop>:
  14271. * @brief Stop the DMA Transfer.
  14272. * @param huart UART handle.
  14273. * @retval HAL status
  14274. */
  14275. HAL_StatusTypeDef HAL_UART_DMAStop(UART_HandleTypeDef *huart)
  14276. {
  14277. 80051e0: b580 push {r7, lr}
  14278. 80051e2: b08c sub sp, #48 @ 0x30
  14279. 80051e4: af00 add r7, sp, #0
  14280. 80051e6: 6078 str r0, [r7, #4]
  14281. HAL_UART_TxHalfCpltCallback / HAL_UART_RxHalfCpltCallback:
  14282. indeed, when HAL_DMA_Abort() API is called, the DMA TX/RX Transfer or Half Transfer complete
  14283. interrupt is generated if the DMA transfer interruption occurs at the middle or at the end of
  14284. the stream and the corresponding call back is executed. */
  14285. const HAL_UART_StateTypeDef gstate = huart->gState;
  14286. 80051e8: 687b ldr r3, [r7, #4]
  14287. 80051ea: 2288 movs r2, #136 @ 0x88
  14288. 80051ec: 589b ldr r3, [r3, r2]
  14289. 80051ee: 62fb str r3, [r7, #44] @ 0x2c
  14290. const HAL_UART_StateTypeDef rxstate = huart->RxState;
  14291. 80051f0: 687b ldr r3, [r7, #4]
  14292. 80051f2: 228c movs r2, #140 @ 0x8c
  14293. 80051f4: 589b ldr r3, [r3, r2]
  14294. 80051f6: 62bb str r3, [r7, #40] @ 0x28
  14295. /* Stop UART DMA Tx request if ongoing */
  14296. if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAT)) &&
  14297. 80051f8: 687b ldr r3, [r7, #4]
  14298. 80051fa: 681b ldr r3, [r3, #0]
  14299. 80051fc: 689b ldr r3, [r3, #8]
  14300. 80051fe: 2280 movs r2, #128 @ 0x80
  14301. 8005200: 4013 ands r3, r2
  14302. 8005202: 2b80 cmp r3, #128 @ 0x80
  14303. 8005204: d138 bne.n 8005278 <HAL_UART_DMAStop+0x98>
  14304. 8005206: 6afb ldr r3, [r7, #44] @ 0x2c
  14305. 8005208: 2b21 cmp r3, #33 @ 0x21
  14306. 800520a: d135 bne.n 8005278 <HAL_UART_DMAStop+0x98>
  14307. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  14308. 800520c: f3ef 8310 mrs r3, PRIMASK
  14309. 8005210: 617b str r3, [r7, #20]
  14310. return(result);
  14311. 8005212: 697b ldr r3, [r7, #20]
  14312. (gstate == HAL_UART_STATE_BUSY_TX))
  14313. {
  14314. ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAT);
  14315. 8005214: 627b str r3, [r7, #36] @ 0x24
  14316. 8005216: 2301 movs r3, #1
  14317. 8005218: 61bb str r3, [r7, #24]
  14318. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  14319. 800521a: 69bb ldr r3, [r7, #24]
  14320. 800521c: f383 8810 msr PRIMASK, r3
  14321. }
  14322. 8005220: 46c0 nop @ (mov r8, r8)
  14323. 8005222: 687b ldr r3, [r7, #4]
  14324. 8005224: 681b ldr r3, [r3, #0]
  14325. 8005226: 689a ldr r2, [r3, #8]
  14326. 8005228: 687b ldr r3, [r7, #4]
  14327. 800522a: 681b ldr r3, [r3, #0]
  14328. 800522c: 2180 movs r1, #128 @ 0x80
  14329. 800522e: 438a bics r2, r1
  14330. 8005230: 609a str r2, [r3, #8]
  14331. 8005232: 6a7b ldr r3, [r7, #36] @ 0x24
  14332. 8005234: 61fb str r3, [r7, #28]
  14333. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  14334. 8005236: 69fb ldr r3, [r7, #28]
  14335. 8005238: f383 8810 msr PRIMASK, r3
  14336. }
  14337. 800523c: 46c0 nop @ (mov r8, r8)
  14338. /* Abort the UART DMA Tx channel */
  14339. if (huart->hdmatx != NULL)
  14340. 800523e: 687b ldr r3, [r7, #4]
  14341. 8005240: 6fdb ldr r3, [r3, #124] @ 0x7c
  14342. 8005242: 2b00 cmp r3, #0
  14343. 8005244: d014 beq.n 8005270 <HAL_UART_DMAStop+0x90>
  14344. {
  14345. if (HAL_DMA_Abort(huart->hdmatx) != HAL_OK)
  14346. 8005246: 687b ldr r3, [r7, #4]
  14347. 8005248: 6fdb ldr r3, [r3, #124] @ 0x7c
  14348. 800524a: 0018 movs r0, r3
  14349. 800524c: f7fd fe72 bl 8002f34 <HAL_DMA_Abort>
  14350. 8005250: 1e03 subs r3, r0, #0
  14351. 8005252: d00d beq.n 8005270 <HAL_UART_DMAStop+0x90>
  14352. {
  14353. if (HAL_DMA_GetError(huart->hdmatx) == HAL_DMA_ERROR_TIMEOUT)
  14354. 8005254: 687b ldr r3, [r7, #4]
  14355. 8005256: 6fdb ldr r3, [r3, #124] @ 0x7c
  14356. 8005258: 0018 movs r0, r3
  14357. 800525a: f7fd ff7f bl 800315c <HAL_DMA_GetError>
  14358. 800525e: 0003 movs r3, r0
  14359. 8005260: 2b20 cmp r3, #32
  14360. 8005262: d105 bne.n 8005270 <HAL_UART_DMAStop+0x90>
  14361. {
  14362. /* Set error code to DMA */
  14363. huart->ErrorCode = HAL_UART_ERROR_DMA;
  14364. 8005264: 687b ldr r3, [r7, #4]
  14365. 8005266: 2290 movs r2, #144 @ 0x90
  14366. 8005268: 2110 movs r1, #16
  14367. 800526a: 5099 str r1, [r3, r2]
  14368. return HAL_TIMEOUT;
  14369. 800526c: 2303 movs r3, #3
  14370. 800526e: e047 b.n 8005300 <HAL_UART_DMAStop+0x120>
  14371. }
  14372. }
  14373. }
  14374. UART_EndTxTransfer(huart);
  14375. 8005270: 687b ldr r3, [r7, #4]
  14376. 8005272: 0018 movs r0, r3
  14377. 8005274: f000 fc4e bl 8005b14 <UART_EndTxTransfer>
  14378. }
  14379. /* Stop UART DMA Rx request if ongoing */
  14380. if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) &&
  14381. 8005278: 687b ldr r3, [r7, #4]
  14382. 800527a: 681b ldr r3, [r3, #0]
  14383. 800527c: 689b ldr r3, [r3, #8]
  14384. 800527e: 2240 movs r2, #64 @ 0x40
  14385. 8005280: 4013 ands r3, r2
  14386. 8005282: 2b40 cmp r3, #64 @ 0x40
  14387. 8005284: d13b bne.n 80052fe <HAL_UART_DMAStop+0x11e>
  14388. 8005286: 6abb ldr r3, [r7, #40] @ 0x28
  14389. 8005288: 2b22 cmp r3, #34 @ 0x22
  14390. 800528a: d138 bne.n 80052fe <HAL_UART_DMAStop+0x11e>
  14391. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  14392. 800528c: f3ef 8310 mrs r3, PRIMASK
  14393. 8005290: 60bb str r3, [r7, #8]
  14394. return(result);
  14395. 8005292: 68bb ldr r3, [r7, #8]
  14396. (rxstate == HAL_UART_STATE_BUSY_RX))
  14397. {
  14398. ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR);
  14399. 8005294: 623b str r3, [r7, #32]
  14400. 8005296: 2301 movs r3, #1
  14401. 8005298: 60fb str r3, [r7, #12]
  14402. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  14403. 800529a: 68fb ldr r3, [r7, #12]
  14404. 800529c: f383 8810 msr PRIMASK, r3
  14405. }
  14406. 80052a0: 46c0 nop @ (mov r8, r8)
  14407. 80052a2: 687b ldr r3, [r7, #4]
  14408. 80052a4: 681b ldr r3, [r3, #0]
  14409. 80052a6: 689a ldr r2, [r3, #8]
  14410. 80052a8: 687b ldr r3, [r7, #4]
  14411. 80052aa: 681b ldr r3, [r3, #0]
  14412. 80052ac: 2140 movs r1, #64 @ 0x40
  14413. 80052ae: 438a bics r2, r1
  14414. 80052b0: 609a str r2, [r3, #8]
  14415. 80052b2: 6a3b ldr r3, [r7, #32]
  14416. 80052b4: 613b str r3, [r7, #16]
  14417. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  14418. 80052b6: 693b ldr r3, [r7, #16]
  14419. 80052b8: f383 8810 msr PRIMASK, r3
  14420. }
  14421. 80052bc: 46c0 nop @ (mov r8, r8)
  14422. /* Abort the UART DMA Rx channel */
  14423. if (huart->hdmarx != NULL)
  14424. 80052be: 687b ldr r3, [r7, #4]
  14425. 80052c0: 2280 movs r2, #128 @ 0x80
  14426. 80052c2: 589b ldr r3, [r3, r2]
  14427. 80052c4: 2b00 cmp r3, #0
  14428. 80052c6: d016 beq.n 80052f6 <HAL_UART_DMAStop+0x116>
  14429. {
  14430. if (HAL_DMA_Abort(huart->hdmarx) != HAL_OK)
  14431. 80052c8: 687b ldr r3, [r7, #4]
  14432. 80052ca: 2280 movs r2, #128 @ 0x80
  14433. 80052cc: 589b ldr r3, [r3, r2]
  14434. 80052ce: 0018 movs r0, r3
  14435. 80052d0: f7fd fe30 bl 8002f34 <HAL_DMA_Abort>
  14436. 80052d4: 1e03 subs r3, r0, #0
  14437. 80052d6: d00e beq.n 80052f6 <HAL_UART_DMAStop+0x116>
  14438. {
  14439. if (HAL_DMA_GetError(huart->hdmarx) == HAL_DMA_ERROR_TIMEOUT)
  14440. 80052d8: 687b ldr r3, [r7, #4]
  14441. 80052da: 2280 movs r2, #128 @ 0x80
  14442. 80052dc: 589b ldr r3, [r3, r2]
  14443. 80052de: 0018 movs r0, r3
  14444. 80052e0: f7fd ff3c bl 800315c <HAL_DMA_GetError>
  14445. 80052e4: 0003 movs r3, r0
  14446. 80052e6: 2b20 cmp r3, #32
  14447. 80052e8: d105 bne.n 80052f6 <HAL_UART_DMAStop+0x116>
  14448. {
  14449. /* Set error code to DMA */
  14450. huart->ErrorCode = HAL_UART_ERROR_DMA;
  14451. 80052ea: 687b ldr r3, [r7, #4]
  14452. 80052ec: 2290 movs r2, #144 @ 0x90
  14453. 80052ee: 2110 movs r1, #16
  14454. 80052f0: 5099 str r1, [r3, r2]
  14455. return HAL_TIMEOUT;
  14456. 80052f2: 2303 movs r3, #3
  14457. 80052f4: e004 b.n 8005300 <HAL_UART_DMAStop+0x120>
  14458. }
  14459. }
  14460. }
  14461. UART_EndRxTransfer(huart);
  14462. 80052f6: 687b ldr r3, [r7, #4]
  14463. 80052f8: 0018 movs r0, r3
  14464. 80052fa: f000 fc4b bl 8005b94 <UART_EndRxTransfer>
  14465. }
  14466. return HAL_OK;
  14467. 80052fe: 2300 movs r3, #0
  14468. }
  14469. 8005300: 0018 movs r0, r3
  14470. 8005302: 46bd mov sp, r7
  14471. 8005304: b00c add sp, #48 @ 0x30
  14472. 8005306: bd80 pop {r7, pc}
  14473. 08005308 <HAL_UART_TxCpltCallback>:
  14474. * @brief Tx Transfer completed callback.
  14475. * @param huart UART handle.
  14476. * @retval None
  14477. */
  14478. __weak void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
  14479. {
  14480. 8005308: b580 push {r7, lr}
  14481. 800530a: b082 sub sp, #8
  14482. 800530c: af00 add r7, sp, #0
  14483. 800530e: 6078 str r0, [r7, #4]
  14484. UNUSED(huart);
  14485. /* NOTE : This function should not be modified, when the callback is needed,
  14486. the HAL_UART_TxCpltCallback can be implemented in the user file.
  14487. */
  14488. }
  14489. 8005310: 46c0 nop @ (mov r8, r8)
  14490. 8005312: 46bd mov sp, r7
  14491. 8005314: b002 add sp, #8
  14492. 8005316: bd80 pop {r7, pc}
  14493. 08005318 <HAL_UART_TxHalfCpltCallback>:
  14494. * @brief Tx Half Transfer completed callback.
  14495. * @param huart UART handle.
  14496. * @retval None
  14497. */
  14498. __weak void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart)
  14499. {
  14500. 8005318: b580 push {r7, lr}
  14501. 800531a: b082 sub sp, #8
  14502. 800531c: af00 add r7, sp, #0
  14503. 800531e: 6078 str r0, [r7, #4]
  14504. UNUSED(huart);
  14505. /* NOTE: This function should not be modified, when the callback is needed,
  14506. the HAL_UART_TxHalfCpltCallback can be implemented in the user file.
  14507. */
  14508. }
  14509. 8005320: 46c0 nop @ (mov r8, r8)
  14510. 8005322: 46bd mov sp, r7
  14511. 8005324: b002 add sp, #8
  14512. 8005326: bd80 pop {r7, pc}
  14513. 08005328 <HAL_UART_RxCpltCallback>:
  14514. * @brief Rx Transfer completed callback.
  14515. * @param huart UART handle.
  14516. * @retval None
  14517. */
  14518. __weak void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
  14519. {
  14520. 8005328: b580 push {r7, lr}
  14521. 800532a: b082 sub sp, #8
  14522. 800532c: af00 add r7, sp, #0
  14523. 800532e: 6078 str r0, [r7, #4]
  14524. UNUSED(huart);
  14525. /* NOTE : This function should not be modified, when the callback is needed,
  14526. the HAL_UART_RxCpltCallback can be implemented in the user file.
  14527. */
  14528. }
  14529. 8005330: 46c0 nop @ (mov r8, r8)
  14530. 8005332: 46bd mov sp, r7
  14531. 8005334: b002 add sp, #8
  14532. 8005336: bd80 pop {r7, pc}
  14533. 08005338 <HAL_UART_RxHalfCpltCallback>:
  14534. * @brief Rx Half Transfer completed callback.
  14535. * @param huart UART handle.
  14536. * @retval None
  14537. */
  14538. __weak void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart)
  14539. {
  14540. 8005338: b580 push {r7, lr}
  14541. 800533a: b082 sub sp, #8
  14542. 800533c: af00 add r7, sp, #0
  14543. 800533e: 6078 str r0, [r7, #4]
  14544. UNUSED(huart);
  14545. /* NOTE: This function should not be modified, when the callback is needed,
  14546. the HAL_UART_RxHalfCpltCallback can be implemented in the user file.
  14547. */
  14548. }
  14549. 8005340: 46c0 nop @ (mov r8, r8)
  14550. 8005342: 46bd mov sp, r7
  14551. 8005344: b002 add sp, #8
  14552. 8005346: bd80 pop {r7, pc}
  14553. 08005348 <HAL_UART_ErrorCallback>:
  14554. * @brief UART error callback.
  14555. * @param huart UART handle.
  14556. * @retval None
  14557. */
  14558. __weak void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
  14559. {
  14560. 8005348: b580 push {r7, lr}
  14561. 800534a: b082 sub sp, #8
  14562. 800534c: af00 add r7, sp, #0
  14563. 800534e: 6078 str r0, [r7, #4]
  14564. UNUSED(huart);
  14565. /* NOTE : This function should not be modified, when the callback is needed,
  14566. the HAL_UART_ErrorCallback can be implemented in the user file.
  14567. */
  14568. }
  14569. 8005350: 46c0 nop @ (mov r8, r8)
  14570. 8005352: 46bd mov sp, r7
  14571. 8005354: b002 add sp, #8
  14572. 8005356: bd80 pop {r7, pc}
  14573. 08005358 <UART_SetConfig>:
  14574. * @brief Configure the UART peripheral.
  14575. * @param huart UART handle.
  14576. * @retval HAL status
  14577. */
  14578. HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart)
  14579. {
  14580. 8005358: b580 push {r7, lr}
  14581. 800535a: b088 sub sp, #32
  14582. 800535c: af00 add r7, sp, #0
  14583. 800535e: 6078 str r0, [r7, #4]
  14584. uint32_t tmpreg;
  14585. uint16_t brrtemp;
  14586. UART_ClockSourceTypeDef clocksource;
  14587. uint32_t usartdiv;
  14588. HAL_StatusTypeDef ret = HAL_OK;
  14589. 8005360: 231a movs r3, #26
  14590. 8005362: 18fb adds r3, r7, r3
  14591. 8005364: 2200 movs r2, #0
  14592. 8005366: 701a strb r2, [r3, #0]
  14593. * the UART Word Length, Parity, Mode and oversampling:
  14594. * set the M bits according to huart->Init.WordLength value
  14595. * set PCE and PS bits according to huart->Init.Parity value
  14596. * set TE and RE bits according to huart->Init.Mode value
  14597. * set OVER8 bit according to huart->Init.OverSampling value */
  14598. tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode | huart->Init.OverSampling ;
  14599. 8005368: 687b ldr r3, [r7, #4]
  14600. 800536a: 689a ldr r2, [r3, #8]
  14601. 800536c: 687b ldr r3, [r7, #4]
  14602. 800536e: 691b ldr r3, [r3, #16]
  14603. 8005370: 431a orrs r2, r3
  14604. 8005372: 687b ldr r3, [r7, #4]
  14605. 8005374: 695b ldr r3, [r3, #20]
  14606. 8005376: 431a orrs r2, r3
  14607. 8005378: 687b ldr r3, [r7, #4]
  14608. 800537a: 69db ldr r3, [r3, #28]
  14609. 800537c: 4313 orrs r3, r2
  14610. 800537e: 61fb str r3, [r7, #28]
  14611. MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg);
  14612. 8005380: 687b ldr r3, [r7, #4]
  14613. 8005382: 681b ldr r3, [r3, #0]
  14614. 8005384: 681b ldr r3, [r3, #0]
  14615. 8005386: 4aa1 ldr r2, [pc, #644] @ (800560c <UART_SetConfig+0x2b4>)
  14616. 8005388: 4013 ands r3, r2
  14617. 800538a: 0019 movs r1, r3
  14618. 800538c: 687b ldr r3, [r7, #4]
  14619. 800538e: 681b ldr r3, [r3, #0]
  14620. 8005390: 69fa ldr r2, [r7, #28]
  14621. 8005392: 430a orrs r2, r1
  14622. 8005394: 601a str r2, [r3, #0]
  14623. /*-------------------------- USART CR2 Configuration -----------------------*/
  14624. /* Configure the UART Stop Bits: Set STOP[13:12] bits according
  14625. * to huart->Init.StopBits value */
  14626. MODIFY_REG(huart->Instance->CR2, USART_CR2_STOP, huart->Init.StopBits);
  14627. 8005396: 687b ldr r3, [r7, #4]
  14628. 8005398: 681b ldr r3, [r3, #0]
  14629. 800539a: 685b ldr r3, [r3, #4]
  14630. 800539c: 4a9c ldr r2, [pc, #624] @ (8005610 <UART_SetConfig+0x2b8>)
  14631. 800539e: 4013 ands r3, r2
  14632. 80053a0: 0019 movs r1, r3
  14633. 80053a2: 687b ldr r3, [r7, #4]
  14634. 80053a4: 68da ldr r2, [r3, #12]
  14635. 80053a6: 687b ldr r3, [r7, #4]
  14636. 80053a8: 681b ldr r3, [r3, #0]
  14637. 80053aa: 430a orrs r2, r1
  14638. 80053ac: 605a str r2, [r3, #4]
  14639. /* Configure
  14640. * - UART HardWare Flow Control: set CTSE and RTSE bits according
  14641. * to huart->Init.HwFlowCtl value
  14642. * - one-bit sampling method versus three samples' majority rule according
  14643. * to huart->Init.OneBitSampling (not applicable to LPUART) */
  14644. tmpreg = (uint32_t)huart->Init.HwFlowCtl;
  14645. 80053ae: 687b ldr r3, [r7, #4]
  14646. 80053b0: 699b ldr r3, [r3, #24]
  14647. 80053b2: 61fb str r3, [r7, #28]
  14648. if (!(UART_INSTANCE_LOWPOWER(huart)))
  14649. {
  14650. tmpreg |= huart->Init.OneBitSampling;
  14651. 80053b4: 687b ldr r3, [r7, #4]
  14652. 80053b6: 6a1b ldr r3, [r3, #32]
  14653. 80053b8: 69fa ldr r2, [r7, #28]
  14654. 80053ba: 4313 orrs r3, r2
  14655. 80053bc: 61fb str r3, [r7, #28]
  14656. }
  14657. MODIFY_REG(huart->Instance->CR3, USART_CR3_FIELDS, tmpreg);
  14658. 80053be: 687b ldr r3, [r7, #4]
  14659. 80053c0: 681b ldr r3, [r3, #0]
  14660. 80053c2: 689b ldr r3, [r3, #8]
  14661. 80053c4: 4a93 ldr r2, [pc, #588] @ (8005614 <UART_SetConfig+0x2bc>)
  14662. 80053c6: 4013 ands r3, r2
  14663. 80053c8: 0019 movs r1, r3
  14664. 80053ca: 687b ldr r3, [r7, #4]
  14665. 80053cc: 681b ldr r3, [r3, #0]
  14666. 80053ce: 69fa ldr r2, [r7, #28]
  14667. 80053d0: 430a orrs r2, r1
  14668. 80053d2: 609a str r2, [r3, #8]
  14669. /*-------------------------- USART PRESC Configuration -----------------------*/
  14670. /* Configure
  14671. * - UART Clock Prescaler : set PRESCALER according to huart->Init.ClockPrescaler value */
  14672. MODIFY_REG(huart->Instance->PRESC, USART_PRESC_PRESCALER, huart->Init.ClockPrescaler);
  14673. 80053d4: 687b ldr r3, [r7, #4]
  14674. 80053d6: 681b ldr r3, [r3, #0]
  14675. 80053d8: 6adb ldr r3, [r3, #44] @ 0x2c
  14676. 80053da: 220f movs r2, #15
  14677. 80053dc: 4393 bics r3, r2
  14678. 80053de: 0019 movs r1, r3
  14679. 80053e0: 687b ldr r3, [r7, #4]
  14680. 80053e2: 6a5a ldr r2, [r3, #36] @ 0x24
  14681. 80053e4: 687b ldr r3, [r7, #4]
  14682. 80053e6: 681b ldr r3, [r3, #0]
  14683. 80053e8: 430a orrs r2, r1
  14684. 80053ea: 62da str r2, [r3, #44] @ 0x2c
  14685. /*-------------------------- USART BRR Configuration -----------------------*/
  14686. UART_GETCLOCKSOURCE(huart, clocksource);
  14687. 80053ec: 687b ldr r3, [r7, #4]
  14688. 80053ee: 681b ldr r3, [r3, #0]
  14689. 80053f0: 4a89 ldr r2, [pc, #548] @ (8005618 <UART_SetConfig+0x2c0>)
  14690. 80053f2: 4293 cmp r3, r2
  14691. 80053f4: d127 bne.n 8005446 <UART_SetConfig+0xee>
  14692. 80053f6: 4b89 ldr r3, [pc, #548] @ (800561c <UART_SetConfig+0x2c4>)
  14693. 80053f8: 6d5b ldr r3, [r3, #84] @ 0x54
  14694. 80053fa: 2203 movs r2, #3
  14695. 80053fc: 4013 ands r3, r2
  14696. 80053fe: 2b03 cmp r3, #3
  14697. 8005400: d017 beq.n 8005432 <UART_SetConfig+0xda>
  14698. 8005402: d81b bhi.n 800543c <UART_SetConfig+0xe4>
  14699. 8005404: 2b02 cmp r3, #2
  14700. 8005406: d00a beq.n 800541e <UART_SetConfig+0xc6>
  14701. 8005408: d818 bhi.n 800543c <UART_SetConfig+0xe4>
  14702. 800540a: 2b00 cmp r3, #0
  14703. 800540c: d002 beq.n 8005414 <UART_SetConfig+0xbc>
  14704. 800540e: 2b01 cmp r3, #1
  14705. 8005410: d00a beq.n 8005428 <UART_SetConfig+0xd0>
  14706. 8005412: e013 b.n 800543c <UART_SetConfig+0xe4>
  14707. 8005414: 231b movs r3, #27
  14708. 8005416: 18fb adds r3, r7, r3
  14709. 8005418: 2200 movs r2, #0
  14710. 800541a: 701a strb r2, [r3, #0]
  14711. 800541c: e021 b.n 8005462 <UART_SetConfig+0x10a>
  14712. 800541e: 231b movs r3, #27
  14713. 8005420: 18fb adds r3, r7, r3
  14714. 8005422: 2202 movs r2, #2
  14715. 8005424: 701a strb r2, [r3, #0]
  14716. 8005426: e01c b.n 8005462 <UART_SetConfig+0x10a>
  14717. 8005428: 231b movs r3, #27
  14718. 800542a: 18fb adds r3, r7, r3
  14719. 800542c: 2204 movs r2, #4
  14720. 800542e: 701a strb r2, [r3, #0]
  14721. 8005430: e017 b.n 8005462 <UART_SetConfig+0x10a>
  14722. 8005432: 231b movs r3, #27
  14723. 8005434: 18fb adds r3, r7, r3
  14724. 8005436: 2208 movs r2, #8
  14725. 8005438: 701a strb r2, [r3, #0]
  14726. 800543a: e012 b.n 8005462 <UART_SetConfig+0x10a>
  14727. 800543c: 231b movs r3, #27
  14728. 800543e: 18fb adds r3, r7, r3
  14729. 8005440: 2210 movs r2, #16
  14730. 8005442: 701a strb r2, [r3, #0]
  14731. 8005444: e00d b.n 8005462 <UART_SetConfig+0x10a>
  14732. 8005446: 687b ldr r3, [r7, #4]
  14733. 8005448: 681b ldr r3, [r3, #0]
  14734. 800544a: 4a75 ldr r2, [pc, #468] @ (8005620 <UART_SetConfig+0x2c8>)
  14735. 800544c: 4293 cmp r3, r2
  14736. 800544e: d104 bne.n 800545a <UART_SetConfig+0x102>
  14737. 8005450: 231b movs r3, #27
  14738. 8005452: 18fb adds r3, r7, r3
  14739. 8005454: 2200 movs r2, #0
  14740. 8005456: 701a strb r2, [r3, #0]
  14741. 8005458: e003 b.n 8005462 <UART_SetConfig+0x10a>
  14742. 800545a: 231b movs r3, #27
  14743. 800545c: 18fb adds r3, r7, r3
  14744. 800545e: 2210 movs r2, #16
  14745. 8005460: 701a strb r2, [r3, #0]
  14746. } /* if ( (lpuart_ker_ck_pres < (3 * huart->Init.BaudRate) ) ||
  14747. (lpuart_ker_ck_pres > (4096 * huart->Init.BaudRate) )) */
  14748. } /* if (pclk != 0) */
  14749. }
  14750. /* Check UART Over Sampling to set Baud Rate Register */
  14751. else if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
  14752. 8005462: 687b ldr r3, [r7, #4]
  14753. 8005464: 69da ldr r2, [r3, #28]
  14754. 8005466: 2380 movs r3, #128 @ 0x80
  14755. 8005468: 021b lsls r3, r3, #8
  14756. 800546a: 429a cmp r2, r3
  14757. 800546c: d000 beq.n 8005470 <UART_SetConfig+0x118>
  14758. 800546e: e065 b.n 800553c <UART_SetConfig+0x1e4>
  14759. {
  14760. switch (clocksource)
  14761. 8005470: 231b movs r3, #27
  14762. 8005472: 18fb adds r3, r7, r3
  14763. 8005474: 781b ldrb r3, [r3, #0]
  14764. 8005476: 2b08 cmp r3, #8
  14765. 8005478: d015 beq.n 80054a6 <UART_SetConfig+0x14e>
  14766. 800547a: dc18 bgt.n 80054ae <UART_SetConfig+0x156>
  14767. 800547c: 2b04 cmp r3, #4
  14768. 800547e: d00d beq.n 800549c <UART_SetConfig+0x144>
  14769. 8005480: dc15 bgt.n 80054ae <UART_SetConfig+0x156>
  14770. 8005482: 2b00 cmp r3, #0
  14771. 8005484: d002 beq.n 800548c <UART_SetConfig+0x134>
  14772. 8005486: 2b02 cmp r3, #2
  14773. 8005488: d005 beq.n 8005496 <UART_SetConfig+0x13e>
  14774. 800548a: e010 b.n 80054ae <UART_SetConfig+0x156>
  14775. {
  14776. case UART_CLOCKSOURCE_PCLK1:
  14777. pclk = HAL_RCC_GetPCLK1Freq();
  14778. 800548c: f7fe ff18 bl 80042c0 <HAL_RCC_GetPCLK1Freq>
  14779. 8005490: 0003 movs r3, r0
  14780. 8005492: 617b str r3, [r7, #20]
  14781. break;
  14782. 8005494: e012 b.n 80054bc <UART_SetConfig+0x164>
  14783. case UART_CLOCKSOURCE_HSI:
  14784. pclk = (uint32_t) HSI_VALUE;
  14785. 8005496: 4b63 ldr r3, [pc, #396] @ (8005624 <UART_SetConfig+0x2cc>)
  14786. 8005498: 617b str r3, [r7, #20]
  14787. break;
  14788. 800549a: e00f b.n 80054bc <UART_SetConfig+0x164>
  14789. case UART_CLOCKSOURCE_SYSCLK:
  14790. pclk = HAL_RCC_GetSysClockFreq();
  14791. 800549c: f7fe fe84 bl 80041a8 <HAL_RCC_GetSysClockFreq>
  14792. 80054a0: 0003 movs r3, r0
  14793. 80054a2: 617b str r3, [r7, #20]
  14794. break;
  14795. 80054a4: e00a b.n 80054bc <UART_SetConfig+0x164>
  14796. case UART_CLOCKSOURCE_LSE:
  14797. pclk = (uint32_t) LSE_VALUE;
  14798. 80054a6: 2380 movs r3, #128 @ 0x80
  14799. 80054a8: 021b lsls r3, r3, #8
  14800. 80054aa: 617b str r3, [r7, #20]
  14801. break;
  14802. 80054ac: e006 b.n 80054bc <UART_SetConfig+0x164>
  14803. default:
  14804. pclk = 0U;
  14805. 80054ae: 2300 movs r3, #0
  14806. 80054b0: 617b str r3, [r7, #20]
  14807. ret = HAL_ERROR;
  14808. 80054b2: 231a movs r3, #26
  14809. 80054b4: 18fb adds r3, r7, r3
  14810. 80054b6: 2201 movs r2, #1
  14811. 80054b8: 701a strb r2, [r3, #0]
  14812. break;
  14813. 80054ba: 46c0 nop @ (mov r8, r8)
  14814. }
  14815. /* USARTDIV must be greater than or equal to 0d16 */
  14816. if (pclk != 0U)
  14817. 80054bc: 697b ldr r3, [r7, #20]
  14818. 80054be: 2b00 cmp r3, #0
  14819. 80054c0: d100 bne.n 80054c4 <UART_SetConfig+0x16c>
  14820. 80054c2: e08d b.n 80055e0 <UART_SetConfig+0x288>
  14821. {
  14822. usartdiv = (uint32_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler));
  14823. 80054c4: 687b ldr r3, [r7, #4]
  14824. 80054c6: 6a5a ldr r2, [r3, #36] @ 0x24
  14825. 80054c8: 4b57 ldr r3, [pc, #348] @ (8005628 <UART_SetConfig+0x2d0>)
  14826. 80054ca: 0052 lsls r2, r2, #1
  14827. 80054cc: 5ad3 ldrh r3, [r2, r3]
  14828. 80054ce: 0019 movs r1, r3
  14829. 80054d0: 6978 ldr r0, [r7, #20]
  14830. 80054d2: f7fa fe15 bl 8000100 <__udivsi3>
  14831. 80054d6: 0003 movs r3, r0
  14832. 80054d8: 005a lsls r2, r3, #1
  14833. 80054da: 687b ldr r3, [r7, #4]
  14834. 80054dc: 685b ldr r3, [r3, #4]
  14835. 80054de: 085b lsrs r3, r3, #1
  14836. 80054e0: 18d2 adds r2, r2, r3
  14837. 80054e2: 687b ldr r3, [r7, #4]
  14838. 80054e4: 685b ldr r3, [r3, #4]
  14839. 80054e6: 0019 movs r1, r3
  14840. 80054e8: 0010 movs r0, r2
  14841. 80054ea: f7fa fe09 bl 8000100 <__udivsi3>
  14842. 80054ee: 0003 movs r3, r0
  14843. 80054f0: 613b str r3, [r7, #16]
  14844. if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
  14845. 80054f2: 693b ldr r3, [r7, #16]
  14846. 80054f4: 2b0f cmp r3, #15
  14847. 80054f6: d91c bls.n 8005532 <UART_SetConfig+0x1da>
  14848. 80054f8: 693a ldr r2, [r7, #16]
  14849. 80054fa: 2380 movs r3, #128 @ 0x80
  14850. 80054fc: 025b lsls r3, r3, #9
  14851. 80054fe: 429a cmp r2, r3
  14852. 8005500: d217 bcs.n 8005532 <UART_SetConfig+0x1da>
  14853. {
  14854. brrtemp = (uint16_t)(usartdiv & 0xFFF0U);
  14855. 8005502: 693b ldr r3, [r7, #16]
  14856. 8005504: b29a uxth r2, r3
  14857. 8005506: 200e movs r0, #14
  14858. 8005508: 183b adds r3, r7, r0
  14859. 800550a: 210f movs r1, #15
  14860. 800550c: 438a bics r2, r1
  14861. 800550e: 801a strh r2, [r3, #0]
  14862. brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U);
  14863. 8005510: 693b ldr r3, [r7, #16]
  14864. 8005512: 085b lsrs r3, r3, #1
  14865. 8005514: b29b uxth r3, r3
  14866. 8005516: 2207 movs r2, #7
  14867. 8005518: 4013 ands r3, r2
  14868. 800551a: b299 uxth r1, r3
  14869. 800551c: 183b adds r3, r7, r0
  14870. 800551e: 183a adds r2, r7, r0
  14871. 8005520: 8812 ldrh r2, [r2, #0]
  14872. 8005522: 430a orrs r2, r1
  14873. 8005524: 801a strh r2, [r3, #0]
  14874. huart->Instance->BRR = brrtemp;
  14875. 8005526: 687b ldr r3, [r7, #4]
  14876. 8005528: 681b ldr r3, [r3, #0]
  14877. 800552a: 183a adds r2, r7, r0
  14878. 800552c: 8812 ldrh r2, [r2, #0]
  14879. 800552e: 60da str r2, [r3, #12]
  14880. 8005530: e056 b.n 80055e0 <UART_SetConfig+0x288>
  14881. }
  14882. else
  14883. {
  14884. ret = HAL_ERROR;
  14885. 8005532: 231a movs r3, #26
  14886. 8005534: 18fb adds r3, r7, r3
  14887. 8005536: 2201 movs r2, #1
  14888. 8005538: 701a strb r2, [r3, #0]
  14889. 800553a: e051 b.n 80055e0 <UART_SetConfig+0x288>
  14890. }
  14891. }
  14892. }
  14893. else
  14894. {
  14895. switch (clocksource)
  14896. 800553c: 231b movs r3, #27
  14897. 800553e: 18fb adds r3, r7, r3
  14898. 8005540: 781b ldrb r3, [r3, #0]
  14899. 8005542: 2b08 cmp r3, #8
  14900. 8005544: d015 beq.n 8005572 <UART_SetConfig+0x21a>
  14901. 8005546: dc18 bgt.n 800557a <UART_SetConfig+0x222>
  14902. 8005548: 2b04 cmp r3, #4
  14903. 800554a: d00d beq.n 8005568 <UART_SetConfig+0x210>
  14904. 800554c: dc15 bgt.n 800557a <UART_SetConfig+0x222>
  14905. 800554e: 2b00 cmp r3, #0
  14906. 8005550: d002 beq.n 8005558 <UART_SetConfig+0x200>
  14907. 8005552: 2b02 cmp r3, #2
  14908. 8005554: d005 beq.n 8005562 <UART_SetConfig+0x20a>
  14909. 8005556: e010 b.n 800557a <UART_SetConfig+0x222>
  14910. {
  14911. case UART_CLOCKSOURCE_PCLK1:
  14912. pclk = HAL_RCC_GetPCLK1Freq();
  14913. 8005558: f7fe feb2 bl 80042c0 <HAL_RCC_GetPCLK1Freq>
  14914. 800555c: 0003 movs r3, r0
  14915. 800555e: 617b str r3, [r7, #20]
  14916. break;
  14917. 8005560: e012 b.n 8005588 <UART_SetConfig+0x230>
  14918. case UART_CLOCKSOURCE_HSI:
  14919. pclk = (uint32_t) HSI_VALUE;
  14920. 8005562: 4b30 ldr r3, [pc, #192] @ (8005624 <UART_SetConfig+0x2cc>)
  14921. 8005564: 617b str r3, [r7, #20]
  14922. break;
  14923. 8005566: e00f b.n 8005588 <UART_SetConfig+0x230>
  14924. case UART_CLOCKSOURCE_SYSCLK:
  14925. pclk = HAL_RCC_GetSysClockFreq();
  14926. 8005568: f7fe fe1e bl 80041a8 <HAL_RCC_GetSysClockFreq>
  14927. 800556c: 0003 movs r3, r0
  14928. 800556e: 617b str r3, [r7, #20]
  14929. break;
  14930. 8005570: e00a b.n 8005588 <UART_SetConfig+0x230>
  14931. case UART_CLOCKSOURCE_LSE:
  14932. pclk = (uint32_t) LSE_VALUE;
  14933. 8005572: 2380 movs r3, #128 @ 0x80
  14934. 8005574: 021b lsls r3, r3, #8
  14935. 8005576: 617b str r3, [r7, #20]
  14936. break;
  14937. 8005578: e006 b.n 8005588 <UART_SetConfig+0x230>
  14938. default:
  14939. pclk = 0U;
  14940. 800557a: 2300 movs r3, #0
  14941. 800557c: 617b str r3, [r7, #20]
  14942. ret = HAL_ERROR;
  14943. 800557e: 231a movs r3, #26
  14944. 8005580: 18fb adds r3, r7, r3
  14945. 8005582: 2201 movs r2, #1
  14946. 8005584: 701a strb r2, [r3, #0]
  14947. break;
  14948. 8005586: 46c0 nop @ (mov r8, r8)
  14949. }
  14950. if (pclk != 0U)
  14951. 8005588: 697b ldr r3, [r7, #20]
  14952. 800558a: 2b00 cmp r3, #0
  14953. 800558c: d028 beq.n 80055e0 <UART_SetConfig+0x288>
  14954. {
  14955. /* USARTDIV must be greater than or equal to 0d16 */
  14956. usartdiv = (uint32_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler));
  14957. 800558e: 687b ldr r3, [r7, #4]
  14958. 8005590: 6a5a ldr r2, [r3, #36] @ 0x24
  14959. 8005592: 4b25 ldr r3, [pc, #148] @ (8005628 <UART_SetConfig+0x2d0>)
  14960. 8005594: 0052 lsls r2, r2, #1
  14961. 8005596: 5ad3 ldrh r3, [r2, r3]
  14962. 8005598: 0019 movs r1, r3
  14963. 800559a: 6978 ldr r0, [r7, #20]
  14964. 800559c: f7fa fdb0 bl 8000100 <__udivsi3>
  14965. 80055a0: 0003 movs r3, r0
  14966. 80055a2: 001a movs r2, r3
  14967. 80055a4: 687b ldr r3, [r7, #4]
  14968. 80055a6: 685b ldr r3, [r3, #4]
  14969. 80055a8: 085b lsrs r3, r3, #1
  14970. 80055aa: 18d2 adds r2, r2, r3
  14971. 80055ac: 687b ldr r3, [r7, #4]
  14972. 80055ae: 685b ldr r3, [r3, #4]
  14973. 80055b0: 0019 movs r1, r3
  14974. 80055b2: 0010 movs r0, r2
  14975. 80055b4: f7fa fda4 bl 8000100 <__udivsi3>
  14976. 80055b8: 0003 movs r3, r0
  14977. 80055ba: 613b str r3, [r7, #16]
  14978. if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX))
  14979. 80055bc: 693b ldr r3, [r7, #16]
  14980. 80055be: 2b0f cmp r3, #15
  14981. 80055c0: d90a bls.n 80055d8 <UART_SetConfig+0x280>
  14982. 80055c2: 693a ldr r2, [r7, #16]
  14983. 80055c4: 2380 movs r3, #128 @ 0x80
  14984. 80055c6: 025b lsls r3, r3, #9
  14985. 80055c8: 429a cmp r2, r3
  14986. 80055ca: d205 bcs.n 80055d8 <UART_SetConfig+0x280>
  14987. {
  14988. huart->Instance->BRR = (uint16_t)usartdiv;
  14989. 80055cc: 693b ldr r3, [r7, #16]
  14990. 80055ce: b29a uxth r2, r3
  14991. 80055d0: 687b ldr r3, [r7, #4]
  14992. 80055d2: 681b ldr r3, [r3, #0]
  14993. 80055d4: 60da str r2, [r3, #12]
  14994. 80055d6: e003 b.n 80055e0 <UART_SetConfig+0x288>
  14995. }
  14996. else
  14997. {
  14998. ret = HAL_ERROR;
  14999. 80055d8: 231a movs r3, #26
  15000. 80055da: 18fb adds r3, r7, r3
  15001. 80055dc: 2201 movs r2, #1
  15002. 80055de: 701a strb r2, [r3, #0]
  15003. }
  15004. }
  15005. }
  15006. /* Initialize the number of data to process during RX/TX ISR execution */
  15007. huart->NbTxDataToProcess = 1;
  15008. 80055e0: 687b ldr r3, [r7, #4]
  15009. 80055e2: 226a movs r2, #106 @ 0x6a
  15010. 80055e4: 2101 movs r1, #1
  15011. 80055e6: 5299 strh r1, [r3, r2]
  15012. huart->NbRxDataToProcess = 1;
  15013. 80055e8: 687b ldr r3, [r7, #4]
  15014. 80055ea: 2268 movs r2, #104 @ 0x68
  15015. 80055ec: 2101 movs r1, #1
  15016. 80055ee: 5299 strh r1, [r3, r2]
  15017. /* Clear ISR function pointers */
  15018. huart->RxISR = NULL;
  15019. 80055f0: 687b ldr r3, [r7, #4]
  15020. 80055f2: 2200 movs r2, #0
  15021. 80055f4: 675a str r2, [r3, #116] @ 0x74
  15022. huart->TxISR = NULL;
  15023. 80055f6: 687b ldr r3, [r7, #4]
  15024. 80055f8: 2200 movs r2, #0
  15025. 80055fa: 679a str r2, [r3, #120] @ 0x78
  15026. return ret;
  15027. 80055fc: 231a movs r3, #26
  15028. 80055fe: 18fb adds r3, r7, r3
  15029. 8005600: 781b ldrb r3, [r3, #0]
  15030. }
  15031. 8005602: 0018 movs r0, r3
  15032. 8005604: 46bd mov sp, r7
  15033. 8005606: b008 add sp, #32
  15034. 8005608: bd80 pop {r7, pc}
  15035. 800560a: 46c0 nop @ (mov r8, r8)
  15036. 800560c: cfff69f3 .word 0xcfff69f3
  15037. 8005610: ffffcfff .word 0xffffcfff
  15038. 8005614: 11fff4ff .word 0x11fff4ff
  15039. 8005618: 40013800 .word 0x40013800
  15040. 800561c: 40021000 .word 0x40021000
  15041. 8005620: 40004400 .word 0x40004400
  15042. 8005624: 00f42400 .word 0x00f42400
  15043. 8005628: 08006128 .word 0x08006128
  15044. 0800562c <UART_AdvFeatureConfig>:
  15045. * @brief Configure the UART peripheral advanced features.
  15046. * @param huart UART handle.
  15047. * @retval None
  15048. */
  15049. void UART_AdvFeatureConfig(UART_HandleTypeDef *huart)
  15050. {
  15051. 800562c: b580 push {r7, lr}
  15052. 800562e: b082 sub sp, #8
  15053. 8005630: af00 add r7, sp, #0
  15054. 8005632: 6078 str r0, [r7, #4]
  15055. /* Check whether the set of advanced features to configure is properly set */
  15056. assert_param(IS_UART_ADVFEATURE_INIT(huart->AdvancedInit.AdvFeatureInit));
  15057. /* if required, configure RX/TX pins swap */
  15058. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_SWAP_INIT))
  15059. 8005634: 687b ldr r3, [r7, #4]
  15060. 8005636: 6a9b ldr r3, [r3, #40] @ 0x28
  15061. 8005638: 2208 movs r2, #8
  15062. 800563a: 4013 ands r3, r2
  15063. 800563c: d00b beq.n 8005656 <UART_AdvFeatureConfig+0x2a>
  15064. {
  15065. assert_param(IS_UART_ADVFEATURE_SWAP(huart->AdvancedInit.Swap));
  15066. MODIFY_REG(huart->Instance->CR2, USART_CR2_SWAP, huart->AdvancedInit.Swap);
  15067. 800563e: 687b ldr r3, [r7, #4]
  15068. 8005640: 681b ldr r3, [r3, #0]
  15069. 8005642: 685b ldr r3, [r3, #4]
  15070. 8005644: 4a4a ldr r2, [pc, #296] @ (8005770 <UART_AdvFeatureConfig+0x144>)
  15071. 8005646: 4013 ands r3, r2
  15072. 8005648: 0019 movs r1, r3
  15073. 800564a: 687b ldr r3, [r7, #4]
  15074. 800564c: 6b9a ldr r2, [r3, #56] @ 0x38
  15075. 800564e: 687b ldr r3, [r7, #4]
  15076. 8005650: 681b ldr r3, [r3, #0]
  15077. 8005652: 430a orrs r2, r1
  15078. 8005654: 605a str r2, [r3, #4]
  15079. }
  15080. /* if required, configure TX pin active level inversion */
  15081. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_TXINVERT_INIT))
  15082. 8005656: 687b ldr r3, [r7, #4]
  15083. 8005658: 6a9b ldr r3, [r3, #40] @ 0x28
  15084. 800565a: 2201 movs r2, #1
  15085. 800565c: 4013 ands r3, r2
  15086. 800565e: d00b beq.n 8005678 <UART_AdvFeatureConfig+0x4c>
  15087. {
  15088. assert_param(IS_UART_ADVFEATURE_TXINV(huart->AdvancedInit.TxPinLevelInvert));
  15089. MODIFY_REG(huart->Instance->CR2, USART_CR2_TXINV, huart->AdvancedInit.TxPinLevelInvert);
  15090. 8005660: 687b ldr r3, [r7, #4]
  15091. 8005662: 681b ldr r3, [r3, #0]
  15092. 8005664: 685b ldr r3, [r3, #4]
  15093. 8005666: 4a43 ldr r2, [pc, #268] @ (8005774 <UART_AdvFeatureConfig+0x148>)
  15094. 8005668: 4013 ands r3, r2
  15095. 800566a: 0019 movs r1, r3
  15096. 800566c: 687b ldr r3, [r7, #4]
  15097. 800566e: 6ada ldr r2, [r3, #44] @ 0x2c
  15098. 8005670: 687b ldr r3, [r7, #4]
  15099. 8005672: 681b ldr r3, [r3, #0]
  15100. 8005674: 430a orrs r2, r1
  15101. 8005676: 605a str r2, [r3, #4]
  15102. }
  15103. /* if required, configure RX pin active level inversion */
  15104. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXINVERT_INIT))
  15105. 8005678: 687b ldr r3, [r7, #4]
  15106. 800567a: 6a9b ldr r3, [r3, #40] @ 0x28
  15107. 800567c: 2202 movs r2, #2
  15108. 800567e: 4013 ands r3, r2
  15109. 8005680: d00b beq.n 800569a <UART_AdvFeatureConfig+0x6e>
  15110. {
  15111. assert_param(IS_UART_ADVFEATURE_RXINV(huart->AdvancedInit.RxPinLevelInvert));
  15112. MODIFY_REG(huart->Instance->CR2, USART_CR2_RXINV, huart->AdvancedInit.RxPinLevelInvert);
  15113. 8005682: 687b ldr r3, [r7, #4]
  15114. 8005684: 681b ldr r3, [r3, #0]
  15115. 8005686: 685b ldr r3, [r3, #4]
  15116. 8005688: 4a3b ldr r2, [pc, #236] @ (8005778 <UART_AdvFeatureConfig+0x14c>)
  15117. 800568a: 4013 ands r3, r2
  15118. 800568c: 0019 movs r1, r3
  15119. 800568e: 687b ldr r3, [r7, #4]
  15120. 8005690: 6b1a ldr r2, [r3, #48] @ 0x30
  15121. 8005692: 687b ldr r3, [r7, #4]
  15122. 8005694: 681b ldr r3, [r3, #0]
  15123. 8005696: 430a orrs r2, r1
  15124. 8005698: 605a str r2, [r3, #4]
  15125. }
  15126. /* if required, configure data inversion */
  15127. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DATAINVERT_INIT))
  15128. 800569a: 687b ldr r3, [r7, #4]
  15129. 800569c: 6a9b ldr r3, [r3, #40] @ 0x28
  15130. 800569e: 2204 movs r2, #4
  15131. 80056a0: 4013 ands r3, r2
  15132. 80056a2: d00b beq.n 80056bc <UART_AdvFeatureConfig+0x90>
  15133. {
  15134. assert_param(IS_UART_ADVFEATURE_DATAINV(huart->AdvancedInit.DataInvert));
  15135. MODIFY_REG(huart->Instance->CR2, USART_CR2_DATAINV, huart->AdvancedInit.DataInvert);
  15136. 80056a4: 687b ldr r3, [r7, #4]
  15137. 80056a6: 681b ldr r3, [r3, #0]
  15138. 80056a8: 685b ldr r3, [r3, #4]
  15139. 80056aa: 4a34 ldr r2, [pc, #208] @ (800577c <UART_AdvFeatureConfig+0x150>)
  15140. 80056ac: 4013 ands r3, r2
  15141. 80056ae: 0019 movs r1, r3
  15142. 80056b0: 687b ldr r3, [r7, #4]
  15143. 80056b2: 6b5a ldr r2, [r3, #52] @ 0x34
  15144. 80056b4: 687b ldr r3, [r7, #4]
  15145. 80056b6: 681b ldr r3, [r3, #0]
  15146. 80056b8: 430a orrs r2, r1
  15147. 80056ba: 605a str r2, [r3, #4]
  15148. }
  15149. /* if required, configure RX overrun detection disabling */
  15150. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT))
  15151. 80056bc: 687b ldr r3, [r7, #4]
  15152. 80056be: 6a9b ldr r3, [r3, #40] @ 0x28
  15153. 80056c0: 2210 movs r2, #16
  15154. 80056c2: 4013 ands r3, r2
  15155. 80056c4: d00b beq.n 80056de <UART_AdvFeatureConfig+0xb2>
  15156. {
  15157. assert_param(IS_UART_OVERRUN(huart->AdvancedInit.OverrunDisable));
  15158. MODIFY_REG(huart->Instance->CR3, USART_CR3_OVRDIS, huart->AdvancedInit.OverrunDisable);
  15159. 80056c6: 687b ldr r3, [r7, #4]
  15160. 80056c8: 681b ldr r3, [r3, #0]
  15161. 80056ca: 689b ldr r3, [r3, #8]
  15162. 80056cc: 4a2c ldr r2, [pc, #176] @ (8005780 <UART_AdvFeatureConfig+0x154>)
  15163. 80056ce: 4013 ands r3, r2
  15164. 80056d0: 0019 movs r1, r3
  15165. 80056d2: 687b ldr r3, [r7, #4]
  15166. 80056d4: 6bda ldr r2, [r3, #60] @ 0x3c
  15167. 80056d6: 687b ldr r3, [r7, #4]
  15168. 80056d8: 681b ldr r3, [r3, #0]
  15169. 80056da: 430a orrs r2, r1
  15170. 80056dc: 609a str r2, [r3, #8]
  15171. }
  15172. /* if required, configure DMA disabling on reception error */
  15173. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DMADISABLEONERROR_INIT))
  15174. 80056de: 687b ldr r3, [r7, #4]
  15175. 80056e0: 6a9b ldr r3, [r3, #40] @ 0x28
  15176. 80056e2: 2220 movs r2, #32
  15177. 80056e4: 4013 ands r3, r2
  15178. 80056e6: d00b beq.n 8005700 <UART_AdvFeatureConfig+0xd4>
  15179. {
  15180. assert_param(IS_UART_ADVFEATURE_DMAONRXERROR(huart->AdvancedInit.DMADisableonRxError));
  15181. MODIFY_REG(huart->Instance->CR3, USART_CR3_DDRE, huart->AdvancedInit.DMADisableonRxError);
  15182. 80056e8: 687b ldr r3, [r7, #4]
  15183. 80056ea: 681b ldr r3, [r3, #0]
  15184. 80056ec: 689b ldr r3, [r3, #8]
  15185. 80056ee: 4a25 ldr r2, [pc, #148] @ (8005784 <UART_AdvFeatureConfig+0x158>)
  15186. 80056f0: 4013 ands r3, r2
  15187. 80056f2: 0019 movs r1, r3
  15188. 80056f4: 687b ldr r3, [r7, #4]
  15189. 80056f6: 6c1a ldr r2, [r3, #64] @ 0x40
  15190. 80056f8: 687b ldr r3, [r7, #4]
  15191. 80056fa: 681b ldr r3, [r3, #0]
  15192. 80056fc: 430a orrs r2, r1
  15193. 80056fe: 609a str r2, [r3, #8]
  15194. }
  15195. /* if required, configure auto Baud rate detection scheme */
  15196. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_AUTOBAUDRATE_INIT))
  15197. 8005700: 687b ldr r3, [r7, #4]
  15198. 8005702: 6a9b ldr r3, [r3, #40] @ 0x28
  15199. 8005704: 2240 movs r2, #64 @ 0x40
  15200. 8005706: 4013 ands r3, r2
  15201. 8005708: d01d beq.n 8005746 <UART_AdvFeatureConfig+0x11a>
  15202. {
  15203. assert_param(IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(huart->Instance));
  15204. assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATE(huart->AdvancedInit.AutoBaudRateEnable));
  15205. MODIFY_REG(huart->Instance->CR2, USART_CR2_ABREN, huart->AdvancedInit.AutoBaudRateEnable);
  15206. 800570a: 687b ldr r3, [r7, #4]
  15207. 800570c: 681b ldr r3, [r3, #0]
  15208. 800570e: 685b ldr r3, [r3, #4]
  15209. 8005710: 4a1d ldr r2, [pc, #116] @ (8005788 <UART_AdvFeatureConfig+0x15c>)
  15210. 8005712: 4013 ands r3, r2
  15211. 8005714: 0019 movs r1, r3
  15212. 8005716: 687b ldr r3, [r7, #4]
  15213. 8005718: 6c5a ldr r2, [r3, #68] @ 0x44
  15214. 800571a: 687b ldr r3, [r7, #4]
  15215. 800571c: 681b ldr r3, [r3, #0]
  15216. 800571e: 430a orrs r2, r1
  15217. 8005720: 605a str r2, [r3, #4]
  15218. /* set auto Baudrate detection parameters if detection is enabled */
  15219. if (huart->AdvancedInit.AutoBaudRateEnable == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE)
  15220. 8005722: 687b ldr r3, [r7, #4]
  15221. 8005724: 6c5a ldr r2, [r3, #68] @ 0x44
  15222. 8005726: 2380 movs r3, #128 @ 0x80
  15223. 8005728: 035b lsls r3, r3, #13
  15224. 800572a: 429a cmp r2, r3
  15225. 800572c: d10b bne.n 8005746 <UART_AdvFeatureConfig+0x11a>
  15226. {
  15227. assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(huart->AdvancedInit.AutoBaudRateMode));
  15228. MODIFY_REG(huart->Instance->CR2, USART_CR2_ABRMODE, huart->AdvancedInit.AutoBaudRateMode);
  15229. 800572e: 687b ldr r3, [r7, #4]
  15230. 8005730: 681b ldr r3, [r3, #0]
  15231. 8005732: 685b ldr r3, [r3, #4]
  15232. 8005734: 4a15 ldr r2, [pc, #84] @ (800578c <UART_AdvFeatureConfig+0x160>)
  15233. 8005736: 4013 ands r3, r2
  15234. 8005738: 0019 movs r1, r3
  15235. 800573a: 687b ldr r3, [r7, #4]
  15236. 800573c: 6c9a ldr r2, [r3, #72] @ 0x48
  15237. 800573e: 687b ldr r3, [r7, #4]
  15238. 8005740: 681b ldr r3, [r3, #0]
  15239. 8005742: 430a orrs r2, r1
  15240. 8005744: 605a str r2, [r3, #4]
  15241. }
  15242. }
  15243. /* if required, configure MSB first on communication line */
  15244. if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_MSBFIRST_INIT))
  15245. 8005746: 687b ldr r3, [r7, #4]
  15246. 8005748: 6a9b ldr r3, [r3, #40] @ 0x28
  15247. 800574a: 2280 movs r2, #128 @ 0x80
  15248. 800574c: 4013 ands r3, r2
  15249. 800574e: d00b beq.n 8005768 <UART_AdvFeatureConfig+0x13c>
  15250. {
  15251. assert_param(IS_UART_ADVFEATURE_MSBFIRST(huart->AdvancedInit.MSBFirst));
  15252. MODIFY_REG(huart->Instance->CR2, USART_CR2_MSBFIRST, huart->AdvancedInit.MSBFirst);
  15253. 8005750: 687b ldr r3, [r7, #4]
  15254. 8005752: 681b ldr r3, [r3, #0]
  15255. 8005754: 685b ldr r3, [r3, #4]
  15256. 8005756: 4a0e ldr r2, [pc, #56] @ (8005790 <UART_AdvFeatureConfig+0x164>)
  15257. 8005758: 4013 ands r3, r2
  15258. 800575a: 0019 movs r1, r3
  15259. 800575c: 687b ldr r3, [r7, #4]
  15260. 800575e: 6cda ldr r2, [r3, #76] @ 0x4c
  15261. 8005760: 687b ldr r3, [r7, #4]
  15262. 8005762: 681b ldr r3, [r3, #0]
  15263. 8005764: 430a orrs r2, r1
  15264. 8005766: 605a str r2, [r3, #4]
  15265. }
  15266. }
  15267. 8005768: 46c0 nop @ (mov r8, r8)
  15268. 800576a: 46bd mov sp, r7
  15269. 800576c: b002 add sp, #8
  15270. 800576e: bd80 pop {r7, pc}
  15271. 8005770: ffff7fff .word 0xffff7fff
  15272. 8005774: fffdffff .word 0xfffdffff
  15273. 8005778: fffeffff .word 0xfffeffff
  15274. 800577c: fffbffff .word 0xfffbffff
  15275. 8005780: ffffefff .word 0xffffefff
  15276. 8005784: ffffdfff .word 0xffffdfff
  15277. 8005788: ffefffff .word 0xffefffff
  15278. 800578c: ff9fffff .word 0xff9fffff
  15279. 8005790: fff7ffff .word 0xfff7ffff
  15280. 08005794 <UART_CheckIdleState>:
  15281. * @brief Check the UART Idle State.
  15282. * @param huart UART handle.
  15283. * @retval HAL status
  15284. */
  15285. HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart)
  15286. {
  15287. 8005794: b580 push {r7, lr}
  15288. 8005796: b092 sub sp, #72 @ 0x48
  15289. 8005798: af02 add r7, sp, #8
  15290. 800579a: 6078 str r0, [r7, #4]
  15291. uint32_t tickstart;
  15292. /* Initialize the UART ErrorCode */
  15293. huart->ErrorCode = HAL_UART_ERROR_NONE;
  15294. 800579c: 687b ldr r3, [r7, #4]
  15295. 800579e: 2290 movs r2, #144 @ 0x90
  15296. 80057a0: 2100 movs r1, #0
  15297. 80057a2: 5099 str r1, [r3, r2]
  15298. /* Init tickstart for timeout management */
  15299. tickstart = HAL_GetTick();
  15300. 80057a4: f7fc f860 bl 8001868 <HAL_GetTick>
  15301. 80057a8: 0003 movs r3, r0
  15302. 80057aa: 63fb str r3, [r7, #60] @ 0x3c
  15303. /* Check if the Transmitter is enabled */
  15304. if ((huart->Instance->CR1 & USART_CR1_TE) == USART_CR1_TE)
  15305. 80057ac: 687b ldr r3, [r7, #4]
  15306. 80057ae: 681b ldr r3, [r3, #0]
  15307. 80057b0: 681b ldr r3, [r3, #0]
  15308. 80057b2: 2208 movs r2, #8
  15309. 80057b4: 4013 ands r3, r2
  15310. 80057b6: 2b08 cmp r3, #8
  15311. 80057b8: d12d bne.n 8005816 <UART_CheckIdleState+0x82>
  15312. {
  15313. /* Wait until TEACK flag is set */
  15314. if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_TEACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK)
  15315. 80057ba: 6bfb ldr r3, [r7, #60] @ 0x3c
  15316. 80057bc: 2280 movs r2, #128 @ 0x80
  15317. 80057be: 0391 lsls r1, r2, #14
  15318. 80057c0: 6878 ldr r0, [r7, #4]
  15319. 80057c2: 4a47 ldr r2, [pc, #284] @ (80058e0 <UART_CheckIdleState+0x14c>)
  15320. 80057c4: 9200 str r2, [sp, #0]
  15321. 80057c6: 2200 movs r2, #0
  15322. 80057c8: f000 f88e bl 80058e8 <UART_WaitOnFlagUntilTimeout>
  15323. 80057cc: 1e03 subs r3, r0, #0
  15324. 80057ce: d022 beq.n 8005816 <UART_CheckIdleState+0x82>
  15325. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15326. 80057d0: f3ef 8310 mrs r3, PRIMASK
  15327. 80057d4: 627b str r3, [r7, #36] @ 0x24
  15328. return(result);
  15329. 80057d6: 6a7b ldr r3, [r7, #36] @ 0x24
  15330. {
  15331. /* Disable TXE interrupt for the interrupt process */
  15332. ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE_TXFNFIE));
  15333. 80057d8: 63bb str r3, [r7, #56] @ 0x38
  15334. 80057da: 2301 movs r3, #1
  15335. 80057dc: 62bb str r3, [r7, #40] @ 0x28
  15336. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15337. 80057de: 6abb ldr r3, [r7, #40] @ 0x28
  15338. 80057e0: f383 8810 msr PRIMASK, r3
  15339. }
  15340. 80057e4: 46c0 nop @ (mov r8, r8)
  15341. 80057e6: 687b ldr r3, [r7, #4]
  15342. 80057e8: 681b ldr r3, [r3, #0]
  15343. 80057ea: 681a ldr r2, [r3, #0]
  15344. 80057ec: 687b ldr r3, [r7, #4]
  15345. 80057ee: 681b ldr r3, [r3, #0]
  15346. 80057f0: 2180 movs r1, #128 @ 0x80
  15347. 80057f2: 438a bics r2, r1
  15348. 80057f4: 601a str r2, [r3, #0]
  15349. 80057f6: 6bbb ldr r3, [r7, #56] @ 0x38
  15350. 80057f8: 62fb str r3, [r7, #44] @ 0x2c
  15351. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15352. 80057fa: 6afb ldr r3, [r7, #44] @ 0x2c
  15353. 80057fc: f383 8810 msr PRIMASK, r3
  15354. }
  15355. 8005800: 46c0 nop @ (mov r8, r8)
  15356. huart->gState = HAL_UART_STATE_READY;
  15357. 8005802: 687b ldr r3, [r7, #4]
  15358. 8005804: 2288 movs r2, #136 @ 0x88
  15359. 8005806: 2120 movs r1, #32
  15360. 8005808: 5099 str r1, [r3, r2]
  15361. __HAL_UNLOCK(huart);
  15362. 800580a: 687b ldr r3, [r7, #4]
  15363. 800580c: 2284 movs r2, #132 @ 0x84
  15364. 800580e: 2100 movs r1, #0
  15365. 8005810: 5499 strb r1, [r3, r2]
  15366. /* Timeout occurred */
  15367. return HAL_TIMEOUT;
  15368. 8005812: 2303 movs r3, #3
  15369. 8005814: e060 b.n 80058d8 <UART_CheckIdleState+0x144>
  15370. }
  15371. }
  15372. /* Check if the Receiver is enabled */
  15373. if ((huart->Instance->CR1 & USART_CR1_RE) == USART_CR1_RE)
  15374. 8005816: 687b ldr r3, [r7, #4]
  15375. 8005818: 681b ldr r3, [r3, #0]
  15376. 800581a: 681b ldr r3, [r3, #0]
  15377. 800581c: 2204 movs r2, #4
  15378. 800581e: 4013 ands r3, r2
  15379. 8005820: 2b04 cmp r3, #4
  15380. 8005822: d146 bne.n 80058b2 <UART_CheckIdleState+0x11e>
  15381. {
  15382. /* Wait until REACK flag is set */
  15383. if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_REACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK)
  15384. 8005824: 6bfb ldr r3, [r7, #60] @ 0x3c
  15385. 8005826: 2280 movs r2, #128 @ 0x80
  15386. 8005828: 03d1 lsls r1, r2, #15
  15387. 800582a: 6878 ldr r0, [r7, #4]
  15388. 800582c: 4a2c ldr r2, [pc, #176] @ (80058e0 <UART_CheckIdleState+0x14c>)
  15389. 800582e: 9200 str r2, [sp, #0]
  15390. 8005830: 2200 movs r2, #0
  15391. 8005832: f000 f859 bl 80058e8 <UART_WaitOnFlagUntilTimeout>
  15392. 8005836: 1e03 subs r3, r0, #0
  15393. 8005838: d03b beq.n 80058b2 <UART_CheckIdleState+0x11e>
  15394. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15395. 800583a: f3ef 8310 mrs r3, PRIMASK
  15396. 800583e: 60fb str r3, [r7, #12]
  15397. return(result);
  15398. 8005840: 68fb ldr r3, [r7, #12]
  15399. {
  15400. /* Disable RXNE, PE and ERR (Frame error, noise error, overrun error)
  15401. interrupts for the interrupt process */
  15402. ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE));
  15403. 8005842: 637b str r3, [r7, #52] @ 0x34
  15404. 8005844: 2301 movs r3, #1
  15405. 8005846: 613b str r3, [r7, #16]
  15406. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15407. 8005848: 693b ldr r3, [r7, #16]
  15408. 800584a: f383 8810 msr PRIMASK, r3
  15409. }
  15410. 800584e: 46c0 nop @ (mov r8, r8)
  15411. 8005850: 687b ldr r3, [r7, #4]
  15412. 8005852: 681b ldr r3, [r3, #0]
  15413. 8005854: 681a ldr r2, [r3, #0]
  15414. 8005856: 687b ldr r3, [r7, #4]
  15415. 8005858: 681b ldr r3, [r3, #0]
  15416. 800585a: 4922 ldr r1, [pc, #136] @ (80058e4 <UART_CheckIdleState+0x150>)
  15417. 800585c: 400a ands r2, r1
  15418. 800585e: 601a str r2, [r3, #0]
  15419. 8005860: 6b7b ldr r3, [r7, #52] @ 0x34
  15420. 8005862: 617b str r3, [r7, #20]
  15421. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15422. 8005864: 697b ldr r3, [r7, #20]
  15423. 8005866: f383 8810 msr PRIMASK, r3
  15424. }
  15425. 800586a: 46c0 nop @ (mov r8, r8)
  15426. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15427. 800586c: f3ef 8310 mrs r3, PRIMASK
  15428. 8005870: 61bb str r3, [r7, #24]
  15429. return(result);
  15430. 8005872: 69bb ldr r3, [r7, #24]
  15431. ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
  15432. 8005874: 633b str r3, [r7, #48] @ 0x30
  15433. 8005876: 2301 movs r3, #1
  15434. 8005878: 61fb str r3, [r7, #28]
  15435. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15436. 800587a: 69fb ldr r3, [r7, #28]
  15437. 800587c: f383 8810 msr PRIMASK, r3
  15438. }
  15439. 8005880: 46c0 nop @ (mov r8, r8)
  15440. 8005882: 687b ldr r3, [r7, #4]
  15441. 8005884: 681b ldr r3, [r3, #0]
  15442. 8005886: 689a ldr r2, [r3, #8]
  15443. 8005888: 687b ldr r3, [r7, #4]
  15444. 800588a: 681b ldr r3, [r3, #0]
  15445. 800588c: 2101 movs r1, #1
  15446. 800588e: 438a bics r2, r1
  15447. 8005890: 609a str r2, [r3, #8]
  15448. 8005892: 6b3b ldr r3, [r7, #48] @ 0x30
  15449. 8005894: 623b str r3, [r7, #32]
  15450. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15451. 8005896: 6a3b ldr r3, [r7, #32]
  15452. 8005898: f383 8810 msr PRIMASK, r3
  15453. }
  15454. 800589c: 46c0 nop @ (mov r8, r8)
  15455. huart->RxState = HAL_UART_STATE_READY;
  15456. 800589e: 687b ldr r3, [r7, #4]
  15457. 80058a0: 228c movs r2, #140 @ 0x8c
  15458. 80058a2: 2120 movs r1, #32
  15459. 80058a4: 5099 str r1, [r3, r2]
  15460. __HAL_UNLOCK(huart);
  15461. 80058a6: 687b ldr r3, [r7, #4]
  15462. 80058a8: 2284 movs r2, #132 @ 0x84
  15463. 80058aa: 2100 movs r1, #0
  15464. 80058ac: 5499 strb r1, [r3, r2]
  15465. /* Timeout occurred */
  15466. return HAL_TIMEOUT;
  15467. 80058ae: 2303 movs r3, #3
  15468. 80058b0: e012 b.n 80058d8 <UART_CheckIdleState+0x144>
  15469. }
  15470. }
  15471. /* Initialize the UART State */
  15472. huart->gState = HAL_UART_STATE_READY;
  15473. 80058b2: 687b ldr r3, [r7, #4]
  15474. 80058b4: 2288 movs r2, #136 @ 0x88
  15475. 80058b6: 2120 movs r1, #32
  15476. 80058b8: 5099 str r1, [r3, r2]
  15477. huart->RxState = HAL_UART_STATE_READY;
  15478. 80058ba: 687b ldr r3, [r7, #4]
  15479. 80058bc: 228c movs r2, #140 @ 0x8c
  15480. 80058be: 2120 movs r1, #32
  15481. 80058c0: 5099 str r1, [r3, r2]
  15482. huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
  15483. 80058c2: 687b ldr r3, [r7, #4]
  15484. 80058c4: 2200 movs r2, #0
  15485. 80058c6: 66da str r2, [r3, #108] @ 0x6c
  15486. huart->RxEventType = HAL_UART_RXEVENT_TC;
  15487. 80058c8: 687b ldr r3, [r7, #4]
  15488. 80058ca: 2200 movs r2, #0
  15489. 80058cc: 671a str r2, [r3, #112] @ 0x70
  15490. __HAL_UNLOCK(huart);
  15491. 80058ce: 687b ldr r3, [r7, #4]
  15492. 80058d0: 2284 movs r2, #132 @ 0x84
  15493. 80058d2: 2100 movs r1, #0
  15494. 80058d4: 5499 strb r1, [r3, r2]
  15495. return HAL_OK;
  15496. 80058d6: 2300 movs r3, #0
  15497. }
  15498. 80058d8: 0018 movs r0, r3
  15499. 80058da: 46bd mov sp, r7
  15500. 80058dc: b010 add sp, #64 @ 0x40
  15501. 80058de: bd80 pop {r7, pc}
  15502. 80058e0: 01ffffff .word 0x01ffffff
  15503. 80058e4: fffffedf .word 0xfffffedf
  15504. 080058e8 <UART_WaitOnFlagUntilTimeout>:
  15505. * @param Timeout Timeout duration
  15506. * @retval HAL status
  15507. */
  15508. HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status,
  15509. uint32_t Tickstart, uint32_t Timeout)
  15510. {
  15511. 80058e8: b580 push {r7, lr}
  15512. 80058ea: b084 sub sp, #16
  15513. 80058ec: af00 add r7, sp, #0
  15514. 80058ee: 60f8 str r0, [r7, #12]
  15515. 80058f0: 60b9 str r1, [r7, #8]
  15516. 80058f2: 603b str r3, [r7, #0]
  15517. 80058f4: 1dfb adds r3, r7, #7
  15518. 80058f6: 701a strb r2, [r3, #0]
  15519. /* Wait until flag is set */
  15520. while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
  15521. 80058f8: e051 b.n 800599e <UART_WaitOnFlagUntilTimeout+0xb6>
  15522. {
  15523. /* Check for the Timeout */
  15524. if (Timeout != HAL_MAX_DELAY)
  15525. 80058fa: 69bb ldr r3, [r7, #24]
  15526. 80058fc: 3301 adds r3, #1
  15527. 80058fe: d04e beq.n 800599e <UART_WaitOnFlagUntilTimeout+0xb6>
  15528. {
  15529. if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
  15530. 8005900: f7fb ffb2 bl 8001868 <HAL_GetTick>
  15531. 8005904: 0002 movs r2, r0
  15532. 8005906: 683b ldr r3, [r7, #0]
  15533. 8005908: 1ad3 subs r3, r2, r3
  15534. 800590a: 69ba ldr r2, [r7, #24]
  15535. 800590c: 429a cmp r2, r3
  15536. 800590e: d302 bcc.n 8005916 <UART_WaitOnFlagUntilTimeout+0x2e>
  15537. 8005910: 69bb ldr r3, [r7, #24]
  15538. 8005912: 2b00 cmp r3, #0
  15539. 8005914: d101 bne.n 800591a <UART_WaitOnFlagUntilTimeout+0x32>
  15540. {
  15541. return HAL_TIMEOUT;
  15542. 8005916: 2303 movs r3, #3
  15543. 8005918: e051 b.n 80059be <UART_WaitOnFlagUntilTimeout+0xd6>
  15544. }
  15545. if ((READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) && (Flag != UART_FLAG_TXE) && (Flag != UART_FLAG_TC))
  15546. 800591a: 68fb ldr r3, [r7, #12]
  15547. 800591c: 681b ldr r3, [r3, #0]
  15548. 800591e: 681b ldr r3, [r3, #0]
  15549. 8005920: 2204 movs r2, #4
  15550. 8005922: 4013 ands r3, r2
  15551. 8005924: d03b beq.n 800599e <UART_WaitOnFlagUntilTimeout+0xb6>
  15552. 8005926: 68bb ldr r3, [r7, #8]
  15553. 8005928: 2b80 cmp r3, #128 @ 0x80
  15554. 800592a: d038 beq.n 800599e <UART_WaitOnFlagUntilTimeout+0xb6>
  15555. 800592c: 68bb ldr r3, [r7, #8]
  15556. 800592e: 2b40 cmp r3, #64 @ 0x40
  15557. 8005930: d035 beq.n 800599e <UART_WaitOnFlagUntilTimeout+0xb6>
  15558. {
  15559. if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) == SET)
  15560. 8005932: 68fb ldr r3, [r7, #12]
  15561. 8005934: 681b ldr r3, [r3, #0]
  15562. 8005936: 69db ldr r3, [r3, #28]
  15563. 8005938: 2208 movs r2, #8
  15564. 800593a: 4013 ands r3, r2
  15565. 800593c: 2b08 cmp r3, #8
  15566. 800593e: d111 bne.n 8005964 <UART_WaitOnFlagUntilTimeout+0x7c>
  15567. {
  15568. /* Clear Overrun Error flag*/
  15569. __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF);
  15570. 8005940: 68fb ldr r3, [r7, #12]
  15571. 8005942: 681b ldr r3, [r3, #0]
  15572. 8005944: 2208 movs r2, #8
  15573. 8005946: 621a str r2, [r3, #32]
  15574. /* Blocking error : transfer is aborted
  15575. Set the UART state ready to be able to start again the process,
  15576. Disable Rx Interrupts if ongoing */
  15577. UART_EndRxTransfer(huart);
  15578. 8005948: 68fb ldr r3, [r7, #12]
  15579. 800594a: 0018 movs r0, r3
  15580. 800594c: f000 f922 bl 8005b94 <UART_EndRxTransfer>
  15581. huart->ErrorCode = HAL_UART_ERROR_ORE;
  15582. 8005950: 68fb ldr r3, [r7, #12]
  15583. 8005952: 2290 movs r2, #144 @ 0x90
  15584. 8005954: 2108 movs r1, #8
  15585. 8005956: 5099 str r1, [r3, r2]
  15586. /* Process Unlocked */
  15587. __HAL_UNLOCK(huart);
  15588. 8005958: 68fb ldr r3, [r7, #12]
  15589. 800595a: 2284 movs r2, #132 @ 0x84
  15590. 800595c: 2100 movs r1, #0
  15591. 800595e: 5499 strb r1, [r3, r2]
  15592. return HAL_ERROR;
  15593. 8005960: 2301 movs r3, #1
  15594. 8005962: e02c b.n 80059be <UART_WaitOnFlagUntilTimeout+0xd6>
  15595. }
  15596. if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET)
  15597. 8005964: 68fb ldr r3, [r7, #12]
  15598. 8005966: 681b ldr r3, [r3, #0]
  15599. 8005968: 69da ldr r2, [r3, #28]
  15600. 800596a: 2380 movs r3, #128 @ 0x80
  15601. 800596c: 011b lsls r3, r3, #4
  15602. 800596e: 401a ands r2, r3
  15603. 8005970: 2380 movs r3, #128 @ 0x80
  15604. 8005972: 011b lsls r3, r3, #4
  15605. 8005974: 429a cmp r2, r3
  15606. 8005976: d112 bne.n 800599e <UART_WaitOnFlagUntilTimeout+0xb6>
  15607. {
  15608. /* Clear Receiver Timeout flag*/
  15609. __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF);
  15610. 8005978: 68fb ldr r3, [r7, #12]
  15611. 800597a: 681b ldr r3, [r3, #0]
  15612. 800597c: 2280 movs r2, #128 @ 0x80
  15613. 800597e: 0112 lsls r2, r2, #4
  15614. 8005980: 621a str r2, [r3, #32]
  15615. /* Blocking error : transfer is aborted
  15616. Set the UART state ready to be able to start again the process,
  15617. Disable Rx Interrupts if ongoing */
  15618. UART_EndRxTransfer(huart);
  15619. 8005982: 68fb ldr r3, [r7, #12]
  15620. 8005984: 0018 movs r0, r3
  15621. 8005986: f000 f905 bl 8005b94 <UART_EndRxTransfer>
  15622. huart->ErrorCode = HAL_UART_ERROR_RTO;
  15623. 800598a: 68fb ldr r3, [r7, #12]
  15624. 800598c: 2290 movs r2, #144 @ 0x90
  15625. 800598e: 2120 movs r1, #32
  15626. 8005990: 5099 str r1, [r3, r2]
  15627. /* Process Unlocked */
  15628. __HAL_UNLOCK(huart);
  15629. 8005992: 68fb ldr r3, [r7, #12]
  15630. 8005994: 2284 movs r2, #132 @ 0x84
  15631. 8005996: 2100 movs r1, #0
  15632. 8005998: 5499 strb r1, [r3, r2]
  15633. return HAL_TIMEOUT;
  15634. 800599a: 2303 movs r3, #3
  15635. 800599c: e00f b.n 80059be <UART_WaitOnFlagUntilTimeout+0xd6>
  15636. while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
  15637. 800599e: 68fb ldr r3, [r7, #12]
  15638. 80059a0: 681b ldr r3, [r3, #0]
  15639. 80059a2: 69db ldr r3, [r3, #28]
  15640. 80059a4: 68ba ldr r2, [r7, #8]
  15641. 80059a6: 4013 ands r3, r2
  15642. 80059a8: 68ba ldr r2, [r7, #8]
  15643. 80059aa: 1ad3 subs r3, r2, r3
  15644. 80059ac: 425a negs r2, r3
  15645. 80059ae: 4153 adcs r3, r2
  15646. 80059b0: b2db uxtb r3, r3
  15647. 80059b2: 001a movs r2, r3
  15648. 80059b4: 1dfb adds r3, r7, #7
  15649. 80059b6: 781b ldrb r3, [r3, #0]
  15650. 80059b8: 429a cmp r2, r3
  15651. 80059ba: d09e beq.n 80058fa <UART_WaitOnFlagUntilTimeout+0x12>
  15652. }
  15653. }
  15654. }
  15655. }
  15656. return HAL_OK;
  15657. 80059bc: 2300 movs r3, #0
  15658. }
  15659. 80059be: 0018 movs r0, r3
  15660. 80059c0: 46bd mov sp, r7
  15661. 80059c2: b004 add sp, #16
  15662. 80059c4: bd80 pop {r7, pc}
  15663. ...
  15664. 080059c8 <UART_Start_Receive_DMA>:
  15665. * @param pData Pointer to data buffer (u8 or u16 data elements).
  15666. * @param Size Amount of data elements (u8 or u16) to be received.
  15667. * @retval HAL status
  15668. */
  15669. HAL_StatusTypeDef UART_Start_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
  15670. {
  15671. 80059c8: b580 push {r7, lr}
  15672. 80059ca: b090 sub sp, #64 @ 0x40
  15673. 80059cc: af00 add r7, sp, #0
  15674. 80059ce: 60f8 str r0, [r7, #12]
  15675. 80059d0: 60b9 str r1, [r7, #8]
  15676. 80059d2: 1dbb adds r3, r7, #6
  15677. 80059d4: 801a strh r2, [r3, #0]
  15678. huart->pRxBuffPtr = pData;
  15679. 80059d6: 68fb ldr r3, [r7, #12]
  15680. 80059d8: 68ba ldr r2, [r7, #8]
  15681. 80059da: 659a str r2, [r3, #88] @ 0x58
  15682. huart->RxXferSize = Size;
  15683. 80059dc: 68fb ldr r3, [r7, #12]
  15684. 80059de: 1dba adds r2, r7, #6
  15685. 80059e0: 215c movs r1, #92 @ 0x5c
  15686. 80059e2: 8812 ldrh r2, [r2, #0]
  15687. 80059e4: 525a strh r2, [r3, r1]
  15688. huart->ErrorCode = HAL_UART_ERROR_NONE;
  15689. 80059e6: 68fb ldr r3, [r7, #12]
  15690. 80059e8: 2290 movs r2, #144 @ 0x90
  15691. 80059ea: 2100 movs r1, #0
  15692. 80059ec: 5099 str r1, [r3, r2]
  15693. huart->RxState = HAL_UART_STATE_BUSY_RX;
  15694. 80059ee: 68fb ldr r3, [r7, #12]
  15695. 80059f0: 228c movs r2, #140 @ 0x8c
  15696. 80059f2: 2122 movs r1, #34 @ 0x22
  15697. 80059f4: 5099 str r1, [r3, r2]
  15698. if (huart->hdmarx != NULL)
  15699. 80059f6: 68fb ldr r3, [r7, #12]
  15700. 80059f8: 2280 movs r2, #128 @ 0x80
  15701. 80059fa: 589b ldr r3, [r3, r2]
  15702. 80059fc: 2b00 cmp r3, #0
  15703. 80059fe: d02d beq.n 8005a5c <UART_Start_Receive_DMA+0x94>
  15704. {
  15705. /* Set the UART DMA transfer complete callback */
  15706. huart->hdmarx->XferCpltCallback = UART_DMAReceiveCplt;
  15707. 8005a00: 68fb ldr r3, [r7, #12]
  15708. 8005a02: 2280 movs r2, #128 @ 0x80
  15709. 8005a04: 589b ldr r3, [r3, r2]
  15710. 8005a06: 4a40 ldr r2, [pc, #256] @ (8005b08 <UART_Start_Receive_DMA+0x140>)
  15711. 8005a08: 62da str r2, [r3, #44] @ 0x2c
  15712. /* Set the UART DMA Half transfer complete callback */
  15713. huart->hdmarx->XferHalfCpltCallback = UART_DMARxHalfCplt;
  15714. 8005a0a: 68fb ldr r3, [r7, #12]
  15715. 8005a0c: 2280 movs r2, #128 @ 0x80
  15716. 8005a0e: 589b ldr r3, [r3, r2]
  15717. 8005a10: 4a3e ldr r2, [pc, #248] @ (8005b0c <UART_Start_Receive_DMA+0x144>)
  15718. 8005a12: 631a str r2, [r3, #48] @ 0x30
  15719. /* Set the DMA error callback */
  15720. huart->hdmarx->XferErrorCallback = UART_DMAError;
  15721. 8005a14: 68fb ldr r3, [r7, #12]
  15722. 8005a16: 2280 movs r2, #128 @ 0x80
  15723. 8005a18: 589b ldr r3, [r3, r2]
  15724. 8005a1a: 4a3d ldr r2, [pc, #244] @ (8005b10 <UART_Start_Receive_DMA+0x148>)
  15725. 8005a1c: 635a str r2, [r3, #52] @ 0x34
  15726. /* Set the DMA abort callback */
  15727. huart->hdmarx->XferAbortCallback = NULL;
  15728. 8005a1e: 68fb ldr r3, [r7, #12]
  15729. 8005a20: 2280 movs r2, #128 @ 0x80
  15730. 8005a22: 589b ldr r3, [r3, r2]
  15731. 8005a24: 2200 movs r2, #0
  15732. 8005a26: 639a str r2, [r3, #56] @ 0x38
  15733. /* Enable the DMA channel */
  15734. if (HAL_DMA_Start_IT(huart->hdmarx, (uint32_t)&huart->Instance->RDR, (uint32_t)huart->pRxBuffPtr, Size) != HAL_OK)
  15735. 8005a28: 68fb ldr r3, [r7, #12]
  15736. 8005a2a: 2280 movs r2, #128 @ 0x80
  15737. 8005a2c: 5898 ldr r0, [r3, r2]
  15738. 8005a2e: 68fb ldr r3, [r7, #12]
  15739. 8005a30: 681b ldr r3, [r3, #0]
  15740. 8005a32: 3324 adds r3, #36 @ 0x24
  15741. 8005a34: 0019 movs r1, r3
  15742. 8005a36: 68fb ldr r3, [r7, #12]
  15743. 8005a38: 6d9b ldr r3, [r3, #88] @ 0x58
  15744. 8005a3a: 001a movs r2, r3
  15745. 8005a3c: 1dbb adds r3, r7, #6
  15746. 8005a3e: 881b ldrh r3, [r3, #0]
  15747. 8005a40: f7fd f9f2 bl 8002e28 <HAL_DMA_Start_IT>
  15748. 8005a44: 1e03 subs r3, r0, #0
  15749. 8005a46: d009 beq.n 8005a5c <UART_Start_Receive_DMA+0x94>
  15750. {
  15751. /* Set error code to DMA */
  15752. huart->ErrorCode = HAL_UART_ERROR_DMA;
  15753. 8005a48: 68fb ldr r3, [r7, #12]
  15754. 8005a4a: 2290 movs r2, #144 @ 0x90
  15755. 8005a4c: 2110 movs r1, #16
  15756. 8005a4e: 5099 str r1, [r3, r2]
  15757. /* Restore huart->RxState to ready */
  15758. huart->RxState = HAL_UART_STATE_READY;
  15759. 8005a50: 68fb ldr r3, [r7, #12]
  15760. 8005a52: 228c movs r2, #140 @ 0x8c
  15761. 8005a54: 2120 movs r1, #32
  15762. 8005a56: 5099 str r1, [r3, r2]
  15763. return HAL_ERROR;
  15764. 8005a58: 2301 movs r3, #1
  15765. 8005a5a: e050 b.n 8005afe <UART_Start_Receive_DMA+0x136>
  15766. }
  15767. }
  15768. /* Enable the UART Parity Error Interrupt */
  15769. if (huart->Init.Parity != UART_PARITY_NONE)
  15770. 8005a5c: 68fb ldr r3, [r7, #12]
  15771. 8005a5e: 691b ldr r3, [r3, #16]
  15772. 8005a60: 2b00 cmp r3, #0
  15773. 8005a62: d019 beq.n 8005a98 <UART_Start_Receive_DMA+0xd0>
  15774. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15775. 8005a64: f3ef 8310 mrs r3, PRIMASK
  15776. 8005a68: 62bb str r3, [r7, #40] @ 0x28
  15777. return(result);
  15778. 8005a6a: 6abb ldr r3, [r7, #40] @ 0x28
  15779. {
  15780. ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_PEIE);
  15781. 8005a6c: 63fb str r3, [r7, #60] @ 0x3c
  15782. 8005a6e: 2301 movs r3, #1
  15783. 8005a70: 62fb str r3, [r7, #44] @ 0x2c
  15784. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15785. 8005a72: 6afb ldr r3, [r7, #44] @ 0x2c
  15786. 8005a74: f383 8810 msr PRIMASK, r3
  15787. }
  15788. 8005a78: 46c0 nop @ (mov r8, r8)
  15789. 8005a7a: 68fb ldr r3, [r7, #12]
  15790. 8005a7c: 681b ldr r3, [r3, #0]
  15791. 8005a7e: 681a ldr r2, [r3, #0]
  15792. 8005a80: 68fb ldr r3, [r7, #12]
  15793. 8005a82: 681b ldr r3, [r3, #0]
  15794. 8005a84: 2180 movs r1, #128 @ 0x80
  15795. 8005a86: 0049 lsls r1, r1, #1
  15796. 8005a88: 430a orrs r2, r1
  15797. 8005a8a: 601a str r2, [r3, #0]
  15798. 8005a8c: 6bfb ldr r3, [r7, #60] @ 0x3c
  15799. 8005a8e: 633b str r3, [r7, #48] @ 0x30
  15800. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15801. 8005a90: 6b3b ldr r3, [r7, #48] @ 0x30
  15802. 8005a92: f383 8810 msr PRIMASK, r3
  15803. }
  15804. 8005a96: 46c0 nop @ (mov r8, r8)
  15805. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15806. 8005a98: f3ef 8310 mrs r3, PRIMASK
  15807. 8005a9c: 613b str r3, [r7, #16]
  15808. return(result);
  15809. 8005a9e: 693b ldr r3, [r7, #16]
  15810. }
  15811. /* Enable the UART Error Interrupt: (Frame error, noise error, overrun error) */
  15812. ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_EIE);
  15813. 8005aa0: 63bb str r3, [r7, #56] @ 0x38
  15814. 8005aa2: 2301 movs r3, #1
  15815. 8005aa4: 617b str r3, [r7, #20]
  15816. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15817. 8005aa6: 697b ldr r3, [r7, #20]
  15818. 8005aa8: f383 8810 msr PRIMASK, r3
  15819. }
  15820. 8005aac: 46c0 nop @ (mov r8, r8)
  15821. 8005aae: 68fb ldr r3, [r7, #12]
  15822. 8005ab0: 681b ldr r3, [r3, #0]
  15823. 8005ab2: 689a ldr r2, [r3, #8]
  15824. 8005ab4: 68fb ldr r3, [r7, #12]
  15825. 8005ab6: 681b ldr r3, [r3, #0]
  15826. 8005ab8: 2101 movs r1, #1
  15827. 8005aba: 430a orrs r2, r1
  15828. 8005abc: 609a str r2, [r3, #8]
  15829. 8005abe: 6bbb ldr r3, [r7, #56] @ 0x38
  15830. 8005ac0: 61bb str r3, [r7, #24]
  15831. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15832. 8005ac2: 69bb ldr r3, [r7, #24]
  15833. 8005ac4: f383 8810 msr PRIMASK, r3
  15834. }
  15835. 8005ac8: 46c0 nop @ (mov r8, r8)
  15836. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15837. 8005aca: f3ef 8310 mrs r3, PRIMASK
  15838. 8005ace: 61fb str r3, [r7, #28]
  15839. return(result);
  15840. 8005ad0: 69fb ldr r3, [r7, #28]
  15841. /* Enable the DMA transfer for the receiver request by setting the DMAR bit
  15842. in the UART CR3 register */
  15843. ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_DMAR);
  15844. 8005ad2: 637b str r3, [r7, #52] @ 0x34
  15845. 8005ad4: 2301 movs r3, #1
  15846. 8005ad6: 623b str r3, [r7, #32]
  15847. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15848. 8005ad8: 6a3b ldr r3, [r7, #32]
  15849. 8005ada: f383 8810 msr PRIMASK, r3
  15850. }
  15851. 8005ade: 46c0 nop @ (mov r8, r8)
  15852. 8005ae0: 68fb ldr r3, [r7, #12]
  15853. 8005ae2: 681b ldr r3, [r3, #0]
  15854. 8005ae4: 689a ldr r2, [r3, #8]
  15855. 8005ae6: 68fb ldr r3, [r7, #12]
  15856. 8005ae8: 681b ldr r3, [r3, #0]
  15857. 8005aea: 2140 movs r1, #64 @ 0x40
  15858. 8005aec: 430a orrs r2, r1
  15859. 8005aee: 609a str r2, [r3, #8]
  15860. 8005af0: 6b7b ldr r3, [r7, #52] @ 0x34
  15861. 8005af2: 627b str r3, [r7, #36] @ 0x24
  15862. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15863. 8005af4: 6a7b ldr r3, [r7, #36] @ 0x24
  15864. 8005af6: f383 8810 msr PRIMASK, r3
  15865. }
  15866. 8005afa: 46c0 nop @ (mov r8, r8)
  15867. return HAL_OK;
  15868. 8005afc: 2300 movs r3, #0
  15869. }
  15870. 8005afe: 0018 movs r0, r3
  15871. 8005b00: 46bd mov sp, r7
  15872. 8005b02: b010 add sp, #64 @ 0x40
  15873. 8005b04: bd80 pop {r7, pc}
  15874. 8005b06: 46c0 nop @ (mov r8, r8)
  15875. 8005b08: 08005d19 .word 0x08005d19
  15876. 8005b0c: 08005e49 .word 0x08005e49
  15877. 8005b10: 08005e8b .word 0x08005e8b
  15878. 08005b14 <UART_EndTxTransfer>:
  15879. * @brief End ongoing Tx transfer on UART peripheral (following error detection or Transmit completion).
  15880. * @param huart UART handle.
  15881. * @retval None
  15882. */
  15883. static void UART_EndTxTransfer(UART_HandleTypeDef *huart)
  15884. {
  15885. 8005b14: b580 push {r7, lr}
  15886. 8005b16: b08a sub sp, #40 @ 0x28
  15887. 8005b18: af00 add r7, sp, #0
  15888. 8005b1a: 6078 str r0, [r7, #4]
  15889. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15890. 8005b1c: f3ef 8310 mrs r3, PRIMASK
  15891. 8005b20: 60bb str r3, [r7, #8]
  15892. return(result);
  15893. 8005b22: 68bb ldr r3, [r7, #8]
  15894. /* Disable TXEIE, TCIE, TXFT interrupts */
  15895. ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE_TXFNFIE | USART_CR1_TCIE));
  15896. 8005b24: 627b str r3, [r7, #36] @ 0x24
  15897. 8005b26: 2301 movs r3, #1
  15898. 8005b28: 60fb str r3, [r7, #12]
  15899. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15900. 8005b2a: 68fb ldr r3, [r7, #12]
  15901. 8005b2c: f383 8810 msr PRIMASK, r3
  15902. }
  15903. 8005b30: 46c0 nop @ (mov r8, r8)
  15904. 8005b32: 687b ldr r3, [r7, #4]
  15905. 8005b34: 681b ldr r3, [r3, #0]
  15906. 8005b36: 681a ldr r2, [r3, #0]
  15907. 8005b38: 687b ldr r3, [r7, #4]
  15908. 8005b3a: 681b ldr r3, [r3, #0]
  15909. 8005b3c: 21c0 movs r1, #192 @ 0xc0
  15910. 8005b3e: 438a bics r2, r1
  15911. 8005b40: 601a str r2, [r3, #0]
  15912. 8005b42: 6a7b ldr r3, [r7, #36] @ 0x24
  15913. 8005b44: 613b str r3, [r7, #16]
  15914. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15915. 8005b46: 693b ldr r3, [r7, #16]
  15916. 8005b48: f383 8810 msr PRIMASK, r3
  15917. }
  15918. 8005b4c: 46c0 nop @ (mov r8, r8)
  15919. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15920. 8005b4e: f3ef 8310 mrs r3, PRIMASK
  15921. 8005b52: 617b str r3, [r7, #20]
  15922. return(result);
  15923. 8005b54: 697b ldr r3, [r7, #20]
  15924. ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_TXFTIE));
  15925. 8005b56: 623b str r3, [r7, #32]
  15926. 8005b58: 2301 movs r3, #1
  15927. 8005b5a: 61bb str r3, [r7, #24]
  15928. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15929. 8005b5c: 69bb ldr r3, [r7, #24]
  15930. 8005b5e: f383 8810 msr PRIMASK, r3
  15931. }
  15932. 8005b62: 46c0 nop @ (mov r8, r8)
  15933. 8005b64: 687b ldr r3, [r7, #4]
  15934. 8005b66: 681b ldr r3, [r3, #0]
  15935. 8005b68: 689a ldr r2, [r3, #8]
  15936. 8005b6a: 687b ldr r3, [r7, #4]
  15937. 8005b6c: 681b ldr r3, [r3, #0]
  15938. 8005b6e: 4908 ldr r1, [pc, #32] @ (8005b90 <UART_EndTxTransfer+0x7c>)
  15939. 8005b70: 400a ands r2, r1
  15940. 8005b72: 609a str r2, [r3, #8]
  15941. 8005b74: 6a3b ldr r3, [r7, #32]
  15942. 8005b76: 61fb str r3, [r7, #28]
  15943. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15944. 8005b78: 69fb ldr r3, [r7, #28]
  15945. 8005b7a: f383 8810 msr PRIMASK, r3
  15946. }
  15947. 8005b7e: 46c0 nop @ (mov r8, r8)
  15948. /* At end of Tx process, restore huart->gState to Ready */
  15949. huart->gState = HAL_UART_STATE_READY;
  15950. 8005b80: 687b ldr r3, [r7, #4]
  15951. 8005b82: 2288 movs r2, #136 @ 0x88
  15952. 8005b84: 2120 movs r1, #32
  15953. 8005b86: 5099 str r1, [r3, r2]
  15954. }
  15955. 8005b88: 46c0 nop @ (mov r8, r8)
  15956. 8005b8a: 46bd mov sp, r7
  15957. 8005b8c: b00a add sp, #40 @ 0x28
  15958. 8005b8e: bd80 pop {r7, pc}
  15959. 8005b90: ff7fffff .word 0xff7fffff
  15960. 08005b94 <UART_EndRxTransfer>:
  15961. * @brief End ongoing Rx transfer on UART peripheral (following error detection or Reception completion).
  15962. * @param huart UART handle.
  15963. * @retval None
  15964. */
  15965. static void UART_EndRxTransfer(UART_HandleTypeDef *huart)
  15966. {
  15967. 8005b94: b580 push {r7, lr}
  15968. 8005b96: b08e sub sp, #56 @ 0x38
  15969. 8005b98: af00 add r7, sp, #0
  15970. 8005b9a: 6078 str r0, [r7, #4]
  15971. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  15972. 8005b9c: f3ef 8310 mrs r3, PRIMASK
  15973. 8005ba0: 617b str r3, [r7, #20]
  15974. return(result);
  15975. 8005ba2: 697b ldr r3, [r7, #20]
  15976. /* Disable RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts */
  15977. ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE));
  15978. 8005ba4: 637b str r3, [r7, #52] @ 0x34
  15979. 8005ba6: 2301 movs r3, #1
  15980. 8005ba8: 61bb str r3, [r7, #24]
  15981. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15982. 8005baa: 69bb ldr r3, [r7, #24]
  15983. 8005bac: f383 8810 msr PRIMASK, r3
  15984. }
  15985. 8005bb0: 46c0 nop @ (mov r8, r8)
  15986. 8005bb2: 687b ldr r3, [r7, #4]
  15987. 8005bb4: 681b ldr r3, [r3, #0]
  15988. 8005bb6: 681a ldr r2, [r3, #0]
  15989. 8005bb8: 687b ldr r3, [r7, #4]
  15990. 8005bba: 681b ldr r3, [r3, #0]
  15991. 8005bbc: 4926 ldr r1, [pc, #152] @ (8005c58 <UART_EndRxTransfer+0xc4>)
  15992. 8005bbe: 400a ands r2, r1
  15993. 8005bc0: 601a str r2, [r3, #0]
  15994. 8005bc2: 6b7b ldr r3, [r7, #52] @ 0x34
  15995. 8005bc4: 61fb str r3, [r7, #28]
  15996. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  15997. 8005bc6: 69fb ldr r3, [r7, #28]
  15998. 8005bc8: f383 8810 msr PRIMASK, r3
  15999. }
  16000. 8005bcc: 46c0 nop @ (mov r8, r8)
  16001. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16002. 8005bce: f3ef 8310 mrs r3, PRIMASK
  16003. 8005bd2: 623b str r3, [r7, #32]
  16004. return(result);
  16005. 8005bd4: 6a3b ldr r3, [r7, #32]
  16006. ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE));
  16007. 8005bd6: 633b str r3, [r7, #48] @ 0x30
  16008. 8005bd8: 2301 movs r3, #1
  16009. 8005bda: 627b str r3, [r7, #36] @ 0x24
  16010. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16011. 8005bdc: 6a7b ldr r3, [r7, #36] @ 0x24
  16012. 8005bde: f383 8810 msr PRIMASK, r3
  16013. }
  16014. 8005be2: 46c0 nop @ (mov r8, r8)
  16015. 8005be4: 687b ldr r3, [r7, #4]
  16016. 8005be6: 681b ldr r3, [r3, #0]
  16017. 8005be8: 689a ldr r2, [r3, #8]
  16018. 8005bea: 687b ldr r3, [r7, #4]
  16019. 8005bec: 681b ldr r3, [r3, #0]
  16020. 8005bee: 491b ldr r1, [pc, #108] @ (8005c5c <UART_EndRxTransfer+0xc8>)
  16021. 8005bf0: 400a ands r2, r1
  16022. 8005bf2: 609a str r2, [r3, #8]
  16023. 8005bf4: 6b3b ldr r3, [r7, #48] @ 0x30
  16024. 8005bf6: 62bb str r3, [r7, #40] @ 0x28
  16025. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16026. 8005bf8: 6abb ldr r3, [r7, #40] @ 0x28
  16027. 8005bfa: f383 8810 msr PRIMASK, r3
  16028. }
  16029. 8005bfe: 46c0 nop @ (mov r8, r8)
  16030. /* In case of reception waiting for IDLE event, disable also the IDLE IE interrupt source */
  16031. if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
  16032. 8005c00: 687b ldr r3, [r7, #4]
  16033. 8005c02: 6edb ldr r3, [r3, #108] @ 0x6c
  16034. 8005c04: 2b01 cmp r3, #1
  16035. 8005c06: d118 bne.n 8005c3a <UART_EndRxTransfer+0xa6>
  16036. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16037. 8005c08: f3ef 8310 mrs r3, PRIMASK
  16038. 8005c0c: 60bb str r3, [r7, #8]
  16039. return(result);
  16040. 8005c0e: 68bb ldr r3, [r7, #8]
  16041. {
  16042. ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
  16043. 8005c10: 62fb str r3, [r7, #44] @ 0x2c
  16044. 8005c12: 2301 movs r3, #1
  16045. 8005c14: 60fb str r3, [r7, #12]
  16046. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16047. 8005c16: 68fb ldr r3, [r7, #12]
  16048. 8005c18: f383 8810 msr PRIMASK, r3
  16049. }
  16050. 8005c1c: 46c0 nop @ (mov r8, r8)
  16051. 8005c1e: 687b ldr r3, [r7, #4]
  16052. 8005c20: 681b ldr r3, [r3, #0]
  16053. 8005c22: 681a ldr r2, [r3, #0]
  16054. 8005c24: 687b ldr r3, [r7, #4]
  16055. 8005c26: 681b ldr r3, [r3, #0]
  16056. 8005c28: 2110 movs r1, #16
  16057. 8005c2a: 438a bics r2, r1
  16058. 8005c2c: 601a str r2, [r3, #0]
  16059. 8005c2e: 6afb ldr r3, [r7, #44] @ 0x2c
  16060. 8005c30: 613b str r3, [r7, #16]
  16061. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16062. 8005c32: 693b ldr r3, [r7, #16]
  16063. 8005c34: f383 8810 msr PRIMASK, r3
  16064. }
  16065. 8005c38: 46c0 nop @ (mov r8, r8)
  16066. }
  16067. /* At end of Rx process, restore huart->RxState to Ready */
  16068. huart->RxState = HAL_UART_STATE_READY;
  16069. 8005c3a: 687b ldr r3, [r7, #4]
  16070. 8005c3c: 228c movs r2, #140 @ 0x8c
  16071. 8005c3e: 2120 movs r1, #32
  16072. 8005c40: 5099 str r1, [r3, r2]
  16073. huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
  16074. 8005c42: 687b ldr r3, [r7, #4]
  16075. 8005c44: 2200 movs r2, #0
  16076. 8005c46: 66da str r2, [r3, #108] @ 0x6c
  16077. /* Reset RxIsr function pointer */
  16078. huart->RxISR = NULL;
  16079. 8005c48: 687b ldr r3, [r7, #4]
  16080. 8005c4a: 2200 movs r2, #0
  16081. 8005c4c: 675a str r2, [r3, #116] @ 0x74
  16082. }
  16083. 8005c4e: 46c0 nop @ (mov r8, r8)
  16084. 8005c50: 46bd mov sp, r7
  16085. 8005c52: b00e add sp, #56 @ 0x38
  16086. 8005c54: bd80 pop {r7, pc}
  16087. 8005c56: 46c0 nop @ (mov r8, r8)
  16088. 8005c58: fffffedf .word 0xfffffedf
  16089. 8005c5c: effffffe .word 0xeffffffe
  16090. 08005c60 <UART_DMATransmitCplt>:
  16091. * @brief DMA UART transmit process complete callback.
  16092. * @param hdma DMA handle.
  16093. * @retval None
  16094. */
  16095. static void UART_DMATransmitCplt(DMA_HandleTypeDef *hdma)
  16096. {
  16097. 8005c60: b580 push {r7, lr}
  16098. 8005c62: b08c sub sp, #48 @ 0x30
  16099. 8005c64: af00 add r7, sp, #0
  16100. 8005c66: 6078 str r0, [r7, #4]
  16101. UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
  16102. 8005c68: 687b ldr r3, [r7, #4]
  16103. 8005c6a: 6a9b ldr r3, [r3, #40] @ 0x28
  16104. 8005c6c: 62fb str r3, [r7, #44] @ 0x2c
  16105. /* DMA Normal mode */
  16106. if (HAL_IS_BIT_CLR(hdma->Instance->CCR, DMA_CCR_CIRC))
  16107. 8005c6e: 687b ldr r3, [r7, #4]
  16108. 8005c70: 681b ldr r3, [r3, #0]
  16109. 8005c72: 681b ldr r3, [r3, #0]
  16110. 8005c74: 2220 movs r2, #32
  16111. 8005c76: 4013 ands r3, r2
  16112. 8005c78: d135 bne.n 8005ce6 <UART_DMATransmitCplt+0x86>
  16113. {
  16114. huart->TxXferCount = 0U;
  16115. 8005c7a: 6afb ldr r3, [r7, #44] @ 0x2c
  16116. 8005c7c: 2256 movs r2, #86 @ 0x56
  16117. 8005c7e: 2100 movs r1, #0
  16118. 8005c80: 5299 strh r1, [r3, r2]
  16119. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16120. 8005c82: f3ef 8310 mrs r3, PRIMASK
  16121. 8005c86: 60fb str r3, [r7, #12]
  16122. return(result);
  16123. 8005c88: 68fb ldr r3, [r7, #12]
  16124. /* Disable the DMA transfer for transmit request by resetting the DMAT bit
  16125. in the UART CR3 register */
  16126. ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAT);
  16127. 8005c8a: 62bb str r3, [r7, #40] @ 0x28
  16128. 8005c8c: 2301 movs r3, #1
  16129. 8005c8e: 613b str r3, [r7, #16]
  16130. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16131. 8005c90: 693b ldr r3, [r7, #16]
  16132. 8005c92: f383 8810 msr PRIMASK, r3
  16133. }
  16134. 8005c96: 46c0 nop @ (mov r8, r8)
  16135. 8005c98: 6afb ldr r3, [r7, #44] @ 0x2c
  16136. 8005c9a: 681b ldr r3, [r3, #0]
  16137. 8005c9c: 689a ldr r2, [r3, #8]
  16138. 8005c9e: 6afb ldr r3, [r7, #44] @ 0x2c
  16139. 8005ca0: 681b ldr r3, [r3, #0]
  16140. 8005ca2: 2180 movs r1, #128 @ 0x80
  16141. 8005ca4: 438a bics r2, r1
  16142. 8005ca6: 609a str r2, [r3, #8]
  16143. 8005ca8: 6abb ldr r3, [r7, #40] @ 0x28
  16144. 8005caa: 617b str r3, [r7, #20]
  16145. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16146. 8005cac: 697b ldr r3, [r7, #20]
  16147. 8005cae: f383 8810 msr PRIMASK, r3
  16148. }
  16149. 8005cb2: 46c0 nop @ (mov r8, r8)
  16150. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16151. 8005cb4: f3ef 8310 mrs r3, PRIMASK
  16152. 8005cb8: 61bb str r3, [r7, #24]
  16153. return(result);
  16154. 8005cba: 69bb ldr r3, [r7, #24]
  16155. /* Enable the UART Transmit Complete Interrupt */
  16156. ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE);
  16157. 8005cbc: 627b str r3, [r7, #36] @ 0x24
  16158. 8005cbe: 2301 movs r3, #1
  16159. 8005cc0: 61fb str r3, [r7, #28]
  16160. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16161. 8005cc2: 69fb ldr r3, [r7, #28]
  16162. 8005cc4: f383 8810 msr PRIMASK, r3
  16163. }
  16164. 8005cc8: 46c0 nop @ (mov r8, r8)
  16165. 8005cca: 6afb ldr r3, [r7, #44] @ 0x2c
  16166. 8005ccc: 681b ldr r3, [r3, #0]
  16167. 8005cce: 681a ldr r2, [r3, #0]
  16168. 8005cd0: 6afb ldr r3, [r7, #44] @ 0x2c
  16169. 8005cd2: 681b ldr r3, [r3, #0]
  16170. 8005cd4: 2140 movs r1, #64 @ 0x40
  16171. 8005cd6: 430a orrs r2, r1
  16172. 8005cd8: 601a str r2, [r3, #0]
  16173. 8005cda: 6a7b ldr r3, [r7, #36] @ 0x24
  16174. 8005cdc: 623b str r3, [r7, #32]
  16175. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16176. 8005cde: 6a3b ldr r3, [r7, #32]
  16177. 8005ce0: f383 8810 msr PRIMASK, r3
  16178. }
  16179. 8005ce4: e004 b.n 8005cf0 <UART_DMATransmitCplt+0x90>
  16180. #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
  16181. /*Call registered Tx complete callback*/
  16182. huart->TxCpltCallback(huart);
  16183. #else
  16184. /*Call legacy weak Tx complete callback*/
  16185. HAL_UART_TxCpltCallback(huart);
  16186. 8005ce6: 6afb ldr r3, [r7, #44] @ 0x2c
  16187. 8005ce8: 0018 movs r0, r3
  16188. 8005cea: f7ff fb0d bl 8005308 <HAL_UART_TxCpltCallback>
  16189. #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
  16190. }
  16191. }
  16192. 8005cee: 46c0 nop @ (mov r8, r8)
  16193. 8005cf0: 46c0 nop @ (mov r8, r8)
  16194. 8005cf2: 46bd mov sp, r7
  16195. 8005cf4: b00c add sp, #48 @ 0x30
  16196. 8005cf6: bd80 pop {r7, pc}
  16197. 08005cf8 <UART_DMATxHalfCplt>:
  16198. * @brief DMA UART transmit process half complete callback.
  16199. * @param hdma DMA handle.
  16200. * @retval None
  16201. */
  16202. static void UART_DMATxHalfCplt(DMA_HandleTypeDef *hdma)
  16203. {
  16204. 8005cf8: b580 push {r7, lr}
  16205. 8005cfa: b084 sub sp, #16
  16206. 8005cfc: af00 add r7, sp, #0
  16207. 8005cfe: 6078 str r0, [r7, #4]
  16208. UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
  16209. 8005d00: 687b ldr r3, [r7, #4]
  16210. 8005d02: 6a9b ldr r3, [r3, #40] @ 0x28
  16211. 8005d04: 60fb str r3, [r7, #12]
  16212. #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
  16213. /*Call registered Tx Half complete callback*/
  16214. huart->TxHalfCpltCallback(huart);
  16215. #else
  16216. /*Call legacy weak Tx Half complete callback*/
  16217. HAL_UART_TxHalfCpltCallback(huart);
  16218. 8005d06: 68fb ldr r3, [r7, #12]
  16219. 8005d08: 0018 movs r0, r3
  16220. 8005d0a: f7ff fb05 bl 8005318 <HAL_UART_TxHalfCpltCallback>
  16221. #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
  16222. }
  16223. 8005d0e: 46c0 nop @ (mov r8, r8)
  16224. 8005d10: 46bd mov sp, r7
  16225. 8005d12: b004 add sp, #16
  16226. 8005d14: bd80 pop {r7, pc}
  16227. ...
  16228. 08005d18 <UART_DMAReceiveCplt>:
  16229. * @brief DMA UART receive process complete callback.
  16230. * @param hdma DMA handle.
  16231. * @retval None
  16232. */
  16233. static void UART_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
  16234. {
  16235. 8005d18: b580 push {r7, lr}
  16236. 8005d1a: b094 sub sp, #80 @ 0x50
  16237. 8005d1c: af00 add r7, sp, #0
  16238. 8005d1e: 6078 str r0, [r7, #4]
  16239. UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
  16240. 8005d20: 687b ldr r3, [r7, #4]
  16241. 8005d22: 6a9b ldr r3, [r3, #40] @ 0x28
  16242. 8005d24: 64fb str r3, [r7, #76] @ 0x4c
  16243. /* DMA Normal mode */
  16244. if (HAL_IS_BIT_CLR(hdma->Instance->CCR, DMA_CCR_CIRC))
  16245. 8005d26: 687b ldr r3, [r7, #4]
  16246. 8005d28: 681b ldr r3, [r3, #0]
  16247. 8005d2a: 681b ldr r3, [r3, #0]
  16248. 8005d2c: 2220 movs r2, #32
  16249. 8005d2e: 4013 ands r3, r2
  16250. 8005d30: d16f bne.n 8005e12 <UART_DMAReceiveCplt+0xfa>
  16251. {
  16252. huart->RxXferCount = 0U;
  16253. 8005d32: 6cfb ldr r3, [r7, #76] @ 0x4c
  16254. 8005d34: 225e movs r2, #94 @ 0x5e
  16255. 8005d36: 2100 movs r1, #0
  16256. 8005d38: 5299 strh r1, [r3, r2]
  16257. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16258. 8005d3a: f3ef 8310 mrs r3, PRIMASK
  16259. 8005d3e: 61bb str r3, [r7, #24]
  16260. return(result);
  16261. 8005d40: 69bb ldr r3, [r7, #24]
  16262. /* Disable PE and ERR (Frame error, noise error, overrun error) interrupts */
  16263. ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE);
  16264. 8005d42: 64bb str r3, [r7, #72] @ 0x48
  16265. 8005d44: 2301 movs r3, #1
  16266. 8005d46: 61fb str r3, [r7, #28]
  16267. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16268. 8005d48: 69fb ldr r3, [r7, #28]
  16269. 8005d4a: f383 8810 msr PRIMASK, r3
  16270. }
  16271. 8005d4e: 46c0 nop @ (mov r8, r8)
  16272. 8005d50: 6cfb ldr r3, [r7, #76] @ 0x4c
  16273. 8005d52: 681b ldr r3, [r3, #0]
  16274. 8005d54: 681a ldr r2, [r3, #0]
  16275. 8005d56: 6cfb ldr r3, [r7, #76] @ 0x4c
  16276. 8005d58: 681b ldr r3, [r3, #0]
  16277. 8005d5a: 493a ldr r1, [pc, #232] @ (8005e44 <UART_DMAReceiveCplt+0x12c>)
  16278. 8005d5c: 400a ands r2, r1
  16279. 8005d5e: 601a str r2, [r3, #0]
  16280. 8005d60: 6cbb ldr r3, [r7, #72] @ 0x48
  16281. 8005d62: 623b str r3, [r7, #32]
  16282. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16283. 8005d64: 6a3b ldr r3, [r7, #32]
  16284. 8005d66: f383 8810 msr PRIMASK, r3
  16285. }
  16286. 8005d6a: 46c0 nop @ (mov r8, r8)
  16287. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16288. 8005d6c: f3ef 8310 mrs r3, PRIMASK
  16289. 8005d70: 627b str r3, [r7, #36] @ 0x24
  16290. return(result);
  16291. 8005d72: 6a7b ldr r3, [r7, #36] @ 0x24
  16292. ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
  16293. 8005d74: 647b str r3, [r7, #68] @ 0x44
  16294. 8005d76: 2301 movs r3, #1
  16295. 8005d78: 62bb str r3, [r7, #40] @ 0x28
  16296. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16297. 8005d7a: 6abb ldr r3, [r7, #40] @ 0x28
  16298. 8005d7c: f383 8810 msr PRIMASK, r3
  16299. }
  16300. 8005d80: 46c0 nop @ (mov r8, r8)
  16301. 8005d82: 6cfb ldr r3, [r7, #76] @ 0x4c
  16302. 8005d84: 681b ldr r3, [r3, #0]
  16303. 8005d86: 689a ldr r2, [r3, #8]
  16304. 8005d88: 6cfb ldr r3, [r7, #76] @ 0x4c
  16305. 8005d8a: 681b ldr r3, [r3, #0]
  16306. 8005d8c: 2101 movs r1, #1
  16307. 8005d8e: 438a bics r2, r1
  16308. 8005d90: 609a str r2, [r3, #8]
  16309. 8005d92: 6c7b ldr r3, [r7, #68] @ 0x44
  16310. 8005d94: 62fb str r3, [r7, #44] @ 0x2c
  16311. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16312. 8005d96: 6afb ldr r3, [r7, #44] @ 0x2c
  16313. 8005d98: f383 8810 msr PRIMASK, r3
  16314. }
  16315. 8005d9c: 46c0 nop @ (mov r8, r8)
  16316. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16317. 8005d9e: f3ef 8310 mrs r3, PRIMASK
  16318. 8005da2: 633b str r3, [r7, #48] @ 0x30
  16319. return(result);
  16320. 8005da4: 6b3b ldr r3, [r7, #48] @ 0x30
  16321. /* Disable the DMA transfer for the receiver request by resetting the DMAR bit
  16322. in the UART CR3 register */
  16323. ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR);
  16324. 8005da6: 643b str r3, [r7, #64] @ 0x40
  16325. 8005da8: 2301 movs r3, #1
  16326. 8005daa: 637b str r3, [r7, #52] @ 0x34
  16327. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16328. 8005dac: 6b7b ldr r3, [r7, #52] @ 0x34
  16329. 8005dae: f383 8810 msr PRIMASK, r3
  16330. }
  16331. 8005db2: 46c0 nop @ (mov r8, r8)
  16332. 8005db4: 6cfb ldr r3, [r7, #76] @ 0x4c
  16333. 8005db6: 681b ldr r3, [r3, #0]
  16334. 8005db8: 689a ldr r2, [r3, #8]
  16335. 8005dba: 6cfb ldr r3, [r7, #76] @ 0x4c
  16336. 8005dbc: 681b ldr r3, [r3, #0]
  16337. 8005dbe: 2140 movs r1, #64 @ 0x40
  16338. 8005dc0: 438a bics r2, r1
  16339. 8005dc2: 609a str r2, [r3, #8]
  16340. 8005dc4: 6c3b ldr r3, [r7, #64] @ 0x40
  16341. 8005dc6: 63bb str r3, [r7, #56] @ 0x38
  16342. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16343. 8005dc8: 6bbb ldr r3, [r7, #56] @ 0x38
  16344. 8005dca: f383 8810 msr PRIMASK, r3
  16345. }
  16346. 8005dce: 46c0 nop @ (mov r8, r8)
  16347. /* At end of Rx process, restore huart->RxState to Ready */
  16348. huart->RxState = HAL_UART_STATE_READY;
  16349. 8005dd0: 6cfb ldr r3, [r7, #76] @ 0x4c
  16350. 8005dd2: 228c movs r2, #140 @ 0x8c
  16351. 8005dd4: 2120 movs r1, #32
  16352. 8005dd6: 5099 str r1, [r3, r2]
  16353. /* If Reception till IDLE event has been selected, Disable IDLE Interrupt */
  16354. if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
  16355. 8005dd8: 6cfb ldr r3, [r7, #76] @ 0x4c
  16356. 8005dda: 6edb ldr r3, [r3, #108] @ 0x6c
  16357. 8005ddc: 2b01 cmp r3, #1
  16358. 8005dde: d118 bne.n 8005e12 <UART_DMAReceiveCplt+0xfa>
  16359. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16360. 8005de0: f3ef 8310 mrs r3, PRIMASK
  16361. 8005de4: 60fb str r3, [r7, #12]
  16362. return(result);
  16363. 8005de6: 68fb ldr r3, [r7, #12]
  16364. {
  16365. ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
  16366. 8005de8: 63fb str r3, [r7, #60] @ 0x3c
  16367. 8005dea: 2301 movs r3, #1
  16368. 8005dec: 613b str r3, [r7, #16]
  16369. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16370. 8005dee: 693b ldr r3, [r7, #16]
  16371. 8005df0: f383 8810 msr PRIMASK, r3
  16372. }
  16373. 8005df4: 46c0 nop @ (mov r8, r8)
  16374. 8005df6: 6cfb ldr r3, [r7, #76] @ 0x4c
  16375. 8005df8: 681b ldr r3, [r3, #0]
  16376. 8005dfa: 681a ldr r2, [r3, #0]
  16377. 8005dfc: 6cfb ldr r3, [r7, #76] @ 0x4c
  16378. 8005dfe: 681b ldr r3, [r3, #0]
  16379. 8005e00: 2110 movs r1, #16
  16380. 8005e02: 438a bics r2, r1
  16381. 8005e04: 601a str r2, [r3, #0]
  16382. 8005e06: 6bfb ldr r3, [r7, #60] @ 0x3c
  16383. 8005e08: 617b str r3, [r7, #20]
  16384. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16385. 8005e0a: 697b ldr r3, [r7, #20]
  16386. 8005e0c: f383 8810 msr PRIMASK, r3
  16387. }
  16388. 8005e10: 46c0 nop @ (mov r8, r8)
  16389. }
  16390. }
  16391. /* Initialize type of RxEvent that correspond to RxEvent callback execution;
  16392. In this case, Rx Event type is Transfer Complete */
  16393. huart->RxEventType = HAL_UART_RXEVENT_TC;
  16394. 8005e12: 6cfb ldr r3, [r7, #76] @ 0x4c
  16395. 8005e14: 2200 movs r2, #0
  16396. 8005e16: 671a str r2, [r3, #112] @ 0x70
  16397. /* Check current reception Mode :
  16398. If Reception till IDLE event has been selected : use Rx Event callback */
  16399. if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
  16400. 8005e18: 6cfb ldr r3, [r7, #76] @ 0x4c
  16401. 8005e1a: 6edb ldr r3, [r3, #108] @ 0x6c
  16402. 8005e1c: 2b01 cmp r3, #1
  16403. 8005e1e: d108 bne.n 8005e32 <UART_DMAReceiveCplt+0x11a>
  16404. #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
  16405. /*Call registered Rx Event callback*/
  16406. huart->RxEventCallback(huart, huart->RxXferSize);
  16407. #else
  16408. /*Call legacy weak Rx Event callback*/
  16409. HAL_UARTEx_RxEventCallback(huart, huart->RxXferSize);
  16410. 8005e20: 6cfb ldr r3, [r7, #76] @ 0x4c
  16411. 8005e22: 225c movs r2, #92 @ 0x5c
  16412. 8005e24: 5a9a ldrh r2, [r3, r2]
  16413. 8005e26: 6cfb ldr r3, [r7, #76] @ 0x4c
  16414. 8005e28: 0011 movs r1, r2
  16415. 8005e2a: 0018 movs r0, r3
  16416. 8005e2c: f7fb f9de bl 80011ec <HAL_UARTEx_RxEventCallback>
  16417. #else
  16418. /*Call legacy weak Rx complete callback*/
  16419. HAL_UART_RxCpltCallback(huart);
  16420. #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
  16421. }
  16422. }
  16423. 8005e30: e003 b.n 8005e3a <UART_DMAReceiveCplt+0x122>
  16424. HAL_UART_RxCpltCallback(huart);
  16425. 8005e32: 6cfb ldr r3, [r7, #76] @ 0x4c
  16426. 8005e34: 0018 movs r0, r3
  16427. 8005e36: f7ff fa77 bl 8005328 <HAL_UART_RxCpltCallback>
  16428. }
  16429. 8005e3a: 46c0 nop @ (mov r8, r8)
  16430. 8005e3c: 46bd mov sp, r7
  16431. 8005e3e: b014 add sp, #80 @ 0x50
  16432. 8005e40: bd80 pop {r7, pc}
  16433. 8005e42: 46c0 nop @ (mov r8, r8)
  16434. 8005e44: fffffeff .word 0xfffffeff
  16435. 08005e48 <UART_DMARxHalfCplt>:
  16436. * @brief DMA UART receive process half complete callback.
  16437. * @param hdma DMA handle.
  16438. * @retval None
  16439. */
  16440. static void UART_DMARxHalfCplt(DMA_HandleTypeDef *hdma)
  16441. {
  16442. 8005e48: b580 push {r7, lr}
  16443. 8005e4a: b084 sub sp, #16
  16444. 8005e4c: af00 add r7, sp, #0
  16445. 8005e4e: 6078 str r0, [r7, #4]
  16446. UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
  16447. 8005e50: 687b ldr r3, [r7, #4]
  16448. 8005e52: 6a9b ldr r3, [r3, #40] @ 0x28
  16449. 8005e54: 60fb str r3, [r7, #12]
  16450. /* Initialize type of RxEvent that correspond to RxEvent callback execution;
  16451. In this case, Rx Event type is Half Transfer */
  16452. huart->RxEventType = HAL_UART_RXEVENT_HT;
  16453. 8005e56: 68fb ldr r3, [r7, #12]
  16454. 8005e58: 2201 movs r2, #1
  16455. 8005e5a: 671a str r2, [r3, #112] @ 0x70
  16456. /* Check current reception Mode :
  16457. If Reception till IDLE event has been selected : use Rx Event callback */
  16458. if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
  16459. 8005e5c: 68fb ldr r3, [r7, #12]
  16460. 8005e5e: 6edb ldr r3, [r3, #108] @ 0x6c
  16461. 8005e60: 2b01 cmp r3, #1
  16462. 8005e62: d10a bne.n 8005e7a <UART_DMARxHalfCplt+0x32>
  16463. #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
  16464. /*Call registered Rx Event callback*/
  16465. huart->RxEventCallback(huart, huart->RxXferSize / 2U);
  16466. #else
  16467. /*Call legacy weak Rx Event callback*/
  16468. HAL_UARTEx_RxEventCallback(huart, huart->RxXferSize / 2U);
  16469. 8005e64: 68fb ldr r3, [r7, #12]
  16470. 8005e66: 225c movs r2, #92 @ 0x5c
  16471. 8005e68: 5a9b ldrh r3, [r3, r2]
  16472. 8005e6a: 085b lsrs r3, r3, #1
  16473. 8005e6c: b29a uxth r2, r3
  16474. 8005e6e: 68fb ldr r3, [r7, #12]
  16475. 8005e70: 0011 movs r1, r2
  16476. 8005e72: 0018 movs r0, r3
  16477. 8005e74: f7fb f9ba bl 80011ec <HAL_UARTEx_RxEventCallback>
  16478. #else
  16479. /*Call legacy weak Rx Half complete callback*/
  16480. HAL_UART_RxHalfCpltCallback(huart);
  16481. #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
  16482. }
  16483. }
  16484. 8005e78: e003 b.n 8005e82 <UART_DMARxHalfCplt+0x3a>
  16485. HAL_UART_RxHalfCpltCallback(huart);
  16486. 8005e7a: 68fb ldr r3, [r7, #12]
  16487. 8005e7c: 0018 movs r0, r3
  16488. 8005e7e: f7ff fa5b bl 8005338 <HAL_UART_RxHalfCpltCallback>
  16489. }
  16490. 8005e82: 46c0 nop @ (mov r8, r8)
  16491. 8005e84: 46bd mov sp, r7
  16492. 8005e86: b004 add sp, #16
  16493. 8005e88: bd80 pop {r7, pc}
  16494. 08005e8a <UART_DMAError>:
  16495. * @brief DMA UART communication error callback.
  16496. * @param hdma DMA handle.
  16497. * @retval None
  16498. */
  16499. static void UART_DMAError(DMA_HandleTypeDef *hdma)
  16500. {
  16501. 8005e8a: b580 push {r7, lr}
  16502. 8005e8c: b086 sub sp, #24
  16503. 8005e8e: af00 add r7, sp, #0
  16504. 8005e90: 6078 str r0, [r7, #4]
  16505. UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
  16506. 8005e92: 687b ldr r3, [r7, #4]
  16507. 8005e94: 6a9b ldr r3, [r3, #40] @ 0x28
  16508. 8005e96: 617b str r3, [r7, #20]
  16509. const HAL_UART_StateTypeDef gstate = huart->gState;
  16510. 8005e98: 697b ldr r3, [r7, #20]
  16511. 8005e9a: 2288 movs r2, #136 @ 0x88
  16512. 8005e9c: 589b ldr r3, [r3, r2]
  16513. 8005e9e: 613b str r3, [r7, #16]
  16514. const HAL_UART_StateTypeDef rxstate = huart->RxState;
  16515. 8005ea0: 697b ldr r3, [r7, #20]
  16516. 8005ea2: 228c movs r2, #140 @ 0x8c
  16517. 8005ea4: 589b ldr r3, [r3, r2]
  16518. 8005ea6: 60fb str r3, [r7, #12]
  16519. /* Stop UART DMA Tx request if ongoing */
  16520. if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAT)) &&
  16521. 8005ea8: 697b ldr r3, [r7, #20]
  16522. 8005eaa: 681b ldr r3, [r3, #0]
  16523. 8005eac: 689b ldr r3, [r3, #8]
  16524. 8005eae: 2280 movs r2, #128 @ 0x80
  16525. 8005eb0: 4013 ands r3, r2
  16526. 8005eb2: 2b80 cmp r3, #128 @ 0x80
  16527. 8005eb4: d10a bne.n 8005ecc <UART_DMAError+0x42>
  16528. 8005eb6: 693b ldr r3, [r7, #16]
  16529. 8005eb8: 2b21 cmp r3, #33 @ 0x21
  16530. 8005eba: d107 bne.n 8005ecc <UART_DMAError+0x42>
  16531. (gstate == HAL_UART_STATE_BUSY_TX))
  16532. {
  16533. huart->TxXferCount = 0U;
  16534. 8005ebc: 697b ldr r3, [r7, #20]
  16535. 8005ebe: 2256 movs r2, #86 @ 0x56
  16536. 8005ec0: 2100 movs r1, #0
  16537. 8005ec2: 5299 strh r1, [r3, r2]
  16538. UART_EndTxTransfer(huart);
  16539. 8005ec4: 697b ldr r3, [r7, #20]
  16540. 8005ec6: 0018 movs r0, r3
  16541. 8005ec8: f7ff fe24 bl 8005b14 <UART_EndTxTransfer>
  16542. }
  16543. /* Stop UART DMA Rx request if ongoing */
  16544. if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) &&
  16545. 8005ecc: 697b ldr r3, [r7, #20]
  16546. 8005ece: 681b ldr r3, [r3, #0]
  16547. 8005ed0: 689b ldr r3, [r3, #8]
  16548. 8005ed2: 2240 movs r2, #64 @ 0x40
  16549. 8005ed4: 4013 ands r3, r2
  16550. 8005ed6: 2b40 cmp r3, #64 @ 0x40
  16551. 8005ed8: d10a bne.n 8005ef0 <UART_DMAError+0x66>
  16552. 8005eda: 68fb ldr r3, [r7, #12]
  16553. 8005edc: 2b22 cmp r3, #34 @ 0x22
  16554. 8005ede: d107 bne.n 8005ef0 <UART_DMAError+0x66>
  16555. (rxstate == HAL_UART_STATE_BUSY_RX))
  16556. {
  16557. huart->RxXferCount = 0U;
  16558. 8005ee0: 697b ldr r3, [r7, #20]
  16559. 8005ee2: 225e movs r2, #94 @ 0x5e
  16560. 8005ee4: 2100 movs r1, #0
  16561. 8005ee6: 5299 strh r1, [r3, r2]
  16562. UART_EndRxTransfer(huart);
  16563. 8005ee8: 697b ldr r3, [r7, #20]
  16564. 8005eea: 0018 movs r0, r3
  16565. 8005eec: f7ff fe52 bl 8005b94 <UART_EndRxTransfer>
  16566. }
  16567. huart->ErrorCode |= HAL_UART_ERROR_DMA;
  16568. 8005ef0: 697b ldr r3, [r7, #20]
  16569. 8005ef2: 2290 movs r2, #144 @ 0x90
  16570. 8005ef4: 589b ldr r3, [r3, r2]
  16571. 8005ef6: 2210 movs r2, #16
  16572. 8005ef8: 431a orrs r2, r3
  16573. 8005efa: 697b ldr r3, [r7, #20]
  16574. 8005efc: 2190 movs r1, #144 @ 0x90
  16575. 8005efe: 505a str r2, [r3, r1]
  16576. #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
  16577. /*Call registered error callback*/
  16578. huart->ErrorCallback(huart);
  16579. #else
  16580. /*Call legacy weak error callback*/
  16581. HAL_UART_ErrorCallback(huart);
  16582. 8005f00: 697b ldr r3, [r7, #20]
  16583. 8005f02: 0018 movs r0, r3
  16584. 8005f04: f7ff fa20 bl 8005348 <HAL_UART_ErrorCallback>
  16585. #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
  16586. }
  16587. 8005f08: 46c0 nop @ (mov r8, r8)
  16588. 8005f0a: 46bd mov sp, r7
  16589. 8005f0c: b006 add sp, #24
  16590. 8005f0e: bd80 pop {r7, pc}
  16591. 08005f10 <HAL_UARTEx_ReceiveToIdle_DMA>:
  16592. * @param pData Pointer to data buffer (uint8_t or uint16_t data elements).
  16593. * @param Size Amount of data elements (uint8_t or uint16_t) to be received.
  16594. * @retval HAL status
  16595. */
  16596. HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
  16597. {
  16598. 8005f10: b5b0 push {r4, r5, r7, lr}
  16599. 8005f12: b08a sub sp, #40 @ 0x28
  16600. 8005f14: af00 add r7, sp, #0
  16601. 8005f16: 60f8 str r0, [r7, #12]
  16602. 8005f18: 60b9 str r1, [r7, #8]
  16603. 8005f1a: 1dbb adds r3, r7, #6
  16604. 8005f1c: 801a strh r2, [r3, #0]
  16605. HAL_StatusTypeDef status;
  16606. /* Check that a Rx process is not already ongoing */
  16607. if (huart->RxState == HAL_UART_STATE_READY)
  16608. 8005f1e: 68fb ldr r3, [r7, #12]
  16609. 8005f20: 228c movs r2, #140 @ 0x8c
  16610. 8005f22: 589b ldr r3, [r3, r2]
  16611. 8005f24: 2b20 cmp r3, #32
  16612. 8005f26: d156 bne.n 8005fd6 <HAL_UARTEx_ReceiveToIdle_DMA+0xc6>
  16613. {
  16614. if ((pData == NULL) || (Size == 0U))
  16615. 8005f28: 68bb ldr r3, [r7, #8]
  16616. 8005f2a: 2b00 cmp r3, #0
  16617. 8005f2c: d003 beq.n 8005f36 <HAL_UARTEx_ReceiveToIdle_DMA+0x26>
  16618. 8005f2e: 1dbb adds r3, r7, #6
  16619. 8005f30: 881b ldrh r3, [r3, #0]
  16620. 8005f32: 2b00 cmp r3, #0
  16621. 8005f34: d101 bne.n 8005f3a <HAL_UARTEx_ReceiveToIdle_DMA+0x2a>
  16622. {
  16623. return HAL_ERROR;
  16624. 8005f36: 2301 movs r3, #1
  16625. 8005f38: e04e b.n 8005fd8 <HAL_UARTEx_ReceiveToIdle_DMA+0xc8>
  16626. }
  16627. /* In case of 9bits/No Parity transfer, pData buffer provided as input parameter
  16628. should be aligned on a uint16_t frontier, as data copy from RDR will be
  16629. handled by DMA from a uint16_t frontier. */
  16630. if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE))
  16631. 8005f3a: 68fb ldr r3, [r7, #12]
  16632. 8005f3c: 689a ldr r2, [r3, #8]
  16633. 8005f3e: 2380 movs r3, #128 @ 0x80
  16634. 8005f40: 015b lsls r3, r3, #5
  16635. 8005f42: 429a cmp r2, r3
  16636. 8005f44: d109 bne.n 8005f5a <HAL_UARTEx_ReceiveToIdle_DMA+0x4a>
  16637. 8005f46: 68fb ldr r3, [r7, #12]
  16638. 8005f48: 691b ldr r3, [r3, #16]
  16639. 8005f4a: 2b00 cmp r3, #0
  16640. 8005f4c: d105 bne.n 8005f5a <HAL_UARTEx_ReceiveToIdle_DMA+0x4a>
  16641. {
  16642. if ((((uint32_t)pData) & 1U) != 0U)
  16643. 8005f4e: 68bb ldr r3, [r7, #8]
  16644. 8005f50: 2201 movs r2, #1
  16645. 8005f52: 4013 ands r3, r2
  16646. 8005f54: d001 beq.n 8005f5a <HAL_UARTEx_ReceiveToIdle_DMA+0x4a>
  16647. {
  16648. return HAL_ERROR;
  16649. 8005f56: 2301 movs r3, #1
  16650. 8005f58: e03e b.n 8005fd8 <HAL_UARTEx_ReceiveToIdle_DMA+0xc8>
  16651. }
  16652. }
  16653. /* Set Reception type to reception till IDLE Event*/
  16654. huart->ReceptionType = HAL_UART_RECEPTION_TOIDLE;
  16655. 8005f5a: 68fb ldr r3, [r7, #12]
  16656. 8005f5c: 2201 movs r2, #1
  16657. 8005f5e: 66da str r2, [r3, #108] @ 0x6c
  16658. huart->RxEventType = HAL_UART_RXEVENT_TC;
  16659. 8005f60: 68fb ldr r3, [r7, #12]
  16660. 8005f62: 2200 movs r2, #0
  16661. 8005f64: 671a str r2, [r3, #112] @ 0x70
  16662. status = UART_Start_Receive_DMA(huart, pData, Size);
  16663. 8005f66: 2527 movs r5, #39 @ 0x27
  16664. 8005f68: 197c adds r4, r7, r5
  16665. 8005f6a: 1dbb adds r3, r7, #6
  16666. 8005f6c: 881a ldrh r2, [r3, #0]
  16667. 8005f6e: 68b9 ldr r1, [r7, #8]
  16668. 8005f70: 68fb ldr r3, [r7, #12]
  16669. 8005f72: 0018 movs r0, r3
  16670. 8005f74: f7ff fd28 bl 80059c8 <UART_Start_Receive_DMA>
  16671. 8005f78: 0003 movs r3, r0
  16672. 8005f7a: 7023 strb r3, [r4, #0]
  16673. /* Check Rx process has been successfully started */
  16674. if (status == HAL_OK)
  16675. 8005f7c: 197b adds r3, r7, r5
  16676. 8005f7e: 781b ldrb r3, [r3, #0]
  16677. 8005f80: 2b00 cmp r3, #0
  16678. 8005f82: d124 bne.n 8005fce <HAL_UARTEx_ReceiveToIdle_DMA+0xbe>
  16679. {
  16680. if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
  16681. 8005f84: 68fb ldr r3, [r7, #12]
  16682. 8005f86: 6edb ldr r3, [r3, #108] @ 0x6c
  16683. 8005f88: 2b01 cmp r3, #1
  16684. 8005f8a: d11c bne.n 8005fc6 <HAL_UARTEx_ReceiveToIdle_DMA+0xb6>
  16685. {
  16686. __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF);
  16687. 8005f8c: 68fb ldr r3, [r7, #12]
  16688. 8005f8e: 681b ldr r3, [r3, #0]
  16689. 8005f90: 2210 movs r2, #16
  16690. 8005f92: 621a str r2, [r3, #32]
  16691. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16692. 8005f94: f3ef 8310 mrs r3, PRIMASK
  16693. 8005f98: 617b str r3, [r7, #20]
  16694. return(result);
  16695. 8005f9a: 697b ldr r3, [r7, #20]
  16696. ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
  16697. 8005f9c: 623b str r3, [r7, #32]
  16698. 8005f9e: 2301 movs r3, #1
  16699. 8005fa0: 61bb str r3, [r7, #24]
  16700. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16701. 8005fa2: 69bb ldr r3, [r7, #24]
  16702. 8005fa4: f383 8810 msr PRIMASK, r3
  16703. }
  16704. 8005fa8: 46c0 nop @ (mov r8, r8)
  16705. 8005faa: 68fb ldr r3, [r7, #12]
  16706. 8005fac: 681b ldr r3, [r3, #0]
  16707. 8005fae: 681a ldr r2, [r3, #0]
  16708. 8005fb0: 68fb ldr r3, [r7, #12]
  16709. 8005fb2: 681b ldr r3, [r3, #0]
  16710. 8005fb4: 2110 movs r1, #16
  16711. 8005fb6: 430a orrs r2, r1
  16712. 8005fb8: 601a str r2, [r3, #0]
  16713. 8005fba: 6a3b ldr r3, [r7, #32]
  16714. 8005fbc: 61fb str r3, [r7, #28]
  16715. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16716. 8005fbe: 69fb ldr r3, [r7, #28]
  16717. 8005fc0: f383 8810 msr PRIMASK, r3
  16718. }
  16719. 8005fc4: e003 b.n 8005fce <HAL_UARTEx_ReceiveToIdle_DMA+0xbe>
  16720. {
  16721. /* In case of errors already pending when reception is started,
  16722. Interrupts may have already been raised and lead to reception abortion.
  16723. (Overrun error for instance).
  16724. In such case Reception Type has been reset to HAL_UART_RECEPTION_STANDARD. */
  16725. status = HAL_ERROR;
  16726. 8005fc6: 2327 movs r3, #39 @ 0x27
  16727. 8005fc8: 18fb adds r3, r7, r3
  16728. 8005fca: 2201 movs r2, #1
  16729. 8005fcc: 701a strb r2, [r3, #0]
  16730. }
  16731. }
  16732. return status;
  16733. 8005fce: 2327 movs r3, #39 @ 0x27
  16734. 8005fd0: 18fb adds r3, r7, r3
  16735. 8005fd2: 781b ldrb r3, [r3, #0]
  16736. 8005fd4: e000 b.n 8005fd8 <HAL_UARTEx_ReceiveToIdle_DMA+0xc8>
  16737. }
  16738. else
  16739. {
  16740. return HAL_BUSY;
  16741. 8005fd6: 2302 movs r3, #2
  16742. }
  16743. }
  16744. 8005fd8: 0018 movs r0, r3
  16745. 8005fda: 46bd mov sp, r7
  16746. 8005fdc: b00a add sp, #40 @ 0x28
  16747. 8005fde: bdb0 pop {r4, r5, r7, pc}
  16748. 08005fe0 <memset>:
  16749. 8005fe0: 0003 movs r3, r0
  16750. 8005fe2: 1882 adds r2, r0, r2
  16751. 8005fe4: 4293 cmp r3, r2
  16752. 8005fe6: d100 bne.n 8005fea <memset+0xa>
  16753. 8005fe8: 4770 bx lr
  16754. 8005fea: 7019 strb r1, [r3, #0]
  16755. 8005fec: 3301 adds r3, #1
  16756. 8005fee: e7f9 b.n 8005fe4 <memset+0x4>
  16757. 08005ff0 <__libc_init_array>:
  16758. 8005ff0: b570 push {r4, r5, r6, lr}
  16759. 8005ff2: 2600 movs r6, #0
  16760. 8005ff4: 4c0c ldr r4, [pc, #48] @ (8006028 <__libc_init_array+0x38>)
  16761. 8005ff6: 4d0d ldr r5, [pc, #52] @ (800602c <__libc_init_array+0x3c>)
  16762. 8005ff8: 1b64 subs r4, r4, r5
  16763. 8005ffa: 10a4 asrs r4, r4, #2
  16764. 8005ffc: 42a6 cmp r6, r4
  16765. 8005ffe: d109 bne.n 8006014 <__libc_init_array+0x24>
  16766. 8006000: 2600 movs r6, #0
  16767. 8006002: f000 f819 bl 8006038 <_init>
  16768. 8006006: 4c0a ldr r4, [pc, #40] @ (8006030 <__libc_init_array+0x40>)
  16769. 8006008: 4d0a ldr r5, [pc, #40] @ (8006034 <__libc_init_array+0x44>)
  16770. 800600a: 1b64 subs r4, r4, r5
  16771. 800600c: 10a4 asrs r4, r4, #2
  16772. 800600e: 42a6 cmp r6, r4
  16773. 8006010: d105 bne.n 800601e <__libc_init_array+0x2e>
  16774. 8006012: bd70 pop {r4, r5, r6, pc}
  16775. 8006014: 00b3 lsls r3, r6, #2
  16776. 8006016: 58eb ldr r3, [r5, r3]
  16777. 8006018: 4798 blx r3
  16778. 800601a: 3601 adds r6, #1
  16779. 800601c: e7ee b.n 8005ffc <__libc_init_array+0xc>
  16780. 800601e: 00b3 lsls r3, r6, #2
  16781. 8006020: 58eb ldr r3, [r5, r3]
  16782. 8006022: 4798 blx r3
  16783. 8006024: 3601 adds r6, #1
  16784. 8006026: e7f2 b.n 800600e <__libc_init_array+0x1e>
  16785. 8006028: 08006140 .word 0x08006140
  16786. 800602c: 08006140 .word 0x08006140
  16787. 8006030: 08006144 .word 0x08006144
  16788. 8006034: 08006140 .word 0x08006140
  16789. 08006038 <_init>:
  16790. 8006038: b5f8 push {r3, r4, r5, r6, r7, lr}
  16791. 800603a: 46c0 nop @ (mov r8, r8)
  16792. 800603c: bcf8 pop {r3, r4, r5, r6, r7}
  16793. 800603e: bc08 pop {r3}
  16794. 8006040: 469e mov lr, r3
  16795. 8006042: 4770 bx lr
  16796. 08006044 <_fini>:
  16797. 8006044: b5f8 push {r3, r4, r5, r6, r7, lr}
  16798. 8006046: 46c0 nop @ (mov r8, r8)
  16799. 8006048: bcf8 pop {r3, r4, r5, r6, r7}
  16800. 800604a: bc08 pop {r3}
  16801. 800604c: 469e mov lr, r3
  16802. 800604e: 4770 bx lr
  16803. 08006050 <__FLASH_Program_Fast_veneer>:
  16804. 8006050: b401 push {r0}
  16805. 8006052: 4802 ldr r0, [pc, #8] @ (800605c <__FLASH_Program_Fast_veneer+0xc>)
  16806. 8006054: 4684 mov ip, r0
  16807. 8006056: bc01 pop {r0}
  16808. 8006058: 4760 bx ip
  16809. 800605a: bf00 nop
  16810. 800605c: 2000010d .word 0x2000010d
  16811. Disassembly of section .data:
  16812. 20000000 <SystemCoreClock>:
  16813. 20000000: 00f42400 .$..
  16814. 20000004 <crc8tab>:
  16815. 20000004: aa7fd500 54812bfe 8356fc29 7da802d7 .....+.T).V....}
  16816. 20000014: f82d8752 06d379ac d104ae7b 2ffa5085 R.-..y..{....P./
  16817. 20000024: 0edb71a4 f0258f5a 27f2588d d90ca673 .q..Z.%..X.'s...
  16818. 20000034: 5c8923f6 a277dd08 75a00adf 8b5ef421 .#.\..w....u!.^.
  16819. 20000044: 37e2489d c91cb663 1ecb61b4 e0359f4a .H.7c....a..J.5.
  16820. 20000054: 65b01acf 9b4ee431 4c9933e6 b267cd18 ...e1.N..3.L..g.
  16821. 20000064: 9346ec39 6db812c7 ba6fc510 44913bee 9.F....m..o..;.D
  16822. 20000074: c114be6b 3fea4095 e83d9742 16c369bc k....@.?B.=..i..
  16823. 20000084: 45903aef bb6ec411 6cb913c6 9247ed38 .:.E..n....l8.G.
  16824. 20000094: 17c268bd e93c9643 3eeb4194 c015bf6a .h..C.<..A.>j...
  16825. 200000a4: e1349e4b 1fca60b5 c81db762 36e3499c K.4..`..b....I.6
  16826. 200000b4: b366cc19 4d9832e7 9a4fe530 64b11bce ..f..2.M0.O....d
  16827. 200000c4: d80da772 26f3598c f1248e5b 0fda70a5 r....Y.&[.$..p..
  16828. 200000d4: 8a5ff520 74a10bde a376dc09 5d8822f7 ._....t..v..".]
  16829. 200000e4: 7ca903d6 8257fd28 55802aff ab7ed401 ...|(.W..*.U..~.
  16830. 200000f4: 2efb5184 d005af7a 07d278ad f92c8653 .Q..z....x..S.,.
  16831. 20000104 <uwTickPrio>:
  16832. 20000104: 00000004 ....
  16833. 20000108 <uwTickFreq>:
  16834. 20000108: 00000001 ....
  16835. 2000010c <FLASH_Program_Fast>:
  16836. * @param Address Specifies the address to be programmed.
  16837. * @param DataAddress Specifies the address where the data are stored.
  16838. * @retval None
  16839. */
  16840. static __RAM_FUNC void FLASH_Program_Fast(uint32_t Address, uint32_t DataAddress)
  16841. {
  16842. 2000010c: b580 push {r7, lr}
  16843. 2000010e: b088 sub sp, #32
  16844. 20000110: af00 add r7, sp, #0
  16845. 20000112: 6078 str r0, [r7, #4]
  16846. 20000114: 6039 str r1, [r7, #0]
  16847. uint8_t index = 0;
  16848. 20000116: 231f movs r3, #31
  16849. 20000118: 18fb adds r3, r7, r3
  16850. 2000011a: 2200 movs r2, #0
  16851. 2000011c: 701a strb r2, [r3, #0]
  16852. uint32_t dest = Address;
  16853. 2000011e: 687b ldr r3, [r7, #4]
  16854. 20000120: 61bb str r3, [r7, #24]
  16855. uint32_t src = DataAddress;
  16856. 20000122: 683b ldr r3, [r7, #0]
  16857. 20000124: 617b str r3, [r7, #20]
  16858. uint32_t primask_bit;
  16859. /* Set FSTPG bit */
  16860. SET_BIT(FLASH->CR, FLASH_CR_FSTPG);
  16861. 20000126: 4b1a ldr r3, [pc, #104] @ (20000190 <FLASH_Program_Fast+0x84>)
  16862. 20000128: 695a ldr r2, [r3, #20]
  16863. 2000012a: 4b19 ldr r3, [pc, #100] @ (20000190 <FLASH_Program_Fast+0x84>)
  16864. 2000012c: 2180 movs r1, #128 @ 0x80
  16865. 2000012e: 02c9 lsls r1, r1, #11
  16866. 20000130: 430a orrs r2, r1
  16867. 20000132: 615a str r2, [r3, #20]
  16868. __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
  16869. 20000134: f3ef 8310 mrs r3, PRIMASK
  16870. 20000138: 60fb str r3, [r7, #12]
  16871. return(result);
  16872. 2000013a: 68fb ldr r3, [r7, #12]
  16873. /* Enter critical section: row programming should not be longer than 7 ms */
  16874. primask_bit = __get_PRIMASK();
  16875. 2000013c: 613b str r3, [r7, #16]
  16876. __ASM volatile ("cpsid i" : : : "memory");
  16877. 2000013e: b672 cpsid i
  16878. }
  16879. 20000140: 46c0 nop @ (mov r8, r8)
  16880. __disable_irq();
  16881. /* Fast Program : 64 words */
  16882. while (index < 64U)
  16883. 20000142: e00f b.n 20000164 <FLASH_Program_Fast+0x58>
  16884. {
  16885. *(uint32_t *)dest = *(uint32_t *)src;
  16886. 20000144: 697a ldr r2, [r7, #20]
  16887. 20000146: 69bb ldr r3, [r7, #24]
  16888. 20000148: 6812 ldr r2, [r2, #0]
  16889. 2000014a: 601a str r2, [r3, #0]
  16890. src += 4U;
  16891. 2000014c: 697b ldr r3, [r7, #20]
  16892. 2000014e: 3304 adds r3, #4
  16893. 20000150: 617b str r3, [r7, #20]
  16894. dest += 4U;
  16895. 20000152: 69bb ldr r3, [r7, #24]
  16896. 20000154: 3304 adds r3, #4
  16897. 20000156: 61bb str r3, [r7, #24]
  16898. index++;
  16899. 20000158: 211f movs r1, #31
  16900. 2000015a: 187b adds r3, r7, r1
  16901. 2000015c: 781a ldrb r2, [r3, #0]
  16902. 2000015e: 187b adds r3, r7, r1
  16903. 20000160: 3201 adds r2, #1
  16904. 20000162: 701a strb r2, [r3, #0]
  16905. while (index < 64U)
  16906. 20000164: 231f movs r3, #31
  16907. 20000166: 18fb adds r3, r7, r3
  16908. 20000168: 781b ldrb r3, [r3, #0]
  16909. 2000016a: 2b3f cmp r3, #63 @ 0x3f
  16910. 2000016c: d9ea bls.n 20000144 <FLASH_Program_Fast+0x38>
  16911. be anyway done later */
  16912. #if defined(FLASH_DBANK_SUPPORT)
  16913. while ((FLASH->SR & (FLASH_SR_BSY1 | FLASH_SR_BSY2)) != 0x00U)
  16914. #else
  16915. while ((FLASH->SR & FLASH_SR_BSY1) != 0x00U)
  16916. 2000016e: 46c0 nop @ (mov r8, r8)
  16917. 20000170: 4b07 ldr r3, [pc, #28] @ (20000190 <FLASH_Program_Fast+0x84>)
  16918. 20000172: 691a ldr r2, [r3, #16]
  16919. 20000174: 2380 movs r3, #128 @ 0x80
  16920. 20000176: 025b lsls r3, r3, #9
  16921. 20000178: 4013 ands r3, r2
  16922. 2000017a: d1f9 bne.n 20000170 <FLASH_Program_Fast+0x64>
  16923. 2000017c: 693b ldr r3, [r7, #16]
  16924. 2000017e: 60bb str r3, [r7, #8]
  16925. __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
  16926. 20000180: 68bb ldr r3, [r7, #8]
  16927. 20000182: f383 8810 msr PRIMASK, r3
  16928. }
  16929. 20000186: 46c0 nop @ (mov r8, r8)
  16930. {
  16931. }
  16932. /* Exit critical section: restore previous priority mask */
  16933. __set_PRIMASK(primask_bit);
  16934. }
  16935. 20000188: 46c0 nop @ (mov r8, r8)
  16936. 2000018a: 46bd mov sp, r7
  16937. 2000018c: b008 add sp, #32
  16938. 2000018e: bd80 pop {r7, pc}
  16939. 20000190: 40022000 .word 0x40022000