dosimeter-fw.list 873 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157
  1. dosimeter-fw.elf: file format elf32-littlearm
  2. Sections:
  3. Idx Name Size VMA LMA File off Algn
  4. 0 .isr_vector 000001c4 08000000 08000000 00010000 2**0
  5. CONTENTS, ALLOC, LOAD, READONLY, DATA
  6. 1 .text 00008d9c 080001c4 080001c4 000101c4 2**2
  7. CONTENTS, ALLOC, LOAD, READONLY, CODE
  8. 2 .rodata 00000060 08008f60 08008f60 00018f60 2**2
  9. CONTENTS, ALLOC, LOAD, READONLY, DATA
  10. 3 .ARM.extab 00000000 08008fc0 08008fc0 00020190 2**0
  11. CONTENTS
  12. 4 .ARM 00000008 08008fc0 08008fc0 00018fc0 2**2
  13. CONTENTS, ALLOC, LOAD, READONLY, DATA
  14. 5 .preinit_array 00000000 08008fc8 08008fc8 00020190 2**0
  15. CONTENTS, ALLOC, LOAD, DATA
  16. 6 .init_array 00000004 08008fc8 08008fc8 00018fc8 2**2
  17. CONTENTS, ALLOC, LOAD, DATA
  18. 7 .fini_array 00000004 08008fcc 08008fcc 00018fcc 2**2
  19. CONTENTS, ALLOC, LOAD, DATA
  20. 8 .data 00000190 20000000 08008fd0 00020000 2**2
  21. CONTENTS, ALLOC, LOAD, DATA
  22. 9 .bss 00001d6c 20000190 08009160 00020190 2**2
  23. ALLOC
  24. 10 ._user_heap_stack 00000604 20001efc 08009160 00021efc 2**0
  25. ALLOC
  26. 11 .ARM.attributes 00000030 00000000 00000000 00020190 2**0
  27. CONTENTS, READONLY
  28. 12 .debug_info 00022c42 00000000 00000000 000201c0 2**0
  29. CONTENTS, READONLY, DEBUGGING, OCTETS
  30. 13 .debug_abbrev 0000429c 00000000 00000000 00042e02 2**0
  31. CONTENTS, READONLY, DEBUGGING, OCTETS
  32. 14 .debug_aranges 00001960 00000000 00000000 000470a0 2**3
  33. CONTENTS, READONLY, DEBUGGING, OCTETS
  34. 15 .debug_ranges 000017c8 00000000 00000000 00048a00 2**3
  35. CONTENTS, READONLY, DEBUGGING, OCTETS
  36. 16 .debug_macro 00028414 00000000 00000000 0004a1c8 2**0
  37. CONTENTS, READONLY, DEBUGGING, OCTETS
  38. 17 .debug_line 0001f97f 00000000 00000000 000725dc 2**0
  39. CONTENTS, READONLY, DEBUGGING, OCTETS
  40. 18 .debug_str 000ebf42 00000000 00000000 00091f5b 2**0
  41. CONTENTS, READONLY, DEBUGGING, OCTETS
  42. 19 .comment 00000053 00000000 00000000 0017de9d 2**0
  43. CONTENTS, READONLY
  44. 20 .debug_frame 00006c2c 00000000 00000000 0017def0 2**2
  45. CONTENTS, READONLY, DEBUGGING, OCTETS
  46. Disassembly of section .text:
  47. 080001c4 <__do_global_dtors_aux>:
  48. 80001c4: b510 push {r4, lr}
  49. 80001c6: 4c05 ldr r4, [pc, #20] ; (80001dc <__do_global_dtors_aux+0x18>)
  50. 80001c8: 7823 ldrb r3, [r4, #0]
  51. 80001ca: b933 cbnz r3, 80001da <__do_global_dtors_aux+0x16>
  52. 80001cc: 4b04 ldr r3, [pc, #16] ; (80001e0 <__do_global_dtors_aux+0x1c>)
  53. 80001ce: b113 cbz r3, 80001d6 <__do_global_dtors_aux+0x12>
  54. 80001d0: 4804 ldr r0, [pc, #16] ; (80001e4 <__do_global_dtors_aux+0x20>)
  55. 80001d2: f3af 8000 nop.w
  56. 80001d6: 2301 movs r3, #1
  57. 80001d8: 7023 strb r3, [r4, #0]
  58. 80001da: bd10 pop {r4, pc}
  59. 80001dc: 20000190 .word 0x20000190
  60. 80001e0: 00000000 .word 0x00000000
  61. 80001e4: 08008f48 .word 0x08008f48
  62. 080001e8 <frame_dummy>:
  63. 80001e8: b508 push {r3, lr}
  64. 80001ea: 4b03 ldr r3, [pc, #12] ; (80001f8 <frame_dummy+0x10>)
  65. 80001ec: b11b cbz r3, 80001f6 <frame_dummy+0xe>
  66. 80001ee: 4903 ldr r1, [pc, #12] ; (80001fc <frame_dummy+0x14>)
  67. 80001f0: 4803 ldr r0, [pc, #12] ; (8000200 <frame_dummy+0x18>)
  68. 80001f2: f3af 8000 nop.w
  69. 80001f6: bd08 pop {r3, pc}
  70. 80001f8: 00000000 .word 0x00000000
  71. 80001fc: 20000194 .word 0x20000194
  72. 8000200: 08008f48 .word 0x08008f48
  73. 08000204 <__aeabi_uldivmod>:
  74. 8000204: b953 cbnz r3, 800021c <__aeabi_uldivmod+0x18>
  75. 8000206: b94a cbnz r2, 800021c <__aeabi_uldivmod+0x18>
  76. 8000208: 2900 cmp r1, #0
  77. 800020a: bf08 it eq
  78. 800020c: 2800 cmpeq r0, #0
  79. 800020e: bf1c itt ne
  80. 8000210: f04f 31ff movne.w r1, #4294967295 ; 0xffffffff
  81. 8000214: f04f 30ff movne.w r0, #4294967295 ; 0xffffffff
  82. 8000218: f000 b96e b.w 80004f8 <__aeabi_idiv0>
  83. 800021c: f1ad 0c08 sub.w ip, sp, #8
  84. 8000220: e96d ce04 strd ip, lr, [sp, #-16]!
  85. 8000224: f000 f806 bl 8000234 <__udivmoddi4>
  86. 8000228: f8dd e004 ldr.w lr, [sp, #4]
  87. 800022c: e9dd 2302 ldrd r2, r3, [sp, #8]
  88. 8000230: b004 add sp, #16
  89. 8000232: 4770 bx lr
  90. 08000234 <__udivmoddi4>:
  91. 8000234: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  92. 8000238: 9d08 ldr r5, [sp, #32]
  93. 800023a: 4604 mov r4, r0
  94. 800023c: 468c mov ip, r1
  95. 800023e: 2b00 cmp r3, #0
  96. 8000240: f040 8083 bne.w 800034a <__udivmoddi4+0x116>
  97. 8000244: 428a cmp r2, r1
  98. 8000246: 4617 mov r7, r2
  99. 8000248: d947 bls.n 80002da <__udivmoddi4+0xa6>
  100. 800024a: fab2 f282 clz r2, r2
  101. 800024e: b142 cbz r2, 8000262 <__udivmoddi4+0x2e>
  102. 8000250: f1c2 0020 rsb r0, r2, #32
  103. 8000254: fa24 f000 lsr.w r0, r4, r0
  104. 8000258: 4091 lsls r1, r2
  105. 800025a: 4097 lsls r7, r2
  106. 800025c: ea40 0c01 orr.w ip, r0, r1
  107. 8000260: 4094 lsls r4, r2
  108. 8000262: ea4f 4817 mov.w r8, r7, lsr #16
  109. 8000266: 0c23 lsrs r3, r4, #16
  110. 8000268: fbbc f6f8 udiv r6, ip, r8
  111. 800026c: fa1f fe87 uxth.w lr, r7
  112. 8000270: fb08 c116 mls r1, r8, r6, ip
  113. 8000274: ea43 4301 orr.w r3, r3, r1, lsl #16
  114. 8000278: fb06 f10e mul.w r1, r6, lr
  115. 800027c: 4299 cmp r1, r3
  116. 800027e: d909 bls.n 8000294 <__udivmoddi4+0x60>
  117. 8000280: 18fb adds r3, r7, r3
  118. 8000282: f106 30ff add.w r0, r6, #4294967295 ; 0xffffffff
  119. 8000286: f080 8119 bcs.w 80004bc <__udivmoddi4+0x288>
  120. 800028a: 4299 cmp r1, r3
  121. 800028c: f240 8116 bls.w 80004bc <__udivmoddi4+0x288>
  122. 8000290: 3e02 subs r6, #2
  123. 8000292: 443b add r3, r7
  124. 8000294: 1a5b subs r3, r3, r1
  125. 8000296: b2a4 uxth r4, r4
  126. 8000298: fbb3 f0f8 udiv r0, r3, r8
  127. 800029c: fb08 3310 mls r3, r8, r0, r3
  128. 80002a0: ea44 4403 orr.w r4, r4, r3, lsl #16
  129. 80002a4: fb00 fe0e mul.w lr, r0, lr
  130. 80002a8: 45a6 cmp lr, r4
  131. 80002aa: d909 bls.n 80002c0 <__udivmoddi4+0x8c>
  132. 80002ac: 193c adds r4, r7, r4
  133. 80002ae: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff
  134. 80002b2: f080 8105 bcs.w 80004c0 <__udivmoddi4+0x28c>
  135. 80002b6: 45a6 cmp lr, r4
  136. 80002b8: f240 8102 bls.w 80004c0 <__udivmoddi4+0x28c>
  137. 80002bc: 3802 subs r0, #2
  138. 80002be: 443c add r4, r7
  139. 80002c0: ea40 4006 orr.w r0, r0, r6, lsl #16
  140. 80002c4: eba4 040e sub.w r4, r4, lr
  141. 80002c8: 2600 movs r6, #0
  142. 80002ca: b11d cbz r5, 80002d4 <__udivmoddi4+0xa0>
  143. 80002cc: 40d4 lsrs r4, r2
  144. 80002ce: 2300 movs r3, #0
  145. 80002d0: e9c5 4300 strd r4, r3, [r5]
  146. 80002d4: 4631 mov r1, r6
  147. 80002d6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  148. 80002da: b902 cbnz r2, 80002de <__udivmoddi4+0xaa>
  149. 80002dc: deff udf #255 ; 0xff
  150. 80002de: fab2 f282 clz r2, r2
  151. 80002e2: 2a00 cmp r2, #0
  152. 80002e4: d150 bne.n 8000388 <__udivmoddi4+0x154>
  153. 80002e6: 1bcb subs r3, r1, r7
  154. 80002e8: ea4f 4e17 mov.w lr, r7, lsr #16
  155. 80002ec: fa1f f887 uxth.w r8, r7
  156. 80002f0: 2601 movs r6, #1
  157. 80002f2: fbb3 fcfe udiv ip, r3, lr
  158. 80002f6: 0c21 lsrs r1, r4, #16
  159. 80002f8: fb0e 331c mls r3, lr, ip, r3
  160. 80002fc: ea41 4103 orr.w r1, r1, r3, lsl #16
  161. 8000300: fb08 f30c mul.w r3, r8, ip
  162. 8000304: 428b cmp r3, r1
  163. 8000306: d907 bls.n 8000318 <__udivmoddi4+0xe4>
  164. 8000308: 1879 adds r1, r7, r1
  165. 800030a: f10c 30ff add.w r0, ip, #4294967295 ; 0xffffffff
  166. 800030e: d202 bcs.n 8000316 <__udivmoddi4+0xe2>
  167. 8000310: 428b cmp r3, r1
  168. 8000312: f200 80e9 bhi.w 80004e8 <__udivmoddi4+0x2b4>
  169. 8000316: 4684 mov ip, r0
  170. 8000318: 1ac9 subs r1, r1, r3
  171. 800031a: b2a3 uxth r3, r4
  172. 800031c: fbb1 f0fe udiv r0, r1, lr
  173. 8000320: fb0e 1110 mls r1, lr, r0, r1
  174. 8000324: ea43 4401 orr.w r4, r3, r1, lsl #16
  175. 8000328: fb08 f800 mul.w r8, r8, r0
  176. 800032c: 45a0 cmp r8, r4
  177. 800032e: d907 bls.n 8000340 <__udivmoddi4+0x10c>
  178. 8000330: 193c adds r4, r7, r4
  179. 8000332: f100 33ff add.w r3, r0, #4294967295 ; 0xffffffff
  180. 8000336: d202 bcs.n 800033e <__udivmoddi4+0x10a>
  181. 8000338: 45a0 cmp r8, r4
  182. 800033a: f200 80d9 bhi.w 80004f0 <__udivmoddi4+0x2bc>
  183. 800033e: 4618 mov r0, r3
  184. 8000340: eba4 0408 sub.w r4, r4, r8
  185. 8000344: ea40 400c orr.w r0, r0, ip, lsl #16
  186. 8000348: e7bf b.n 80002ca <__udivmoddi4+0x96>
  187. 800034a: 428b cmp r3, r1
  188. 800034c: d909 bls.n 8000362 <__udivmoddi4+0x12e>
  189. 800034e: 2d00 cmp r5, #0
  190. 8000350: f000 80b1 beq.w 80004b6 <__udivmoddi4+0x282>
  191. 8000354: 2600 movs r6, #0
  192. 8000356: e9c5 0100 strd r0, r1, [r5]
  193. 800035a: 4630 mov r0, r6
  194. 800035c: 4631 mov r1, r6
  195. 800035e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  196. 8000362: fab3 f683 clz r6, r3
  197. 8000366: 2e00 cmp r6, #0
  198. 8000368: d14a bne.n 8000400 <__udivmoddi4+0x1cc>
  199. 800036a: 428b cmp r3, r1
  200. 800036c: d302 bcc.n 8000374 <__udivmoddi4+0x140>
  201. 800036e: 4282 cmp r2, r0
  202. 8000370: f200 80b8 bhi.w 80004e4 <__udivmoddi4+0x2b0>
  203. 8000374: 1a84 subs r4, r0, r2
  204. 8000376: eb61 0103 sbc.w r1, r1, r3
  205. 800037a: 2001 movs r0, #1
  206. 800037c: 468c mov ip, r1
  207. 800037e: 2d00 cmp r5, #0
  208. 8000380: d0a8 beq.n 80002d4 <__udivmoddi4+0xa0>
  209. 8000382: e9c5 4c00 strd r4, ip, [r5]
  210. 8000386: e7a5 b.n 80002d4 <__udivmoddi4+0xa0>
  211. 8000388: f1c2 0320 rsb r3, r2, #32
  212. 800038c: fa20 f603 lsr.w r6, r0, r3
  213. 8000390: 4097 lsls r7, r2
  214. 8000392: fa01 f002 lsl.w r0, r1, r2
  215. 8000396: ea4f 4e17 mov.w lr, r7, lsr #16
  216. 800039a: 40d9 lsrs r1, r3
  217. 800039c: 4330 orrs r0, r6
  218. 800039e: 0c03 lsrs r3, r0, #16
  219. 80003a0: fbb1 f6fe udiv r6, r1, lr
  220. 80003a4: fa1f f887 uxth.w r8, r7
  221. 80003a8: fb0e 1116 mls r1, lr, r6, r1
  222. 80003ac: ea43 4301 orr.w r3, r3, r1, lsl #16
  223. 80003b0: fb06 f108 mul.w r1, r6, r8
  224. 80003b4: 4299 cmp r1, r3
  225. 80003b6: fa04 f402 lsl.w r4, r4, r2
  226. 80003ba: d909 bls.n 80003d0 <__udivmoddi4+0x19c>
  227. 80003bc: 18fb adds r3, r7, r3
  228. 80003be: f106 3cff add.w ip, r6, #4294967295 ; 0xffffffff
  229. 80003c2: f080 808d bcs.w 80004e0 <__udivmoddi4+0x2ac>
  230. 80003c6: 4299 cmp r1, r3
  231. 80003c8: f240 808a bls.w 80004e0 <__udivmoddi4+0x2ac>
  232. 80003cc: 3e02 subs r6, #2
  233. 80003ce: 443b add r3, r7
  234. 80003d0: 1a5b subs r3, r3, r1
  235. 80003d2: b281 uxth r1, r0
  236. 80003d4: fbb3 f0fe udiv r0, r3, lr
  237. 80003d8: fb0e 3310 mls r3, lr, r0, r3
  238. 80003dc: ea41 4103 orr.w r1, r1, r3, lsl #16
  239. 80003e0: fb00 f308 mul.w r3, r0, r8
  240. 80003e4: 428b cmp r3, r1
  241. 80003e6: d907 bls.n 80003f8 <__udivmoddi4+0x1c4>
  242. 80003e8: 1879 adds r1, r7, r1
  243. 80003ea: f100 3cff add.w ip, r0, #4294967295 ; 0xffffffff
  244. 80003ee: d273 bcs.n 80004d8 <__udivmoddi4+0x2a4>
  245. 80003f0: 428b cmp r3, r1
  246. 80003f2: d971 bls.n 80004d8 <__udivmoddi4+0x2a4>
  247. 80003f4: 3802 subs r0, #2
  248. 80003f6: 4439 add r1, r7
  249. 80003f8: 1acb subs r3, r1, r3
  250. 80003fa: ea40 4606 orr.w r6, r0, r6, lsl #16
  251. 80003fe: e778 b.n 80002f2 <__udivmoddi4+0xbe>
  252. 8000400: f1c6 0c20 rsb ip, r6, #32
  253. 8000404: fa03 f406 lsl.w r4, r3, r6
  254. 8000408: fa22 f30c lsr.w r3, r2, ip
  255. 800040c: 431c orrs r4, r3
  256. 800040e: fa20 f70c lsr.w r7, r0, ip
  257. 8000412: fa01 f306 lsl.w r3, r1, r6
  258. 8000416: ea4f 4e14 mov.w lr, r4, lsr #16
  259. 800041a: fa21 f10c lsr.w r1, r1, ip
  260. 800041e: 431f orrs r7, r3
  261. 8000420: 0c3b lsrs r3, r7, #16
  262. 8000422: fbb1 f9fe udiv r9, r1, lr
  263. 8000426: fa1f f884 uxth.w r8, r4
  264. 800042a: fb0e 1119 mls r1, lr, r9, r1
  265. 800042e: ea43 4101 orr.w r1, r3, r1, lsl #16
  266. 8000432: fb09 fa08 mul.w sl, r9, r8
  267. 8000436: 458a cmp sl, r1
  268. 8000438: fa02 f206 lsl.w r2, r2, r6
  269. 800043c: fa00 f306 lsl.w r3, r0, r6
  270. 8000440: d908 bls.n 8000454 <__udivmoddi4+0x220>
  271. 8000442: 1861 adds r1, r4, r1
  272. 8000444: f109 30ff add.w r0, r9, #4294967295 ; 0xffffffff
  273. 8000448: d248 bcs.n 80004dc <__udivmoddi4+0x2a8>
  274. 800044a: 458a cmp sl, r1
  275. 800044c: d946 bls.n 80004dc <__udivmoddi4+0x2a8>
  276. 800044e: f1a9 0902 sub.w r9, r9, #2
  277. 8000452: 4421 add r1, r4
  278. 8000454: eba1 010a sub.w r1, r1, sl
  279. 8000458: b2bf uxth r7, r7
  280. 800045a: fbb1 f0fe udiv r0, r1, lr
  281. 800045e: fb0e 1110 mls r1, lr, r0, r1
  282. 8000462: ea47 4701 orr.w r7, r7, r1, lsl #16
  283. 8000466: fb00 f808 mul.w r8, r0, r8
  284. 800046a: 45b8 cmp r8, r7
  285. 800046c: d907 bls.n 800047e <__udivmoddi4+0x24a>
  286. 800046e: 19e7 adds r7, r4, r7
  287. 8000470: f100 31ff add.w r1, r0, #4294967295 ; 0xffffffff
  288. 8000474: d22e bcs.n 80004d4 <__udivmoddi4+0x2a0>
  289. 8000476: 45b8 cmp r8, r7
  290. 8000478: d92c bls.n 80004d4 <__udivmoddi4+0x2a0>
  291. 800047a: 3802 subs r0, #2
  292. 800047c: 4427 add r7, r4
  293. 800047e: ea40 4009 orr.w r0, r0, r9, lsl #16
  294. 8000482: eba7 0708 sub.w r7, r7, r8
  295. 8000486: fba0 8902 umull r8, r9, r0, r2
  296. 800048a: 454f cmp r7, r9
  297. 800048c: 46c6 mov lr, r8
  298. 800048e: 4649 mov r1, r9
  299. 8000490: d31a bcc.n 80004c8 <__udivmoddi4+0x294>
  300. 8000492: d017 beq.n 80004c4 <__udivmoddi4+0x290>
  301. 8000494: b15d cbz r5, 80004ae <__udivmoddi4+0x27a>
  302. 8000496: ebb3 020e subs.w r2, r3, lr
  303. 800049a: eb67 0701 sbc.w r7, r7, r1
  304. 800049e: fa07 fc0c lsl.w ip, r7, ip
  305. 80004a2: 40f2 lsrs r2, r6
  306. 80004a4: ea4c 0202 orr.w r2, ip, r2
  307. 80004a8: 40f7 lsrs r7, r6
  308. 80004aa: e9c5 2700 strd r2, r7, [r5]
  309. 80004ae: 2600 movs r6, #0
  310. 80004b0: 4631 mov r1, r6
  311. 80004b2: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  312. 80004b6: 462e mov r6, r5
  313. 80004b8: 4628 mov r0, r5
  314. 80004ba: e70b b.n 80002d4 <__udivmoddi4+0xa0>
  315. 80004bc: 4606 mov r6, r0
  316. 80004be: e6e9 b.n 8000294 <__udivmoddi4+0x60>
  317. 80004c0: 4618 mov r0, r3
  318. 80004c2: e6fd b.n 80002c0 <__udivmoddi4+0x8c>
  319. 80004c4: 4543 cmp r3, r8
  320. 80004c6: d2e5 bcs.n 8000494 <__udivmoddi4+0x260>
  321. 80004c8: ebb8 0e02 subs.w lr, r8, r2
  322. 80004cc: eb69 0104 sbc.w r1, r9, r4
  323. 80004d0: 3801 subs r0, #1
  324. 80004d2: e7df b.n 8000494 <__udivmoddi4+0x260>
  325. 80004d4: 4608 mov r0, r1
  326. 80004d6: e7d2 b.n 800047e <__udivmoddi4+0x24a>
  327. 80004d8: 4660 mov r0, ip
  328. 80004da: e78d b.n 80003f8 <__udivmoddi4+0x1c4>
  329. 80004dc: 4681 mov r9, r0
  330. 80004de: e7b9 b.n 8000454 <__udivmoddi4+0x220>
  331. 80004e0: 4666 mov r6, ip
  332. 80004e2: e775 b.n 80003d0 <__udivmoddi4+0x19c>
  333. 80004e4: 4630 mov r0, r6
  334. 80004e6: e74a b.n 800037e <__udivmoddi4+0x14a>
  335. 80004e8: f1ac 0c02 sub.w ip, ip, #2
  336. 80004ec: 4439 add r1, r7
  337. 80004ee: e713 b.n 8000318 <__udivmoddi4+0xe4>
  338. 80004f0: 3802 subs r0, #2
  339. 80004f2: 443c add r4, r7
  340. 80004f4: e724 b.n 8000340 <__udivmoddi4+0x10c>
  341. 80004f6: bf00 nop
  342. 080004f8 <__aeabi_idiv0>:
  343. 80004f8: 4770 bx lr
  344. 80004fa: bf00 nop
  345. 080004fc <main>:
  346. /**
  347. * @brief The application entry point.
  348. * @retval int
  349. */
  350. int main(void)
  351. {
  352. 80004fc: b580 push {r7, lr}
  353. 80004fe: af00 add r7, sp, #0
  354. /* USER CODE END 1 */
  355. /* MCU Configuration--------------------------------------------------------*/
  356. /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  357. HAL_Init();
  358. 8000500: f000 fe66 bl 80011d0 <HAL_Init>
  359. /* USER CODE BEGIN Init */
  360. /* USER CODE END Init */
  361. /* Configure the system clock */
  362. SystemClock_Config();
  363. 8000504: f000 f818 bl 8000538 <SystemClock_Config>
  364. /* USER CODE BEGIN SysInit */
  365. /* USER CODE END SysInit */
  366. /* Initialize all configured peripherals */
  367. MX_GPIO_Init();
  368. 8000508: f000 fad2 bl 8000ab0 <MX_GPIO_Init>
  369. MX_ADC1_Init();
  370. 800050c: f000 f882 bl 8000614 <MX_ADC1_Init>
  371. MX_ADC2_Init();
  372. 8000510: f000 f8d2 bl 80006b8 <MX_ADC2_Init>
  373. MX_DAC_Init();
  374. 8000514: f000 f922 bl 800075c <MX_DAC_Init>
  375. MX_I2C1_SMBUS_Init();
  376. 8000518: f000 f954 bl 80007c4 <MX_I2C1_SMBUS_Init>
  377. MX_RTC_Init();
  378. 800051c: f000 f984 bl 8000828 <MX_RTC_Init>
  379. MX_SPI1_Init();
  380. 8000520: f000 f9dc bl 80008dc <MX_SPI1_Init>
  381. MX_SPI2_Init();
  382. 8000524: f000 fa10 bl 8000948 <MX_SPI2_Init>
  383. MX_USART1_UART_Init();
  384. 8000528: f000 fa98 bl 8000a5c <MX_USART1_UART_Init>
  385. MX_USB_DEVICE_Init();
  386. 800052c: f007 ff6a bl 8008404 <MX_USB_DEVICE_Init>
  387. MX_TIM2_Init();
  388. 8000530: f000 fa40 bl 80009b4 <MX_TIM2_Init>
  389. /* USER CODE END 2 */
  390. /* Infinite loop */
  391. /* USER CODE BEGIN WHILE */
  392. while (1)
  393. 8000534: e7fe b.n 8000534 <main+0x38>
  394. ...
  395. 08000538 <SystemClock_Config>:
  396. /**
  397. * @brief System Clock Configuration
  398. * @retval None
  399. */
  400. void SystemClock_Config(void)
  401. {
  402. 8000538: b580 push {r7, lr}
  403. 800053a: b094 sub sp, #80 ; 0x50
  404. 800053c: af00 add r7, sp, #0
  405. RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  406. 800053e: f107 031c add.w r3, r7, #28
  407. 8000542: 2234 movs r2, #52 ; 0x34
  408. 8000544: 2100 movs r1, #0
  409. 8000546: 4618 mov r0, r3
  410. 8000548: f008 fcf6 bl 8008f38 <memset>
  411. RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  412. 800054c: f107 0308 add.w r3, r7, #8
  413. 8000550: 2200 movs r2, #0
  414. 8000552: 601a str r2, [r3, #0]
  415. 8000554: 605a str r2, [r3, #4]
  416. 8000556: 609a str r2, [r3, #8]
  417. 8000558: 60da str r2, [r3, #12]
  418. 800055a: 611a str r2, [r3, #16]
  419. /** Configure the main internal regulator output voltage
  420. */
  421. __HAL_RCC_PWR_CLK_ENABLE();
  422. 800055c: 2300 movs r3, #0
  423. 800055e: 607b str r3, [r7, #4]
  424. 8000560: 4b2a ldr r3, [pc, #168] ; (800060c <SystemClock_Config+0xd4>)
  425. 8000562: 6c1b ldr r3, [r3, #64] ; 0x40
  426. 8000564: 4a29 ldr r2, [pc, #164] ; (800060c <SystemClock_Config+0xd4>)
  427. 8000566: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  428. 800056a: 6413 str r3, [r2, #64] ; 0x40
  429. 800056c: 4b27 ldr r3, [pc, #156] ; (800060c <SystemClock_Config+0xd4>)
  430. 800056e: 6c1b ldr r3, [r3, #64] ; 0x40
  431. 8000570: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
  432. 8000574: 607b str r3, [r7, #4]
  433. 8000576: 687b ldr r3, [r7, #4]
  434. __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
  435. 8000578: 2300 movs r3, #0
  436. 800057a: 603b str r3, [r7, #0]
  437. 800057c: 4b24 ldr r3, [pc, #144] ; (8000610 <SystemClock_Config+0xd8>)
  438. 800057e: 681b ldr r3, [r3, #0]
  439. 8000580: 4a23 ldr r2, [pc, #140] ; (8000610 <SystemClock_Config+0xd8>)
  440. 8000582: f443 4340 orr.w r3, r3, #49152 ; 0xc000
  441. 8000586: 6013 str r3, [r2, #0]
  442. 8000588: 4b21 ldr r3, [pc, #132] ; (8000610 <SystemClock_Config+0xd8>)
  443. 800058a: 681b ldr r3, [r3, #0]
  444. 800058c: f403 4340 and.w r3, r3, #49152 ; 0xc000
  445. 8000590: 603b str r3, [r7, #0]
  446. 8000592: 683b ldr r3, [r7, #0]
  447. /** Initializes the RCC Oscillators according to the specified parameters
  448. * in the RCC_OscInitTypeDef structure.
  449. */
  450. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE;
  451. 8000594: 2305 movs r3, #5
  452. 8000596: 61fb str r3, [r7, #28]
  453. RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  454. 8000598: f44f 3380 mov.w r3, #65536 ; 0x10000
  455. 800059c: 623b str r3, [r7, #32]
  456. RCC_OscInitStruct.LSEState = RCC_LSE_ON;
  457. 800059e: 2301 movs r3, #1
  458. 80005a0: 627b str r3, [r7, #36] ; 0x24
  459. RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  460. 80005a2: 2302 movs r3, #2
  461. 80005a4: 637b str r3, [r7, #52] ; 0x34
  462. RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  463. 80005a6: f44f 0380 mov.w r3, #4194304 ; 0x400000
  464. 80005aa: 63bb str r3, [r7, #56] ; 0x38
  465. RCC_OscInitStruct.PLL.PLLM = 4;
  466. 80005ac: 2304 movs r3, #4
  467. 80005ae: 63fb str r3, [r7, #60] ; 0x3c
  468. RCC_OscInitStruct.PLL.PLLN = 160;
  469. 80005b0: 23a0 movs r3, #160 ; 0xa0
  470. 80005b2: 643b str r3, [r7, #64] ; 0x40
  471. RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  472. 80005b4: 2302 movs r3, #2
  473. 80005b6: 647b str r3, [r7, #68] ; 0x44
  474. RCC_OscInitStruct.PLL.PLLQ = 2;
  475. 80005b8: 2302 movs r3, #2
  476. 80005ba: 64bb str r3, [r7, #72] ; 0x48
  477. RCC_OscInitStruct.PLL.PLLR = 2;
  478. 80005bc: 2302 movs r3, #2
  479. 80005be: 64fb str r3, [r7, #76] ; 0x4c
  480. if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  481. 80005c0: f107 031c add.w r3, r7, #28
  482. 80005c4: 4618 mov r0, r3
  483. 80005c6: f003 fbff bl 8003dc8 <HAL_RCC_OscConfig>
  484. 80005ca: 4603 mov r3, r0
  485. 80005cc: 2b00 cmp r3, #0
  486. 80005ce: d001 beq.n 80005d4 <SystemClock_Config+0x9c>
  487. {
  488. Error_Handler();
  489. 80005d0: f000 fb46 bl 8000c60 <Error_Handler>
  490. }
  491. /** Initializes the CPU, AHB and APB buses clocks
  492. */
  493. RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
  494. 80005d4: 230f movs r3, #15
  495. 80005d6: 60bb str r3, [r7, #8]
  496. |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
  497. RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  498. 80005d8: 2302 movs r3, #2
  499. 80005da: 60fb str r3, [r7, #12]
  500. RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  501. 80005dc: 2300 movs r3, #0
  502. 80005de: 613b str r3, [r7, #16]
  503. RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
  504. 80005e0: f44f 53a0 mov.w r3, #5120 ; 0x1400
  505. 80005e4: 617b str r3, [r7, #20]
  506. RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
  507. 80005e6: f44f 5380 mov.w r3, #4096 ; 0x1000
  508. 80005ea: 61bb str r3, [r7, #24]
  509. if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
  510. 80005ec: f107 0308 add.w r3, r7, #8
  511. 80005f0: 2105 movs r1, #5
  512. 80005f2: 4618 mov r0, r3
  513. 80005f4: f002 fdf2 bl 80031dc <HAL_RCC_ClockConfig>
  514. 80005f8: 4603 mov r3, r0
  515. 80005fa: 2b00 cmp r3, #0
  516. 80005fc: d001 beq.n 8000602 <SystemClock_Config+0xca>
  517. {
  518. Error_Handler();
  519. 80005fe: f000 fb2f bl 8000c60 <Error_Handler>
  520. }
  521. }
  522. 8000602: bf00 nop
  523. 8000604: 3750 adds r7, #80 ; 0x50
  524. 8000606: 46bd mov sp, r7
  525. 8000608: bd80 pop {r7, pc}
  526. 800060a: bf00 nop
  527. 800060c: 40023800 .word 0x40023800
  528. 8000610: 40007000 .word 0x40007000
  529. 08000614 <MX_ADC1_Init>:
  530. * @brief ADC1 Initialization Function
  531. * @param None
  532. * @retval None
  533. */
  534. static void MX_ADC1_Init(void)
  535. {
  536. 8000614: b580 push {r7, lr}
  537. 8000616: b084 sub sp, #16
  538. 8000618: af00 add r7, sp, #0
  539. /* USER CODE BEGIN ADC1_Init 0 */
  540. /* USER CODE END ADC1_Init 0 */
  541. ADC_ChannelConfTypeDef sConfig = {0};
  542. 800061a: 463b mov r3, r7
  543. 800061c: 2200 movs r2, #0
  544. 800061e: 601a str r2, [r3, #0]
  545. 8000620: 605a str r2, [r3, #4]
  546. 8000622: 609a str r2, [r3, #8]
  547. 8000624: 60da str r2, [r3, #12]
  548. /* USER CODE BEGIN ADC1_Init 1 */
  549. /* USER CODE END ADC1_Init 1 */
  550. /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
  551. */
  552. hadc1.Instance = ADC1;
  553. 8000626: 4b21 ldr r3, [pc, #132] ; (80006ac <MX_ADC1_Init+0x98>)
  554. 8000628: 4a21 ldr r2, [pc, #132] ; (80006b0 <MX_ADC1_Init+0x9c>)
  555. 800062a: 601a str r2, [r3, #0]
  556. hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
  557. 800062c: 4b1f ldr r3, [pc, #124] ; (80006ac <MX_ADC1_Init+0x98>)
  558. 800062e: f44f 3280 mov.w r2, #65536 ; 0x10000
  559. 8000632: 605a str r2, [r3, #4]
  560. hadc1.Init.Resolution = ADC_RESOLUTION_12B;
  561. 8000634: 4b1d ldr r3, [pc, #116] ; (80006ac <MX_ADC1_Init+0x98>)
  562. 8000636: 2200 movs r2, #0
  563. 8000638: 609a str r2, [r3, #8]
  564. hadc1.Init.ScanConvMode = DISABLE;
  565. 800063a: 4b1c ldr r3, [pc, #112] ; (80006ac <MX_ADC1_Init+0x98>)
  566. 800063c: 2200 movs r2, #0
  567. 800063e: 611a str r2, [r3, #16]
  568. hadc1.Init.ContinuousConvMode = DISABLE;
  569. 8000640: 4b1a ldr r3, [pc, #104] ; (80006ac <MX_ADC1_Init+0x98>)
  570. 8000642: 2200 movs r2, #0
  571. 8000644: 761a strb r2, [r3, #24]
  572. hadc1.Init.DiscontinuousConvMode = DISABLE;
  573. 8000646: 4b19 ldr r3, [pc, #100] ; (80006ac <MX_ADC1_Init+0x98>)
  574. 8000648: 2200 movs r2, #0
  575. 800064a: f883 2020 strb.w r2, [r3, #32]
  576. hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
  577. 800064e: 4b17 ldr r3, [pc, #92] ; (80006ac <MX_ADC1_Init+0x98>)
  578. 8000650: 2200 movs r2, #0
  579. 8000652: 62da str r2, [r3, #44] ; 0x2c
  580. hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
  581. 8000654: 4b15 ldr r3, [pc, #84] ; (80006ac <MX_ADC1_Init+0x98>)
  582. 8000656: 4a17 ldr r2, [pc, #92] ; (80006b4 <MX_ADC1_Init+0xa0>)
  583. 8000658: 629a str r2, [r3, #40] ; 0x28
  584. hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
  585. 800065a: 4b14 ldr r3, [pc, #80] ; (80006ac <MX_ADC1_Init+0x98>)
  586. 800065c: 2200 movs r2, #0
  587. 800065e: 60da str r2, [r3, #12]
  588. hadc1.Init.NbrOfConversion = 1;
  589. 8000660: 4b12 ldr r3, [pc, #72] ; (80006ac <MX_ADC1_Init+0x98>)
  590. 8000662: 2201 movs r2, #1
  591. 8000664: 61da str r2, [r3, #28]
  592. hadc1.Init.DMAContinuousRequests = DISABLE;
  593. 8000666: 4b11 ldr r3, [pc, #68] ; (80006ac <MX_ADC1_Init+0x98>)
  594. 8000668: 2200 movs r2, #0
  595. 800066a: f883 2030 strb.w r2, [r3, #48] ; 0x30
  596. hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
  597. 800066e: 4b0f ldr r3, [pc, #60] ; (80006ac <MX_ADC1_Init+0x98>)
  598. 8000670: 2201 movs r2, #1
  599. 8000672: 615a str r2, [r3, #20]
  600. if (HAL_ADC_Init(&hadc1) != HAL_OK)
  601. 8000674: 480d ldr r0, [pc, #52] ; (80006ac <MX_ADC1_Init+0x98>)
  602. 8000676: f000 fe41 bl 80012fc <HAL_ADC_Init>
  603. 800067a: 4603 mov r3, r0
  604. 800067c: 2b00 cmp r3, #0
  605. 800067e: d001 beq.n 8000684 <MX_ADC1_Init+0x70>
  606. {
  607. Error_Handler();
  608. 8000680: f000 faee bl 8000c60 <Error_Handler>
  609. }
  610. /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
  611. */
  612. sConfig.Channel = ADC_CHANNEL_VREFINT;
  613. 8000684: 2311 movs r3, #17
  614. 8000686: 603b str r3, [r7, #0]
  615. sConfig.Rank = 1;
  616. 8000688: 2301 movs r3, #1
  617. 800068a: 607b str r3, [r7, #4]
  618. sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
  619. 800068c: 2300 movs r3, #0
  620. 800068e: 60bb str r3, [r7, #8]
  621. if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
  622. 8000690: 463b mov r3, r7
  623. 8000692: 4619 mov r1, r3
  624. 8000694: 4805 ldr r0, [pc, #20] ; (80006ac <MX_ADC1_Init+0x98>)
  625. 8000696: f000 fe75 bl 8001384 <HAL_ADC_ConfigChannel>
  626. 800069a: 4603 mov r3, r0
  627. 800069c: 2b00 cmp r3, #0
  628. 800069e: d001 beq.n 80006a4 <MX_ADC1_Init+0x90>
  629. {
  630. Error_Handler();
  631. 80006a0: f000 fade bl 8000c60 <Error_Handler>
  632. }
  633. /* USER CODE BEGIN ADC1_Init 2 */
  634. /* USER CODE END ADC1_Init 2 */
  635. }
  636. 80006a4: bf00 nop
  637. 80006a6: 3710 adds r7, #16
  638. 80006a8: 46bd mov sp, r7
  639. 80006aa: bd80 pop {r7, pc}
  640. 80006ac: 20000470 .word 0x20000470
  641. 80006b0: 40012000 .word 0x40012000
  642. 80006b4: 0f000001 .word 0x0f000001
  643. 080006b8 <MX_ADC2_Init>:
  644. * @brief ADC2 Initialization Function
  645. * @param None
  646. * @retval None
  647. */
  648. static void MX_ADC2_Init(void)
  649. {
  650. 80006b8: b580 push {r7, lr}
  651. 80006ba: b084 sub sp, #16
  652. 80006bc: af00 add r7, sp, #0
  653. /* USER CODE BEGIN ADC2_Init 0 */
  654. /* USER CODE END ADC2_Init 0 */
  655. ADC_ChannelConfTypeDef sConfig = {0};
  656. 80006be: 463b mov r3, r7
  657. 80006c0: 2200 movs r2, #0
  658. 80006c2: 601a str r2, [r3, #0]
  659. 80006c4: 605a str r2, [r3, #4]
  660. 80006c6: 609a str r2, [r3, #8]
  661. 80006c8: 60da str r2, [r3, #12]
  662. /* USER CODE BEGIN ADC2_Init 1 */
  663. /* USER CODE END ADC2_Init 1 */
  664. /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
  665. */
  666. hadc2.Instance = ADC2;
  667. 80006ca: 4b21 ldr r3, [pc, #132] ; (8000750 <MX_ADC2_Init+0x98>)
  668. 80006cc: 4a21 ldr r2, [pc, #132] ; (8000754 <MX_ADC2_Init+0x9c>)
  669. 80006ce: 601a str r2, [r3, #0]
  670. hadc2.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
  671. 80006d0: 4b1f ldr r3, [pc, #124] ; (8000750 <MX_ADC2_Init+0x98>)
  672. 80006d2: f44f 3280 mov.w r2, #65536 ; 0x10000
  673. 80006d6: 605a str r2, [r3, #4]
  674. hadc2.Init.Resolution = ADC_RESOLUTION_12B;
  675. 80006d8: 4b1d ldr r3, [pc, #116] ; (8000750 <MX_ADC2_Init+0x98>)
  676. 80006da: 2200 movs r2, #0
  677. 80006dc: 609a str r2, [r3, #8]
  678. hadc2.Init.ScanConvMode = DISABLE;
  679. 80006de: 4b1c ldr r3, [pc, #112] ; (8000750 <MX_ADC2_Init+0x98>)
  680. 80006e0: 2200 movs r2, #0
  681. 80006e2: 611a str r2, [r3, #16]
  682. hadc2.Init.ContinuousConvMode = DISABLE;
  683. 80006e4: 4b1a ldr r3, [pc, #104] ; (8000750 <MX_ADC2_Init+0x98>)
  684. 80006e6: 2200 movs r2, #0
  685. 80006e8: 761a strb r2, [r3, #24]
  686. hadc2.Init.DiscontinuousConvMode = DISABLE;
  687. 80006ea: 4b19 ldr r3, [pc, #100] ; (8000750 <MX_ADC2_Init+0x98>)
  688. 80006ec: 2200 movs r2, #0
  689. 80006ee: f883 2020 strb.w r2, [r3, #32]
  690. hadc2.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
  691. 80006f2: 4b17 ldr r3, [pc, #92] ; (8000750 <MX_ADC2_Init+0x98>)
  692. 80006f4: 2200 movs r2, #0
  693. 80006f6: 62da str r2, [r3, #44] ; 0x2c
  694. hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START;
  695. 80006f8: 4b15 ldr r3, [pc, #84] ; (8000750 <MX_ADC2_Init+0x98>)
  696. 80006fa: 4a17 ldr r2, [pc, #92] ; (8000758 <MX_ADC2_Init+0xa0>)
  697. 80006fc: 629a str r2, [r3, #40] ; 0x28
  698. hadc2.Init.DataAlign = ADC_DATAALIGN_RIGHT;
  699. 80006fe: 4b14 ldr r3, [pc, #80] ; (8000750 <MX_ADC2_Init+0x98>)
  700. 8000700: 2200 movs r2, #0
  701. 8000702: 60da str r2, [r3, #12]
  702. hadc2.Init.NbrOfConversion = 1;
  703. 8000704: 4b12 ldr r3, [pc, #72] ; (8000750 <MX_ADC2_Init+0x98>)
  704. 8000706: 2201 movs r2, #1
  705. 8000708: 61da str r2, [r3, #28]
  706. hadc2.Init.DMAContinuousRequests = DISABLE;
  707. 800070a: 4b11 ldr r3, [pc, #68] ; (8000750 <MX_ADC2_Init+0x98>)
  708. 800070c: 2200 movs r2, #0
  709. 800070e: f883 2030 strb.w r2, [r3, #48] ; 0x30
  710. hadc2.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
  711. 8000712: 4b0f ldr r3, [pc, #60] ; (8000750 <MX_ADC2_Init+0x98>)
  712. 8000714: 2201 movs r2, #1
  713. 8000716: 615a str r2, [r3, #20]
  714. if (HAL_ADC_Init(&hadc2) != HAL_OK)
  715. 8000718: 480d ldr r0, [pc, #52] ; (8000750 <MX_ADC2_Init+0x98>)
  716. 800071a: f000 fdef bl 80012fc <HAL_ADC_Init>
  717. 800071e: 4603 mov r3, r0
  718. 8000720: 2b00 cmp r3, #0
  719. 8000722: d001 beq.n 8000728 <MX_ADC2_Init+0x70>
  720. {
  721. Error_Handler();
  722. 8000724: f000 fa9c bl 8000c60 <Error_Handler>
  723. }
  724. /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
  725. */
  726. sConfig.Channel = ADC_CHANNEL_14;
  727. 8000728: 230e movs r3, #14
  728. 800072a: 603b str r3, [r7, #0]
  729. sConfig.Rank = 1;
  730. 800072c: 2301 movs r3, #1
  731. 800072e: 607b str r3, [r7, #4]
  732. sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
  733. 8000730: 2300 movs r3, #0
  734. 8000732: 60bb str r3, [r7, #8]
  735. if (HAL_ADC_ConfigChannel(&hadc2, &sConfig) != HAL_OK)
  736. 8000734: 463b mov r3, r7
  737. 8000736: 4619 mov r1, r3
  738. 8000738: 4805 ldr r0, [pc, #20] ; (8000750 <MX_ADC2_Init+0x98>)
  739. 800073a: f000 fe23 bl 8001384 <HAL_ADC_ConfigChannel>
  740. 800073e: 4603 mov r3, r0
  741. 8000740: 2b00 cmp r3, #0
  742. 8000742: d001 beq.n 8000748 <MX_ADC2_Init+0x90>
  743. {
  744. Error_Handler();
  745. 8000744: f000 fa8c bl 8000c60 <Error_Handler>
  746. }
  747. /* USER CODE BEGIN ADC2_Init 2 */
  748. /* USER CODE END ADC2_Init 2 */
  749. }
  750. 8000748: bf00 nop
  751. 800074a: 3710 adds r7, #16
  752. 800074c: 46bd mov sp, r7
  753. 800074e: bd80 pop {r7, pc}
  754. 8000750: 20000428 .word 0x20000428
  755. 8000754: 40012100 .word 0x40012100
  756. 8000758: 0f000001 .word 0x0f000001
  757. 0800075c <MX_DAC_Init>:
  758. * @brief DAC Initialization Function
  759. * @param None
  760. * @retval None
  761. */
  762. static void MX_DAC_Init(void)
  763. {
  764. 800075c: b580 push {r7, lr}
  765. 800075e: b082 sub sp, #8
  766. 8000760: af00 add r7, sp, #0
  767. /* USER CODE BEGIN DAC_Init 0 */
  768. /* USER CODE END DAC_Init 0 */
  769. DAC_ChannelConfTypeDef sConfig = {0};
  770. 8000762: 463b mov r3, r7
  771. 8000764: 2200 movs r2, #0
  772. 8000766: 601a str r2, [r3, #0]
  773. 8000768: 605a str r2, [r3, #4]
  774. /* USER CODE BEGIN DAC_Init 1 */
  775. /* USER CODE END DAC_Init 1 */
  776. /** DAC Initialization
  777. */
  778. hdac.Instance = DAC;
  779. 800076a: 4b14 ldr r3, [pc, #80] ; (80007bc <MX_DAC_Init+0x60>)
  780. 800076c: 4a14 ldr r2, [pc, #80] ; (80007c0 <MX_DAC_Init+0x64>)
  781. 800076e: 601a str r2, [r3, #0]
  782. if (HAL_DAC_Init(&hdac) != HAL_OK)
  783. 8000770: 4812 ldr r0, [pc, #72] ; (80007bc <MX_DAC_Init+0x60>)
  784. 8000772: f001 f946 bl 8001a02 <HAL_DAC_Init>
  785. 8000776: 4603 mov r3, r0
  786. 8000778: 2b00 cmp r3, #0
  787. 800077a: d001 beq.n 8000780 <MX_DAC_Init+0x24>
  788. {
  789. Error_Handler();
  790. 800077c: f000 fa70 bl 8000c60 <Error_Handler>
  791. }
  792. /** DAC channel OUT1 config
  793. */
  794. sConfig.DAC_Trigger = DAC_TRIGGER_NONE;
  795. 8000780: 2300 movs r3, #0
  796. 8000782: 603b str r3, [r7, #0]
  797. sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_ENABLE;
  798. 8000784: 2300 movs r3, #0
  799. 8000786: 607b str r3, [r7, #4]
  800. if (HAL_DAC_ConfigChannel(&hdac, &sConfig, DAC_CHANNEL_1) != HAL_OK)
  801. 8000788: 463b mov r3, r7
  802. 800078a: 2200 movs r2, #0
  803. 800078c: 4619 mov r1, r3
  804. 800078e: 480b ldr r0, [pc, #44] ; (80007bc <MX_DAC_Init+0x60>)
  805. 8000790: f001 f959 bl 8001a46 <HAL_DAC_ConfigChannel>
  806. 8000794: 4603 mov r3, r0
  807. 8000796: 2b00 cmp r3, #0
  808. 8000798: d001 beq.n 800079e <MX_DAC_Init+0x42>
  809. {
  810. Error_Handler();
  811. 800079a: f000 fa61 bl 8000c60 <Error_Handler>
  812. }
  813. /** DAC channel OUT2 config
  814. */
  815. if (HAL_DAC_ConfigChannel(&hdac, &sConfig, DAC_CHANNEL_2) != HAL_OK)
  816. 800079e: 463b mov r3, r7
  817. 80007a0: 2210 movs r2, #16
  818. 80007a2: 4619 mov r1, r3
  819. 80007a4: 4805 ldr r0, [pc, #20] ; (80007bc <MX_DAC_Init+0x60>)
  820. 80007a6: f001 f94e bl 8001a46 <HAL_DAC_ConfigChannel>
  821. 80007aa: 4603 mov r3, r0
  822. 80007ac: 2b00 cmp r3, #0
  823. 80007ae: d001 beq.n 80007b4 <MX_DAC_Init+0x58>
  824. {
  825. Error_Handler();
  826. 80007b0: f000 fa56 bl 8000c60 <Error_Handler>
  827. }
  828. /* USER CODE BEGIN DAC_Init 2 */
  829. /* USER CODE END DAC_Init 2 */
  830. }
  831. 80007b4: bf00 nop
  832. 80007b6: 3708 adds r7, #8
  833. 80007b8: 46bd mov sp, r7
  834. 80007ba: bd80 pop {r7, pc}
  835. 80007bc: 200004fc .word 0x200004fc
  836. 80007c0: 40007400 .word 0x40007400
  837. 080007c4 <MX_I2C1_SMBUS_Init>:
  838. * @brief I2C1 Initialization Function
  839. * @param None
  840. * @retval None
  841. */
  842. static void MX_I2C1_SMBUS_Init(void)
  843. {
  844. 80007c4: b580 push {r7, lr}
  845. 80007c6: af00 add r7, sp, #0
  846. /* USER CODE END I2C1_Init 0 */
  847. /* USER CODE BEGIN I2C1_Init 1 */
  848. /* USER CODE END I2C1_Init 1 */
  849. hsmbus1.Instance = I2C1;
  850. 80007c8: 4b14 ldr r3, [pc, #80] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  851. 80007ca: 4a15 ldr r2, [pc, #84] ; (8000820 <MX_I2C1_SMBUS_Init+0x5c>)
  852. 80007cc: 601a str r2, [r3, #0]
  853. hsmbus1.Init.ClockSpeed = 100000;
  854. 80007ce: 4b13 ldr r3, [pc, #76] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  855. 80007d0: 4a14 ldr r2, [pc, #80] ; (8000824 <MX_I2C1_SMBUS_Init+0x60>)
  856. 80007d2: 605a str r2, [r3, #4]
  857. hsmbus1.Init.OwnAddress1 = 0;
  858. 80007d4: 4b11 ldr r3, [pc, #68] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  859. 80007d6: 2200 movs r2, #0
  860. 80007d8: 60da str r2, [r3, #12]
  861. hsmbus1.Init.AddressingMode = SMBUS_ADDRESSINGMODE_7BIT;
  862. 80007da: 4b10 ldr r3, [pc, #64] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  863. 80007dc: f44f 4280 mov.w r2, #16384 ; 0x4000
  864. 80007e0: 611a str r2, [r3, #16]
  865. hsmbus1.Init.DualAddressMode = SMBUS_DUALADDRESS_DISABLE;
  866. 80007e2: 4b0e ldr r3, [pc, #56] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  867. 80007e4: 2200 movs r2, #0
  868. 80007e6: 615a str r2, [r3, #20]
  869. hsmbus1.Init.OwnAddress2 = 0;
  870. 80007e8: 4b0c ldr r3, [pc, #48] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  871. 80007ea: 2200 movs r2, #0
  872. 80007ec: 619a str r2, [r3, #24]
  873. hsmbus1.Init.GeneralCallMode = SMBUS_GENERALCALL_DISABLE;
  874. 80007ee: 4b0b ldr r3, [pc, #44] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  875. 80007f0: 2200 movs r2, #0
  876. 80007f2: 61da str r2, [r3, #28]
  877. hsmbus1.Init.NoStretchMode = SMBUS_NOSTRETCH_DISABLE;
  878. 80007f4: 4b09 ldr r3, [pc, #36] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  879. 80007f6: 2200 movs r2, #0
  880. 80007f8: 621a str r2, [r3, #32]
  881. hsmbus1.Init.PacketErrorCheckMode = SMBUS_PEC_DISABLE;
  882. 80007fa: 4b08 ldr r3, [pc, #32] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  883. 80007fc: 2200 movs r2, #0
  884. 80007fe: 625a str r2, [r3, #36] ; 0x24
  885. hsmbus1.Init.PeripheralMode = SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE;
  886. 8000800: 4b06 ldr r3, [pc, #24] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  887. 8000802: 2202 movs r2, #2
  888. 8000804: 629a str r2, [r3, #40] ; 0x28
  889. if (HAL_SMBUS_Init(&hsmbus1) != HAL_OK)
  890. 8000806: 4805 ldr r0, [pc, #20] ; (800081c <MX_I2C1_SMBUS_Init+0x58>)
  891. 8000808: f003 ffe4 bl 80047d4 <HAL_SMBUS_Init>
  892. 800080c: 4603 mov r3, r0
  893. 800080e: 2b00 cmp r3, #0
  894. 8000810: d001 beq.n 8000816 <MX_I2C1_SMBUS_Init+0x52>
  895. {
  896. Error_Handler();
  897. 8000812: f000 fa25 bl 8000c60 <Error_Handler>
  898. }
  899. /* USER CODE BEGIN I2C1_Init 2 */
  900. /* USER CODE END I2C1_Init 2 */
  901. }
  902. 8000816: bf00 nop
  903. 8000818: bd80 pop {r7, pc}
  904. 800081a: bf00 nop
  905. 800081c: 20000588 .word 0x20000588
  906. 8000820: 40005400 .word 0x40005400
  907. 8000824: 000186a0 .word 0x000186a0
  908. 08000828 <MX_RTC_Init>:
  909. * @brief RTC Initialization Function
  910. * @param None
  911. * @retval None
  912. */
  913. static void MX_RTC_Init(void)
  914. {
  915. 8000828: b580 push {r7, lr}
  916. 800082a: b086 sub sp, #24
  917. 800082c: af00 add r7, sp, #0
  918. /* USER CODE BEGIN RTC_Init 0 */
  919. /* USER CODE END RTC_Init 0 */
  920. RTC_TimeTypeDef sTime = {0};
  921. 800082e: 1d3b adds r3, r7, #4
  922. 8000830: 2200 movs r2, #0
  923. 8000832: 601a str r2, [r3, #0]
  924. 8000834: 605a str r2, [r3, #4]
  925. 8000836: 609a str r2, [r3, #8]
  926. 8000838: 60da str r2, [r3, #12]
  927. 800083a: 611a str r2, [r3, #16]
  928. RTC_DateTypeDef sDate = {0};
  929. 800083c: 2300 movs r3, #0
  930. 800083e: 603b str r3, [r7, #0]
  931. /* USER CODE BEGIN RTC_Init 1 */
  932. /* USER CODE END RTC_Init 1 */
  933. /** Initialize RTC Only
  934. */
  935. hrtc.Instance = RTC;
  936. 8000840: 4b24 ldr r3, [pc, #144] ; (80008d4 <MX_RTC_Init+0xac>)
  937. 8000842: 4a25 ldr r2, [pc, #148] ; (80008d8 <MX_RTC_Init+0xb0>)
  938. 8000844: 601a str r2, [r3, #0]
  939. hrtc.Init.HourFormat = RTC_HOURFORMAT_24;
  940. 8000846: 4b23 ldr r3, [pc, #140] ; (80008d4 <MX_RTC_Init+0xac>)
  941. 8000848: 2200 movs r2, #0
  942. 800084a: 605a str r2, [r3, #4]
  943. hrtc.Init.AsynchPrediv = 127;
  944. 800084c: 4b21 ldr r3, [pc, #132] ; (80008d4 <MX_RTC_Init+0xac>)
  945. 800084e: 227f movs r2, #127 ; 0x7f
  946. 8000850: 609a str r2, [r3, #8]
  947. hrtc.Init.SynchPrediv = 255;
  948. 8000852: 4b20 ldr r3, [pc, #128] ; (80008d4 <MX_RTC_Init+0xac>)
  949. 8000854: 22ff movs r2, #255 ; 0xff
  950. 8000856: 60da str r2, [r3, #12]
  951. hrtc.Init.OutPut = RTC_OUTPUT_DISABLE;
  952. 8000858: 4b1e ldr r3, [pc, #120] ; (80008d4 <MX_RTC_Init+0xac>)
  953. 800085a: 2200 movs r2, #0
  954. 800085c: 611a str r2, [r3, #16]
  955. hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;
  956. 800085e: 4b1d ldr r3, [pc, #116] ; (80008d4 <MX_RTC_Init+0xac>)
  957. 8000860: 2200 movs r2, #0
  958. 8000862: 615a str r2, [r3, #20]
  959. hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;
  960. 8000864: 4b1b ldr r3, [pc, #108] ; (80008d4 <MX_RTC_Init+0xac>)
  961. 8000866: 2200 movs r2, #0
  962. 8000868: 619a str r2, [r3, #24]
  963. if (HAL_RTC_Init(&hrtc) != HAL_OK)
  964. 800086a: 481a ldr r0, [pc, #104] ; (80008d4 <MX_RTC_Init+0xac>)
  965. 800086c: f003 fd4a bl 8004304 <HAL_RTC_Init>
  966. 8000870: 4603 mov r3, r0
  967. 8000872: 2b00 cmp r3, #0
  968. 8000874: d001 beq.n 800087a <MX_RTC_Init+0x52>
  969. {
  970. Error_Handler();
  971. 8000876: f000 f9f3 bl 8000c60 <Error_Handler>
  972. /* USER CODE END Check_RTC_BKUP */
  973. /** Initialize RTC and set the Time and Date
  974. */
  975. sTime.Hours = 0x0;
  976. 800087a: 2300 movs r3, #0
  977. 800087c: 713b strb r3, [r7, #4]
  978. sTime.Minutes = 0x0;
  979. 800087e: 2300 movs r3, #0
  980. 8000880: 717b strb r3, [r7, #5]
  981. sTime.Seconds = 0x0;
  982. 8000882: 2300 movs r3, #0
  983. 8000884: 71bb strb r3, [r7, #6]
  984. sTime.DayLightSaving = RTC_DAYLIGHTSAVING_NONE;
  985. 8000886: 2300 movs r3, #0
  986. 8000888: 613b str r3, [r7, #16]
  987. sTime.StoreOperation = RTC_STOREOPERATION_RESET;
  988. 800088a: 2300 movs r3, #0
  989. 800088c: 617b str r3, [r7, #20]
  990. if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK)
  991. 800088e: 1d3b adds r3, r7, #4
  992. 8000890: 2201 movs r2, #1
  993. 8000892: 4619 mov r1, r3
  994. 8000894: 480f ldr r0, [pc, #60] ; (80008d4 <MX_RTC_Init+0xac>)
  995. 8000896: f003 fdc6 bl 8004426 <HAL_RTC_SetTime>
  996. 800089a: 4603 mov r3, r0
  997. 800089c: 2b00 cmp r3, #0
  998. 800089e: d001 beq.n 80008a4 <MX_RTC_Init+0x7c>
  999. {
  1000. Error_Handler();
  1001. 80008a0: f000 f9de bl 8000c60 <Error_Handler>
  1002. }
  1003. sDate.WeekDay = RTC_WEEKDAY_MONDAY;
  1004. 80008a4: 2301 movs r3, #1
  1005. 80008a6: 703b strb r3, [r7, #0]
  1006. sDate.Month = RTC_MONTH_JANUARY;
  1007. 80008a8: 2301 movs r3, #1
  1008. 80008aa: 707b strb r3, [r7, #1]
  1009. sDate.Date = 0x1;
  1010. 80008ac: 2301 movs r3, #1
  1011. 80008ae: 70bb strb r3, [r7, #2]
  1012. sDate.Year = 0x0;
  1013. 80008b0: 2300 movs r3, #0
  1014. 80008b2: 70fb strb r3, [r7, #3]
  1015. if (HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BCD) != HAL_OK)
  1016. 80008b4: 463b mov r3, r7
  1017. 80008b6: 2201 movs r2, #1
  1018. 80008b8: 4619 mov r1, r3
  1019. 80008ba: 4806 ldr r0, [pc, #24] ; (80008d4 <MX_RTC_Init+0xac>)
  1020. 80008bc: f003 fe70 bl 80045a0 <HAL_RTC_SetDate>
  1021. 80008c0: 4603 mov r3, r0
  1022. 80008c2: 2b00 cmp r3, #0
  1023. 80008c4: d001 beq.n 80008ca <MX_RTC_Init+0xa2>
  1024. {
  1025. Error_Handler();
  1026. 80008c6: f000 f9cb bl 8000c60 <Error_Handler>
  1027. }
  1028. /* USER CODE BEGIN RTC_Init 2 */
  1029. /* USER CODE END RTC_Init 2 */
  1030. }
  1031. 80008ca: bf00 nop
  1032. 80008cc: 3718 adds r7, #24
  1033. 80008ce: 46bd mov sp, r7
  1034. 80008d0: bd80 pop {r7, pc}
  1035. 80008d2: bf00 nop
  1036. 80008d4: 20000510 .word 0x20000510
  1037. 80008d8: 40002800 .word 0x40002800
  1038. 080008dc <MX_SPI1_Init>:
  1039. * @brief SPI1 Initialization Function
  1040. * @param None
  1041. * @retval None
  1042. */
  1043. static void MX_SPI1_Init(void)
  1044. {
  1045. 80008dc: b580 push {r7, lr}
  1046. 80008de: af00 add r7, sp, #0
  1047. /* USER CODE BEGIN SPI1_Init 1 */
  1048. /* USER CODE END SPI1_Init 1 */
  1049. /* SPI1 parameter configuration*/
  1050. hspi1.Instance = SPI1;
  1051. 80008e0: 4b17 ldr r3, [pc, #92] ; (8000940 <MX_SPI1_Init+0x64>)
  1052. 80008e2: 4a18 ldr r2, [pc, #96] ; (8000944 <MX_SPI1_Init+0x68>)
  1053. 80008e4: 601a str r2, [r3, #0]
  1054. hspi1.Init.Mode = SPI_MODE_MASTER;
  1055. 80008e6: 4b16 ldr r3, [pc, #88] ; (8000940 <MX_SPI1_Init+0x64>)
  1056. 80008e8: f44f 7282 mov.w r2, #260 ; 0x104
  1057. 80008ec: 605a str r2, [r3, #4]
  1058. hspi1.Init.Direction = SPI_DIRECTION_2LINES;
  1059. 80008ee: 4b14 ldr r3, [pc, #80] ; (8000940 <MX_SPI1_Init+0x64>)
  1060. 80008f0: 2200 movs r2, #0
  1061. 80008f2: 609a str r2, [r3, #8]
  1062. hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
  1063. 80008f4: 4b12 ldr r3, [pc, #72] ; (8000940 <MX_SPI1_Init+0x64>)
  1064. 80008f6: 2200 movs r2, #0
  1065. 80008f8: 60da str r2, [r3, #12]
  1066. hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
  1067. 80008fa: 4b11 ldr r3, [pc, #68] ; (8000940 <MX_SPI1_Init+0x64>)
  1068. 80008fc: 2200 movs r2, #0
  1069. 80008fe: 611a str r2, [r3, #16]
  1070. hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
  1071. 8000900: 4b0f ldr r3, [pc, #60] ; (8000940 <MX_SPI1_Init+0x64>)
  1072. 8000902: 2200 movs r2, #0
  1073. 8000904: 615a str r2, [r3, #20]
  1074. hspi1.Init.NSS = SPI_NSS_SOFT;
  1075. 8000906: 4b0e ldr r3, [pc, #56] ; (8000940 <MX_SPI1_Init+0x64>)
  1076. 8000908: f44f 7200 mov.w r2, #512 ; 0x200
  1077. 800090c: 619a str r2, [r3, #24]
  1078. hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
  1079. 800090e: 4b0c ldr r3, [pc, #48] ; (8000940 <MX_SPI1_Init+0x64>)
  1080. 8000910: 2200 movs r2, #0
  1081. 8000912: 61da str r2, [r3, #28]
  1082. hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
  1083. 8000914: 4b0a ldr r3, [pc, #40] ; (8000940 <MX_SPI1_Init+0x64>)
  1084. 8000916: 2200 movs r2, #0
  1085. 8000918: 621a str r2, [r3, #32]
  1086. hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
  1087. 800091a: 4b09 ldr r3, [pc, #36] ; (8000940 <MX_SPI1_Init+0x64>)
  1088. 800091c: 2200 movs r2, #0
  1089. 800091e: 625a str r2, [r3, #36] ; 0x24
  1090. hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  1091. 8000920: 4b07 ldr r3, [pc, #28] ; (8000940 <MX_SPI1_Init+0x64>)
  1092. 8000922: 2200 movs r2, #0
  1093. 8000924: 629a str r2, [r3, #40] ; 0x28
  1094. hspi1.Init.CRCPolynomial = 10;
  1095. 8000926: 4b06 ldr r3, [pc, #24] ; (8000940 <MX_SPI1_Init+0x64>)
  1096. 8000928: 220a movs r2, #10
  1097. 800092a: 62da str r2, [r3, #44] ; 0x2c
  1098. if (HAL_SPI_Init(&hspi1) != HAL_OK)
  1099. 800092c: 4804 ldr r0, [pc, #16] ; (8000940 <MX_SPI1_Init+0x64>)
  1100. 800092e: f004 f80f bl 8004950 <HAL_SPI_Init>
  1101. 8000932: 4603 mov r3, r0
  1102. 8000934: 2b00 cmp r3, #0
  1103. 8000936: d001 beq.n 800093c <MX_SPI1_Init+0x60>
  1104. {
  1105. Error_Handler();
  1106. 8000938: f000 f992 bl 8000c60 <Error_Handler>
  1107. }
  1108. /* USER CODE BEGIN SPI1_Init 2 */
  1109. /* USER CODE END SPI1_Init 2 */
  1110. }
  1111. 800093c: bf00 nop
  1112. 800093e: bd80 pop {r7, pc}
  1113. 8000940: 20000530 .word 0x20000530
  1114. 8000944: 40013000 .word 0x40013000
  1115. 08000948 <MX_SPI2_Init>:
  1116. * @brief SPI2 Initialization Function
  1117. * @param None
  1118. * @retval None
  1119. */
  1120. static void MX_SPI2_Init(void)
  1121. {
  1122. 8000948: b580 push {r7, lr}
  1123. 800094a: af00 add r7, sp, #0
  1124. /* USER CODE BEGIN SPI2_Init 1 */
  1125. /* USER CODE END SPI2_Init 1 */
  1126. /* SPI2 parameter configuration*/
  1127. hspi2.Instance = SPI2;
  1128. 800094c: 4b17 ldr r3, [pc, #92] ; (80009ac <MX_SPI2_Init+0x64>)
  1129. 800094e: 4a18 ldr r2, [pc, #96] ; (80009b0 <MX_SPI2_Init+0x68>)
  1130. 8000950: 601a str r2, [r3, #0]
  1131. hspi2.Init.Mode = SPI_MODE_MASTER;
  1132. 8000952: 4b16 ldr r3, [pc, #88] ; (80009ac <MX_SPI2_Init+0x64>)
  1133. 8000954: f44f 7282 mov.w r2, #260 ; 0x104
  1134. 8000958: 605a str r2, [r3, #4]
  1135. hspi2.Init.Direction = SPI_DIRECTION_2LINES;
  1136. 800095a: 4b14 ldr r3, [pc, #80] ; (80009ac <MX_SPI2_Init+0x64>)
  1137. 800095c: 2200 movs r2, #0
  1138. 800095e: 609a str r2, [r3, #8]
  1139. hspi2.Init.DataSize = SPI_DATASIZE_8BIT;
  1140. 8000960: 4b12 ldr r3, [pc, #72] ; (80009ac <MX_SPI2_Init+0x64>)
  1141. 8000962: 2200 movs r2, #0
  1142. 8000964: 60da str r2, [r3, #12]
  1143. hspi2.Init.CLKPolarity = SPI_POLARITY_LOW;
  1144. 8000966: 4b11 ldr r3, [pc, #68] ; (80009ac <MX_SPI2_Init+0x64>)
  1145. 8000968: 2200 movs r2, #0
  1146. 800096a: 611a str r2, [r3, #16]
  1147. hspi2.Init.CLKPhase = SPI_PHASE_1EDGE;
  1148. 800096c: 4b0f ldr r3, [pc, #60] ; (80009ac <MX_SPI2_Init+0x64>)
  1149. 800096e: 2200 movs r2, #0
  1150. 8000970: 615a str r2, [r3, #20]
  1151. hspi2.Init.NSS = SPI_NSS_SOFT;
  1152. 8000972: 4b0e ldr r3, [pc, #56] ; (80009ac <MX_SPI2_Init+0x64>)
  1153. 8000974: f44f 7200 mov.w r2, #512 ; 0x200
  1154. 8000978: 619a str r2, [r3, #24]
  1155. hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
  1156. 800097a: 4b0c ldr r3, [pc, #48] ; (80009ac <MX_SPI2_Init+0x64>)
  1157. 800097c: 2200 movs r2, #0
  1158. 800097e: 61da str r2, [r3, #28]
  1159. hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB;
  1160. 8000980: 4b0a ldr r3, [pc, #40] ; (80009ac <MX_SPI2_Init+0x64>)
  1161. 8000982: 2200 movs r2, #0
  1162. 8000984: 621a str r2, [r3, #32]
  1163. hspi2.Init.TIMode = SPI_TIMODE_DISABLE;
  1164. 8000986: 4b09 ldr r3, [pc, #36] ; (80009ac <MX_SPI2_Init+0x64>)
  1165. 8000988: 2200 movs r2, #0
  1166. 800098a: 625a str r2, [r3, #36] ; 0x24
  1167. hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  1168. 800098c: 4b07 ldr r3, [pc, #28] ; (80009ac <MX_SPI2_Init+0x64>)
  1169. 800098e: 2200 movs r2, #0
  1170. 8000990: 629a str r2, [r3, #40] ; 0x28
  1171. hspi2.Init.CRCPolynomial = 10;
  1172. 8000992: 4b06 ldr r3, [pc, #24] ; (80009ac <MX_SPI2_Init+0x64>)
  1173. 8000994: 220a movs r2, #10
  1174. 8000996: 62da str r2, [r3, #44] ; 0x2c
  1175. if (HAL_SPI_Init(&hspi2) != HAL_OK)
  1176. 8000998: 4804 ldr r0, [pc, #16] ; (80009ac <MX_SPI2_Init+0x64>)
  1177. 800099a: f003 ffd9 bl 8004950 <HAL_SPI_Init>
  1178. 800099e: 4603 mov r3, r0
  1179. 80009a0: 2b00 cmp r3, #0
  1180. 80009a2: d001 beq.n 80009a8 <MX_SPI2_Init+0x60>
  1181. {
  1182. Error_Handler();
  1183. 80009a4: f000 f95c bl 8000c60 <Error_Handler>
  1184. }
  1185. /* USER CODE BEGIN SPI2_Init 2 */
  1186. /* USER CODE END SPI2_Init 2 */
  1187. }
  1188. 80009a8: bf00 nop
  1189. 80009aa: bd80 pop {r7, pc}
  1190. 80009ac: 200003d0 .word 0x200003d0
  1191. 80009b0: 40003800 .word 0x40003800
  1192. 080009b4 <MX_TIM2_Init>:
  1193. * @brief TIM2 Initialization Function
  1194. * @param None
  1195. * @retval None
  1196. */
  1197. static void MX_TIM2_Init(void)
  1198. {
  1199. 80009b4: b580 push {r7, lr}
  1200. 80009b6: b088 sub sp, #32
  1201. 80009b8: af00 add r7, sp, #0
  1202. /* USER CODE BEGIN TIM2_Init 0 */
  1203. /* USER CODE END TIM2_Init 0 */
  1204. TIM_SlaveConfigTypeDef sSlaveConfig = {0};
  1205. 80009ba: f107 030c add.w r3, r7, #12
  1206. 80009be: 2200 movs r2, #0
  1207. 80009c0: 601a str r2, [r3, #0]
  1208. 80009c2: 605a str r2, [r3, #4]
  1209. 80009c4: 609a str r2, [r3, #8]
  1210. 80009c6: 60da str r2, [r3, #12]
  1211. 80009c8: 611a str r2, [r3, #16]
  1212. TIM_MasterConfigTypeDef sMasterConfig = {0};
  1213. 80009ca: 1d3b adds r3, r7, #4
  1214. 80009cc: 2200 movs r2, #0
  1215. 80009ce: 601a str r2, [r3, #0]
  1216. 80009d0: 605a str r2, [r3, #4]
  1217. /* USER CODE BEGIN TIM2_Init 1 */
  1218. /* USER CODE END TIM2_Init 1 */
  1219. htim2.Instance = TIM2;
  1220. 80009d2: 4b21 ldr r3, [pc, #132] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1221. 80009d4: f04f 4280 mov.w r2, #1073741824 ; 0x40000000
  1222. 80009d8: 601a str r2, [r3, #0]
  1223. htim2.Init.Prescaler = 0;
  1224. 80009da: 4b1f ldr r3, [pc, #124] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1225. 80009dc: 2200 movs r2, #0
  1226. 80009de: 605a str r2, [r3, #4]
  1227. htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
  1228. 80009e0: 4b1d ldr r3, [pc, #116] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1229. 80009e2: 2200 movs r2, #0
  1230. 80009e4: 609a str r2, [r3, #8]
  1231. htim2.Init.Period = 4294967295;
  1232. 80009e6: 4b1c ldr r3, [pc, #112] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1233. 80009e8: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff
  1234. 80009ec: 60da str r2, [r3, #12]
  1235. htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
  1236. 80009ee: 4b1a ldr r3, [pc, #104] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1237. 80009f0: 2200 movs r2, #0
  1238. 80009f2: 611a str r2, [r3, #16]
  1239. htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
  1240. 80009f4: 4b18 ldr r3, [pc, #96] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1241. 80009f6: 2200 movs r2, #0
  1242. 80009f8: 619a str r2, [r3, #24]
  1243. if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
  1244. 80009fa: 4817 ldr r0, [pc, #92] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1245. 80009fc: f004 f831 bl 8004a62 <HAL_TIM_Base_Init>
  1246. 8000a00: 4603 mov r3, r0
  1247. 8000a02: 2b00 cmp r3, #0
  1248. 8000a04: d001 beq.n 8000a0a <MX_TIM2_Init+0x56>
  1249. {
  1250. Error_Handler();
  1251. 8000a06: f000 f92b bl 8000c60 <Error_Handler>
  1252. }
  1253. sSlaveConfig.SlaveMode = TIM_SLAVEMODE_EXTERNAL1;
  1254. 8000a0a: 2307 movs r3, #7
  1255. 8000a0c: 60fb str r3, [r7, #12]
  1256. sSlaveConfig.InputTrigger = TIM_TS_ETRF;
  1257. 8000a0e: 2370 movs r3, #112 ; 0x70
  1258. 8000a10: 613b str r3, [r7, #16]
  1259. sSlaveConfig.TriggerPolarity = TIM_TRIGGERPOLARITY_NONINVERTED;
  1260. 8000a12: 2300 movs r3, #0
  1261. 8000a14: 617b str r3, [r7, #20]
  1262. sSlaveConfig.TriggerPrescaler = TIM_TRIGGERPRESCALER_DIV1;
  1263. 8000a16: 2300 movs r3, #0
  1264. 8000a18: 61bb str r3, [r7, #24]
  1265. sSlaveConfig.TriggerFilter = 0;
  1266. 8000a1a: 2300 movs r3, #0
  1267. 8000a1c: 61fb str r3, [r7, #28]
  1268. if (HAL_TIM_SlaveConfigSynchro(&htim2, &sSlaveConfig) != HAL_OK)
  1269. 8000a1e: f107 030c add.w r3, r7, #12
  1270. 8000a22: 4619 mov r1, r3
  1271. 8000a24: 480c ldr r0, [pc, #48] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1272. 8000a26: f004 f86b bl 8004b00 <HAL_TIM_SlaveConfigSynchro>
  1273. 8000a2a: 4603 mov r3, r0
  1274. 8000a2c: 2b00 cmp r3, #0
  1275. 8000a2e: d001 beq.n 8000a34 <MX_TIM2_Init+0x80>
  1276. {
  1277. Error_Handler();
  1278. 8000a30: f000 f916 bl 8000c60 <Error_Handler>
  1279. }
  1280. sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
  1281. 8000a34: 2300 movs r3, #0
  1282. 8000a36: 607b str r3, [r7, #4]
  1283. sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  1284. 8000a38: 2300 movs r3, #0
  1285. 8000a3a: 60bb str r3, [r7, #8]
  1286. if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
  1287. 8000a3c: 1d3b adds r3, r7, #4
  1288. 8000a3e: 4619 mov r1, r3
  1289. 8000a40: 4805 ldr r0, [pc, #20] ; (8000a58 <MX_TIM2_Init+0xa4>)
  1290. 8000a42: f004 fa4f bl 8004ee4 <HAL_TIMEx_MasterConfigSynchronization>
  1291. 8000a46: 4603 mov r3, r0
  1292. 8000a48: 2b00 cmp r3, #0
  1293. 8000a4a: d001 beq.n 8000a50 <MX_TIM2_Init+0x9c>
  1294. {
  1295. Error_Handler();
  1296. 8000a4c: f000 f908 bl 8000c60 <Error_Handler>
  1297. }
  1298. /* USER CODE BEGIN TIM2_Init 2 */
  1299. /* USER CODE END TIM2_Init 2 */
  1300. }
  1301. 8000a50: bf00 nop
  1302. 8000a52: 3720 adds r7, #32
  1303. 8000a54: 46bd mov sp, r7
  1304. 8000a56: bd80 pop {r7, pc}
  1305. 8000a58: 200005d8 .word 0x200005d8
  1306. 08000a5c <MX_USART1_UART_Init>:
  1307. * @brief USART1 Initialization Function
  1308. * @param None
  1309. * @retval None
  1310. */
  1311. static void MX_USART1_UART_Init(void)
  1312. {
  1313. 8000a5c: b580 push {r7, lr}
  1314. 8000a5e: af00 add r7, sp, #0
  1315. /* USER CODE END USART1_Init 0 */
  1316. /* USER CODE BEGIN USART1_Init 1 */
  1317. /* USER CODE END USART1_Init 1 */
  1318. huart1.Instance = USART1;
  1319. 8000a60: 4b11 ldr r3, [pc, #68] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1320. 8000a62: 4a12 ldr r2, [pc, #72] ; (8000aac <MX_USART1_UART_Init+0x50>)
  1321. 8000a64: 601a str r2, [r3, #0]
  1322. huart1.Init.BaudRate = 115200;
  1323. 8000a66: 4b10 ldr r3, [pc, #64] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1324. 8000a68: f44f 32e1 mov.w r2, #115200 ; 0x1c200
  1325. 8000a6c: 605a str r2, [r3, #4]
  1326. huart1.Init.WordLength = UART_WORDLENGTH_8B;
  1327. 8000a6e: 4b0e ldr r3, [pc, #56] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1328. 8000a70: 2200 movs r2, #0
  1329. 8000a72: 609a str r2, [r3, #8]
  1330. huart1.Init.StopBits = UART_STOPBITS_1;
  1331. 8000a74: 4b0c ldr r3, [pc, #48] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1332. 8000a76: 2200 movs r2, #0
  1333. 8000a78: 60da str r2, [r3, #12]
  1334. huart1.Init.Parity = UART_PARITY_NONE;
  1335. 8000a7a: 4b0b ldr r3, [pc, #44] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1336. 8000a7c: 2200 movs r2, #0
  1337. 8000a7e: 611a str r2, [r3, #16]
  1338. huart1.Init.Mode = UART_MODE_TX_RX;
  1339. 8000a80: 4b09 ldr r3, [pc, #36] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1340. 8000a82: 220c movs r2, #12
  1341. 8000a84: 615a str r2, [r3, #20]
  1342. huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  1343. 8000a86: 4b08 ldr r3, [pc, #32] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1344. 8000a88: 2200 movs r2, #0
  1345. 8000a8a: 619a str r2, [r3, #24]
  1346. huart1.Init.OverSampling = UART_OVERSAMPLING_16;
  1347. 8000a8c: 4b06 ldr r3, [pc, #24] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1348. 8000a8e: 2200 movs r2, #0
  1349. 8000a90: 61da str r2, [r3, #28]
  1350. if (HAL_UART_Init(&huart1) != HAL_OK)
  1351. 8000a92: 4805 ldr r0, [pc, #20] ; (8000aa8 <MX_USART1_UART_Init+0x4c>)
  1352. 8000a94: f004 faa2 bl 8004fdc <HAL_UART_Init>
  1353. 8000a98: 4603 mov r3, r0
  1354. 8000a9a: 2b00 cmp r3, #0
  1355. 8000a9c: d001 beq.n 8000aa2 <MX_USART1_UART_Init+0x46>
  1356. {
  1357. Error_Handler();
  1358. 8000a9e: f000 f8df bl 8000c60 <Error_Handler>
  1359. }
  1360. /* USER CODE BEGIN USART1_Init 2 */
  1361. /* USER CODE END USART1_Init 2 */
  1362. }
  1363. 8000aa2: bf00 nop
  1364. 8000aa4: bd80 pop {r7, pc}
  1365. 8000aa6: bf00 nop
  1366. 8000aa8: 200004b8 .word 0x200004b8
  1367. 8000aac: 40011000 .word 0x40011000
  1368. 08000ab0 <MX_GPIO_Init>:
  1369. * @brief GPIO Initialization Function
  1370. * @param None
  1371. * @retval None
  1372. */
  1373. static void MX_GPIO_Init(void)
  1374. {
  1375. 8000ab0: b580 push {r7, lr}
  1376. 8000ab2: b08a sub sp, #40 ; 0x28
  1377. 8000ab4: af00 add r7, sp, #0
  1378. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1379. 8000ab6: f107 0314 add.w r3, r7, #20
  1380. 8000aba: 2200 movs r2, #0
  1381. 8000abc: 601a str r2, [r3, #0]
  1382. 8000abe: 605a str r2, [r3, #4]
  1383. 8000ac0: 609a str r2, [r3, #8]
  1384. 8000ac2: 60da str r2, [r3, #12]
  1385. 8000ac4: 611a str r2, [r3, #16]
  1386. /* GPIO Ports Clock Enable */
  1387. __HAL_RCC_GPIOC_CLK_ENABLE();
  1388. 8000ac6: 2300 movs r3, #0
  1389. 8000ac8: 613b str r3, [r7, #16]
  1390. 8000aca: 4b60 ldr r3, [pc, #384] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1391. 8000acc: 6b1b ldr r3, [r3, #48] ; 0x30
  1392. 8000ace: 4a5f ldr r2, [pc, #380] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1393. 8000ad0: f043 0304 orr.w r3, r3, #4
  1394. 8000ad4: 6313 str r3, [r2, #48] ; 0x30
  1395. 8000ad6: 4b5d ldr r3, [pc, #372] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1396. 8000ad8: 6b1b ldr r3, [r3, #48] ; 0x30
  1397. 8000ada: f003 0304 and.w r3, r3, #4
  1398. 8000ade: 613b str r3, [r7, #16]
  1399. 8000ae0: 693b ldr r3, [r7, #16]
  1400. __HAL_RCC_GPIOH_CLK_ENABLE();
  1401. 8000ae2: 2300 movs r3, #0
  1402. 8000ae4: 60fb str r3, [r7, #12]
  1403. 8000ae6: 4b59 ldr r3, [pc, #356] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1404. 8000ae8: 6b1b ldr r3, [r3, #48] ; 0x30
  1405. 8000aea: 4a58 ldr r2, [pc, #352] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1406. 8000aec: f043 0380 orr.w r3, r3, #128 ; 0x80
  1407. 8000af0: 6313 str r3, [r2, #48] ; 0x30
  1408. 8000af2: 4b56 ldr r3, [pc, #344] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1409. 8000af4: 6b1b ldr r3, [r3, #48] ; 0x30
  1410. 8000af6: f003 0380 and.w r3, r3, #128 ; 0x80
  1411. 8000afa: 60fb str r3, [r7, #12]
  1412. 8000afc: 68fb ldr r3, [r7, #12]
  1413. __HAL_RCC_GPIOA_CLK_ENABLE();
  1414. 8000afe: 2300 movs r3, #0
  1415. 8000b00: 60bb str r3, [r7, #8]
  1416. 8000b02: 4b52 ldr r3, [pc, #328] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1417. 8000b04: 6b1b ldr r3, [r3, #48] ; 0x30
  1418. 8000b06: 4a51 ldr r2, [pc, #324] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1419. 8000b08: f043 0301 orr.w r3, r3, #1
  1420. 8000b0c: 6313 str r3, [r2, #48] ; 0x30
  1421. 8000b0e: 4b4f ldr r3, [pc, #316] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1422. 8000b10: 6b1b ldr r3, [r3, #48] ; 0x30
  1423. 8000b12: f003 0301 and.w r3, r3, #1
  1424. 8000b16: 60bb str r3, [r7, #8]
  1425. 8000b18: 68bb ldr r3, [r7, #8]
  1426. __HAL_RCC_GPIOB_CLK_ENABLE();
  1427. 8000b1a: 2300 movs r3, #0
  1428. 8000b1c: 607b str r3, [r7, #4]
  1429. 8000b1e: 4b4b ldr r3, [pc, #300] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1430. 8000b20: 6b1b ldr r3, [r3, #48] ; 0x30
  1431. 8000b22: 4a4a ldr r2, [pc, #296] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1432. 8000b24: f043 0302 orr.w r3, r3, #2
  1433. 8000b28: 6313 str r3, [r2, #48] ; 0x30
  1434. 8000b2a: 4b48 ldr r3, [pc, #288] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1435. 8000b2c: 6b1b ldr r3, [r3, #48] ; 0x30
  1436. 8000b2e: f003 0302 and.w r3, r3, #2
  1437. 8000b32: 607b str r3, [r7, #4]
  1438. 8000b34: 687b ldr r3, [r7, #4]
  1439. __HAL_RCC_GPIOD_CLK_ENABLE();
  1440. 8000b36: 2300 movs r3, #0
  1441. 8000b38: 603b str r3, [r7, #0]
  1442. 8000b3a: 4b44 ldr r3, [pc, #272] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1443. 8000b3c: 6b1b ldr r3, [r3, #48] ; 0x30
  1444. 8000b3e: 4a43 ldr r2, [pc, #268] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1445. 8000b40: f043 0308 orr.w r3, r3, #8
  1446. 8000b44: 6313 str r3, [r2, #48] ; 0x30
  1447. 8000b46: 4b41 ldr r3, [pc, #260] ; (8000c4c <MX_GPIO_Init+0x19c>)
  1448. 8000b48: 6b1b ldr r3, [r3, #48] ; 0x30
  1449. 8000b4a: f003 0308 and.w r3, r3, #8
  1450. 8000b4e: 603b str r3, [r7, #0]
  1451. 8000b50: 683b ldr r3, [r7, #0]
  1452. /*Configure GPIO pin Output Level */
  1453. HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13|GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_3
  1454. 8000b52: 2200 movs r2, #0
  1455. 8000b54: f643 410b movw r1, #15371 ; 0x3c0b
  1456. 8000b58: 483d ldr r0, [pc, #244] ; (8000c50 <MX_GPIO_Init+0x1a0>)
  1457. 8000b5a: f001 f957 bl 8001e0c <HAL_GPIO_WritePin>
  1458. |GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12, GPIO_PIN_RESET);
  1459. /*Configure GPIO pin Output Level */
  1460. HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10|GPIO_PIN_12
  1461. 8000b5e: 2200 movs r2, #0
  1462. 8000b60: f241 41c6 movw r1, #5318 ; 0x14c6
  1463. 8000b64: 483b ldr r0, [pc, #236] ; (8000c54 <MX_GPIO_Init+0x1a4>)
  1464. 8000b66: f001 f951 bl 8001e0c <HAL_GPIO_WritePin>
  1465. |GPIO_PIN_6|GPIO_PIN_7, GPIO_PIN_RESET);
  1466. /*Configure GPIO pin Output Level */
  1467. HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, GPIO_PIN_RESET);
  1468. 8000b6a: 2200 movs r2, #0
  1469. 8000b6c: f44f 4100 mov.w r1, #32768 ; 0x8000
  1470. 8000b70: 4839 ldr r0, [pc, #228] ; (8000c58 <MX_GPIO_Init+0x1a8>)
  1471. 8000b72: f001 f94b bl 8001e0c <HAL_GPIO_WritePin>
  1472. /*Configure GPIO pin Output Level */
  1473. HAL_GPIO_WritePin(GPIOD, GPIO_PIN_2, GPIO_PIN_RESET);
  1474. 8000b76: 2200 movs r2, #0
  1475. 8000b78: 2104 movs r1, #4
  1476. 8000b7a: 4838 ldr r0, [pc, #224] ; (8000c5c <MX_GPIO_Init+0x1ac>)
  1477. 8000b7c: f001 f946 bl 8001e0c <HAL_GPIO_WritePin>
  1478. /*Configure GPIO pins : PC13 PC0 PC1 PC3
  1479. PC10 PC11 PC12 */
  1480. GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_3
  1481. 8000b80: f643 430b movw r3, #15371 ; 0x3c0b
  1482. 8000b84: 617b str r3, [r7, #20]
  1483. |GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12;
  1484. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  1485. 8000b86: 2301 movs r3, #1
  1486. 8000b88: 61bb str r3, [r7, #24]
  1487. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1488. 8000b8a: 2300 movs r3, #0
  1489. 8000b8c: 61fb str r3, [r7, #28]
  1490. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1491. 8000b8e: 2300 movs r3, #0
  1492. 8000b90: 623b str r3, [r7, #32]
  1493. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  1494. 8000b92: f107 0314 add.w r3, r7, #20
  1495. 8000b96: 4619 mov r1, r3
  1496. 8000b98: 482d ldr r0, [pc, #180] ; (8000c50 <MX_GPIO_Init+0x1a0>)
  1497. 8000b9a: f000 ffa3 bl 8001ae4 <HAL_GPIO_Init>
  1498. /*Configure GPIO pins : PC2 PC6 PC7 PC8
  1499. PC9 */
  1500. GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8
  1501. 8000b9e: f44f 7371 mov.w r3, #964 ; 0x3c4
  1502. 8000ba2: 617b str r3, [r7, #20]
  1503. |GPIO_PIN_9;
  1504. GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  1505. 8000ba4: 2300 movs r3, #0
  1506. 8000ba6: 61bb str r3, [r7, #24]
  1507. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1508. 8000ba8: 2300 movs r3, #0
  1509. 8000baa: 61fb str r3, [r7, #28]
  1510. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  1511. 8000bac: f107 0314 add.w r3, r7, #20
  1512. 8000bb0: 4619 mov r1, r3
  1513. 8000bb2: 4827 ldr r0, [pc, #156] ; (8000c50 <MX_GPIO_Init+0x1a0>)
  1514. 8000bb4: f000 ff96 bl 8001ae4 <HAL_GPIO_Init>
  1515. /*Configure GPIO pin : PA1 */
  1516. GPIO_InitStruct.Pin = GPIO_PIN_1;
  1517. 8000bb8: 2302 movs r3, #2
  1518. 8000bba: 617b str r3, [r7, #20]
  1519. GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
  1520. 8000bbc: f44f 1388 mov.w r3, #1114112 ; 0x110000
  1521. 8000bc0: 61bb str r3, [r7, #24]
  1522. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1523. 8000bc2: 2300 movs r3, #0
  1524. 8000bc4: 61fb str r3, [r7, #28]
  1525. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  1526. 8000bc6: f107 0314 add.w r3, r7, #20
  1527. 8000bca: 4619 mov r1, r3
  1528. 8000bcc: 4822 ldr r0, [pc, #136] ; (8000c58 <MX_GPIO_Init+0x1a8>)
  1529. 8000bce: f000 ff89 bl 8001ae4 <HAL_GPIO_Init>
  1530. /*Configure GPIO pins : PB1 PB2 PB10 PB12
  1531. PB6 PB7 */
  1532. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10|GPIO_PIN_12
  1533. 8000bd2: f241 43c6 movw r3, #5318 ; 0x14c6
  1534. 8000bd6: 617b str r3, [r7, #20]
  1535. |GPIO_PIN_6|GPIO_PIN_7;
  1536. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  1537. 8000bd8: 2301 movs r3, #1
  1538. 8000bda: 61bb str r3, [r7, #24]
  1539. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1540. 8000bdc: 2300 movs r3, #0
  1541. 8000bde: 61fb str r3, [r7, #28]
  1542. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1543. 8000be0: 2300 movs r3, #0
  1544. 8000be2: 623b str r3, [r7, #32]
  1545. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  1546. 8000be4: f107 0314 add.w r3, r7, #20
  1547. 8000be8: 4619 mov r1, r3
  1548. 8000bea: 481a ldr r0, [pc, #104] ; (8000c54 <MX_GPIO_Init+0x1a4>)
  1549. 8000bec: f000 ff7a bl 8001ae4 <HAL_GPIO_Init>
  1550. /*Configure GPIO pin : PA8 */
  1551. GPIO_InitStruct.Pin = GPIO_PIN_8;
  1552. 8000bf0: f44f 7380 mov.w r3, #256 ; 0x100
  1553. 8000bf4: 617b str r3, [r7, #20]
  1554. GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  1555. 8000bf6: 2300 movs r3, #0
  1556. 8000bf8: 61bb str r3, [r7, #24]
  1557. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1558. 8000bfa: 2300 movs r3, #0
  1559. 8000bfc: 61fb str r3, [r7, #28]
  1560. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  1561. 8000bfe: f107 0314 add.w r3, r7, #20
  1562. 8000c02: 4619 mov r1, r3
  1563. 8000c04: 4814 ldr r0, [pc, #80] ; (8000c58 <MX_GPIO_Init+0x1a8>)
  1564. 8000c06: f000 ff6d bl 8001ae4 <HAL_GPIO_Init>
  1565. /*Configure GPIO pin : PA15 */
  1566. GPIO_InitStruct.Pin = GPIO_PIN_15;
  1567. 8000c0a: f44f 4300 mov.w r3, #32768 ; 0x8000
  1568. 8000c0e: 617b str r3, [r7, #20]
  1569. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  1570. 8000c10: 2301 movs r3, #1
  1571. 8000c12: 61bb str r3, [r7, #24]
  1572. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1573. 8000c14: 2300 movs r3, #0
  1574. 8000c16: 61fb str r3, [r7, #28]
  1575. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1576. 8000c18: 2300 movs r3, #0
  1577. 8000c1a: 623b str r3, [r7, #32]
  1578. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  1579. 8000c1c: f107 0314 add.w r3, r7, #20
  1580. 8000c20: 4619 mov r1, r3
  1581. 8000c22: 480d ldr r0, [pc, #52] ; (8000c58 <MX_GPIO_Init+0x1a8>)
  1582. 8000c24: f000 ff5e bl 8001ae4 <HAL_GPIO_Init>
  1583. /*Configure GPIO pin : PD2 */
  1584. GPIO_InitStruct.Pin = GPIO_PIN_2;
  1585. 8000c28: 2304 movs r3, #4
  1586. 8000c2a: 617b str r3, [r7, #20]
  1587. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  1588. 8000c2c: 2301 movs r3, #1
  1589. 8000c2e: 61bb str r3, [r7, #24]
  1590. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1591. 8000c30: 2300 movs r3, #0
  1592. 8000c32: 61fb str r3, [r7, #28]
  1593. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1594. 8000c34: 2300 movs r3, #0
  1595. 8000c36: 623b str r3, [r7, #32]
  1596. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  1597. 8000c38: f107 0314 add.w r3, r7, #20
  1598. 8000c3c: 4619 mov r1, r3
  1599. 8000c3e: 4807 ldr r0, [pc, #28] ; (8000c5c <MX_GPIO_Init+0x1ac>)
  1600. 8000c40: f000 ff50 bl 8001ae4 <HAL_GPIO_Init>
  1601. }
  1602. 8000c44: bf00 nop
  1603. 8000c46: 3728 adds r7, #40 ; 0x28
  1604. 8000c48: 46bd mov sp, r7
  1605. 8000c4a: bd80 pop {r7, pc}
  1606. 8000c4c: 40023800 .word 0x40023800
  1607. 8000c50: 40020800 .word 0x40020800
  1608. 8000c54: 40020400 .word 0x40020400
  1609. 8000c58: 40020000 .word 0x40020000
  1610. 8000c5c: 40020c00 .word 0x40020c00
  1611. 08000c60 <Error_Handler>:
  1612. /**
  1613. * @brief This function is executed in case of error occurrence.
  1614. * @retval None
  1615. */
  1616. void Error_Handler(void)
  1617. {
  1618. 8000c60: b480 push {r7}
  1619. 8000c62: af00 add r7, sp, #0
  1620. \details Disables IRQ interrupts by setting the I-bit in the CPSR.
  1621. Can only be executed in Privileged modes.
  1622. */
  1623. __STATIC_FORCEINLINE void __disable_irq(void)
  1624. {
  1625. __ASM volatile ("cpsid i" : : : "memory");
  1626. 8000c64: b672 cpsid i
  1627. }
  1628. 8000c66: bf00 nop
  1629. /* USER CODE BEGIN Error_Handler_Debug */
  1630. /* User can add his own implementation to report the HAL error return state */
  1631. __disable_irq();
  1632. while (1)
  1633. 8000c68: e7fe b.n 8000c68 <Error_Handler+0x8>
  1634. ...
  1635. 08000c6c <HAL_MspInit>:
  1636. /* USER CODE END 0 */
  1637. /**
  1638. * Initializes the Global MSP.
  1639. */
  1640. void HAL_MspInit(void)
  1641. {
  1642. 8000c6c: b480 push {r7}
  1643. 8000c6e: b083 sub sp, #12
  1644. 8000c70: af00 add r7, sp, #0
  1645. /* USER CODE BEGIN MspInit 0 */
  1646. /* USER CODE END MspInit 0 */
  1647. __HAL_RCC_SYSCFG_CLK_ENABLE();
  1648. 8000c72: 2300 movs r3, #0
  1649. 8000c74: 607b str r3, [r7, #4]
  1650. 8000c76: 4b10 ldr r3, [pc, #64] ; (8000cb8 <HAL_MspInit+0x4c>)
  1651. 8000c78: 6c5b ldr r3, [r3, #68] ; 0x44
  1652. 8000c7a: 4a0f ldr r2, [pc, #60] ; (8000cb8 <HAL_MspInit+0x4c>)
  1653. 8000c7c: f443 4380 orr.w r3, r3, #16384 ; 0x4000
  1654. 8000c80: 6453 str r3, [r2, #68] ; 0x44
  1655. 8000c82: 4b0d ldr r3, [pc, #52] ; (8000cb8 <HAL_MspInit+0x4c>)
  1656. 8000c84: 6c5b ldr r3, [r3, #68] ; 0x44
  1657. 8000c86: f403 4380 and.w r3, r3, #16384 ; 0x4000
  1658. 8000c8a: 607b str r3, [r7, #4]
  1659. 8000c8c: 687b ldr r3, [r7, #4]
  1660. __HAL_RCC_PWR_CLK_ENABLE();
  1661. 8000c8e: 2300 movs r3, #0
  1662. 8000c90: 603b str r3, [r7, #0]
  1663. 8000c92: 4b09 ldr r3, [pc, #36] ; (8000cb8 <HAL_MspInit+0x4c>)
  1664. 8000c94: 6c1b ldr r3, [r3, #64] ; 0x40
  1665. 8000c96: 4a08 ldr r2, [pc, #32] ; (8000cb8 <HAL_MspInit+0x4c>)
  1666. 8000c98: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  1667. 8000c9c: 6413 str r3, [r2, #64] ; 0x40
  1668. 8000c9e: 4b06 ldr r3, [pc, #24] ; (8000cb8 <HAL_MspInit+0x4c>)
  1669. 8000ca0: 6c1b ldr r3, [r3, #64] ; 0x40
  1670. 8000ca2: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
  1671. 8000ca6: 603b str r3, [r7, #0]
  1672. 8000ca8: 683b ldr r3, [r7, #0]
  1673. /* System interrupt init*/
  1674. /* USER CODE BEGIN MspInit 1 */
  1675. /* USER CODE END MspInit 1 */
  1676. }
  1677. 8000caa: bf00 nop
  1678. 8000cac: 370c adds r7, #12
  1679. 8000cae: 46bd mov sp, r7
  1680. 8000cb0: f85d 7b04 ldr.w r7, [sp], #4
  1681. 8000cb4: 4770 bx lr
  1682. 8000cb6: bf00 nop
  1683. 8000cb8: 40023800 .word 0x40023800
  1684. 08000cbc <HAL_ADC_MspInit>:
  1685. * This function configures the hardware resources used in this example
  1686. * @param hadc: ADC handle pointer
  1687. * @retval None
  1688. */
  1689. void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
  1690. {
  1691. 8000cbc: b580 push {r7, lr}
  1692. 8000cbe: b08a sub sp, #40 ; 0x28
  1693. 8000cc0: af00 add r7, sp, #0
  1694. 8000cc2: 6078 str r0, [r7, #4]
  1695. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1696. 8000cc4: f107 0314 add.w r3, r7, #20
  1697. 8000cc8: 2200 movs r2, #0
  1698. 8000cca: 601a str r2, [r3, #0]
  1699. 8000ccc: 605a str r2, [r3, #4]
  1700. 8000cce: 609a str r2, [r3, #8]
  1701. 8000cd0: 60da str r2, [r3, #12]
  1702. 8000cd2: 611a str r2, [r3, #16]
  1703. if(hadc->Instance==ADC1)
  1704. 8000cd4: 687b ldr r3, [r7, #4]
  1705. 8000cd6: 681b ldr r3, [r3, #0]
  1706. 8000cd8: 4a21 ldr r2, [pc, #132] ; (8000d60 <HAL_ADC_MspInit+0xa4>)
  1707. 8000cda: 4293 cmp r3, r2
  1708. 8000cdc: d10e bne.n 8000cfc <HAL_ADC_MspInit+0x40>
  1709. {
  1710. /* USER CODE BEGIN ADC1_MspInit 0 */
  1711. /* USER CODE END ADC1_MspInit 0 */
  1712. /* Peripheral clock enable */
  1713. __HAL_RCC_ADC1_CLK_ENABLE();
  1714. 8000cde: 2300 movs r3, #0
  1715. 8000ce0: 613b str r3, [r7, #16]
  1716. 8000ce2: 4b20 ldr r3, [pc, #128] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1717. 8000ce4: 6c5b ldr r3, [r3, #68] ; 0x44
  1718. 8000ce6: 4a1f ldr r2, [pc, #124] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1719. 8000ce8: f443 7380 orr.w r3, r3, #256 ; 0x100
  1720. 8000cec: 6453 str r3, [r2, #68] ; 0x44
  1721. 8000cee: 4b1d ldr r3, [pc, #116] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1722. 8000cf0: 6c5b ldr r3, [r3, #68] ; 0x44
  1723. 8000cf2: f403 7380 and.w r3, r3, #256 ; 0x100
  1724. 8000cf6: 613b str r3, [r7, #16]
  1725. 8000cf8: 693b ldr r3, [r7, #16]
  1726. /* USER CODE BEGIN ADC2_MspInit 1 */
  1727. /* USER CODE END ADC2_MspInit 1 */
  1728. }
  1729. }
  1730. 8000cfa: e02c b.n 8000d56 <HAL_ADC_MspInit+0x9a>
  1731. else if(hadc->Instance==ADC2)
  1732. 8000cfc: 687b ldr r3, [r7, #4]
  1733. 8000cfe: 681b ldr r3, [r3, #0]
  1734. 8000d00: 4a19 ldr r2, [pc, #100] ; (8000d68 <HAL_ADC_MspInit+0xac>)
  1735. 8000d02: 4293 cmp r3, r2
  1736. 8000d04: d127 bne.n 8000d56 <HAL_ADC_MspInit+0x9a>
  1737. __HAL_RCC_ADC2_CLK_ENABLE();
  1738. 8000d06: 2300 movs r3, #0
  1739. 8000d08: 60fb str r3, [r7, #12]
  1740. 8000d0a: 4b16 ldr r3, [pc, #88] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1741. 8000d0c: 6c5b ldr r3, [r3, #68] ; 0x44
  1742. 8000d0e: 4a15 ldr r2, [pc, #84] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1743. 8000d10: f443 7300 orr.w r3, r3, #512 ; 0x200
  1744. 8000d14: 6453 str r3, [r2, #68] ; 0x44
  1745. 8000d16: 4b13 ldr r3, [pc, #76] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1746. 8000d18: 6c5b ldr r3, [r3, #68] ; 0x44
  1747. 8000d1a: f403 7300 and.w r3, r3, #512 ; 0x200
  1748. 8000d1e: 60fb str r3, [r7, #12]
  1749. 8000d20: 68fb ldr r3, [r7, #12]
  1750. __HAL_RCC_GPIOC_CLK_ENABLE();
  1751. 8000d22: 2300 movs r3, #0
  1752. 8000d24: 60bb str r3, [r7, #8]
  1753. 8000d26: 4b0f ldr r3, [pc, #60] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1754. 8000d28: 6b1b ldr r3, [r3, #48] ; 0x30
  1755. 8000d2a: 4a0e ldr r2, [pc, #56] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1756. 8000d2c: f043 0304 orr.w r3, r3, #4
  1757. 8000d30: 6313 str r3, [r2, #48] ; 0x30
  1758. 8000d32: 4b0c ldr r3, [pc, #48] ; (8000d64 <HAL_ADC_MspInit+0xa8>)
  1759. 8000d34: 6b1b ldr r3, [r3, #48] ; 0x30
  1760. 8000d36: f003 0304 and.w r3, r3, #4
  1761. 8000d3a: 60bb str r3, [r7, #8]
  1762. 8000d3c: 68bb ldr r3, [r7, #8]
  1763. GPIO_InitStruct.Pin = GPIO_PIN_4;
  1764. 8000d3e: 2310 movs r3, #16
  1765. 8000d40: 617b str r3, [r7, #20]
  1766. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  1767. 8000d42: 2303 movs r3, #3
  1768. 8000d44: 61bb str r3, [r7, #24]
  1769. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1770. 8000d46: 2300 movs r3, #0
  1771. 8000d48: 61fb str r3, [r7, #28]
  1772. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  1773. 8000d4a: f107 0314 add.w r3, r7, #20
  1774. 8000d4e: 4619 mov r1, r3
  1775. 8000d50: 4806 ldr r0, [pc, #24] ; (8000d6c <HAL_ADC_MspInit+0xb0>)
  1776. 8000d52: f000 fec7 bl 8001ae4 <HAL_GPIO_Init>
  1777. }
  1778. 8000d56: bf00 nop
  1779. 8000d58: 3728 adds r7, #40 ; 0x28
  1780. 8000d5a: 46bd mov sp, r7
  1781. 8000d5c: bd80 pop {r7, pc}
  1782. 8000d5e: bf00 nop
  1783. 8000d60: 40012000 .word 0x40012000
  1784. 8000d64: 40023800 .word 0x40023800
  1785. 8000d68: 40012100 .word 0x40012100
  1786. 8000d6c: 40020800 .word 0x40020800
  1787. 08000d70 <HAL_DAC_MspInit>:
  1788. * This function configures the hardware resources used in this example
  1789. * @param hdac: DAC handle pointer
  1790. * @retval None
  1791. */
  1792. void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac)
  1793. {
  1794. 8000d70: b580 push {r7, lr}
  1795. 8000d72: b08a sub sp, #40 ; 0x28
  1796. 8000d74: af00 add r7, sp, #0
  1797. 8000d76: 6078 str r0, [r7, #4]
  1798. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1799. 8000d78: f107 0314 add.w r3, r7, #20
  1800. 8000d7c: 2200 movs r2, #0
  1801. 8000d7e: 601a str r2, [r3, #0]
  1802. 8000d80: 605a str r2, [r3, #4]
  1803. 8000d82: 609a str r2, [r3, #8]
  1804. 8000d84: 60da str r2, [r3, #12]
  1805. 8000d86: 611a str r2, [r3, #16]
  1806. if(hdac->Instance==DAC)
  1807. 8000d88: 687b ldr r3, [r7, #4]
  1808. 8000d8a: 681b ldr r3, [r3, #0]
  1809. 8000d8c: 4a17 ldr r2, [pc, #92] ; (8000dec <HAL_DAC_MspInit+0x7c>)
  1810. 8000d8e: 4293 cmp r3, r2
  1811. 8000d90: d127 bne.n 8000de2 <HAL_DAC_MspInit+0x72>
  1812. {
  1813. /* USER CODE BEGIN DAC_MspInit 0 */
  1814. /* USER CODE END DAC_MspInit 0 */
  1815. /* Peripheral clock enable */
  1816. __HAL_RCC_DAC_CLK_ENABLE();
  1817. 8000d92: 2300 movs r3, #0
  1818. 8000d94: 613b str r3, [r7, #16]
  1819. 8000d96: 4b16 ldr r3, [pc, #88] ; (8000df0 <HAL_DAC_MspInit+0x80>)
  1820. 8000d98: 6c1b ldr r3, [r3, #64] ; 0x40
  1821. 8000d9a: 4a15 ldr r2, [pc, #84] ; (8000df0 <HAL_DAC_MspInit+0x80>)
  1822. 8000d9c: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
  1823. 8000da0: 6413 str r3, [r2, #64] ; 0x40
  1824. 8000da2: 4b13 ldr r3, [pc, #76] ; (8000df0 <HAL_DAC_MspInit+0x80>)
  1825. 8000da4: 6c1b ldr r3, [r3, #64] ; 0x40
  1826. 8000da6: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
  1827. 8000daa: 613b str r3, [r7, #16]
  1828. 8000dac: 693b ldr r3, [r7, #16]
  1829. __HAL_RCC_GPIOA_CLK_ENABLE();
  1830. 8000dae: 2300 movs r3, #0
  1831. 8000db0: 60fb str r3, [r7, #12]
  1832. 8000db2: 4b0f ldr r3, [pc, #60] ; (8000df0 <HAL_DAC_MspInit+0x80>)
  1833. 8000db4: 6b1b ldr r3, [r3, #48] ; 0x30
  1834. 8000db6: 4a0e ldr r2, [pc, #56] ; (8000df0 <HAL_DAC_MspInit+0x80>)
  1835. 8000db8: f043 0301 orr.w r3, r3, #1
  1836. 8000dbc: 6313 str r3, [r2, #48] ; 0x30
  1837. 8000dbe: 4b0c ldr r3, [pc, #48] ; (8000df0 <HAL_DAC_MspInit+0x80>)
  1838. 8000dc0: 6b1b ldr r3, [r3, #48] ; 0x30
  1839. 8000dc2: f003 0301 and.w r3, r3, #1
  1840. 8000dc6: 60fb str r3, [r7, #12]
  1841. 8000dc8: 68fb ldr r3, [r7, #12]
  1842. /**DAC GPIO Configuration
  1843. PA4 ------> DAC_OUT1
  1844. PA5 ------> DAC_OUT2
  1845. */
  1846. GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5;
  1847. 8000dca: 2330 movs r3, #48 ; 0x30
  1848. 8000dcc: 617b str r3, [r7, #20]
  1849. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  1850. 8000dce: 2303 movs r3, #3
  1851. 8000dd0: 61bb str r3, [r7, #24]
  1852. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1853. 8000dd2: 2300 movs r3, #0
  1854. 8000dd4: 61fb str r3, [r7, #28]
  1855. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  1856. 8000dd6: f107 0314 add.w r3, r7, #20
  1857. 8000dda: 4619 mov r1, r3
  1858. 8000ddc: 4805 ldr r0, [pc, #20] ; (8000df4 <HAL_DAC_MspInit+0x84>)
  1859. 8000dde: f000 fe81 bl 8001ae4 <HAL_GPIO_Init>
  1860. /* USER CODE BEGIN DAC_MspInit 1 */
  1861. /* USER CODE END DAC_MspInit 1 */
  1862. }
  1863. }
  1864. 8000de2: bf00 nop
  1865. 8000de4: 3728 adds r7, #40 ; 0x28
  1866. 8000de6: 46bd mov sp, r7
  1867. 8000de8: bd80 pop {r7, pc}
  1868. 8000dea: bf00 nop
  1869. 8000dec: 40007400 .word 0x40007400
  1870. 8000df0: 40023800 .word 0x40023800
  1871. 8000df4: 40020000 .word 0x40020000
  1872. 08000df8 <HAL_SMBUS_MspInit>:
  1873. * This function configures the hardware resources used in this example
  1874. * @param hsmbus: SMBUS handle pointer
  1875. * @retval None
  1876. */
  1877. void HAL_SMBUS_MspInit(SMBUS_HandleTypeDef* hsmbus)
  1878. {
  1879. 8000df8: b580 push {r7, lr}
  1880. 8000dfa: b08a sub sp, #40 ; 0x28
  1881. 8000dfc: af00 add r7, sp, #0
  1882. 8000dfe: 6078 str r0, [r7, #4]
  1883. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1884. 8000e00: f107 0314 add.w r3, r7, #20
  1885. 8000e04: 2200 movs r2, #0
  1886. 8000e06: 601a str r2, [r3, #0]
  1887. 8000e08: 605a str r2, [r3, #4]
  1888. 8000e0a: 609a str r2, [r3, #8]
  1889. 8000e0c: 60da str r2, [r3, #12]
  1890. 8000e0e: 611a str r2, [r3, #16]
  1891. if(hsmbus->Instance==I2C1)
  1892. 8000e10: 687b ldr r3, [r7, #4]
  1893. 8000e12: 681b ldr r3, [r3, #0]
  1894. 8000e14: 4a19 ldr r2, [pc, #100] ; (8000e7c <HAL_SMBUS_MspInit+0x84>)
  1895. 8000e16: 4293 cmp r3, r2
  1896. 8000e18: d12c bne.n 8000e74 <HAL_SMBUS_MspInit+0x7c>
  1897. {
  1898. /* USER CODE BEGIN I2C1_MspInit 0 */
  1899. /* USER CODE END I2C1_MspInit 0 */
  1900. __HAL_RCC_GPIOB_CLK_ENABLE();
  1901. 8000e1a: 2300 movs r3, #0
  1902. 8000e1c: 613b str r3, [r7, #16]
  1903. 8000e1e: 4b18 ldr r3, [pc, #96] ; (8000e80 <HAL_SMBUS_MspInit+0x88>)
  1904. 8000e20: 6b1b ldr r3, [r3, #48] ; 0x30
  1905. 8000e22: 4a17 ldr r2, [pc, #92] ; (8000e80 <HAL_SMBUS_MspInit+0x88>)
  1906. 8000e24: f043 0302 orr.w r3, r3, #2
  1907. 8000e28: 6313 str r3, [r2, #48] ; 0x30
  1908. 8000e2a: 4b15 ldr r3, [pc, #84] ; (8000e80 <HAL_SMBUS_MspInit+0x88>)
  1909. 8000e2c: 6b1b ldr r3, [r3, #48] ; 0x30
  1910. 8000e2e: f003 0302 and.w r3, r3, #2
  1911. 8000e32: 613b str r3, [r7, #16]
  1912. 8000e34: 693b ldr r3, [r7, #16]
  1913. /**I2C1 GPIO Configuration
  1914. PB8 ------> I2C1_SCL
  1915. PB9 ------> I2C1_SDA
  1916. */
  1917. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  1918. 8000e36: f44f 7340 mov.w r3, #768 ; 0x300
  1919. 8000e3a: 617b str r3, [r7, #20]
  1920. GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
  1921. 8000e3c: 2312 movs r3, #18
  1922. 8000e3e: 61bb str r3, [r7, #24]
  1923. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1924. 8000e40: 2300 movs r3, #0
  1925. 8000e42: 61fb str r3, [r7, #28]
  1926. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  1927. 8000e44: 2303 movs r3, #3
  1928. 8000e46: 623b str r3, [r7, #32]
  1929. GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
  1930. 8000e48: 2304 movs r3, #4
  1931. 8000e4a: 627b str r3, [r7, #36] ; 0x24
  1932. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  1933. 8000e4c: f107 0314 add.w r3, r7, #20
  1934. 8000e50: 4619 mov r1, r3
  1935. 8000e52: 480c ldr r0, [pc, #48] ; (8000e84 <HAL_SMBUS_MspInit+0x8c>)
  1936. 8000e54: f000 fe46 bl 8001ae4 <HAL_GPIO_Init>
  1937. /* Peripheral clock enable */
  1938. __HAL_RCC_I2C1_CLK_ENABLE();
  1939. 8000e58: 2300 movs r3, #0
  1940. 8000e5a: 60fb str r3, [r7, #12]
  1941. 8000e5c: 4b08 ldr r3, [pc, #32] ; (8000e80 <HAL_SMBUS_MspInit+0x88>)
  1942. 8000e5e: 6c1b ldr r3, [r3, #64] ; 0x40
  1943. 8000e60: 4a07 ldr r2, [pc, #28] ; (8000e80 <HAL_SMBUS_MspInit+0x88>)
  1944. 8000e62: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
  1945. 8000e66: 6413 str r3, [r2, #64] ; 0x40
  1946. 8000e68: 4b05 ldr r3, [pc, #20] ; (8000e80 <HAL_SMBUS_MspInit+0x88>)
  1947. 8000e6a: 6c1b ldr r3, [r3, #64] ; 0x40
  1948. 8000e6c: f403 1300 and.w r3, r3, #2097152 ; 0x200000
  1949. 8000e70: 60fb str r3, [r7, #12]
  1950. 8000e72: 68fb ldr r3, [r7, #12]
  1951. /* USER CODE BEGIN I2C1_MspInit 1 */
  1952. /* USER CODE END I2C1_MspInit 1 */
  1953. }
  1954. }
  1955. 8000e74: bf00 nop
  1956. 8000e76: 3728 adds r7, #40 ; 0x28
  1957. 8000e78: 46bd mov sp, r7
  1958. 8000e7a: bd80 pop {r7, pc}
  1959. 8000e7c: 40005400 .word 0x40005400
  1960. 8000e80: 40023800 .word 0x40023800
  1961. 8000e84: 40020400 .word 0x40020400
  1962. 08000e88 <HAL_RTC_MspInit>:
  1963. * This function configures the hardware resources used in this example
  1964. * @param hrtc: RTC handle pointer
  1965. * @retval None
  1966. */
  1967. void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
  1968. {
  1969. 8000e88: b580 push {r7, lr}
  1970. 8000e8a: b09a sub sp, #104 ; 0x68
  1971. 8000e8c: af00 add r7, sp, #0
  1972. 8000e8e: 6078 str r0, [r7, #4]
  1973. RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
  1974. 8000e90: f107 030c add.w r3, r7, #12
  1975. 8000e94: 225c movs r2, #92 ; 0x5c
  1976. 8000e96: 2100 movs r1, #0
  1977. 8000e98: 4618 mov r0, r3
  1978. 8000e9a: f008 f84d bl 8008f38 <memset>
  1979. if(hrtc->Instance==RTC)
  1980. 8000e9e: 687b ldr r3, [r7, #4]
  1981. 8000ea0: 681b ldr r3, [r3, #0]
  1982. 8000ea2: 4a0c ldr r2, [pc, #48] ; (8000ed4 <HAL_RTC_MspInit+0x4c>)
  1983. 8000ea4: 4293 cmp r3, r2
  1984. 8000ea6: d111 bne.n 8000ecc <HAL_RTC_MspInit+0x44>
  1985. /* USER CODE BEGIN RTC_MspInit 0 */
  1986. /* USER CODE END RTC_MspInit 0 */
  1987. /** Initializes the peripherals clock
  1988. */
  1989. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
  1990. 8000ea8: 2320 movs r3, #32
  1991. 8000eaa: 60fb str r3, [r7, #12]
  1992. PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
  1993. 8000eac: f44f 7380 mov.w r3, #256 ; 0x100
  1994. 8000eb0: 64fb str r3, [r7, #76] ; 0x4c
  1995. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  1996. 8000eb2: f107 030c add.w r3, r7, #12
  1997. 8000eb6: 4618 mov r0, r3
  1998. 8000eb8: f002 faaa bl 8003410 <HAL_RCCEx_PeriphCLKConfig>
  1999. 8000ebc: 4603 mov r3, r0
  2000. 8000ebe: 2b00 cmp r3, #0
  2001. 8000ec0: d001 beq.n 8000ec6 <HAL_RTC_MspInit+0x3e>
  2002. {
  2003. Error_Handler();
  2004. 8000ec2: f7ff fecd bl 8000c60 <Error_Handler>
  2005. }
  2006. /* Peripheral clock enable */
  2007. __HAL_RCC_RTC_ENABLE();
  2008. 8000ec6: 4b04 ldr r3, [pc, #16] ; (8000ed8 <HAL_RTC_MspInit+0x50>)
  2009. 8000ec8: 2201 movs r2, #1
  2010. 8000eca: 601a str r2, [r3, #0]
  2011. /* USER CODE BEGIN RTC_MspInit 1 */
  2012. /* USER CODE END RTC_MspInit 1 */
  2013. }
  2014. }
  2015. 8000ecc: bf00 nop
  2016. 8000ece: 3768 adds r7, #104 ; 0x68
  2017. 8000ed0: 46bd mov sp, r7
  2018. 8000ed2: bd80 pop {r7, pc}
  2019. 8000ed4: 40002800 .word 0x40002800
  2020. 8000ed8: 42470e3c .word 0x42470e3c
  2021. 08000edc <HAL_SPI_MspInit>:
  2022. * This function configures the hardware resources used in this example
  2023. * @param hspi: SPI handle pointer
  2024. * @retval None
  2025. */
  2026. void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
  2027. {
  2028. 8000edc: b580 push {r7, lr}
  2029. 8000ede: b08c sub sp, #48 ; 0x30
  2030. 8000ee0: af00 add r7, sp, #0
  2031. 8000ee2: 6078 str r0, [r7, #4]
  2032. GPIO_InitTypeDef GPIO_InitStruct = {0};
  2033. 8000ee4: f107 031c add.w r3, r7, #28
  2034. 8000ee8: 2200 movs r2, #0
  2035. 8000eea: 601a str r2, [r3, #0]
  2036. 8000eec: 605a str r2, [r3, #4]
  2037. 8000eee: 609a str r2, [r3, #8]
  2038. 8000ef0: 60da str r2, [r3, #12]
  2039. 8000ef2: 611a str r2, [r3, #16]
  2040. if(hspi->Instance==SPI1)
  2041. 8000ef4: 687b ldr r3, [r7, #4]
  2042. 8000ef6: 681b ldr r3, [r3, #0]
  2043. 8000ef8: 4a32 ldr r2, [pc, #200] ; (8000fc4 <HAL_SPI_MspInit+0xe8>)
  2044. 8000efa: 4293 cmp r3, r2
  2045. 8000efc: d12c bne.n 8000f58 <HAL_SPI_MspInit+0x7c>
  2046. {
  2047. /* USER CODE BEGIN SPI1_MspInit 0 */
  2048. /* USER CODE END SPI1_MspInit 0 */
  2049. /* Peripheral clock enable */
  2050. __HAL_RCC_SPI1_CLK_ENABLE();
  2051. 8000efe: 2300 movs r3, #0
  2052. 8000f00: 61bb str r3, [r7, #24]
  2053. 8000f02: 4b31 ldr r3, [pc, #196] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2054. 8000f04: 6c5b ldr r3, [r3, #68] ; 0x44
  2055. 8000f06: 4a30 ldr r2, [pc, #192] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2056. 8000f08: f443 5380 orr.w r3, r3, #4096 ; 0x1000
  2057. 8000f0c: 6453 str r3, [r2, #68] ; 0x44
  2058. 8000f0e: 4b2e ldr r3, [pc, #184] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2059. 8000f10: 6c5b ldr r3, [r3, #68] ; 0x44
  2060. 8000f12: f403 5380 and.w r3, r3, #4096 ; 0x1000
  2061. 8000f16: 61bb str r3, [r7, #24]
  2062. 8000f18: 69bb ldr r3, [r7, #24]
  2063. __HAL_RCC_GPIOB_CLK_ENABLE();
  2064. 8000f1a: 2300 movs r3, #0
  2065. 8000f1c: 617b str r3, [r7, #20]
  2066. 8000f1e: 4b2a ldr r3, [pc, #168] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2067. 8000f20: 6b1b ldr r3, [r3, #48] ; 0x30
  2068. 8000f22: 4a29 ldr r2, [pc, #164] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2069. 8000f24: f043 0302 orr.w r3, r3, #2
  2070. 8000f28: 6313 str r3, [r2, #48] ; 0x30
  2071. 8000f2a: 4b27 ldr r3, [pc, #156] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2072. 8000f2c: 6b1b ldr r3, [r3, #48] ; 0x30
  2073. 8000f2e: f003 0302 and.w r3, r3, #2
  2074. 8000f32: 617b str r3, [r7, #20]
  2075. 8000f34: 697b ldr r3, [r7, #20]
  2076. /**SPI1 GPIO Configuration
  2077. PB3 ------> SPI1_SCK
  2078. PB4 ------> SPI1_MISO
  2079. PB5 ------> SPI1_MOSI
  2080. */
  2081. GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5;
  2082. 8000f36: 2338 movs r3, #56 ; 0x38
  2083. 8000f38: 61fb str r3, [r7, #28]
  2084. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  2085. 8000f3a: 2302 movs r3, #2
  2086. 8000f3c: 623b str r3, [r7, #32]
  2087. GPIO_InitStruct.Pull = GPIO_NOPULL;
  2088. 8000f3e: 2300 movs r3, #0
  2089. 8000f40: 627b str r3, [r7, #36] ; 0x24
  2090. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  2091. 8000f42: 2303 movs r3, #3
  2092. 8000f44: 62bb str r3, [r7, #40] ; 0x28
  2093. GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
  2094. 8000f46: 2305 movs r3, #5
  2095. 8000f48: 62fb str r3, [r7, #44] ; 0x2c
  2096. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  2097. 8000f4a: f107 031c add.w r3, r7, #28
  2098. 8000f4e: 4619 mov r1, r3
  2099. 8000f50: 481e ldr r0, [pc, #120] ; (8000fcc <HAL_SPI_MspInit+0xf0>)
  2100. 8000f52: f000 fdc7 bl 8001ae4 <HAL_GPIO_Init>
  2101. /* USER CODE BEGIN SPI2_MspInit 1 */
  2102. /* USER CODE END SPI2_MspInit 1 */
  2103. }
  2104. }
  2105. 8000f56: e031 b.n 8000fbc <HAL_SPI_MspInit+0xe0>
  2106. else if(hspi->Instance==SPI2)
  2107. 8000f58: 687b ldr r3, [r7, #4]
  2108. 8000f5a: 681b ldr r3, [r3, #0]
  2109. 8000f5c: 4a1c ldr r2, [pc, #112] ; (8000fd0 <HAL_SPI_MspInit+0xf4>)
  2110. 8000f5e: 4293 cmp r3, r2
  2111. 8000f60: d12c bne.n 8000fbc <HAL_SPI_MspInit+0xe0>
  2112. __HAL_RCC_SPI2_CLK_ENABLE();
  2113. 8000f62: 2300 movs r3, #0
  2114. 8000f64: 613b str r3, [r7, #16]
  2115. 8000f66: 4b18 ldr r3, [pc, #96] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2116. 8000f68: 6c1b ldr r3, [r3, #64] ; 0x40
  2117. 8000f6a: 4a17 ldr r2, [pc, #92] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2118. 8000f6c: f443 4380 orr.w r3, r3, #16384 ; 0x4000
  2119. 8000f70: 6413 str r3, [r2, #64] ; 0x40
  2120. 8000f72: 4b15 ldr r3, [pc, #84] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2121. 8000f74: 6c1b ldr r3, [r3, #64] ; 0x40
  2122. 8000f76: f403 4380 and.w r3, r3, #16384 ; 0x4000
  2123. 8000f7a: 613b str r3, [r7, #16]
  2124. 8000f7c: 693b ldr r3, [r7, #16]
  2125. __HAL_RCC_GPIOB_CLK_ENABLE();
  2126. 8000f7e: 2300 movs r3, #0
  2127. 8000f80: 60fb str r3, [r7, #12]
  2128. 8000f82: 4b11 ldr r3, [pc, #68] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2129. 8000f84: 6b1b ldr r3, [r3, #48] ; 0x30
  2130. 8000f86: 4a10 ldr r2, [pc, #64] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2131. 8000f88: f043 0302 orr.w r3, r3, #2
  2132. 8000f8c: 6313 str r3, [r2, #48] ; 0x30
  2133. 8000f8e: 4b0e ldr r3, [pc, #56] ; (8000fc8 <HAL_SPI_MspInit+0xec>)
  2134. 8000f90: 6b1b ldr r3, [r3, #48] ; 0x30
  2135. 8000f92: f003 0302 and.w r3, r3, #2
  2136. 8000f96: 60fb str r3, [r7, #12]
  2137. 8000f98: 68fb ldr r3, [r7, #12]
  2138. GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
  2139. 8000f9a: f44f 4360 mov.w r3, #57344 ; 0xe000
  2140. 8000f9e: 61fb str r3, [r7, #28]
  2141. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  2142. 8000fa0: 2302 movs r3, #2
  2143. 8000fa2: 623b str r3, [r7, #32]
  2144. GPIO_InitStruct.Pull = GPIO_NOPULL;
  2145. 8000fa4: 2300 movs r3, #0
  2146. 8000fa6: 627b str r3, [r7, #36] ; 0x24
  2147. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  2148. 8000fa8: 2303 movs r3, #3
  2149. 8000faa: 62bb str r3, [r7, #40] ; 0x28
  2150. GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
  2151. 8000fac: 2305 movs r3, #5
  2152. 8000fae: 62fb str r3, [r7, #44] ; 0x2c
  2153. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  2154. 8000fb0: f107 031c add.w r3, r7, #28
  2155. 8000fb4: 4619 mov r1, r3
  2156. 8000fb6: 4805 ldr r0, [pc, #20] ; (8000fcc <HAL_SPI_MspInit+0xf0>)
  2157. 8000fb8: f000 fd94 bl 8001ae4 <HAL_GPIO_Init>
  2158. }
  2159. 8000fbc: bf00 nop
  2160. 8000fbe: 3730 adds r7, #48 ; 0x30
  2161. 8000fc0: 46bd mov sp, r7
  2162. 8000fc2: bd80 pop {r7, pc}
  2163. 8000fc4: 40013000 .word 0x40013000
  2164. 8000fc8: 40023800 .word 0x40023800
  2165. 8000fcc: 40020400 .word 0x40020400
  2166. 8000fd0: 40003800 .word 0x40003800
  2167. 08000fd4 <HAL_TIM_Base_MspInit>:
  2168. * This function configures the hardware resources used in this example
  2169. * @param htim_base: TIM_Base handle pointer
  2170. * @retval None
  2171. */
  2172. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
  2173. {
  2174. 8000fd4: b580 push {r7, lr}
  2175. 8000fd6: b08a sub sp, #40 ; 0x28
  2176. 8000fd8: af00 add r7, sp, #0
  2177. 8000fda: 6078 str r0, [r7, #4]
  2178. GPIO_InitTypeDef GPIO_InitStruct = {0};
  2179. 8000fdc: f107 0314 add.w r3, r7, #20
  2180. 8000fe0: 2200 movs r2, #0
  2181. 8000fe2: 601a str r2, [r3, #0]
  2182. 8000fe4: 605a str r2, [r3, #4]
  2183. 8000fe6: 609a str r2, [r3, #8]
  2184. 8000fe8: 60da str r2, [r3, #12]
  2185. 8000fea: 611a str r2, [r3, #16]
  2186. if(htim_base->Instance==TIM2)
  2187. 8000fec: 687b ldr r3, [r7, #4]
  2188. 8000fee: 681b ldr r3, [r3, #0]
  2189. 8000ff0: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
  2190. 8000ff4: d12b bne.n 800104e <HAL_TIM_Base_MspInit+0x7a>
  2191. {
  2192. /* USER CODE BEGIN TIM2_MspInit 0 */
  2193. /* USER CODE END TIM2_MspInit 0 */
  2194. /* Peripheral clock enable */
  2195. __HAL_RCC_TIM2_CLK_ENABLE();
  2196. 8000ff6: 2300 movs r3, #0
  2197. 8000ff8: 613b str r3, [r7, #16]
  2198. 8000ffa: 4b17 ldr r3, [pc, #92] ; (8001058 <HAL_TIM_Base_MspInit+0x84>)
  2199. 8000ffc: 6c1b ldr r3, [r3, #64] ; 0x40
  2200. 8000ffe: 4a16 ldr r2, [pc, #88] ; (8001058 <HAL_TIM_Base_MspInit+0x84>)
  2201. 8001000: f043 0301 orr.w r3, r3, #1
  2202. 8001004: 6413 str r3, [r2, #64] ; 0x40
  2203. 8001006: 4b14 ldr r3, [pc, #80] ; (8001058 <HAL_TIM_Base_MspInit+0x84>)
  2204. 8001008: 6c1b ldr r3, [r3, #64] ; 0x40
  2205. 800100a: f003 0301 and.w r3, r3, #1
  2206. 800100e: 613b str r3, [r7, #16]
  2207. 8001010: 693b ldr r3, [r7, #16]
  2208. __HAL_RCC_GPIOA_CLK_ENABLE();
  2209. 8001012: 2300 movs r3, #0
  2210. 8001014: 60fb str r3, [r7, #12]
  2211. 8001016: 4b10 ldr r3, [pc, #64] ; (8001058 <HAL_TIM_Base_MspInit+0x84>)
  2212. 8001018: 6b1b ldr r3, [r3, #48] ; 0x30
  2213. 800101a: 4a0f ldr r2, [pc, #60] ; (8001058 <HAL_TIM_Base_MspInit+0x84>)
  2214. 800101c: f043 0301 orr.w r3, r3, #1
  2215. 8001020: 6313 str r3, [r2, #48] ; 0x30
  2216. 8001022: 4b0d ldr r3, [pc, #52] ; (8001058 <HAL_TIM_Base_MspInit+0x84>)
  2217. 8001024: 6b1b ldr r3, [r3, #48] ; 0x30
  2218. 8001026: f003 0301 and.w r3, r3, #1
  2219. 800102a: 60fb str r3, [r7, #12]
  2220. 800102c: 68fb ldr r3, [r7, #12]
  2221. /**TIM2 GPIO Configuration
  2222. PA0-WKUP ------> TIM2_ETR
  2223. */
  2224. GPIO_InitStruct.Pin = GPIO_PIN_0;
  2225. 800102e: 2301 movs r3, #1
  2226. 8001030: 617b str r3, [r7, #20]
  2227. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  2228. 8001032: 2302 movs r3, #2
  2229. 8001034: 61bb str r3, [r7, #24]
  2230. GPIO_InitStruct.Pull = GPIO_NOPULL;
  2231. 8001036: 2300 movs r3, #0
  2232. 8001038: 61fb str r3, [r7, #28]
  2233. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  2234. 800103a: 2300 movs r3, #0
  2235. 800103c: 623b str r3, [r7, #32]
  2236. GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
  2237. 800103e: 2301 movs r3, #1
  2238. 8001040: 627b str r3, [r7, #36] ; 0x24
  2239. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  2240. 8001042: f107 0314 add.w r3, r7, #20
  2241. 8001046: 4619 mov r1, r3
  2242. 8001048: 4804 ldr r0, [pc, #16] ; (800105c <HAL_TIM_Base_MspInit+0x88>)
  2243. 800104a: f000 fd4b bl 8001ae4 <HAL_GPIO_Init>
  2244. /* USER CODE BEGIN TIM2_MspInit 1 */
  2245. /* USER CODE END TIM2_MspInit 1 */
  2246. }
  2247. }
  2248. 800104e: bf00 nop
  2249. 8001050: 3728 adds r7, #40 ; 0x28
  2250. 8001052: 46bd mov sp, r7
  2251. 8001054: bd80 pop {r7, pc}
  2252. 8001056: bf00 nop
  2253. 8001058: 40023800 .word 0x40023800
  2254. 800105c: 40020000 .word 0x40020000
  2255. 08001060 <HAL_UART_MspInit>:
  2256. * This function configures the hardware resources used in this example
  2257. * @param huart: UART handle pointer
  2258. * @retval None
  2259. */
  2260. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  2261. {
  2262. 8001060: b580 push {r7, lr}
  2263. 8001062: b08a sub sp, #40 ; 0x28
  2264. 8001064: af00 add r7, sp, #0
  2265. 8001066: 6078 str r0, [r7, #4]
  2266. GPIO_InitTypeDef GPIO_InitStruct = {0};
  2267. 8001068: f107 0314 add.w r3, r7, #20
  2268. 800106c: 2200 movs r2, #0
  2269. 800106e: 601a str r2, [r3, #0]
  2270. 8001070: 605a str r2, [r3, #4]
  2271. 8001072: 609a str r2, [r3, #8]
  2272. 8001074: 60da str r2, [r3, #12]
  2273. 8001076: 611a str r2, [r3, #16]
  2274. if(huart->Instance==USART1)
  2275. 8001078: 687b ldr r3, [r7, #4]
  2276. 800107a: 681b ldr r3, [r3, #0]
  2277. 800107c: 4a19 ldr r2, [pc, #100] ; (80010e4 <HAL_UART_MspInit+0x84>)
  2278. 800107e: 4293 cmp r3, r2
  2279. 8001080: d12c bne.n 80010dc <HAL_UART_MspInit+0x7c>
  2280. {
  2281. /* USER CODE BEGIN USART1_MspInit 0 */
  2282. /* USER CODE END USART1_MspInit 0 */
  2283. /* Peripheral clock enable */
  2284. __HAL_RCC_USART1_CLK_ENABLE();
  2285. 8001082: 2300 movs r3, #0
  2286. 8001084: 613b str r3, [r7, #16]
  2287. 8001086: 4b18 ldr r3, [pc, #96] ; (80010e8 <HAL_UART_MspInit+0x88>)
  2288. 8001088: 6c5b ldr r3, [r3, #68] ; 0x44
  2289. 800108a: 4a17 ldr r2, [pc, #92] ; (80010e8 <HAL_UART_MspInit+0x88>)
  2290. 800108c: f043 0310 orr.w r3, r3, #16
  2291. 8001090: 6453 str r3, [r2, #68] ; 0x44
  2292. 8001092: 4b15 ldr r3, [pc, #84] ; (80010e8 <HAL_UART_MspInit+0x88>)
  2293. 8001094: 6c5b ldr r3, [r3, #68] ; 0x44
  2294. 8001096: f003 0310 and.w r3, r3, #16
  2295. 800109a: 613b str r3, [r7, #16]
  2296. 800109c: 693b ldr r3, [r7, #16]
  2297. __HAL_RCC_GPIOA_CLK_ENABLE();
  2298. 800109e: 2300 movs r3, #0
  2299. 80010a0: 60fb str r3, [r7, #12]
  2300. 80010a2: 4b11 ldr r3, [pc, #68] ; (80010e8 <HAL_UART_MspInit+0x88>)
  2301. 80010a4: 6b1b ldr r3, [r3, #48] ; 0x30
  2302. 80010a6: 4a10 ldr r2, [pc, #64] ; (80010e8 <HAL_UART_MspInit+0x88>)
  2303. 80010a8: f043 0301 orr.w r3, r3, #1
  2304. 80010ac: 6313 str r3, [r2, #48] ; 0x30
  2305. 80010ae: 4b0e ldr r3, [pc, #56] ; (80010e8 <HAL_UART_MspInit+0x88>)
  2306. 80010b0: 6b1b ldr r3, [r3, #48] ; 0x30
  2307. 80010b2: f003 0301 and.w r3, r3, #1
  2308. 80010b6: 60fb str r3, [r7, #12]
  2309. 80010b8: 68fb ldr r3, [r7, #12]
  2310. /**USART1 GPIO Configuration
  2311. PA9 ------> USART1_TX
  2312. PA10 ------> USART1_RX
  2313. */
  2314. GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
  2315. 80010ba: f44f 63c0 mov.w r3, #1536 ; 0x600
  2316. 80010be: 617b str r3, [r7, #20]
  2317. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  2318. 80010c0: 2302 movs r3, #2
  2319. 80010c2: 61bb str r3, [r7, #24]
  2320. GPIO_InitStruct.Pull = GPIO_NOPULL;
  2321. 80010c4: 2300 movs r3, #0
  2322. 80010c6: 61fb str r3, [r7, #28]
  2323. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  2324. 80010c8: 2303 movs r3, #3
  2325. 80010ca: 623b str r3, [r7, #32]
  2326. GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
  2327. 80010cc: 2307 movs r3, #7
  2328. 80010ce: 627b str r3, [r7, #36] ; 0x24
  2329. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  2330. 80010d0: f107 0314 add.w r3, r7, #20
  2331. 80010d4: 4619 mov r1, r3
  2332. 80010d6: 4805 ldr r0, [pc, #20] ; (80010ec <HAL_UART_MspInit+0x8c>)
  2333. 80010d8: f000 fd04 bl 8001ae4 <HAL_GPIO_Init>
  2334. /* USER CODE BEGIN USART1_MspInit 1 */
  2335. /* USER CODE END USART1_MspInit 1 */
  2336. }
  2337. }
  2338. 80010dc: bf00 nop
  2339. 80010de: 3728 adds r7, #40 ; 0x28
  2340. 80010e0: 46bd mov sp, r7
  2341. 80010e2: bd80 pop {r7, pc}
  2342. 80010e4: 40011000 .word 0x40011000
  2343. 80010e8: 40023800 .word 0x40023800
  2344. 80010ec: 40020000 .word 0x40020000
  2345. 080010f0 <NMI_Handler>:
  2346. /******************************************************************************/
  2347. /**
  2348. * @brief This function handles Non maskable interrupt.
  2349. */
  2350. void NMI_Handler(void)
  2351. {
  2352. 80010f0: b480 push {r7}
  2353. 80010f2: af00 add r7, sp, #0
  2354. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  2355. /* USER CODE END NonMaskableInt_IRQn 0 */
  2356. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  2357. while (1)
  2358. 80010f4: e7fe b.n 80010f4 <NMI_Handler+0x4>
  2359. 080010f6 <HardFault_Handler>:
  2360. /**
  2361. * @brief This function handles Hard fault interrupt.
  2362. */
  2363. void HardFault_Handler(void)
  2364. {
  2365. 80010f6: b480 push {r7}
  2366. 80010f8: af00 add r7, sp, #0
  2367. /* USER CODE BEGIN HardFault_IRQn 0 */
  2368. /* USER CODE END HardFault_IRQn 0 */
  2369. while (1)
  2370. 80010fa: e7fe b.n 80010fa <HardFault_Handler+0x4>
  2371. 080010fc <MemManage_Handler>:
  2372. /**
  2373. * @brief This function handles Memory management fault.
  2374. */
  2375. void MemManage_Handler(void)
  2376. {
  2377. 80010fc: b480 push {r7}
  2378. 80010fe: af00 add r7, sp, #0
  2379. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  2380. /* USER CODE END MemoryManagement_IRQn 0 */
  2381. while (1)
  2382. 8001100: e7fe b.n 8001100 <MemManage_Handler+0x4>
  2383. 08001102 <BusFault_Handler>:
  2384. /**
  2385. * @brief This function handles Pre-fetch fault, memory access fault.
  2386. */
  2387. void BusFault_Handler(void)
  2388. {
  2389. 8001102: b480 push {r7}
  2390. 8001104: af00 add r7, sp, #0
  2391. /* USER CODE BEGIN BusFault_IRQn 0 */
  2392. /* USER CODE END BusFault_IRQn 0 */
  2393. while (1)
  2394. 8001106: e7fe b.n 8001106 <BusFault_Handler+0x4>
  2395. 08001108 <UsageFault_Handler>:
  2396. /**
  2397. * @brief This function handles Undefined instruction or illegal state.
  2398. */
  2399. void UsageFault_Handler(void)
  2400. {
  2401. 8001108: b480 push {r7}
  2402. 800110a: af00 add r7, sp, #0
  2403. /* USER CODE BEGIN UsageFault_IRQn 0 */
  2404. /* USER CODE END UsageFault_IRQn 0 */
  2405. while (1)
  2406. 800110c: e7fe b.n 800110c <UsageFault_Handler+0x4>
  2407. 0800110e <SVC_Handler>:
  2408. /**
  2409. * @brief This function handles System service call via SWI instruction.
  2410. */
  2411. void SVC_Handler(void)
  2412. {
  2413. 800110e: b480 push {r7}
  2414. 8001110: af00 add r7, sp, #0
  2415. /* USER CODE END SVCall_IRQn 0 */
  2416. /* USER CODE BEGIN SVCall_IRQn 1 */
  2417. /* USER CODE END SVCall_IRQn 1 */
  2418. }
  2419. 8001112: bf00 nop
  2420. 8001114: 46bd mov sp, r7
  2421. 8001116: f85d 7b04 ldr.w r7, [sp], #4
  2422. 800111a: 4770 bx lr
  2423. 0800111c <DebugMon_Handler>:
  2424. /**
  2425. * @brief This function handles Debug monitor.
  2426. */
  2427. void DebugMon_Handler(void)
  2428. {
  2429. 800111c: b480 push {r7}
  2430. 800111e: af00 add r7, sp, #0
  2431. /* USER CODE END DebugMonitor_IRQn 0 */
  2432. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  2433. /* USER CODE END DebugMonitor_IRQn 1 */
  2434. }
  2435. 8001120: bf00 nop
  2436. 8001122: 46bd mov sp, r7
  2437. 8001124: f85d 7b04 ldr.w r7, [sp], #4
  2438. 8001128: 4770 bx lr
  2439. 0800112a <PendSV_Handler>:
  2440. /**
  2441. * @brief This function handles Pendable request for system service.
  2442. */
  2443. void PendSV_Handler(void)
  2444. {
  2445. 800112a: b480 push {r7}
  2446. 800112c: af00 add r7, sp, #0
  2447. /* USER CODE END PendSV_IRQn 0 */
  2448. /* USER CODE BEGIN PendSV_IRQn 1 */
  2449. /* USER CODE END PendSV_IRQn 1 */
  2450. }
  2451. 800112e: bf00 nop
  2452. 8001130: 46bd mov sp, r7
  2453. 8001132: f85d 7b04 ldr.w r7, [sp], #4
  2454. 8001136: 4770 bx lr
  2455. 08001138 <SysTick_Handler>:
  2456. /**
  2457. * @brief This function handles System tick timer.
  2458. */
  2459. void SysTick_Handler(void)
  2460. {
  2461. 8001138: b580 push {r7, lr}
  2462. 800113a: af00 add r7, sp, #0
  2463. /* USER CODE BEGIN SysTick_IRQn 0 */
  2464. /* USER CODE END SysTick_IRQn 0 */
  2465. HAL_IncTick();
  2466. 800113c: f000 f89a bl 8001274 <HAL_IncTick>
  2467. /* USER CODE BEGIN SysTick_IRQn 1 */
  2468. /* USER CODE END SysTick_IRQn 1 */
  2469. }
  2470. 8001140: bf00 nop
  2471. 8001142: bd80 pop {r7, pc}
  2472. 08001144 <OTG_FS_IRQHandler>:
  2473. /**
  2474. * @brief This function handles USB On The Go FS global interrupt.
  2475. */
  2476. void OTG_FS_IRQHandler(void)
  2477. {
  2478. 8001144: b580 push {r7, lr}
  2479. 8001146: af00 add r7, sp, #0
  2480. /* USER CODE BEGIN OTG_FS_IRQn 0 */
  2481. /* USER CODE END OTG_FS_IRQn 0 */
  2482. HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS);
  2483. 8001148: 4802 ldr r0, [pc, #8] ; (8001154 <OTG_FS_IRQHandler+0x10>)
  2484. 800114a: f000 ffcf bl 80020ec <HAL_PCD_IRQHandler>
  2485. /* USER CODE BEGIN OTG_FS_IRQn 1 */
  2486. /* USER CODE END OTG_FS_IRQn 1 */
  2487. }
  2488. 800114e: bf00 nop
  2489. 8001150: bd80 pop {r7, pc}
  2490. 8001152: bf00 nop
  2491. 8001154: 20001af4 .word 0x20001af4
  2492. 08001158 <SystemInit>:
  2493. * configuration.
  2494. * @param None
  2495. * @retval None
  2496. */
  2497. void SystemInit(void)
  2498. {
  2499. 8001158: b480 push {r7}
  2500. 800115a: af00 add r7, sp, #0
  2501. /* FPU settings ------------------------------------------------------------*/
  2502. #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
  2503. SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
  2504. 800115c: 4b06 ldr r3, [pc, #24] ; (8001178 <SystemInit+0x20>)
  2505. 800115e: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
  2506. 8001162: 4a05 ldr r2, [pc, #20] ; (8001178 <SystemInit+0x20>)
  2507. 8001164: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000
  2508. 8001168: f8c2 3088 str.w r3, [r2, #136] ; 0x88
  2509. /* Configure the Vector Table location -------------------------------------*/
  2510. #if defined(USER_VECT_TAB_ADDRESS)
  2511. SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
  2512. #endif /* USER_VECT_TAB_ADDRESS */
  2513. }
  2514. 800116c: bf00 nop
  2515. 800116e: 46bd mov sp, r7
  2516. 8001170: f85d 7b04 ldr.w r7, [sp], #4
  2517. 8001174: 4770 bx lr
  2518. 8001176: bf00 nop
  2519. 8001178: e000ed00 .word 0xe000ed00
  2520. 0800117c <Reset_Handler>:
  2521. .section .text.Reset_Handler
  2522. .weak Reset_Handler
  2523. .type Reset_Handler, %function
  2524. Reset_Handler:
  2525. ldr sp, =_estack /* set stack pointer */
  2526. 800117c: f8df d034 ldr.w sp, [pc, #52] ; 80011b4 <LoopFillZerobss+0x12>
  2527. /* Copy the data segment initializers from flash to SRAM */
  2528. ldr r0, =_sdata
  2529. 8001180: 480d ldr r0, [pc, #52] ; (80011b8 <LoopFillZerobss+0x16>)
  2530. ldr r1, =_edata
  2531. 8001182: 490e ldr r1, [pc, #56] ; (80011bc <LoopFillZerobss+0x1a>)
  2532. ldr r2, =_sidata
  2533. 8001184: 4a0e ldr r2, [pc, #56] ; (80011c0 <LoopFillZerobss+0x1e>)
  2534. movs r3, #0
  2535. 8001186: 2300 movs r3, #0
  2536. b LoopCopyDataInit
  2537. 8001188: e002 b.n 8001190 <LoopCopyDataInit>
  2538. 0800118a <CopyDataInit>:
  2539. CopyDataInit:
  2540. ldr r4, [r2, r3]
  2541. 800118a: 58d4 ldr r4, [r2, r3]
  2542. str r4, [r0, r3]
  2543. 800118c: 50c4 str r4, [r0, r3]
  2544. adds r3, r3, #4
  2545. 800118e: 3304 adds r3, #4
  2546. 08001190 <LoopCopyDataInit>:
  2547. LoopCopyDataInit:
  2548. adds r4, r0, r3
  2549. 8001190: 18c4 adds r4, r0, r3
  2550. cmp r4, r1
  2551. 8001192: 428c cmp r4, r1
  2552. bcc CopyDataInit
  2553. 8001194: d3f9 bcc.n 800118a <CopyDataInit>
  2554. /* Zero fill the bss segment. */
  2555. ldr r2, =_sbss
  2556. 8001196: 4a0b ldr r2, [pc, #44] ; (80011c4 <LoopFillZerobss+0x22>)
  2557. ldr r4, =_ebss
  2558. 8001198: 4c0b ldr r4, [pc, #44] ; (80011c8 <LoopFillZerobss+0x26>)
  2559. movs r3, #0
  2560. 800119a: 2300 movs r3, #0
  2561. b LoopFillZerobss
  2562. 800119c: e001 b.n 80011a2 <LoopFillZerobss>
  2563. 0800119e <FillZerobss>:
  2564. FillZerobss:
  2565. str r3, [r2]
  2566. 800119e: 6013 str r3, [r2, #0]
  2567. adds r2, r2, #4
  2568. 80011a0: 3204 adds r2, #4
  2569. 080011a2 <LoopFillZerobss>:
  2570. LoopFillZerobss:
  2571. cmp r2, r4
  2572. 80011a2: 42a2 cmp r2, r4
  2573. bcc FillZerobss
  2574. 80011a4: d3fb bcc.n 800119e <FillZerobss>
  2575. /* Call the clock system intitialization function.*/
  2576. bl SystemInit
  2577. 80011a6: f7ff ffd7 bl 8001158 <SystemInit>
  2578. /* Call static constructors */
  2579. bl __libc_init_array
  2580. 80011aa: f007 fea1 bl 8008ef0 <__libc_init_array>
  2581. /* Call the application's entry point.*/
  2582. bl main
  2583. 80011ae: f7ff f9a5 bl 80004fc <main>
  2584. bx lr
  2585. 80011b2: 4770 bx lr
  2586. ldr sp, =_estack /* set stack pointer */
  2587. 80011b4: 20020000 .word 0x20020000
  2588. ldr r0, =_sdata
  2589. 80011b8: 20000000 .word 0x20000000
  2590. ldr r1, =_edata
  2591. 80011bc: 20000190 .word 0x20000190
  2592. ldr r2, =_sidata
  2593. 80011c0: 08008fd0 .word 0x08008fd0
  2594. ldr r2, =_sbss
  2595. 80011c4: 20000190 .word 0x20000190
  2596. ldr r4, =_ebss
  2597. 80011c8: 20001efc .word 0x20001efc
  2598. 080011cc <ADC_IRQHandler>:
  2599. * @retval None
  2600. */
  2601. .section .text.Default_Handler,"ax",%progbits
  2602. Default_Handler:
  2603. Infinite_Loop:
  2604. b Infinite_Loop
  2605. 80011cc: e7fe b.n 80011cc <ADC_IRQHandler>
  2606. ...
  2607. 080011d0 <HAL_Init>:
  2608. * need to ensure that the SysTick time base is always set to 1 millisecond
  2609. * to have correct HAL operation.
  2610. * @retval HAL status
  2611. */
  2612. HAL_StatusTypeDef HAL_Init(void)
  2613. {
  2614. 80011d0: b580 push {r7, lr}
  2615. 80011d2: af00 add r7, sp, #0
  2616. /* Configure Flash prefetch, Instruction cache, Data cache */
  2617. #if (INSTRUCTION_CACHE_ENABLE != 0U)
  2618. __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
  2619. 80011d4: 4b0e ldr r3, [pc, #56] ; (8001210 <HAL_Init+0x40>)
  2620. 80011d6: 681b ldr r3, [r3, #0]
  2621. 80011d8: 4a0d ldr r2, [pc, #52] ; (8001210 <HAL_Init+0x40>)
  2622. 80011da: f443 7300 orr.w r3, r3, #512 ; 0x200
  2623. 80011de: 6013 str r3, [r2, #0]
  2624. #endif /* INSTRUCTION_CACHE_ENABLE */
  2625. #if (DATA_CACHE_ENABLE != 0U)
  2626. __HAL_FLASH_DATA_CACHE_ENABLE();
  2627. 80011e0: 4b0b ldr r3, [pc, #44] ; (8001210 <HAL_Init+0x40>)
  2628. 80011e2: 681b ldr r3, [r3, #0]
  2629. 80011e4: 4a0a ldr r2, [pc, #40] ; (8001210 <HAL_Init+0x40>)
  2630. 80011e6: f443 6380 orr.w r3, r3, #1024 ; 0x400
  2631. 80011ea: 6013 str r3, [r2, #0]
  2632. #endif /* DATA_CACHE_ENABLE */
  2633. #if (PREFETCH_ENABLE != 0U)
  2634. __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
  2635. 80011ec: 4b08 ldr r3, [pc, #32] ; (8001210 <HAL_Init+0x40>)
  2636. 80011ee: 681b ldr r3, [r3, #0]
  2637. 80011f0: 4a07 ldr r2, [pc, #28] ; (8001210 <HAL_Init+0x40>)
  2638. 80011f2: f443 7380 orr.w r3, r3, #256 ; 0x100
  2639. 80011f6: 6013 str r3, [r2, #0]
  2640. #endif /* PREFETCH_ENABLE */
  2641. /* Set Interrupt Group Priority */
  2642. HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
  2643. 80011f8: 2003 movs r0, #3
  2644. 80011fa: f000 fbc1 bl 8001980 <HAL_NVIC_SetPriorityGrouping>
  2645. /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
  2646. HAL_InitTick(TICK_INT_PRIORITY);
  2647. 80011fe: 200f movs r0, #15
  2648. 8001200: f000 f808 bl 8001214 <HAL_InitTick>
  2649. /* Init the low level hardware */
  2650. HAL_MspInit();
  2651. 8001204: f7ff fd32 bl 8000c6c <HAL_MspInit>
  2652. /* Return function status */
  2653. return HAL_OK;
  2654. 8001208: 2300 movs r3, #0
  2655. }
  2656. 800120a: 4618 mov r0, r3
  2657. 800120c: bd80 pop {r7, pc}
  2658. 800120e: bf00 nop
  2659. 8001210: 40023c00 .word 0x40023c00
  2660. 08001214 <HAL_InitTick>:
  2661. * implementation in user file.
  2662. * @param TickPriority Tick interrupt priority.
  2663. * @retval HAL status
  2664. */
  2665. __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
  2666. {
  2667. 8001214: b580 push {r7, lr}
  2668. 8001216: b082 sub sp, #8
  2669. 8001218: af00 add r7, sp, #0
  2670. 800121a: 6078 str r0, [r7, #4]
  2671. /* Configure the SysTick to have interrupt in 1ms time basis*/
  2672. if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
  2673. 800121c: 4b12 ldr r3, [pc, #72] ; (8001268 <HAL_InitTick+0x54>)
  2674. 800121e: 681a ldr r2, [r3, #0]
  2675. 8001220: 4b12 ldr r3, [pc, #72] ; (800126c <HAL_InitTick+0x58>)
  2676. 8001222: 781b ldrb r3, [r3, #0]
  2677. 8001224: 4619 mov r1, r3
  2678. 8001226: f44f 737a mov.w r3, #1000 ; 0x3e8
  2679. 800122a: fbb3 f3f1 udiv r3, r3, r1
  2680. 800122e: fbb2 f3f3 udiv r3, r2, r3
  2681. 8001232: 4618 mov r0, r3
  2682. 8001234: f000 fbd9 bl 80019ea <HAL_SYSTICK_Config>
  2683. 8001238: 4603 mov r3, r0
  2684. 800123a: 2b00 cmp r3, #0
  2685. 800123c: d001 beq.n 8001242 <HAL_InitTick+0x2e>
  2686. {
  2687. return HAL_ERROR;
  2688. 800123e: 2301 movs r3, #1
  2689. 8001240: e00e b.n 8001260 <HAL_InitTick+0x4c>
  2690. }
  2691. /* Configure the SysTick IRQ priority */
  2692. if (TickPriority < (1UL << __NVIC_PRIO_BITS))
  2693. 8001242: 687b ldr r3, [r7, #4]
  2694. 8001244: 2b0f cmp r3, #15
  2695. 8001246: d80a bhi.n 800125e <HAL_InitTick+0x4a>
  2696. {
  2697. HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
  2698. 8001248: 2200 movs r2, #0
  2699. 800124a: 6879 ldr r1, [r7, #4]
  2700. 800124c: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
  2701. 8001250: f000 fba1 bl 8001996 <HAL_NVIC_SetPriority>
  2702. uwTickPrio = TickPriority;
  2703. 8001254: 4a06 ldr r2, [pc, #24] ; (8001270 <HAL_InitTick+0x5c>)
  2704. 8001256: 687b ldr r3, [r7, #4]
  2705. 8001258: 6013 str r3, [r2, #0]
  2706. {
  2707. return HAL_ERROR;
  2708. }
  2709. /* Return function status */
  2710. return HAL_OK;
  2711. 800125a: 2300 movs r3, #0
  2712. 800125c: e000 b.n 8001260 <HAL_InitTick+0x4c>
  2713. return HAL_ERROR;
  2714. 800125e: 2301 movs r3, #1
  2715. }
  2716. 8001260: 4618 mov r0, r3
  2717. 8001262: 3708 adds r7, #8
  2718. 8001264: 46bd mov sp, r7
  2719. 8001266: bd80 pop {r7, pc}
  2720. 8001268: 20000000 .word 0x20000000
  2721. 800126c: 20000008 .word 0x20000008
  2722. 8001270: 20000004 .word 0x20000004
  2723. 08001274 <HAL_IncTick>:
  2724. * @note This function is declared as __weak to be overwritten in case of other
  2725. * implementations in user file.
  2726. * @retval None
  2727. */
  2728. __weak void HAL_IncTick(void)
  2729. {
  2730. 8001274: b480 push {r7}
  2731. 8001276: af00 add r7, sp, #0
  2732. uwTick += uwTickFreq;
  2733. 8001278: 4b06 ldr r3, [pc, #24] ; (8001294 <HAL_IncTick+0x20>)
  2734. 800127a: 781b ldrb r3, [r3, #0]
  2735. 800127c: 461a mov r2, r3
  2736. 800127e: 4b06 ldr r3, [pc, #24] ; (8001298 <HAL_IncTick+0x24>)
  2737. 8001280: 681b ldr r3, [r3, #0]
  2738. 8001282: 4413 add r3, r2
  2739. 8001284: 4a04 ldr r2, [pc, #16] ; (8001298 <HAL_IncTick+0x24>)
  2740. 8001286: 6013 str r3, [r2, #0]
  2741. }
  2742. 8001288: bf00 nop
  2743. 800128a: 46bd mov sp, r7
  2744. 800128c: f85d 7b04 ldr.w r7, [sp], #4
  2745. 8001290: 4770 bx lr
  2746. 8001292: bf00 nop
  2747. 8001294: 20000008 .word 0x20000008
  2748. 8001298: 20000620 .word 0x20000620
  2749. 0800129c <HAL_GetTick>:
  2750. * @note This function is declared as __weak to be overwritten in case of other
  2751. * implementations in user file.
  2752. * @retval tick value
  2753. */
  2754. __weak uint32_t HAL_GetTick(void)
  2755. {
  2756. 800129c: b480 push {r7}
  2757. 800129e: af00 add r7, sp, #0
  2758. return uwTick;
  2759. 80012a0: 4b03 ldr r3, [pc, #12] ; (80012b0 <HAL_GetTick+0x14>)
  2760. 80012a2: 681b ldr r3, [r3, #0]
  2761. }
  2762. 80012a4: 4618 mov r0, r3
  2763. 80012a6: 46bd mov sp, r7
  2764. 80012a8: f85d 7b04 ldr.w r7, [sp], #4
  2765. 80012ac: 4770 bx lr
  2766. 80012ae: bf00 nop
  2767. 80012b0: 20000620 .word 0x20000620
  2768. 080012b4 <HAL_Delay>:
  2769. * implementations in user file.
  2770. * @param Delay specifies the delay time length, in milliseconds.
  2771. * @retval None
  2772. */
  2773. __weak void HAL_Delay(uint32_t Delay)
  2774. {
  2775. 80012b4: b580 push {r7, lr}
  2776. 80012b6: b084 sub sp, #16
  2777. 80012b8: af00 add r7, sp, #0
  2778. 80012ba: 6078 str r0, [r7, #4]
  2779. uint32_t tickstart = HAL_GetTick();
  2780. 80012bc: f7ff ffee bl 800129c <HAL_GetTick>
  2781. 80012c0: 60b8 str r0, [r7, #8]
  2782. uint32_t wait = Delay;
  2783. 80012c2: 687b ldr r3, [r7, #4]
  2784. 80012c4: 60fb str r3, [r7, #12]
  2785. /* Add a freq to guarantee minimum wait */
  2786. if (wait < HAL_MAX_DELAY)
  2787. 80012c6: 68fb ldr r3, [r7, #12]
  2788. 80012c8: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff
  2789. 80012cc: d005 beq.n 80012da <HAL_Delay+0x26>
  2790. {
  2791. wait += (uint32_t)(uwTickFreq);
  2792. 80012ce: 4b0a ldr r3, [pc, #40] ; (80012f8 <HAL_Delay+0x44>)
  2793. 80012d0: 781b ldrb r3, [r3, #0]
  2794. 80012d2: 461a mov r2, r3
  2795. 80012d4: 68fb ldr r3, [r7, #12]
  2796. 80012d6: 4413 add r3, r2
  2797. 80012d8: 60fb str r3, [r7, #12]
  2798. }
  2799. while((HAL_GetTick() - tickstart) < wait)
  2800. 80012da: bf00 nop
  2801. 80012dc: f7ff ffde bl 800129c <HAL_GetTick>
  2802. 80012e0: 4602 mov r2, r0
  2803. 80012e2: 68bb ldr r3, [r7, #8]
  2804. 80012e4: 1ad3 subs r3, r2, r3
  2805. 80012e6: 68fa ldr r2, [r7, #12]
  2806. 80012e8: 429a cmp r2, r3
  2807. 80012ea: d8f7 bhi.n 80012dc <HAL_Delay+0x28>
  2808. {
  2809. }
  2810. }
  2811. 80012ec: bf00 nop
  2812. 80012ee: bf00 nop
  2813. 80012f0: 3710 adds r7, #16
  2814. 80012f2: 46bd mov sp, r7
  2815. 80012f4: bd80 pop {r7, pc}
  2816. 80012f6: bf00 nop
  2817. 80012f8: 20000008 .word 0x20000008
  2818. 080012fc <HAL_ADC_Init>:
  2819. * @param hadc pointer to a ADC_HandleTypeDef structure that contains
  2820. * the configuration information for the specified ADC.
  2821. * @retval HAL status
  2822. */
  2823. HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
  2824. {
  2825. 80012fc: b580 push {r7, lr}
  2826. 80012fe: b084 sub sp, #16
  2827. 8001300: af00 add r7, sp, #0
  2828. 8001302: 6078 str r0, [r7, #4]
  2829. HAL_StatusTypeDef tmp_hal_status = HAL_OK;
  2830. 8001304: 2300 movs r3, #0
  2831. 8001306: 73fb strb r3, [r7, #15]
  2832. /* Check ADC handle */
  2833. if(hadc == NULL)
  2834. 8001308: 687b ldr r3, [r7, #4]
  2835. 800130a: 2b00 cmp r3, #0
  2836. 800130c: d101 bne.n 8001312 <HAL_ADC_Init+0x16>
  2837. {
  2838. return HAL_ERROR;
  2839. 800130e: 2301 movs r3, #1
  2840. 8001310: e033 b.n 800137a <HAL_ADC_Init+0x7e>
  2841. if(hadc->Init.ExternalTrigConv != ADC_SOFTWARE_START)
  2842. {
  2843. assert_param(IS_ADC_EXT_TRIG_EDGE(hadc->Init.ExternalTrigConvEdge));
  2844. }
  2845. if(hadc->State == HAL_ADC_STATE_RESET)
  2846. 8001312: 687b ldr r3, [r7, #4]
  2847. 8001314: 6c1b ldr r3, [r3, #64] ; 0x40
  2848. 8001316: 2b00 cmp r3, #0
  2849. 8001318: d109 bne.n 800132e <HAL_ADC_Init+0x32>
  2850. /* Init the low level hardware */
  2851. hadc->MspInitCallback(hadc);
  2852. #else
  2853. /* Init the low level hardware */
  2854. HAL_ADC_MspInit(hadc);
  2855. 800131a: 6878 ldr r0, [r7, #4]
  2856. 800131c: f7ff fcce bl 8000cbc <HAL_ADC_MspInit>
  2857. #endif /* USE_HAL_ADC_REGISTER_CALLBACKS */
  2858. /* Initialize ADC error code */
  2859. ADC_CLEAR_ERRORCODE(hadc);
  2860. 8001320: 687b ldr r3, [r7, #4]
  2861. 8001322: 2200 movs r2, #0
  2862. 8001324: 645a str r2, [r3, #68] ; 0x44
  2863. /* Allocate lock resource and initialize it */
  2864. hadc->Lock = HAL_UNLOCKED;
  2865. 8001326: 687b ldr r3, [r7, #4]
  2866. 8001328: 2200 movs r2, #0
  2867. 800132a: f883 203c strb.w r2, [r3, #60] ; 0x3c
  2868. }
  2869. /* Configuration of ADC parameters if previous preliminary actions are */
  2870. /* correctly completed. */
  2871. if (HAL_IS_BIT_CLR(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL))
  2872. 800132e: 687b ldr r3, [r7, #4]
  2873. 8001330: 6c1b ldr r3, [r3, #64] ; 0x40
  2874. 8001332: f003 0310 and.w r3, r3, #16
  2875. 8001336: 2b00 cmp r3, #0
  2876. 8001338: d118 bne.n 800136c <HAL_ADC_Init+0x70>
  2877. {
  2878. /* Set ADC state */
  2879. ADC_STATE_CLR_SET(hadc->State,
  2880. 800133a: 687b ldr r3, [r7, #4]
  2881. 800133c: 6c1b ldr r3, [r3, #64] ; 0x40
  2882. 800133e: f423 5388 bic.w r3, r3, #4352 ; 0x1100
  2883. 8001342: f023 0302 bic.w r3, r3, #2
  2884. 8001346: f043 0202 orr.w r2, r3, #2
  2885. 800134a: 687b ldr r3, [r7, #4]
  2886. 800134c: 641a str r2, [r3, #64] ; 0x40
  2887. HAL_ADC_STATE_REG_BUSY | HAL_ADC_STATE_INJ_BUSY,
  2888. HAL_ADC_STATE_BUSY_INTERNAL);
  2889. /* Set ADC parameters */
  2890. ADC_Init(hadc);
  2891. 800134e: 6878 ldr r0, [r7, #4]
  2892. 8001350: f000 f94a bl 80015e8 <ADC_Init>
  2893. /* Set ADC error code to none */
  2894. ADC_CLEAR_ERRORCODE(hadc);
  2895. 8001354: 687b ldr r3, [r7, #4]
  2896. 8001356: 2200 movs r2, #0
  2897. 8001358: 645a str r2, [r3, #68] ; 0x44
  2898. /* Set the ADC state */
  2899. ADC_STATE_CLR_SET(hadc->State,
  2900. 800135a: 687b ldr r3, [r7, #4]
  2901. 800135c: 6c1b ldr r3, [r3, #64] ; 0x40
  2902. 800135e: f023 0303 bic.w r3, r3, #3
  2903. 8001362: f043 0201 orr.w r2, r3, #1
  2904. 8001366: 687b ldr r3, [r7, #4]
  2905. 8001368: 641a str r2, [r3, #64] ; 0x40
  2906. 800136a: e001 b.n 8001370 <HAL_ADC_Init+0x74>
  2907. HAL_ADC_STATE_BUSY_INTERNAL,
  2908. HAL_ADC_STATE_READY);
  2909. }
  2910. else
  2911. {
  2912. tmp_hal_status = HAL_ERROR;
  2913. 800136c: 2301 movs r3, #1
  2914. 800136e: 73fb strb r3, [r7, #15]
  2915. }
  2916. /* Release Lock */
  2917. __HAL_UNLOCK(hadc);
  2918. 8001370: 687b ldr r3, [r7, #4]
  2919. 8001372: 2200 movs r2, #0
  2920. 8001374: f883 203c strb.w r2, [r3, #60] ; 0x3c
  2921. /* Return function status */
  2922. return tmp_hal_status;
  2923. 8001378: 7bfb ldrb r3, [r7, #15]
  2924. }
  2925. 800137a: 4618 mov r0, r3
  2926. 800137c: 3710 adds r7, #16
  2927. 800137e: 46bd mov sp, r7
  2928. 8001380: bd80 pop {r7, pc}
  2929. ...
  2930. 08001384 <HAL_ADC_ConfigChannel>:
  2931. * the configuration information for the specified ADC.
  2932. * @param sConfig ADC configuration structure.
  2933. * @retval HAL status
  2934. */
  2935. HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig)
  2936. {
  2937. 8001384: b480 push {r7}
  2938. 8001386: b085 sub sp, #20
  2939. 8001388: af00 add r7, sp, #0
  2940. 800138a: 6078 str r0, [r7, #4]
  2941. 800138c: 6039 str r1, [r7, #0]
  2942. __IO uint32_t counter = 0U;
  2943. 800138e: 2300 movs r3, #0
  2944. 8001390: 60bb str r3, [r7, #8]
  2945. assert_param(IS_ADC_CHANNEL(sConfig->Channel));
  2946. assert_param(IS_ADC_REGULAR_RANK(sConfig->Rank));
  2947. assert_param(IS_ADC_SAMPLE_TIME(sConfig->SamplingTime));
  2948. /* Process locked */
  2949. __HAL_LOCK(hadc);
  2950. 8001392: 687b ldr r3, [r7, #4]
  2951. 8001394: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
  2952. 8001398: 2b01 cmp r3, #1
  2953. 800139a: d101 bne.n 80013a0 <HAL_ADC_ConfigChannel+0x1c>
  2954. 800139c: 2302 movs r3, #2
  2955. 800139e: e113 b.n 80015c8 <HAL_ADC_ConfigChannel+0x244>
  2956. 80013a0: 687b ldr r3, [r7, #4]
  2957. 80013a2: 2201 movs r2, #1
  2958. 80013a4: f883 203c strb.w r2, [r3, #60] ; 0x3c
  2959. /* if ADC_Channel_10 ... ADC_Channel_18 is selected */
  2960. if (sConfig->Channel > ADC_CHANNEL_9)
  2961. 80013a8: 683b ldr r3, [r7, #0]
  2962. 80013aa: 681b ldr r3, [r3, #0]
  2963. 80013ac: 2b09 cmp r3, #9
  2964. 80013ae: d925 bls.n 80013fc <HAL_ADC_ConfigChannel+0x78>
  2965. {
  2966. /* Clear the old sample time */
  2967. hadc->Instance->SMPR1 &= ~ADC_SMPR1(ADC_SMPR1_SMP10, sConfig->Channel);
  2968. 80013b0: 687b ldr r3, [r7, #4]
  2969. 80013b2: 681b ldr r3, [r3, #0]
  2970. 80013b4: 68d9 ldr r1, [r3, #12]
  2971. 80013b6: 683b ldr r3, [r7, #0]
  2972. 80013b8: 681b ldr r3, [r3, #0]
  2973. 80013ba: b29b uxth r3, r3
  2974. 80013bc: 461a mov r2, r3
  2975. 80013be: 4613 mov r3, r2
  2976. 80013c0: 005b lsls r3, r3, #1
  2977. 80013c2: 4413 add r3, r2
  2978. 80013c4: 3b1e subs r3, #30
  2979. 80013c6: 2207 movs r2, #7
  2980. 80013c8: fa02 f303 lsl.w r3, r2, r3
  2981. 80013cc: 43da mvns r2, r3
  2982. 80013ce: 687b ldr r3, [r7, #4]
  2983. 80013d0: 681b ldr r3, [r3, #0]
  2984. 80013d2: 400a ands r2, r1
  2985. 80013d4: 60da str r2, [r3, #12]
  2986. /* Set the new sample time */
  2987. hadc->Instance->SMPR1 |= ADC_SMPR1(sConfig->SamplingTime, sConfig->Channel);
  2988. 80013d6: 687b ldr r3, [r7, #4]
  2989. 80013d8: 681b ldr r3, [r3, #0]
  2990. 80013da: 68d9 ldr r1, [r3, #12]
  2991. 80013dc: 683b ldr r3, [r7, #0]
  2992. 80013de: 689a ldr r2, [r3, #8]
  2993. 80013e0: 683b ldr r3, [r7, #0]
  2994. 80013e2: 681b ldr r3, [r3, #0]
  2995. 80013e4: b29b uxth r3, r3
  2996. 80013e6: 4618 mov r0, r3
  2997. 80013e8: 4603 mov r3, r0
  2998. 80013ea: 005b lsls r3, r3, #1
  2999. 80013ec: 4403 add r3, r0
  3000. 80013ee: 3b1e subs r3, #30
  3001. 80013f0: 409a lsls r2, r3
  3002. 80013f2: 687b ldr r3, [r7, #4]
  3003. 80013f4: 681b ldr r3, [r3, #0]
  3004. 80013f6: 430a orrs r2, r1
  3005. 80013f8: 60da str r2, [r3, #12]
  3006. 80013fa: e022 b.n 8001442 <HAL_ADC_ConfigChannel+0xbe>
  3007. }
  3008. else /* ADC_Channel include in ADC_Channel_[0..9] */
  3009. {
  3010. /* Clear the old sample time */
  3011. hadc->Instance->SMPR2 &= ~ADC_SMPR2(ADC_SMPR2_SMP0, sConfig->Channel);
  3012. 80013fc: 687b ldr r3, [r7, #4]
  3013. 80013fe: 681b ldr r3, [r3, #0]
  3014. 8001400: 6919 ldr r1, [r3, #16]
  3015. 8001402: 683b ldr r3, [r7, #0]
  3016. 8001404: 681b ldr r3, [r3, #0]
  3017. 8001406: b29b uxth r3, r3
  3018. 8001408: 461a mov r2, r3
  3019. 800140a: 4613 mov r3, r2
  3020. 800140c: 005b lsls r3, r3, #1
  3021. 800140e: 4413 add r3, r2
  3022. 8001410: 2207 movs r2, #7
  3023. 8001412: fa02 f303 lsl.w r3, r2, r3
  3024. 8001416: 43da mvns r2, r3
  3025. 8001418: 687b ldr r3, [r7, #4]
  3026. 800141a: 681b ldr r3, [r3, #0]
  3027. 800141c: 400a ands r2, r1
  3028. 800141e: 611a str r2, [r3, #16]
  3029. /* Set the new sample time */
  3030. hadc->Instance->SMPR2 |= ADC_SMPR2(sConfig->SamplingTime, sConfig->Channel);
  3031. 8001420: 687b ldr r3, [r7, #4]
  3032. 8001422: 681b ldr r3, [r3, #0]
  3033. 8001424: 6919 ldr r1, [r3, #16]
  3034. 8001426: 683b ldr r3, [r7, #0]
  3035. 8001428: 689a ldr r2, [r3, #8]
  3036. 800142a: 683b ldr r3, [r7, #0]
  3037. 800142c: 681b ldr r3, [r3, #0]
  3038. 800142e: b29b uxth r3, r3
  3039. 8001430: 4618 mov r0, r3
  3040. 8001432: 4603 mov r3, r0
  3041. 8001434: 005b lsls r3, r3, #1
  3042. 8001436: 4403 add r3, r0
  3043. 8001438: 409a lsls r2, r3
  3044. 800143a: 687b ldr r3, [r7, #4]
  3045. 800143c: 681b ldr r3, [r3, #0]
  3046. 800143e: 430a orrs r2, r1
  3047. 8001440: 611a str r2, [r3, #16]
  3048. }
  3049. /* For Rank 1 to 6 */
  3050. if (sConfig->Rank < 7U)
  3051. 8001442: 683b ldr r3, [r7, #0]
  3052. 8001444: 685b ldr r3, [r3, #4]
  3053. 8001446: 2b06 cmp r3, #6
  3054. 8001448: d824 bhi.n 8001494 <HAL_ADC_ConfigChannel+0x110>
  3055. {
  3056. /* Clear the old SQx bits for the selected rank */
  3057. hadc->Instance->SQR3 &= ~ADC_SQR3_RK(ADC_SQR3_SQ1, sConfig->Rank);
  3058. 800144a: 687b ldr r3, [r7, #4]
  3059. 800144c: 681b ldr r3, [r3, #0]
  3060. 800144e: 6b59 ldr r1, [r3, #52] ; 0x34
  3061. 8001450: 683b ldr r3, [r7, #0]
  3062. 8001452: 685a ldr r2, [r3, #4]
  3063. 8001454: 4613 mov r3, r2
  3064. 8001456: 009b lsls r3, r3, #2
  3065. 8001458: 4413 add r3, r2
  3066. 800145a: 3b05 subs r3, #5
  3067. 800145c: 221f movs r2, #31
  3068. 800145e: fa02 f303 lsl.w r3, r2, r3
  3069. 8001462: 43da mvns r2, r3
  3070. 8001464: 687b ldr r3, [r7, #4]
  3071. 8001466: 681b ldr r3, [r3, #0]
  3072. 8001468: 400a ands r2, r1
  3073. 800146a: 635a str r2, [r3, #52] ; 0x34
  3074. /* Set the SQx bits for the selected rank */
  3075. hadc->Instance->SQR3 |= ADC_SQR3_RK(sConfig->Channel, sConfig->Rank);
  3076. 800146c: 687b ldr r3, [r7, #4]
  3077. 800146e: 681b ldr r3, [r3, #0]
  3078. 8001470: 6b59 ldr r1, [r3, #52] ; 0x34
  3079. 8001472: 683b ldr r3, [r7, #0]
  3080. 8001474: 681b ldr r3, [r3, #0]
  3081. 8001476: b29b uxth r3, r3
  3082. 8001478: 4618 mov r0, r3
  3083. 800147a: 683b ldr r3, [r7, #0]
  3084. 800147c: 685a ldr r2, [r3, #4]
  3085. 800147e: 4613 mov r3, r2
  3086. 8001480: 009b lsls r3, r3, #2
  3087. 8001482: 4413 add r3, r2
  3088. 8001484: 3b05 subs r3, #5
  3089. 8001486: fa00 f203 lsl.w r2, r0, r3
  3090. 800148a: 687b ldr r3, [r7, #4]
  3091. 800148c: 681b ldr r3, [r3, #0]
  3092. 800148e: 430a orrs r2, r1
  3093. 8001490: 635a str r2, [r3, #52] ; 0x34
  3094. 8001492: e04c b.n 800152e <HAL_ADC_ConfigChannel+0x1aa>
  3095. }
  3096. /* For Rank 7 to 12 */
  3097. else if (sConfig->Rank < 13U)
  3098. 8001494: 683b ldr r3, [r7, #0]
  3099. 8001496: 685b ldr r3, [r3, #4]
  3100. 8001498: 2b0c cmp r3, #12
  3101. 800149a: d824 bhi.n 80014e6 <HAL_ADC_ConfigChannel+0x162>
  3102. {
  3103. /* Clear the old SQx bits for the selected rank */
  3104. hadc->Instance->SQR2 &= ~ADC_SQR2_RK(ADC_SQR2_SQ7, sConfig->Rank);
  3105. 800149c: 687b ldr r3, [r7, #4]
  3106. 800149e: 681b ldr r3, [r3, #0]
  3107. 80014a0: 6b19 ldr r1, [r3, #48] ; 0x30
  3108. 80014a2: 683b ldr r3, [r7, #0]
  3109. 80014a4: 685a ldr r2, [r3, #4]
  3110. 80014a6: 4613 mov r3, r2
  3111. 80014a8: 009b lsls r3, r3, #2
  3112. 80014aa: 4413 add r3, r2
  3113. 80014ac: 3b23 subs r3, #35 ; 0x23
  3114. 80014ae: 221f movs r2, #31
  3115. 80014b0: fa02 f303 lsl.w r3, r2, r3
  3116. 80014b4: 43da mvns r2, r3
  3117. 80014b6: 687b ldr r3, [r7, #4]
  3118. 80014b8: 681b ldr r3, [r3, #0]
  3119. 80014ba: 400a ands r2, r1
  3120. 80014bc: 631a str r2, [r3, #48] ; 0x30
  3121. /* Set the SQx bits for the selected rank */
  3122. hadc->Instance->SQR2 |= ADC_SQR2_RK(sConfig->Channel, sConfig->Rank);
  3123. 80014be: 687b ldr r3, [r7, #4]
  3124. 80014c0: 681b ldr r3, [r3, #0]
  3125. 80014c2: 6b19 ldr r1, [r3, #48] ; 0x30
  3126. 80014c4: 683b ldr r3, [r7, #0]
  3127. 80014c6: 681b ldr r3, [r3, #0]
  3128. 80014c8: b29b uxth r3, r3
  3129. 80014ca: 4618 mov r0, r3
  3130. 80014cc: 683b ldr r3, [r7, #0]
  3131. 80014ce: 685a ldr r2, [r3, #4]
  3132. 80014d0: 4613 mov r3, r2
  3133. 80014d2: 009b lsls r3, r3, #2
  3134. 80014d4: 4413 add r3, r2
  3135. 80014d6: 3b23 subs r3, #35 ; 0x23
  3136. 80014d8: fa00 f203 lsl.w r2, r0, r3
  3137. 80014dc: 687b ldr r3, [r7, #4]
  3138. 80014de: 681b ldr r3, [r3, #0]
  3139. 80014e0: 430a orrs r2, r1
  3140. 80014e2: 631a str r2, [r3, #48] ; 0x30
  3141. 80014e4: e023 b.n 800152e <HAL_ADC_ConfigChannel+0x1aa>
  3142. }
  3143. /* For Rank 13 to 16 */
  3144. else
  3145. {
  3146. /* Clear the old SQx bits for the selected rank */
  3147. hadc->Instance->SQR1 &= ~ADC_SQR1_RK(ADC_SQR1_SQ13, sConfig->Rank);
  3148. 80014e6: 687b ldr r3, [r7, #4]
  3149. 80014e8: 681b ldr r3, [r3, #0]
  3150. 80014ea: 6ad9 ldr r1, [r3, #44] ; 0x2c
  3151. 80014ec: 683b ldr r3, [r7, #0]
  3152. 80014ee: 685a ldr r2, [r3, #4]
  3153. 80014f0: 4613 mov r3, r2
  3154. 80014f2: 009b lsls r3, r3, #2
  3155. 80014f4: 4413 add r3, r2
  3156. 80014f6: 3b41 subs r3, #65 ; 0x41
  3157. 80014f8: 221f movs r2, #31
  3158. 80014fa: fa02 f303 lsl.w r3, r2, r3
  3159. 80014fe: 43da mvns r2, r3
  3160. 8001500: 687b ldr r3, [r7, #4]
  3161. 8001502: 681b ldr r3, [r3, #0]
  3162. 8001504: 400a ands r2, r1
  3163. 8001506: 62da str r2, [r3, #44] ; 0x2c
  3164. /* Set the SQx bits for the selected rank */
  3165. hadc->Instance->SQR1 |= ADC_SQR1_RK(sConfig->Channel, sConfig->Rank);
  3166. 8001508: 687b ldr r3, [r7, #4]
  3167. 800150a: 681b ldr r3, [r3, #0]
  3168. 800150c: 6ad9 ldr r1, [r3, #44] ; 0x2c
  3169. 800150e: 683b ldr r3, [r7, #0]
  3170. 8001510: 681b ldr r3, [r3, #0]
  3171. 8001512: b29b uxth r3, r3
  3172. 8001514: 4618 mov r0, r3
  3173. 8001516: 683b ldr r3, [r7, #0]
  3174. 8001518: 685a ldr r2, [r3, #4]
  3175. 800151a: 4613 mov r3, r2
  3176. 800151c: 009b lsls r3, r3, #2
  3177. 800151e: 4413 add r3, r2
  3178. 8001520: 3b41 subs r3, #65 ; 0x41
  3179. 8001522: fa00 f203 lsl.w r2, r0, r3
  3180. 8001526: 687b ldr r3, [r7, #4]
  3181. 8001528: 681b ldr r3, [r3, #0]
  3182. 800152a: 430a orrs r2, r1
  3183. 800152c: 62da str r2, [r3, #44] ; 0x2c
  3184. }
  3185. /* Pointer to the common control register to which is belonging hadc */
  3186. /* (Depending on STM32F4 product, there may be up to 3 ADCs and 1 common */
  3187. /* control register) */
  3188. tmpADC_Common = ADC_COMMON_REGISTER(hadc);
  3189. 800152e: 4b29 ldr r3, [pc, #164] ; (80015d4 <HAL_ADC_ConfigChannel+0x250>)
  3190. 8001530: 60fb str r3, [r7, #12]
  3191. /* if ADC1 Channel_18 is selected for VBAT Channel ennable VBATE */
  3192. if ((hadc->Instance == ADC1) && (sConfig->Channel == ADC_CHANNEL_VBAT))
  3193. 8001532: 687b ldr r3, [r7, #4]
  3194. 8001534: 681b ldr r3, [r3, #0]
  3195. 8001536: 4a28 ldr r2, [pc, #160] ; (80015d8 <HAL_ADC_ConfigChannel+0x254>)
  3196. 8001538: 4293 cmp r3, r2
  3197. 800153a: d10f bne.n 800155c <HAL_ADC_ConfigChannel+0x1d8>
  3198. 800153c: 683b ldr r3, [r7, #0]
  3199. 800153e: 681b ldr r3, [r3, #0]
  3200. 8001540: 2b12 cmp r3, #18
  3201. 8001542: d10b bne.n 800155c <HAL_ADC_ConfigChannel+0x1d8>
  3202. {
  3203. /* Disable the TEMPSENSOR channel in case of using board with multiplixed ADC_CHANNEL_VBAT & ADC_CHANNEL_TEMPSENSOR*/
  3204. if ((uint16_t)ADC_CHANNEL_TEMPSENSOR == (uint16_t)ADC_CHANNEL_VBAT)
  3205. {
  3206. tmpADC_Common->CCR &= ~ADC_CCR_TSVREFE;
  3207. 8001544: 68fb ldr r3, [r7, #12]
  3208. 8001546: 685b ldr r3, [r3, #4]
  3209. 8001548: f423 0200 bic.w r2, r3, #8388608 ; 0x800000
  3210. 800154c: 68fb ldr r3, [r7, #12]
  3211. 800154e: 605a str r2, [r3, #4]
  3212. }
  3213. /* Enable the VBAT channel*/
  3214. tmpADC_Common->CCR |= ADC_CCR_VBATE;
  3215. 8001550: 68fb ldr r3, [r7, #12]
  3216. 8001552: 685b ldr r3, [r3, #4]
  3217. 8001554: f443 0280 orr.w r2, r3, #4194304 ; 0x400000
  3218. 8001558: 68fb ldr r3, [r7, #12]
  3219. 800155a: 605a str r2, [r3, #4]
  3220. }
  3221. /* if ADC1 Channel_16 or Channel_18 is selected for Temperature sensor or
  3222. Channel_17 is selected for VREFINT enable TSVREFE */
  3223. if ((hadc->Instance == ADC1) && ((sConfig->Channel == ADC_CHANNEL_TEMPSENSOR) || (sConfig->Channel == ADC_CHANNEL_VREFINT)))
  3224. 800155c: 687b ldr r3, [r7, #4]
  3225. 800155e: 681b ldr r3, [r3, #0]
  3226. 8001560: 4a1d ldr r2, [pc, #116] ; (80015d8 <HAL_ADC_ConfigChannel+0x254>)
  3227. 8001562: 4293 cmp r3, r2
  3228. 8001564: d12b bne.n 80015be <HAL_ADC_ConfigChannel+0x23a>
  3229. 8001566: 683b ldr r3, [r7, #0]
  3230. 8001568: 681b ldr r3, [r3, #0]
  3231. 800156a: 4a1c ldr r2, [pc, #112] ; (80015dc <HAL_ADC_ConfigChannel+0x258>)
  3232. 800156c: 4293 cmp r3, r2
  3233. 800156e: d003 beq.n 8001578 <HAL_ADC_ConfigChannel+0x1f4>
  3234. 8001570: 683b ldr r3, [r7, #0]
  3235. 8001572: 681b ldr r3, [r3, #0]
  3236. 8001574: 2b11 cmp r3, #17
  3237. 8001576: d122 bne.n 80015be <HAL_ADC_ConfigChannel+0x23a>
  3238. {
  3239. /* Disable the VBAT channel in case of using board with multiplixed ADC_CHANNEL_VBAT & ADC_CHANNEL_TEMPSENSOR*/
  3240. if ((uint16_t)ADC_CHANNEL_TEMPSENSOR == (uint16_t)ADC_CHANNEL_VBAT)
  3241. {
  3242. tmpADC_Common->CCR &= ~ADC_CCR_VBATE;
  3243. 8001578: 68fb ldr r3, [r7, #12]
  3244. 800157a: 685b ldr r3, [r3, #4]
  3245. 800157c: f423 0280 bic.w r2, r3, #4194304 ; 0x400000
  3246. 8001580: 68fb ldr r3, [r7, #12]
  3247. 8001582: 605a str r2, [r3, #4]
  3248. }
  3249. /* Enable the Temperature sensor and VREFINT channel*/
  3250. tmpADC_Common->CCR |= ADC_CCR_TSVREFE;
  3251. 8001584: 68fb ldr r3, [r7, #12]
  3252. 8001586: 685b ldr r3, [r3, #4]
  3253. 8001588: f443 0200 orr.w r2, r3, #8388608 ; 0x800000
  3254. 800158c: 68fb ldr r3, [r7, #12]
  3255. 800158e: 605a str r2, [r3, #4]
  3256. if(sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)
  3257. 8001590: 683b ldr r3, [r7, #0]
  3258. 8001592: 681b ldr r3, [r3, #0]
  3259. 8001594: 4a11 ldr r2, [pc, #68] ; (80015dc <HAL_ADC_ConfigChannel+0x258>)
  3260. 8001596: 4293 cmp r3, r2
  3261. 8001598: d111 bne.n 80015be <HAL_ADC_ConfigChannel+0x23a>
  3262. {
  3263. /* Delay for temperature sensor stabilization time */
  3264. /* Compute number of CPU cycles to wait for */
  3265. counter = (ADC_TEMPSENSOR_DELAY_US * (SystemCoreClock / 1000000U));
  3266. 800159a: 4b11 ldr r3, [pc, #68] ; (80015e0 <HAL_ADC_ConfigChannel+0x25c>)
  3267. 800159c: 681b ldr r3, [r3, #0]
  3268. 800159e: 4a11 ldr r2, [pc, #68] ; (80015e4 <HAL_ADC_ConfigChannel+0x260>)
  3269. 80015a0: fba2 2303 umull r2, r3, r2, r3
  3270. 80015a4: 0c9a lsrs r2, r3, #18
  3271. 80015a6: 4613 mov r3, r2
  3272. 80015a8: 009b lsls r3, r3, #2
  3273. 80015aa: 4413 add r3, r2
  3274. 80015ac: 005b lsls r3, r3, #1
  3275. 80015ae: 60bb str r3, [r7, #8]
  3276. while(counter != 0U)
  3277. 80015b0: e002 b.n 80015b8 <HAL_ADC_ConfigChannel+0x234>
  3278. {
  3279. counter--;
  3280. 80015b2: 68bb ldr r3, [r7, #8]
  3281. 80015b4: 3b01 subs r3, #1
  3282. 80015b6: 60bb str r3, [r7, #8]
  3283. while(counter != 0U)
  3284. 80015b8: 68bb ldr r3, [r7, #8]
  3285. 80015ba: 2b00 cmp r3, #0
  3286. 80015bc: d1f9 bne.n 80015b2 <HAL_ADC_ConfigChannel+0x22e>
  3287. }
  3288. }
  3289. }
  3290. /* Process unlocked */
  3291. __HAL_UNLOCK(hadc);
  3292. 80015be: 687b ldr r3, [r7, #4]
  3293. 80015c0: 2200 movs r2, #0
  3294. 80015c2: f883 203c strb.w r2, [r3, #60] ; 0x3c
  3295. /* Return function status */
  3296. return HAL_OK;
  3297. 80015c6: 2300 movs r3, #0
  3298. }
  3299. 80015c8: 4618 mov r0, r3
  3300. 80015ca: 3714 adds r7, #20
  3301. 80015cc: 46bd mov sp, r7
  3302. 80015ce: f85d 7b04 ldr.w r7, [sp], #4
  3303. 80015d2: 4770 bx lr
  3304. 80015d4: 40012300 .word 0x40012300
  3305. 80015d8: 40012000 .word 0x40012000
  3306. 80015dc: 10000012 .word 0x10000012
  3307. 80015e0: 20000000 .word 0x20000000
  3308. 80015e4: 431bde83 .word 0x431bde83
  3309. 080015e8 <ADC_Init>:
  3310. * @param hadc pointer to a ADC_HandleTypeDef structure that contains
  3311. * the configuration information for the specified ADC.
  3312. * @retval None
  3313. */
  3314. static void ADC_Init(ADC_HandleTypeDef* hadc)
  3315. {
  3316. 80015e8: b480 push {r7}
  3317. 80015ea: b085 sub sp, #20
  3318. 80015ec: af00 add r7, sp, #0
  3319. 80015ee: 6078 str r0, [r7, #4]
  3320. /* Set ADC parameters */
  3321. /* Pointer to the common control register to which is belonging hadc */
  3322. /* (Depending on STM32F4 product, there may be up to 3 ADCs and 1 common */
  3323. /* control register) */
  3324. tmpADC_Common = ADC_COMMON_REGISTER(hadc);
  3325. 80015f0: 4b79 ldr r3, [pc, #484] ; (80017d8 <ADC_Init+0x1f0>)
  3326. 80015f2: 60fb str r3, [r7, #12]
  3327. /* Set the ADC clock prescaler */
  3328. tmpADC_Common->CCR &= ~(ADC_CCR_ADCPRE);
  3329. 80015f4: 68fb ldr r3, [r7, #12]
  3330. 80015f6: 685b ldr r3, [r3, #4]
  3331. 80015f8: f423 3240 bic.w r2, r3, #196608 ; 0x30000
  3332. 80015fc: 68fb ldr r3, [r7, #12]
  3333. 80015fe: 605a str r2, [r3, #4]
  3334. tmpADC_Common->CCR |= hadc->Init.ClockPrescaler;
  3335. 8001600: 68fb ldr r3, [r7, #12]
  3336. 8001602: 685a ldr r2, [r3, #4]
  3337. 8001604: 687b ldr r3, [r7, #4]
  3338. 8001606: 685b ldr r3, [r3, #4]
  3339. 8001608: 431a orrs r2, r3
  3340. 800160a: 68fb ldr r3, [r7, #12]
  3341. 800160c: 605a str r2, [r3, #4]
  3342. /* Set ADC scan mode */
  3343. hadc->Instance->CR1 &= ~(ADC_CR1_SCAN);
  3344. 800160e: 687b ldr r3, [r7, #4]
  3345. 8001610: 681b ldr r3, [r3, #0]
  3346. 8001612: 685a ldr r2, [r3, #4]
  3347. 8001614: 687b ldr r3, [r7, #4]
  3348. 8001616: 681b ldr r3, [r3, #0]
  3349. 8001618: f422 7280 bic.w r2, r2, #256 ; 0x100
  3350. 800161c: 605a str r2, [r3, #4]
  3351. hadc->Instance->CR1 |= ADC_CR1_SCANCONV(hadc->Init.ScanConvMode);
  3352. 800161e: 687b ldr r3, [r7, #4]
  3353. 8001620: 681b ldr r3, [r3, #0]
  3354. 8001622: 6859 ldr r1, [r3, #4]
  3355. 8001624: 687b ldr r3, [r7, #4]
  3356. 8001626: 691b ldr r3, [r3, #16]
  3357. 8001628: 021a lsls r2, r3, #8
  3358. 800162a: 687b ldr r3, [r7, #4]
  3359. 800162c: 681b ldr r3, [r3, #0]
  3360. 800162e: 430a orrs r2, r1
  3361. 8001630: 605a str r2, [r3, #4]
  3362. /* Set ADC resolution */
  3363. hadc->Instance->CR1 &= ~(ADC_CR1_RES);
  3364. 8001632: 687b ldr r3, [r7, #4]
  3365. 8001634: 681b ldr r3, [r3, #0]
  3366. 8001636: 685a ldr r2, [r3, #4]
  3367. 8001638: 687b ldr r3, [r7, #4]
  3368. 800163a: 681b ldr r3, [r3, #0]
  3369. 800163c: f022 7240 bic.w r2, r2, #50331648 ; 0x3000000
  3370. 8001640: 605a str r2, [r3, #4]
  3371. hadc->Instance->CR1 |= hadc->Init.Resolution;
  3372. 8001642: 687b ldr r3, [r7, #4]
  3373. 8001644: 681b ldr r3, [r3, #0]
  3374. 8001646: 6859 ldr r1, [r3, #4]
  3375. 8001648: 687b ldr r3, [r7, #4]
  3376. 800164a: 689a ldr r2, [r3, #8]
  3377. 800164c: 687b ldr r3, [r7, #4]
  3378. 800164e: 681b ldr r3, [r3, #0]
  3379. 8001650: 430a orrs r2, r1
  3380. 8001652: 605a str r2, [r3, #4]
  3381. /* Set ADC data alignment */
  3382. hadc->Instance->CR2 &= ~(ADC_CR2_ALIGN);
  3383. 8001654: 687b ldr r3, [r7, #4]
  3384. 8001656: 681b ldr r3, [r3, #0]
  3385. 8001658: 689a ldr r2, [r3, #8]
  3386. 800165a: 687b ldr r3, [r7, #4]
  3387. 800165c: 681b ldr r3, [r3, #0]
  3388. 800165e: f422 6200 bic.w r2, r2, #2048 ; 0x800
  3389. 8001662: 609a str r2, [r3, #8]
  3390. hadc->Instance->CR2 |= hadc->Init.DataAlign;
  3391. 8001664: 687b ldr r3, [r7, #4]
  3392. 8001666: 681b ldr r3, [r3, #0]
  3393. 8001668: 6899 ldr r1, [r3, #8]
  3394. 800166a: 687b ldr r3, [r7, #4]
  3395. 800166c: 68da ldr r2, [r3, #12]
  3396. 800166e: 687b ldr r3, [r7, #4]
  3397. 8001670: 681b ldr r3, [r3, #0]
  3398. 8001672: 430a orrs r2, r1
  3399. 8001674: 609a str r2, [r3, #8]
  3400. /* Enable external trigger if trigger selection is different of software */
  3401. /* start. */
  3402. /* Note: This configuration keeps the hardware feature of parameter */
  3403. /* ExternalTrigConvEdge "trigger edge none" equivalent to */
  3404. /* software start. */
  3405. if(hadc->Init.ExternalTrigConv != ADC_SOFTWARE_START)
  3406. 8001676: 687b ldr r3, [r7, #4]
  3407. 8001678: 6a9b ldr r3, [r3, #40] ; 0x28
  3408. 800167a: 4a58 ldr r2, [pc, #352] ; (80017dc <ADC_Init+0x1f4>)
  3409. 800167c: 4293 cmp r3, r2
  3410. 800167e: d022 beq.n 80016c6 <ADC_Init+0xde>
  3411. {
  3412. /* Select external trigger to start conversion */
  3413. hadc->Instance->CR2 &= ~(ADC_CR2_EXTSEL);
  3414. 8001680: 687b ldr r3, [r7, #4]
  3415. 8001682: 681b ldr r3, [r3, #0]
  3416. 8001684: 689a ldr r2, [r3, #8]
  3417. 8001686: 687b ldr r3, [r7, #4]
  3418. 8001688: 681b ldr r3, [r3, #0]
  3419. 800168a: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
  3420. 800168e: 609a str r2, [r3, #8]
  3421. hadc->Instance->CR2 |= hadc->Init.ExternalTrigConv;
  3422. 8001690: 687b ldr r3, [r7, #4]
  3423. 8001692: 681b ldr r3, [r3, #0]
  3424. 8001694: 6899 ldr r1, [r3, #8]
  3425. 8001696: 687b ldr r3, [r7, #4]
  3426. 8001698: 6a9a ldr r2, [r3, #40] ; 0x28
  3427. 800169a: 687b ldr r3, [r7, #4]
  3428. 800169c: 681b ldr r3, [r3, #0]
  3429. 800169e: 430a orrs r2, r1
  3430. 80016a0: 609a str r2, [r3, #8]
  3431. /* Select external trigger polarity */
  3432. hadc->Instance->CR2 &= ~(ADC_CR2_EXTEN);
  3433. 80016a2: 687b ldr r3, [r7, #4]
  3434. 80016a4: 681b ldr r3, [r3, #0]
  3435. 80016a6: 689a ldr r2, [r3, #8]
  3436. 80016a8: 687b ldr r3, [r7, #4]
  3437. 80016aa: 681b ldr r3, [r3, #0]
  3438. 80016ac: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
  3439. 80016b0: 609a str r2, [r3, #8]
  3440. hadc->Instance->CR2 |= hadc->Init.ExternalTrigConvEdge;
  3441. 80016b2: 687b ldr r3, [r7, #4]
  3442. 80016b4: 681b ldr r3, [r3, #0]
  3443. 80016b6: 6899 ldr r1, [r3, #8]
  3444. 80016b8: 687b ldr r3, [r7, #4]
  3445. 80016ba: 6ada ldr r2, [r3, #44] ; 0x2c
  3446. 80016bc: 687b ldr r3, [r7, #4]
  3447. 80016be: 681b ldr r3, [r3, #0]
  3448. 80016c0: 430a orrs r2, r1
  3449. 80016c2: 609a str r2, [r3, #8]
  3450. 80016c4: e00f b.n 80016e6 <ADC_Init+0xfe>
  3451. }
  3452. else
  3453. {
  3454. /* Reset the external trigger */
  3455. hadc->Instance->CR2 &= ~(ADC_CR2_EXTSEL);
  3456. 80016c6: 687b ldr r3, [r7, #4]
  3457. 80016c8: 681b ldr r3, [r3, #0]
  3458. 80016ca: 689a ldr r2, [r3, #8]
  3459. 80016cc: 687b ldr r3, [r7, #4]
  3460. 80016ce: 681b ldr r3, [r3, #0]
  3461. 80016d0: f022 6270 bic.w r2, r2, #251658240 ; 0xf000000
  3462. 80016d4: 609a str r2, [r3, #8]
  3463. hadc->Instance->CR2 &= ~(ADC_CR2_EXTEN);
  3464. 80016d6: 687b ldr r3, [r7, #4]
  3465. 80016d8: 681b ldr r3, [r3, #0]
  3466. 80016da: 689a ldr r2, [r3, #8]
  3467. 80016dc: 687b ldr r3, [r7, #4]
  3468. 80016de: 681b ldr r3, [r3, #0]
  3469. 80016e0: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000
  3470. 80016e4: 609a str r2, [r3, #8]
  3471. }
  3472. /* Enable or disable ADC continuous conversion mode */
  3473. hadc->Instance->CR2 &= ~(ADC_CR2_CONT);
  3474. 80016e6: 687b ldr r3, [r7, #4]
  3475. 80016e8: 681b ldr r3, [r3, #0]
  3476. 80016ea: 689a ldr r2, [r3, #8]
  3477. 80016ec: 687b ldr r3, [r7, #4]
  3478. 80016ee: 681b ldr r3, [r3, #0]
  3479. 80016f0: f022 0202 bic.w r2, r2, #2
  3480. 80016f4: 609a str r2, [r3, #8]
  3481. hadc->Instance->CR2 |= ADC_CR2_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode);
  3482. 80016f6: 687b ldr r3, [r7, #4]
  3483. 80016f8: 681b ldr r3, [r3, #0]
  3484. 80016fa: 6899 ldr r1, [r3, #8]
  3485. 80016fc: 687b ldr r3, [r7, #4]
  3486. 80016fe: 7e1b ldrb r3, [r3, #24]
  3487. 8001700: 005a lsls r2, r3, #1
  3488. 8001702: 687b ldr r3, [r7, #4]
  3489. 8001704: 681b ldr r3, [r3, #0]
  3490. 8001706: 430a orrs r2, r1
  3491. 8001708: 609a str r2, [r3, #8]
  3492. if(hadc->Init.DiscontinuousConvMode != DISABLE)
  3493. 800170a: 687b ldr r3, [r7, #4]
  3494. 800170c: f893 3020 ldrb.w r3, [r3, #32]
  3495. 8001710: 2b00 cmp r3, #0
  3496. 8001712: d01b beq.n 800174c <ADC_Init+0x164>
  3497. {
  3498. assert_param(IS_ADC_REGULAR_DISC_NUMBER(hadc->Init.NbrOfDiscConversion));
  3499. /* Enable the selected ADC regular discontinuous mode */
  3500. hadc->Instance->CR1 |= (uint32_t)ADC_CR1_DISCEN;
  3501. 8001714: 687b ldr r3, [r7, #4]
  3502. 8001716: 681b ldr r3, [r3, #0]
  3503. 8001718: 685a ldr r2, [r3, #4]
  3504. 800171a: 687b ldr r3, [r7, #4]
  3505. 800171c: 681b ldr r3, [r3, #0]
  3506. 800171e: f442 6200 orr.w r2, r2, #2048 ; 0x800
  3507. 8001722: 605a str r2, [r3, #4]
  3508. /* Set the number of channels to be converted in discontinuous mode */
  3509. hadc->Instance->CR1 &= ~(ADC_CR1_DISCNUM);
  3510. 8001724: 687b ldr r3, [r7, #4]
  3511. 8001726: 681b ldr r3, [r3, #0]
  3512. 8001728: 685a ldr r2, [r3, #4]
  3513. 800172a: 687b ldr r3, [r7, #4]
  3514. 800172c: 681b ldr r3, [r3, #0]
  3515. 800172e: f422 4260 bic.w r2, r2, #57344 ; 0xe000
  3516. 8001732: 605a str r2, [r3, #4]
  3517. hadc->Instance->CR1 |= ADC_CR1_DISCONTINUOUS(hadc->Init.NbrOfDiscConversion);
  3518. 8001734: 687b ldr r3, [r7, #4]
  3519. 8001736: 681b ldr r3, [r3, #0]
  3520. 8001738: 6859 ldr r1, [r3, #4]
  3521. 800173a: 687b ldr r3, [r7, #4]
  3522. 800173c: 6a5b ldr r3, [r3, #36] ; 0x24
  3523. 800173e: 3b01 subs r3, #1
  3524. 8001740: 035a lsls r2, r3, #13
  3525. 8001742: 687b ldr r3, [r7, #4]
  3526. 8001744: 681b ldr r3, [r3, #0]
  3527. 8001746: 430a orrs r2, r1
  3528. 8001748: 605a str r2, [r3, #4]
  3529. 800174a: e007 b.n 800175c <ADC_Init+0x174>
  3530. }
  3531. else
  3532. {
  3533. /* Disable the selected ADC regular discontinuous mode */
  3534. hadc->Instance->CR1 &= ~(ADC_CR1_DISCEN);
  3535. 800174c: 687b ldr r3, [r7, #4]
  3536. 800174e: 681b ldr r3, [r3, #0]
  3537. 8001750: 685a ldr r2, [r3, #4]
  3538. 8001752: 687b ldr r3, [r7, #4]
  3539. 8001754: 681b ldr r3, [r3, #0]
  3540. 8001756: f422 6200 bic.w r2, r2, #2048 ; 0x800
  3541. 800175a: 605a str r2, [r3, #4]
  3542. }
  3543. /* Set ADC number of conversion */
  3544. hadc->Instance->SQR1 &= ~(ADC_SQR1_L);
  3545. 800175c: 687b ldr r3, [r7, #4]
  3546. 800175e: 681b ldr r3, [r3, #0]
  3547. 8001760: 6ada ldr r2, [r3, #44] ; 0x2c
  3548. 8001762: 687b ldr r3, [r7, #4]
  3549. 8001764: 681b ldr r3, [r3, #0]
  3550. 8001766: f422 0270 bic.w r2, r2, #15728640 ; 0xf00000
  3551. 800176a: 62da str r2, [r3, #44] ; 0x2c
  3552. hadc->Instance->SQR1 |= ADC_SQR1(hadc->Init.NbrOfConversion);
  3553. 800176c: 687b ldr r3, [r7, #4]
  3554. 800176e: 681b ldr r3, [r3, #0]
  3555. 8001770: 6ad9 ldr r1, [r3, #44] ; 0x2c
  3556. 8001772: 687b ldr r3, [r7, #4]
  3557. 8001774: 69db ldr r3, [r3, #28]
  3558. 8001776: 3b01 subs r3, #1
  3559. 8001778: 051a lsls r2, r3, #20
  3560. 800177a: 687b ldr r3, [r7, #4]
  3561. 800177c: 681b ldr r3, [r3, #0]
  3562. 800177e: 430a orrs r2, r1
  3563. 8001780: 62da str r2, [r3, #44] ; 0x2c
  3564. /* Enable or disable ADC DMA continuous request */
  3565. hadc->Instance->CR2 &= ~(ADC_CR2_DDS);
  3566. 8001782: 687b ldr r3, [r7, #4]
  3567. 8001784: 681b ldr r3, [r3, #0]
  3568. 8001786: 689a ldr r2, [r3, #8]
  3569. 8001788: 687b ldr r3, [r7, #4]
  3570. 800178a: 681b ldr r3, [r3, #0]
  3571. 800178c: f422 7200 bic.w r2, r2, #512 ; 0x200
  3572. 8001790: 609a str r2, [r3, #8]
  3573. hadc->Instance->CR2 |= ADC_CR2_DMAContReq((uint32_t)hadc->Init.DMAContinuousRequests);
  3574. 8001792: 687b ldr r3, [r7, #4]
  3575. 8001794: 681b ldr r3, [r3, #0]
  3576. 8001796: 6899 ldr r1, [r3, #8]
  3577. 8001798: 687b ldr r3, [r7, #4]
  3578. 800179a: f893 3030 ldrb.w r3, [r3, #48] ; 0x30
  3579. 800179e: 025a lsls r2, r3, #9
  3580. 80017a0: 687b ldr r3, [r7, #4]
  3581. 80017a2: 681b ldr r3, [r3, #0]
  3582. 80017a4: 430a orrs r2, r1
  3583. 80017a6: 609a str r2, [r3, #8]
  3584. /* Enable or disable ADC end of conversion selection */
  3585. hadc->Instance->CR2 &= ~(ADC_CR2_EOCS);
  3586. 80017a8: 687b ldr r3, [r7, #4]
  3587. 80017aa: 681b ldr r3, [r3, #0]
  3588. 80017ac: 689a ldr r2, [r3, #8]
  3589. 80017ae: 687b ldr r3, [r7, #4]
  3590. 80017b0: 681b ldr r3, [r3, #0]
  3591. 80017b2: f422 6280 bic.w r2, r2, #1024 ; 0x400
  3592. 80017b6: 609a str r2, [r3, #8]
  3593. hadc->Instance->CR2 |= ADC_CR2_EOCSelection(hadc->Init.EOCSelection);
  3594. 80017b8: 687b ldr r3, [r7, #4]
  3595. 80017ba: 681b ldr r3, [r3, #0]
  3596. 80017bc: 6899 ldr r1, [r3, #8]
  3597. 80017be: 687b ldr r3, [r7, #4]
  3598. 80017c0: 695b ldr r3, [r3, #20]
  3599. 80017c2: 029a lsls r2, r3, #10
  3600. 80017c4: 687b ldr r3, [r7, #4]
  3601. 80017c6: 681b ldr r3, [r3, #0]
  3602. 80017c8: 430a orrs r2, r1
  3603. 80017ca: 609a str r2, [r3, #8]
  3604. }
  3605. 80017cc: bf00 nop
  3606. 80017ce: 3714 adds r7, #20
  3607. 80017d0: 46bd mov sp, r7
  3608. 80017d2: f85d 7b04 ldr.w r7, [sp], #4
  3609. 80017d6: 4770 bx lr
  3610. 80017d8: 40012300 .word 0x40012300
  3611. 80017dc: 0f000001 .word 0x0f000001
  3612. 080017e0 <__NVIC_SetPriorityGrouping>:
  3613. In case of a conflict between priority grouping and available
  3614. priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
  3615. \param [in] PriorityGroup Priority grouping field.
  3616. */
  3617. __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
  3618. {
  3619. 80017e0: b480 push {r7}
  3620. 80017e2: b085 sub sp, #20
  3621. 80017e4: af00 add r7, sp, #0
  3622. 80017e6: 6078 str r0, [r7, #4]
  3623. uint32_t reg_value;
  3624. uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
  3625. 80017e8: 687b ldr r3, [r7, #4]
  3626. 80017ea: f003 0307 and.w r3, r3, #7
  3627. 80017ee: 60fb str r3, [r7, #12]
  3628. reg_value = SCB->AIRCR; /* read old register configuration */
  3629. 80017f0: 4b0c ldr r3, [pc, #48] ; (8001824 <__NVIC_SetPriorityGrouping+0x44>)
  3630. 80017f2: 68db ldr r3, [r3, #12]
  3631. 80017f4: 60bb str r3, [r7, #8]
  3632. reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
  3633. 80017f6: 68ba ldr r2, [r7, #8]
  3634. 80017f8: f64f 03ff movw r3, #63743 ; 0xf8ff
  3635. 80017fc: 4013 ands r3, r2
  3636. 80017fe: 60bb str r3, [r7, #8]
  3637. reg_value = (reg_value |
  3638. ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
  3639. (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
  3640. 8001800: 68fb ldr r3, [r7, #12]
  3641. 8001802: 021a lsls r2, r3, #8
  3642. ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
  3643. 8001804: 68bb ldr r3, [r7, #8]
  3644. 8001806: 4313 orrs r3, r2
  3645. reg_value = (reg_value |
  3646. 8001808: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
  3647. 800180c: f443 3300 orr.w r3, r3, #131072 ; 0x20000
  3648. 8001810: 60bb str r3, [r7, #8]
  3649. SCB->AIRCR = reg_value;
  3650. 8001812: 4a04 ldr r2, [pc, #16] ; (8001824 <__NVIC_SetPriorityGrouping+0x44>)
  3651. 8001814: 68bb ldr r3, [r7, #8]
  3652. 8001816: 60d3 str r3, [r2, #12]
  3653. }
  3654. 8001818: bf00 nop
  3655. 800181a: 3714 adds r7, #20
  3656. 800181c: 46bd mov sp, r7
  3657. 800181e: f85d 7b04 ldr.w r7, [sp], #4
  3658. 8001822: 4770 bx lr
  3659. 8001824: e000ed00 .word 0xe000ed00
  3660. 08001828 <__NVIC_GetPriorityGrouping>:
  3661. \brief Get Priority Grouping
  3662. \details Reads the priority grouping field from the NVIC Interrupt Controller.
  3663. \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
  3664. */
  3665. __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
  3666. {
  3667. 8001828: b480 push {r7}
  3668. 800182a: af00 add r7, sp, #0
  3669. return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
  3670. 800182c: 4b04 ldr r3, [pc, #16] ; (8001840 <__NVIC_GetPriorityGrouping+0x18>)
  3671. 800182e: 68db ldr r3, [r3, #12]
  3672. 8001830: 0a1b lsrs r3, r3, #8
  3673. 8001832: f003 0307 and.w r3, r3, #7
  3674. }
  3675. 8001836: 4618 mov r0, r3
  3676. 8001838: 46bd mov sp, r7
  3677. 800183a: f85d 7b04 ldr.w r7, [sp], #4
  3678. 800183e: 4770 bx lr
  3679. 8001840: e000ed00 .word 0xe000ed00
  3680. 08001844 <__NVIC_EnableIRQ>:
  3681. \details Enables a device specific interrupt in the NVIC interrupt controller.
  3682. \param [in] IRQn Device specific interrupt number.
  3683. \note IRQn must not be negative.
  3684. */
  3685. __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
  3686. {
  3687. 8001844: b480 push {r7}
  3688. 8001846: b083 sub sp, #12
  3689. 8001848: af00 add r7, sp, #0
  3690. 800184a: 4603 mov r3, r0
  3691. 800184c: 71fb strb r3, [r7, #7]
  3692. if ((int32_t)(IRQn) >= 0)
  3693. 800184e: f997 3007 ldrsb.w r3, [r7, #7]
  3694. 8001852: 2b00 cmp r3, #0
  3695. 8001854: db0b blt.n 800186e <__NVIC_EnableIRQ+0x2a>
  3696. {
  3697. NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  3698. 8001856: 79fb ldrb r3, [r7, #7]
  3699. 8001858: f003 021f and.w r2, r3, #31
  3700. 800185c: 4907 ldr r1, [pc, #28] ; (800187c <__NVIC_EnableIRQ+0x38>)
  3701. 800185e: f997 3007 ldrsb.w r3, [r7, #7]
  3702. 8001862: 095b lsrs r3, r3, #5
  3703. 8001864: 2001 movs r0, #1
  3704. 8001866: fa00 f202 lsl.w r2, r0, r2
  3705. 800186a: f841 2023 str.w r2, [r1, r3, lsl #2]
  3706. }
  3707. }
  3708. 800186e: bf00 nop
  3709. 8001870: 370c adds r7, #12
  3710. 8001872: 46bd mov sp, r7
  3711. 8001874: f85d 7b04 ldr.w r7, [sp], #4
  3712. 8001878: 4770 bx lr
  3713. 800187a: bf00 nop
  3714. 800187c: e000e100 .word 0xe000e100
  3715. 08001880 <__NVIC_SetPriority>:
  3716. \param [in] IRQn Interrupt number.
  3717. \param [in] priority Priority to set.
  3718. \note The priority cannot be set for every processor exception.
  3719. */
  3720. __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
  3721. {
  3722. 8001880: b480 push {r7}
  3723. 8001882: b083 sub sp, #12
  3724. 8001884: af00 add r7, sp, #0
  3725. 8001886: 4603 mov r3, r0
  3726. 8001888: 6039 str r1, [r7, #0]
  3727. 800188a: 71fb strb r3, [r7, #7]
  3728. if ((int32_t)(IRQn) >= 0)
  3729. 800188c: f997 3007 ldrsb.w r3, [r7, #7]
  3730. 8001890: 2b00 cmp r3, #0
  3731. 8001892: db0a blt.n 80018aa <__NVIC_SetPriority+0x2a>
  3732. {
  3733. NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  3734. 8001894: 683b ldr r3, [r7, #0]
  3735. 8001896: b2da uxtb r2, r3
  3736. 8001898: 490c ldr r1, [pc, #48] ; (80018cc <__NVIC_SetPriority+0x4c>)
  3737. 800189a: f997 3007 ldrsb.w r3, [r7, #7]
  3738. 800189e: 0112 lsls r2, r2, #4
  3739. 80018a0: b2d2 uxtb r2, r2
  3740. 80018a2: 440b add r3, r1
  3741. 80018a4: f883 2300 strb.w r2, [r3, #768] ; 0x300
  3742. }
  3743. else
  3744. {
  3745. SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  3746. }
  3747. }
  3748. 80018a8: e00a b.n 80018c0 <__NVIC_SetPriority+0x40>
  3749. SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  3750. 80018aa: 683b ldr r3, [r7, #0]
  3751. 80018ac: b2da uxtb r2, r3
  3752. 80018ae: 4908 ldr r1, [pc, #32] ; (80018d0 <__NVIC_SetPriority+0x50>)
  3753. 80018b0: 79fb ldrb r3, [r7, #7]
  3754. 80018b2: f003 030f and.w r3, r3, #15
  3755. 80018b6: 3b04 subs r3, #4
  3756. 80018b8: 0112 lsls r2, r2, #4
  3757. 80018ba: b2d2 uxtb r2, r2
  3758. 80018bc: 440b add r3, r1
  3759. 80018be: 761a strb r2, [r3, #24]
  3760. }
  3761. 80018c0: bf00 nop
  3762. 80018c2: 370c adds r7, #12
  3763. 80018c4: 46bd mov sp, r7
  3764. 80018c6: f85d 7b04 ldr.w r7, [sp], #4
  3765. 80018ca: 4770 bx lr
  3766. 80018cc: e000e100 .word 0xe000e100
  3767. 80018d0: e000ed00 .word 0xe000ed00
  3768. 080018d4 <NVIC_EncodePriority>:
  3769. \param [in] PreemptPriority Preemptive priority value (starting from 0).
  3770. \param [in] SubPriority Subpriority value (starting from 0).
  3771. \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
  3772. */
  3773. __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
  3774. {
  3775. 80018d4: b480 push {r7}
  3776. 80018d6: b089 sub sp, #36 ; 0x24
  3777. 80018d8: af00 add r7, sp, #0
  3778. 80018da: 60f8 str r0, [r7, #12]
  3779. 80018dc: 60b9 str r1, [r7, #8]
  3780. 80018de: 607a str r2, [r7, #4]
  3781. uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
  3782. 80018e0: 68fb ldr r3, [r7, #12]
  3783. 80018e2: f003 0307 and.w r3, r3, #7
  3784. 80018e6: 61fb str r3, [r7, #28]
  3785. uint32_t PreemptPriorityBits;
  3786. uint32_t SubPriorityBits;
  3787. PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
  3788. 80018e8: 69fb ldr r3, [r7, #28]
  3789. 80018ea: f1c3 0307 rsb r3, r3, #7
  3790. 80018ee: 2b04 cmp r3, #4
  3791. 80018f0: bf28 it cs
  3792. 80018f2: 2304 movcs r3, #4
  3793. 80018f4: 61bb str r3, [r7, #24]
  3794. SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
  3795. 80018f6: 69fb ldr r3, [r7, #28]
  3796. 80018f8: 3304 adds r3, #4
  3797. 80018fa: 2b06 cmp r3, #6
  3798. 80018fc: d902 bls.n 8001904 <NVIC_EncodePriority+0x30>
  3799. 80018fe: 69fb ldr r3, [r7, #28]
  3800. 8001900: 3b03 subs r3, #3
  3801. 8001902: e000 b.n 8001906 <NVIC_EncodePriority+0x32>
  3802. 8001904: 2300 movs r3, #0
  3803. 8001906: 617b str r3, [r7, #20]
  3804. return (
  3805. ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
  3806. 8001908: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff
  3807. 800190c: 69bb ldr r3, [r7, #24]
  3808. 800190e: fa02 f303 lsl.w r3, r2, r3
  3809. 8001912: 43da mvns r2, r3
  3810. 8001914: 68bb ldr r3, [r7, #8]
  3811. 8001916: 401a ands r2, r3
  3812. 8001918: 697b ldr r3, [r7, #20]
  3813. 800191a: 409a lsls r2, r3
  3814. ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
  3815. 800191c: f04f 31ff mov.w r1, #4294967295 ; 0xffffffff
  3816. 8001920: 697b ldr r3, [r7, #20]
  3817. 8001922: fa01 f303 lsl.w r3, r1, r3
  3818. 8001926: 43d9 mvns r1, r3
  3819. 8001928: 687b ldr r3, [r7, #4]
  3820. 800192a: 400b ands r3, r1
  3821. ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
  3822. 800192c: 4313 orrs r3, r2
  3823. );
  3824. }
  3825. 800192e: 4618 mov r0, r3
  3826. 8001930: 3724 adds r7, #36 ; 0x24
  3827. 8001932: 46bd mov sp, r7
  3828. 8001934: f85d 7b04 ldr.w r7, [sp], #4
  3829. 8001938: 4770 bx lr
  3830. ...
  3831. 0800193c <SysTick_Config>:
  3832. \note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
  3833. function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
  3834. must contain a vendor-specific implementation of this function.
  3835. */
  3836. __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
  3837. {
  3838. 800193c: b580 push {r7, lr}
  3839. 800193e: b082 sub sp, #8
  3840. 8001940: af00 add r7, sp, #0
  3841. 8001942: 6078 str r0, [r7, #4]
  3842. if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
  3843. 8001944: 687b ldr r3, [r7, #4]
  3844. 8001946: 3b01 subs r3, #1
  3845. 8001948: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
  3846. 800194c: d301 bcc.n 8001952 <SysTick_Config+0x16>
  3847. {
  3848. return (1UL); /* Reload value impossible */
  3849. 800194e: 2301 movs r3, #1
  3850. 8001950: e00f b.n 8001972 <SysTick_Config+0x36>
  3851. }
  3852. SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
  3853. 8001952: 4a0a ldr r2, [pc, #40] ; (800197c <SysTick_Config+0x40>)
  3854. 8001954: 687b ldr r3, [r7, #4]
  3855. 8001956: 3b01 subs r3, #1
  3856. 8001958: 6053 str r3, [r2, #4]
  3857. NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
  3858. 800195a: 210f movs r1, #15
  3859. 800195c: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
  3860. 8001960: f7ff ff8e bl 8001880 <__NVIC_SetPriority>
  3861. SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
  3862. 8001964: 4b05 ldr r3, [pc, #20] ; (800197c <SysTick_Config+0x40>)
  3863. 8001966: 2200 movs r2, #0
  3864. 8001968: 609a str r2, [r3, #8]
  3865. SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
  3866. 800196a: 4b04 ldr r3, [pc, #16] ; (800197c <SysTick_Config+0x40>)
  3867. 800196c: 2207 movs r2, #7
  3868. 800196e: 601a str r2, [r3, #0]
  3869. SysTick_CTRL_TICKINT_Msk |
  3870. SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
  3871. return (0UL); /* Function successful */
  3872. 8001970: 2300 movs r3, #0
  3873. }
  3874. 8001972: 4618 mov r0, r3
  3875. 8001974: 3708 adds r7, #8
  3876. 8001976: 46bd mov sp, r7
  3877. 8001978: bd80 pop {r7, pc}
  3878. 800197a: bf00 nop
  3879. 800197c: e000e010 .word 0xe000e010
  3880. 08001980 <HAL_NVIC_SetPriorityGrouping>:
  3881. * @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible.
  3882. * The pending IRQ priority will be managed only by the subpriority.
  3883. * @retval None
  3884. */
  3885. void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
  3886. {
  3887. 8001980: b580 push {r7, lr}
  3888. 8001982: b082 sub sp, #8
  3889. 8001984: af00 add r7, sp, #0
  3890. 8001986: 6078 str r0, [r7, #4]
  3891. /* Check the parameters */
  3892. assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup));
  3893. /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
  3894. NVIC_SetPriorityGrouping(PriorityGroup);
  3895. 8001988: 6878 ldr r0, [r7, #4]
  3896. 800198a: f7ff ff29 bl 80017e0 <__NVIC_SetPriorityGrouping>
  3897. }
  3898. 800198e: bf00 nop
  3899. 8001990: 3708 adds r7, #8
  3900. 8001992: 46bd mov sp, r7
  3901. 8001994: bd80 pop {r7, pc}
  3902. 08001996 <HAL_NVIC_SetPriority>:
  3903. * This parameter can be a value between 0 and 15
  3904. * A lower priority value indicates a higher priority.
  3905. * @retval None
  3906. */
  3907. void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
  3908. {
  3909. 8001996: b580 push {r7, lr}
  3910. 8001998: b086 sub sp, #24
  3911. 800199a: af00 add r7, sp, #0
  3912. 800199c: 4603 mov r3, r0
  3913. 800199e: 60b9 str r1, [r7, #8]
  3914. 80019a0: 607a str r2, [r7, #4]
  3915. 80019a2: 73fb strb r3, [r7, #15]
  3916. uint32_t prioritygroup = 0x00U;
  3917. 80019a4: 2300 movs r3, #0
  3918. 80019a6: 617b str r3, [r7, #20]
  3919. /* Check the parameters */
  3920. assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
  3921. assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
  3922. prioritygroup = NVIC_GetPriorityGrouping();
  3923. 80019a8: f7ff ff3e bl 8001828 <__NVIC_GetPriorityGrouping>
  3924. 80019ac: 6178 str r0, [r7, #20]
  3925. NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
  3926. 80019ae: 687a ldr r2, [r7, #4]
  3927. 80019b0: 68b9 ldr r1, [r7, #8]
  3928. 80019b2: 6978 ldr r0, [r7, #20]
  3929. 80019b4: f7ff ff8e bl 80018d4 <NVIC_EncodePriority>
  3930. 80019b8: 4602 mov r2, r0
  3931. 80019ba: f997 300f ldrsb.w r3, [r7, #15]
  3932. 80019be: 4611 mov r1, r2
  3933. 80019c0: 4618 mov r0, r3
  3934. 80019c2: f7ff ff5d bl 8001880 <__NVIC_SetPriority>
  3935. }
  3936. 80019c6: bf00 nop
  3937. 80019c8: 3718 adds r7, #24
  3938. 80019ca: 46bd mov sp, r7
  3939. 80019cc: bd80 pop {r7, pc}
  3940. 080019ce <HAL_NVIC_EnableIRQ>:
  3941. * This parameter can be an enumerator of IRQn_Type enumeration
  3942. * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f4xxxx.h))
  3943. * @retval None
  3944. */
  3945. void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
  3946. {
  3947. 80019ce: b580 push {r7, lr}
  3948. 80019d0: b082 sub sp, #8
  3949. 80019d2: af00 add r7, sp, #0
  3950. 80019d4: 4603 mov r3, r0
  3951. 80019d6: 71fb strb r3, [r7, #7]
  3952. /* Check the parameters */
  3953. assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
  3954. /* Enable interrupt */
  3955. NVIC_EnableIRQ(IRQn);
  3956. 80019d8: f997 3007 ldrsb.w r3, [r7, #7]
  3957. 80019dc: 4618 mov r0, r3
  3958. 80019de: f7ff ff31 bl 8001844 <__NVIC_EnableIRQ>
  3959. }
  3960. 80019e2: bf00 nop
  3961. 80019e4: 3708 adds r7, #8
  3962. 80019e6: 46bd mov sp, r7
  3963. 80019e8: bd80 pop {r7, pc}
  3964. 080019ea <HAL_SYSTICK_Config>:
  3965. * @param TicksNumb Specifies the ticks Number of ticks between two interrupts.
  3966. * @retval status: - 0 Function succeeded.
  3967. * - 1 Function failed.
  3968. */
  3969. uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
  3970. {
  3971. 80019ea: b580 push {r7, lr}
  3972. 80019ec: b082 sub sp, #8
  3973. 80019ee: af00 add r7, sp, #0
  3974. 80019f0: 6078 str r0, [r7, #4]
  3975. return SysTick_Config(TicksNumb);
  3976. 80019f2: 6878 ldr r0, [r7, #4]
  3977. 80019f4: f7ff ffa2 bl 800193c <SysTick_Config>
  3978. 80019f8: 4603 mov r3, r0
  3979. }
  3980. 80019fa: 4618 mov r0, r3
  3981. 80019fc: 3708 adds r7, #8
  3982. 80019fe: 46bd mov sp, r7
  3983. 8001a00: bd80 pop {r7, pc}
  3984. 08001a02 <HAL_DAC_Init>:
  3985. * @param hdac pointer to a DAC_HandleTypeDef structure that contains
  3986. * the configuration information for the specified DAC.
  3987. * @retval HAL status
  3988. */
  3989. HAL_StatusTypeDef HAL_DAC_Init(DAC_HandleTypeDef *hdac)
  3990. {
  3991. 8001a02: b580 push {r7, lr}
  3992. 8001a04: b082 sub sp, #8
  3993. 8001a06: af00 add r7, sp, #0
  3994. 8001a08: 6078 str r0, [r7, #4]
  3995. /* Check DAC handle */
  3996. if (hdac == NULL)
  3997. 8001a0a: 687b ldr r3, [r7, #4]
  3998. 8001a0c: 2b00 cmp r3, #0
  3999. 8001a0e: d101 bne.n 8001a14 <HAL_DAC_Init+0x12>
  4000. {
  4001. return HAL_ERROR;
  4002. 8001a10: 2301 movs r3, #1
  4003. 8001a12: e014 b.n 8001a3e <HAL_DAC_Init+0x3c>
  4004. }
  4005. /* Check the parameters */
  4006. assert_param(IS_DAC_ALL_INSTANCE(hdac->Instance));
  4007. if (hdac->State == HAL_DAC_STATE_RESET)
  4008. 8001a14: 687b ldr r3, [r7, #4]
  4009. 8001a16: 791b ldrb r3, [r3, #4]
  4010. 8001a18: b2db uxtb r3, r3
  4011. 8001a1a: 2b00 cmp r3, #0
  4012. 8001a1c: d105 bne.n 8001a2a <HAL_DAC_Init+0x28>
  4013. hdac->MspInitCallback = HAL_DAC_MspInit;
  4014. }
  4015. #endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
  4016. /* Allocate lock resource and initialize it */
  4017. hdac->Lock = HAL_UNLOCKED;
  4018. 8001a1e: 687b ldr r3, [r7, #4]
  4019. 8001a20: 2200 movs r2, #0
  4020. 8001a22: 715a strb r2, [r3, #5]
  4021. #if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
  4022. /* Init the low level hardware */
  4023. hdac->MspInitCallback(hdac);
  4024. #else
  4025. /* Init the low level hardware */
  4026. HAL_DAC_MspInit(hdac);
  4027. 8001a24: 6878 ldr r0, [r7, #4]
  4028. 8001a26: f7ff f9a3 bl 8000d70 <HAL_DAC_MspInit>
  4029. #endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
  4030. }
  4031. /* Initialize the DAC state*/
  4032. hdac->State = HAL_DAC_STATE_BUSY;
  4033. 8001a2a: 687b ldr r3, [r7, #4]
  4034. 8001a2c: 2202 movs r2, #2
  4035. 8001a2e: 711a strb r2, [r3, #4]
  4036. /* Set DAC error code to none */
  4037. hdac->ErrorCode = HAL_DAC_ERROR_NONE;
  4038. 8001a30: 687b ldr r3, [r7, #4]
  4039. 8001a32: 2200 movs r2, #0
  4040. 8001a34: 611a str r2, [r3, #16]
  4041. /* Initialize the DAC state*/
  4042. hdac->State = HAL_DAC_STATE_READY;
  4043. 8001a36: 687b ldr r3, [r7, #4]
  4044. 8001a38: 2201 movs r2, #1
  4045. 8001a3a: 711a strb r2, [r3, #4]
  4046. /* Return function status */
  4047. return HAL_OK;
  4048. 8001a3c: 2300 movs r3, #0
  4049. }
  4050. 8001a3e: 4618 mov r0, r3
  4051. 8001a40: 3708 adds r7, #8
  4052. 8001a42: 46bd mov sp, r7
  4053. 8001a44: bd80 pop {r7, pc}
  4054. 08001a46 <HAL_DAC_ConfigChannel>:
  4055. * @arg DAC_CHANNEL_1: DAC Channel1 selected
  4056. * @arg DAC_CHANNEL_2: DAC Channel2 selected
  4057. * @retval HAL status
  4058. */
  4059. HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef *hdac, DAC_ChannelConfTypeDef *sConfig, uint32_t Channel)
  4060. {
  4061. 8001a46: b480 push {r7}
  4062. 8001a48: b087 sub sp, #28
  4063. 8001a4a: af00 add r7, sp, #0
  4064. 8001a4c: 60f8 str r0, [r7, #12]
  4065. 8001a4e: 60b9 str r1, [r7, #8]
  4066. 8001a50: 607a str r2, [r7, #4]
  4067. assert_param(IS_DAC_TRIGGER(sConfig->DAC_Trigger));
  4068. assert_param(IS_DAC_OUTPUT_BUFFER_STATE(sConfig->DAC_OutputBuffer));
  4069. assert_param(IS_DAC_CHANNEL(Channel));
  4070. /* Process locked */
  4071. __HAL_LOCK(hdac);
  4072. 8001a52: 68fb ldr r3, [r7, #12]
  4073. 8001a54: 795b ldrb r3, [r3, #5]
  4074. 8001a56: 2b01 cmp r3, #1
  4075. 8001a58: d101 bne.n 8001a5e <HAL_DAC_ConfigChannel+0x18>
  4076. 8001a5a: 2302 movs r3, #2
  4077. 8001a5c: e03c b.n 8001ad8 <HAL_DAC_ConfigChannel+0x92>
  4078. 8001a5e: 68fb ldr r3, [r7, #12]
  4079. 8001a60: 2201 movs r2, #1
  4080. 8001a62: 715a strb r2, [r3, #5]
  4081. /* Change DAC state */
  4082. hdac->State = HAL_DAC_STATE_BUSY;
  4083. 8001a64: 68fb ldr r3, [r7, #12]
  4084. 8001a66: 2202 movs r2, #2
  4085. 8001a68: 711a strb r2, [r3, #4]
  4086. /* Get the DAC CR value */
  4087. tmpreg1 = hdac->Instance->CR;
  4088. 8001a6a: 68fb ldr r3, [r7, #12]
  4089. 8001a6c: 681b ldr r3, [r3, #0]
  4090. 8001a6e: 681b ldr r3, [r3, #0]
  4091. 8001a70: 617b str r3, [r7, #20]
  4092. /* Clear BOFFx, TENx, TSELx, WAVEx and MAMPx bits */
  4093. tmpreg1 &= ~(((uint32_t)(DAC_CR_MAMP1 | DAC_CR_WAVE1 | DAC_CR_TSEL1 | DAC_CR_TEN1 | DAC_CR_BOFF1)) << (Channel & 0x10UL));
  4094. 8001a72: 687b ldr r3, [r7, #4]
  4095. 8001a74: f003 0310 and.w r3, r3, #16
  4096. 8001a78: f640 72fe movw r2, #4094 ; 0xffe
  4097. 8001a7c: fa02 f303 lsl.w r3, r2, r3
  4098. 8001a80: 43db mvns r3, r3
  4099. 8001a82: 697a ldr r2, [r7, #20]
  4100. 8001a84: 4013 ands r3, r2
  4101. 8001a86: 617b str r3, [r7, #20]
  4102. /* Configure for the selected DAC channel: buffer output, trigger */
  4103. /* Set TSELx and TENx bits according to DAC_Trigger value */
  4104. /* Set BOFFx bit according to DAC_OutputBuffer value */
  4105. tmpreg2 = (sConfig->DAC_Trigger | sConfig->DAC_OutputBuffer);
  4106. 8001a88: 68bb ldr r3, [r7, #8]
  4107. 8001a8a: 681a ldr r2, [r3, #0]
  4108. 8001a8c: 68bb ldr r3, [r7, #8]
  4109. 8001a8e: 685b ldr r3, [r3, #4]
  4110. 8001a90: 4313 orrs r3, r2
  4111. 8001a92: 613b str r3, [r7, #16]
  4112. /* Calculate CR register value depending on DAC_Channel */
  4113. tmpreg1 |= tmpreg2 << (Channel & 0x10UL);
  4114. 8001a94: 687b ldr r3, [r7, #4]
  4115. 8001a96: f003 0310 and.w r3, r3, #16
  4116. 8001a9a: 693a ldr r2, [r7, #16]
  4117. 8001a9c: fa02 f303 lsl.w r3, r2, r3
  4118. 8001aa0: 697a ldr r2, [r7, #20]
  4119. 8001aa2: 4313 orrs r3, r2
  4120. 8001aa4: 617b str r3, [r7, #20]
  4121. /* Write to DAC CR */
  4122. hdac->Instance->CR = tmpreg1;
  4123. 8001aa6: 68fb ldr r3, [r7, #12]
  4124. 8001aa8: 681b ldr r3, [r3, #0]
  4125. 8001aaa: 697a ldr r2, [r7, #20]
  4126. 8001aac: 601a str r2, [r3, #0]
  4127. /* Disable wave generation */
  4128. CLEAR_BIT(hdac->Instance->CR, (DAC_CR_WAVE1 << (Channel & 0x10UL)));
  4129. 8001aae: 68fb ldr r3, [r7, #12]
  4130. 8001ab0: 681b ldr r3, [r3, #0]
  4131. 8001ab2: 6819 ldr r1, [r3, #0]
  4132. 8001ab4: 687b ldr r3, [r7, #4]
  4133. 8001ab6: f003 0310 and.w r3, r3, #16
  4134. 8001aba: 22c0 movs r2, #192 ; 0xc0
  4135. 8001abc: fa02 f303 lsl.w r3, r2, r3
  4136. 8001ac0: 43da mvns r2, r3
  4137. 8001ac2: 68fb ldr r3, [r7, #12]
  4138. 8001ac4: 681b ldr r3, [r3, #0]
  4139. 8001ac6: 400a ands r2, r1
  4140. 8001ac8: 601a str r2, [r3, #0]
  4141. /* Change DAC state */
  4142. hdac->State = HAL_DAC_STATE_READY;
  4143. 8001aca: 68fb ldr r3, [r7, #12]
  4144. 8001acc: 2201 movs r2, #1
  4145. 8001ace: 711a strb r2, [r3, #4]
  4146. /* Process unlocked */
  4147. __HAL_UNLOCK(hdac);
  4148. 8001ad0: 68fb ldr r3, [r7, #12]
  4149. 8001ad2: 2200 movs r2, #0
  4150. 8001ad4: 715a strb r2, [r3, #5]
  4151. /* Return function status */
  4152. return HAL_OK;
  4153. 8001ad6: 2300 movs r3, #0
  4154. }
  4155. 8001ad8: 4618 mov r0, r3
  4156. 8001ada: 371c adds r7, #28
  4157. 8001adc: 46bd mov sp, r7
  4158. 8001ade: f85d 7b04 ldr.w r7, [sp], #4
  4159. 8001ae2: 4770 bx lr
  4160. 08001ae4 <HAL_GPIO_Init>:
  4161. * @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
  4162. * the configuration information for the specified GPIO peripheral.
  4163. * @retval None
  4164. */
  4165. void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
  4166. {
  4167. 8001ae4: b480 push {r7}
  4168. 8001ae6: b089 sub sp, #36 ; 0x24
  4169. 8001ae8: af00 add r7, sp, #0
  4170. 8001aea: 6078 str r0, [r7, #4]
  4171. 8001aec: 6039 str r1, [r7, #0]
  4172. uint32_t position;
  4173. uint32_t ioposition = 0x00U;
  4174. 8001aee: 2300 movs r3, #0
  4175. 8001af0: 617b str r3, [r7, #20]
  4176. uint32_t iocurrent = 0x00U;
  4177. 8001af2: 2300 movs r3, #0
  4178. 8001af4: 613b str r3, [r7, #16]
  4179. uint32_t temp = 0x00U;
  4180. 8001af6: 2300 movs r3, #0
  4181. 8001af8: 61bb str r3, [r7, #24]
  4182. assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
  4183. assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
  4184. assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
  4185. /* Configure the port pins */
  4186. for(position = 0U; position < GPIO_NUMBER; position++)
  4187. 8001afa: 2300 movs r3, #0
  4188. 8001afc: 61fb str r3, [r7, #28]
  4189. 8001afe: e165 b.n 8001dcc <HAL_GPIO_Init+0x2e8>
  4190. {
  4191. /* Get the IO position */
  4192. ioposition = 0x01U << position;
  4193. 8001b00: 2201 movs r2, #1
  4194. 8001b02: 69fb ldr r3, [r7, #28]
  4195. 8001b04: fa02 f303 lsl.w r3, r2, r3
  4196. 8001b08: 617b str r3, [r7, #20]
  4197. /* Get the current IO position */
  4198. iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
  4199. 8001b0a: 683b ldr r3, [r7, #0]
  4200. 8001b0c: 681b ldr r3, [r3, #0]
  4201. 8001b0e: 697a ldr r2, [r7, #20]
  4202. 8001b10: 4013 ands r3, r2
  4203. 8001b12: 613b str r3, [r7, #16]
  4204. if(iocurrent == ioposition)
  4205. 8001b14: 693a ldr r2, [r7, #16]
  4206. 8001b16: 697b ldr r3, [r7, #20]
  4207. 8001b18: 429a cmp r2, r3
  4208. 8001b1a: f040 8154 bne.w 8001dc6 <HAL_GPIO_Init+0x2e2>
  4209. {
  4210. /*--------------------- GPIO Mode Configuration ------------------------*/
  4211. /* In case of Output or Alternate function mode selection */
  4212. if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
  4213. 8001b1e: 683b ldr r3, [r7, #0]
  4214. 8001b20: 685b ldr r3, [r3, #4]
  4215. 8001b22: f003 0303 and.w r3, r3, #3
  4216. 8001b26: 2b01 cmp r3, #1
  4217. 8001b28: d005 beq.n 8001b36 <HAL_GPIO_Init+0x52>
  4218. (GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
  4219. 8001b2a: 683b ldr r3, [r7, #0]
  4220. 8001b2c: 685b ldr r3, [r3, #4]
  4221. 8001b2e: f003 0303 and.w r3, r3, #3
  4222. if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
  4223. 8001b32: 2b02 cmp r3, #2
  4224. 8001b34: d130 bne.n 8001b98 <HAL_GPIO_Init+0xb4>
  4225. {
  4226. /* Check the Speed parameter */
  4227. assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
  4228. /* Configure the IO Speed */
  4229. temp = GPIOx->OSPEEDR;
  4230. 8001b36: 687b ldr r3, [r7, #4]
  4231. 8001b38: 689b ldr r3, [r3, #8]
  4232. 8001b3a: 61bb str r3, [r7, #24]
  4233. temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2U));
  4234. 8001b3c: 69fb ldr r3, [r7, #28]
  4235. 8001b3e: 005b lsls r3, r3, #1
  4236. 8001b40: 2203 movs r2, #3
  4237. 8001b42: fa02 f303 lsl.w r3, r2, r3
  4238. 8001b46: 43db mvns r3, r3
  4239. 8001b48: 69ba ldr r2, [r7, #24]
  4240. 8001b4a: 4013 ands r3, r2
  4241. 8001b4c: 61bb str r3, [r7, #24]
  4242. temp |= (GPIO_Init->Speed << (position * 2U));
  4243. 8001b4e: 683b ldr r3, [r7, #0]
  4244. 8001b50: 68da ldr r2, [r3, #12]
  4245. 8001b52: 69fb ldr r3, [r7, #28]
  4246. 8001b54: 005b lsls r3, r3, #1
  4247. 8001b56: fa02 f303 lsl.w r3, r2, r3
  4248. 8001b5a: 69ba ldr r2, [r7, #24]
  4249. 8001b5c: 4313 orrs r3, r2
  4250. 8001b5e: 61bb str r3, [r7, #24]
  4251. GPIOx->OSPEEDR = temp;
  4252. 8001b60: 687b ldr r3, [r7, #4]
  4253. 8001b62: 69ba ldr r2, [r7, #24]
  4254. 8001b64: 609a str r2, [r3, #8]
  4255. /* Configure the IO Output Type */
  4256. temp = GPIOx->OTYPER;
  4257. 8001b66: 687b ldr r3, [r7, #4]
  4258. 8001b68: 685b ldr r3, [r3, #4]
  4259. 8001b6a: 61bb str r3, [r7, #24]
  4260. temp &= ~(GPIO_OTYPER_OT_0 << position) ;
  4261. 8001b6c: 2201 movs r2, #1
  4262. 8001b6e: 69fb ldr r3, [r7, #28]
  4263. 8001b70: fa02 f303 lsl.w r3, r2, r3
  4264. 8001b74: 43db mvns r3, r3
  4265. 8001b76: 69ba ldr r2, [r7, #24]
  4266. 8001b78: 4013 ands r3, r2
  4267. 8001b7a: 61bb str r3, [r7, #24]
  4268. temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
  4269. 8001b7c: 683b ldr r3, [r7, #0]
  4270. 8001b7e: 685b ldr r3, [r3, #4]
  4271. 8001b80: 091b lsrs r3, r3, #4
  4272. 8001b82: f003 0201 and.w r2, r3, #1
  4273. 8001b86: 69fb ldr r3, [r7, #28]
  4274. 8001b88: fa02 f303 lsl.w r3, r2, r3
  4275. 8001b8c: 69ba ldr r2, [r7, #24]
  4276. 8001b8e: 4313 orrs r3, r2
  4277. 8001b90: 61bb str r3, [r7, #24]
  4278. GPIOx->OTYPER = temp;
  4279. 8001b92: 687b ldr r3, [r7, #4]
  4280. 8001b94: 69ba ldr r2, [r7, #24]
  4281. 8001b96: 605a str r2, [r3, #4]
  4282. }
  4283. if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
  4284. 8001b98: 683b ldr r3, [r7, #0]
  4285. 8001b9a: 685b ldr r3, [r3, #4]
  4286. 8001b9c: f003 0303 and.w r3, r3, #3
  4287. 8001ba0: 2b03 cmp r3, #3
  4288. 8001ba2: d017 beq.n 8001bd4 <HAL_GPIO_Init+0xf0>
  4289. {
  4290. /* Check the parameters */
  4291. assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
  4292. /* Activate the Pull-up or Pull down resistor for the current IO */
  4293. temp = GPIOx->PUPDR;
  4294. 8001ba4: 687b ldr r3, [r7, #4]
  4295. 8001ba6: 68db ldr r3, [r3, #12]
  4296. 8001ba8: 61bb str r3, [r7, #24]
  4297. temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2U));
  4298. 8001baa: 69fb ldr r3, [r7, #28]
  4299. 8001bac: 005b lsls r3, r3, #1
  4300. 8001bae: 2203 movs r2, #3
  4301. 8001bb0: fa02 f303 lsl.w r3, r2, r3
  4302. 8001bb4: 43db mvns r3, r3
  4303. 8001bb6: 69ba ldr r2, [r7, #24]
  4304. 8001bb8: 4013 ands r3, r2
  4305. 8001bba: 61bb str r3, [r7, #24]
  4306. temp |= ((GPIO_Init->Pull) << (position * 2U));
  4307. 8001bbc: 683b ldr r3, [r7, #0]
  4308. 8001bbe: 689a ldr r2, [r3, #8]
  4309. 8001bc0: 69fb ldr r3, [r7, #28]
  4310. 8001bc2: 005b lsls r3, r3, #1
  4311. 8001bc4: fa02 f303 lsl.w r3, r2, r3
  4312. 8001bc8: 69ba ldr r2, [r7, #24]
  4313. 8001bca: 4313 orrs r3, r2
  4314. 8001bcc: 61bb str r3, [r7, #24]
  4315. GPIOx->PUPDR = temp;
  4316. 8001bce: 687b ldr r3, [r7, #4]
  4317. 8001bd0: 69ba ldr r2, [r7, #24]
  4318. 8001bd2: 60da str r2, [r3, #12]
  4319. }
  4320. /* In case of Alternate function mode selection */
  4321. if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
  4322. 8001bd4: 683b ldr r3, [r7, #0]
  4323. 8001bd6: 685b ldr r3, [r3, #4]
  4324. 8001bd8: f003 0303 and.w r3, r3, #3
  4325. 8001bdc: 2b02 cmp r3, #2
  4326. 8001bde: d123 bne.n 8001c28 <HAL_GPIO_Init+0x144>
  4327. {
  4328. /* Check the Alternate function parameter */
  4329. assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
  4330. /* Configure Alternate function mapped with the current IO */
  4331. temp = GPIOx->AFR[position >> 3U];
  4332. 8001be0: 69fb ldr r3, [r7, #28]
  4333. 8001be2: 08da lsrs r2, r3, #3
  4334. 8001be4: 687b ldr r3, [r7, #4]
  4335. 8001be6: 3208 adds r2, #8
  4336. 8001be8: f853 3022 ldr.w r3, [r3, r2, lsl #2]
  4337. 8001bec: 61bb str r3, [r7, #24]
  4338. temp &= ~(0xFU << ((uint32_t)(position & 0x07U) * 4U)) ;
  4339. 8001bee: 69fb ldr r3, [r7, #28]
  4340. 8001bf0: f003 0307 and.w r3, r3, #7
  4341. 8001bf4: 009b lsls r3, r3, #2
  4342. 8001bf6: 220f movs r2, #15
  4343. 8001bf8: fa02 f303 lsl.w r3, r2, r3
  4344. 8001bfc: 43db mvns r3, r3
  4345. 8001bfe: 69ba ldr r2, [r7, #24]
  4346. 8001c00: 4013 ands r3, r2
  4347. 8001c02: 61bb str r3, [r7, #24]
  4348. temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4U));
  4349. 8001c04: 683b ldr r3, [r7, #0]
  4350. 8001c06: 691a ldr r2, [r3, #16]
  4351. 8001c08: 69fb ldr r3, [r7, #28]
  4352. 8001c0a: f003 0307 and.w r3, r3, #7
  4353. 8001c0e: 009b lsls r3, r3, #2
  4354. 8001c10: fa02 f303 lsl.w r3, r2, r3
  4355. 8001c14: 69ba ldr r2, [r7, #24]
  4356. 8001c16: 4313 orrs r3, r2
  4357. 8001c18: 61bb str r3, [r7, #24]
  4358. GPIOx->AFR[position >> 3U] = temp;
  4359. 8001c1a: 69fb ldr r3, [r7, #28]
  4360. 8001c1c: 08da lsrs r2, r3, #3
  4361. 8001c1e: 687b ldr r3, [r7, #4]
  4362. 8001c20: 3208 adds r2, #8
  4363. 8001c22: 69b9 ldr r1, [r7, #24]
  4364. 8001c24: f843 1022 str.w r1, [r3, r2, lsl #2]
  4365. }
  4366. /* Configure IO Direction mode (Input, Output, Alternate or Analog) */
  4367. temp = GPIOx->MODER;
  4368. 8001c28: 687b ldr r3, [r7, #4]
  4369. 8001c2a: 681b ldr r3, [r3, #0]
  4370. 8001c2c: 61bb str r3, [r7, #24]
  4371. temp &= ~(GPIO_MODER_MODER0 << (position * 2U));
  4372. 8001c2e: 69fb ldr r3, [r7, #28]
  4373. 8001c30: 005b lsls r3, r3, #1
  4374. 8001c32: 2203 movs r2, #3
  4375. 8001c34: fa02 f303 lsl.w r3, r2, r3
  4376. 8001c38: 43db mvns r3, r3
  4377. 8001c3a: 69ba ldr r2, [r7, #24]
  4378. 8001c3c: 4013 ands r3, r2
  4379. 8001c3e: 61bb str r3, [r7, #24]
  4380. temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
  4381. 8001c40: 683b ldr r3, [r7, #0]
  4382. 8001c42: 685b ldr r3, [r3, #4]
  4383. 8001c44: f003 0203 and.w r2, r3, #3
  4384. 8001c48: 69fb ldr r3, [r7, #28]
  4385. 8001c4a: 005b lsls r3, r3, #1
  4386. 8001c4c: fa02 f303 lsl.w r3, r2, r3
  4387. 8001c50: 69ba ldr r2, [r7, #24]
  4388. 8001c52: 4313 orrs r3, r2
  4389. 8001c54: 61bb str r3, [r7, #24]
  4390. GPIOx->MODER = temp;
  4391. 8001c56: 687b ldr r3, [r7, #4]
  4392. 8001c58: 69ba ldr r2, [r7, #24]
  4393. 8001c5a: 601a str r2, [r3, #0]
  4394. /*--------------------- EXTI Mode Configuration ------------------------*/
  4395. /* Configure the External Interrupt or event for the current IO */
  4396. if((GPIO_Init->Mode & EXTI_MODE) != 0x00U)
  4397. 8001c5c: 683b ldr r3, [r7, #0]
  4398. 8001c5e: 685b ldr r3, [r3, #4]
  4399. 8001c60: f403 3340 and.w r3, r3, #196608 ; 0x30000
  4400. 8001c64: 2b00 cmp r3, #0
  4401. 8001c66: f000 80ae beq.w 8001dc6 <HAL_GPIO_Init+0x2e2>
  4402. {
  4403. /* Enable SYSCFG Clock */
  4404. __HAL_RCC_SYSCFG_CLK_ENABLE();
  4405. 8001c6a: 2300 movs r3, #0
  4406. 8001c6c: 60fb str r3, [r7, #12]
  4407. 8001c6e: 4b5d ldr r3, [pc, #372] ; (8001de4 <HAL_GPIO_Init+0x300>)
  4408. 8001c70: 6c5b ldr r3, [r3, #68] ; 0x44
  4409. 8001c72: 4a5c ldr r2, [pc, #368] ; (8001de4 <HAL_GPIO_Init+0x300>)
  4410. 8001c74: f443 4380 orr.w r3, r3, #16384 ; 0x4000
  4411. 8001c78: 6453 str r3, [r2, #68] ; 0x44
  4412. 8001c7a: 4b5a ldr r3, [pc, #360] ; (8001de4 <HAL_GPIO_Init+0x300>)
  4413. 8001c7c: 6c5b ldr r3, [r3, #68] ; 0x44
  4414. 8001c7e: f403 4380 and.w r3, r3, #16384 ; 0x4000
  4415. 8001c82: 60fb str r3, [r7, #12]
  4416. 8001c84: 68fb ldr r3, [r7, #12]
  4417. temp = SYSCFG->EXTICR[position >> 2U];
  4418. 8001c86: 4a58 ldr r2, [pc, #352] ; (8001de8 <HAL_GPIO_Init+0x304>)
  4419. 8001c88: 69fb ldr r3, [r7, #28]
  4420. 8001c8a: 089b lsrs r3, r3, #2
  4421. 8001c8c: 3302 adds r3, #2
  4422. 8001c8e: f852 3023 ldr.w r3, [r2, r3, lsl #2]
  4423. 8001c92: 61bb str r3, [r7, #24]
  4424. temp &= ~(0x0FU << (4U * (position & 0x03U)));
  4425. 8001c94: 69fb ldr r3, [r7, #28]
  4426. 8001c96: f003 0303 and.w r3, r3, #3
  4427. 8001c9a: 009b lsls r3, r3, #2
  4428. 8001c9c: 220f movs r2, #15
  4429. 8001c9e: fa02 f303 lsl.w r3, r2, r3
  4430. 8001ca2: 43db mvns r3, r3
  4431. 8001ca4: 69ba ldr r2, [r7, #24]
  4432. 8001ca6: 4013 ands r3, r2
  4433. 8001ca8: 61bb str r3, [r7, #24]
  4434. temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)));
  4435. 8001caa: 687b ldr r3, [r7, #4]
  4436. 8001cac: 4a4f ldr r2, [pc, #316] ; (8001dec <HAL_GPIO_Init+0x308>)
  4437. 8001cae: 4293 cmp r3, r2
  4438. 8001cb0: d025 beq.n 8001cfe <HAL_GPIO_Init+0x21a>
  4439. 8001cb2: 687b ldr r3, [r7, #4]
  4440. 8001cb4: 4a4e ldr r2, [pc, #312] ; (8001df0 <HAL_GPIO_Init+0x30c>)
  4441. 8001cb6: 4293 cmp r3, r2
  4442. 8001cb8: d01f beq.n 8001cfa <HAL_GPIO_Init+0x216>
  4443. 8001cba: 687b ldr r3, [r7, #4]
  4444. 8001cbc: 4a4d ldr r2, [pc, #308] ; (8001df4 <HAL_GPIO_Init+0x310>)
  4445. 8001cbe: 4293 cmp r3, r2
  4446. 8001cc0: d019 beq.n 8001cf6 <HAL_GPIO_Init+0x212>
  4447. 8001cc2: 687b ldr r3, [r7, #4]
  4448. 8001cc4: 4a4c ldr r2, [pc, #304] ; (8001df8 <HAL_GPIO_Init+0x314>)
  4449. 8001cc6: 4293 cmp r3, r2
  4450. 8001cc8: d013 beq.n 8001cf2 <HAL_GPIO_Init+0x20e>
  4451. 8001cca: 687b ldr r3, [r7, #4]
  4452. 8001ccc: 4a4b ldr r2, [pc, #300] ; (8001dfc <HAL_GPIO_Init+0x318>)
  4453. 8001cce: 4293 cmp r3, r2
  4454. 8001cd0: d00d beq.n 8001cee <HAL_GPIO_Init+0x20a>
  4455. 8001cd2: 687b ldr r3, [r7, #4]
  4456. 8001cd4: 4a4a ldr r2, [pc, #296] ; (8001e00 <HAL_GPIO_Init+0x31c>)
  4457. 8001cd6: 4293 cmp r3, r2
  4458. 8001cd8: d007 beq.n 8001cea <HAL_GPIO_Init+0x206>
  4459. 8001cda: 687b ldr r3, [r7, #4]
  4460. 8001cdc: 4a49 ldr r2, [pc, #292] ; (8001e04 <HAL_GPIO_Init+0x320>)
  4461. 8001cde: 4293 cmp r3, r2
  4462. 8001ce0: d101 bne.n 8001ce6 <HAL_GPIO_Init+0x202>
  4463. 8001ce2: 2306 movs r3, #6
  4464. 8001ce4: e00c b.n 8001d00 <HAL_GPIO_Init+0x21c>
  4465. 8001ce6: 2307 movs r3, #7
  4466. 8001ce8: e00a b.n 8001d00 <HAL_GPIO_Init+0x21c>
  4467. 8001cea: 2305 movs r3, #5
  4468. 8001cec: e008 b.n 8001d00 <HAL_GPIO_Init+0x21c>
  4469. 8001cee: 2304 movs r3, #4
  4470. 8001cf0: e006 b.n 8001d00 <HAL_GPIO_Init+0x21c>
  4471. 8001cf2: 2303 movs r3, #3
  4472. 8001cf4: e004 b.n 8001d00 <HAL_GPIO_Init+0x21c>
  4473. 8001cf6: 2302 movs r3, #2
  4474. 8001cf8: e002 b.n 8001d00 <HAL_GPIO_Init+0x21c>
  4475. 8001cfa: 2301 movs r3, #1
  4476. 8001cfc: e000 b.n 8001d00 <HAL_GPIO_Init+0x21c>
  4477. 8001cfe: 2300 movs r3, #0
  4478. 8001d00: 69fa ldr r2, [r7, #28]
  4479. 8001d02: f002 0203 and.w r2, r2, #3
  4480. 8001d06: 0092 lsls r2, r2, #2
  4481. 8001d08: 4093 lsls r3, r2
  4482. 8001d0a: 69ba ldr r2, [r7, #24]
  4483. 8001d0c: 4313 orrs r3, r2
  4484. 8001d0e: 61bb str r3, [r7, #24]
  4485. SYSCFG->EXTICR[position >> 2U] = temp;
  4486. 8001d10: 4935 ldr r1, [pc, #212] ; (8001de8 <HAL_GPIO_Init+0x304>)
  4487. 8001d12: 69fb ldr r3, [r7, #28]
  4488. 8001d14: 089b lsrs r3, r3, #2
  4489. 8001d16: 3302 adds r3, #2
  4490. 8001d18: 69ba ldr r2, [r7, #24]
  4491. 8001d1a: f841 2023 str.w r2, [r1, r3, lsl #2]
  4492. /* Clear EXTI line configuration */
  4493. temp = EXTI->IMR;
  4494. 8001d1e: 4b3a ldr r3, [pc, #232] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4495. 8001d20: 681b ldr r3, [r3, #0]
  4496. 8001d22: 61bb str r3, [r7, #24]
  4497. temp &= ~((uint32_t)iocurrent);
  4498. 8001d24: 693b ldr r3, [r7, #16]
  4499. 8001d26: 43db mvns r3, r3
  4500. 8001d28: 69ba ldr r2, [r7, #24]
  4501. 8001d2a: 4013 ands r3, r2
  4502. 8001d2c: 61bb str r3, [r7, #24]
  4503. if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
  4504. 8001d2e: 683b ldr r3, [r7, #0]
  4505. 8001d30: 685b ldr r3, [r3, #4]
  4506. 8001d32: f403 3380 and.w r3, r3, #65536 ; 0x10000
  4507. 8001d36: 2b00 cmp r3, #0
  4508. 8001d38: d003 beq.n 8001d42 <HAL_GPIO_Init+0x25e>
  4509. {
  4510. temp |= iocurrent;
  4511. 8001d3a: 69ba ldr r2, [r7, #24]
  4512. 8001d3c: 693b ldr r3, [r7, #16]
  4513. 8001d3e: 4313 orrs r3, r2
  4514. 8001d40: 61bb str r3, [r7, #24]
  4515. }
  4516. EXTI->IMR = temp;
  4517. 8001d42: 4a31 ldr r2, [pc, #196] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4518. 8001d44: 69bb ldr r3, [r7, #24]
  4519. 8001d46: 6013 str r3, [r2, #0]
  4520. temp = EXTI->EMR;
  4521. 8001d48: 4b2f ldr r3, [pc, #188] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4522. 8001d4a: 685b ldr r3, [r3, #4]
  4523. 8001d4c: 61bb str r3, [r7, #24]
  4524. temp &= ~((uint32_t)iocurrent);
  4525. 8001d4e: 693b ldr r3, [r7, #16]
  4526. 8001d50: 43db mvns r3, r3
  4527. 8001d52: 69ba ldr r2, [r7, #24]
  4528. 8001d54: 4013 ands r3, r2
  4529. 8001d56: 61bb str r3, [r7, #24]
  4530. if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
  4531. 8001d58: 683b ldr r3, [r7, #0]
  4532. 8001d5a: 685b ldr r3, [r3, #4]
  4533. 8001d5c: f403 3300 and.w r3, r3, #131072 ; 0x20000
  4534. 8001d60: 2b00 cmp r3, #0
  4535. 8001d62: d003 beq.n 8001d6c <HAL_GPIO_Init+0x288>
  4536. {
  4537. temp |= iocurrent;
  4538. 8001d64: 69ba ldr r2, [r7, #24]
  4539. 8001d66: 693b ldr r3, [r7, #16]
  4540. 8001d68: 4313 orrs r3, r2
  4541. 8001d6a: 61bb str r3, [r7, #24]
  4542. }
  4543. EXTI->EMR = temp;
  4544. 8001d6c: 4a26 ldr r2, [pc, #152] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4545. 8001d6e: 69bb ldr r3, [r7, #24]
  4546. 8001d70: 6053 str r3, [r2, #4]
  4547. /* Clear Rising Falling edge configuration */
  4548. temp = EXTI->RTSR;
  4549. 8001d72: 4b25 ldr r3, [pc, #148] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4550. 8001d74: 689b ldr r3, [r3, #8]
  4551. 8001d76: 61bb str r3, [r7, #24]
  4552. temp &= ~((uint32_t)iocurrent);
  4553. 8001d78: 693b ldr r3, [r7, #16]
  4554. 8001d7a: 43db mvns r3, r3
  4555. 8001d7c: 69ba ldr r2, [r7, #24]
  4556. 8001d7e: 4013 ands r3, r2
  4557. 8001d80: 61bb str r3, [r7, #24]
  4558. if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
  4559. 8001d82: 683b ldr r3, [r7, #0]
  4560. 8001d84: 685b ldr r3, [r3, #4]
  4561. 8001d86: f403 1380 and.w r3, r3, #1048576 ; 0x100000
  4562. 8001d8a: 2b00 cmp r3, #0
  4563. 8001d8c: d003 beq.n 8001d96 <HAL_GPIO_Init+0x2b2>
  4564. {
  4565. temp |= iocurrent;
  4566. 8001d8e: 69ba ldr r2, [r7, #24]
  4567. 8001d90: 693b ldr r3, [r7, #16]
  4568. 8001d92: 4313 orrs r3, r2
  4569. 8001d94: 61bb str r3, [r7, #24]
  4570. }
  4571. EXTI->RTSR = temp;
  4572. 8001d96: 4a1c ldr r2, [pc, #112] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4573. 8001d98: 69bb ldr r3, [r7, #24]
  4574. 8001d9a: 6093 str r3, [r2, #8]
  4575. temp = EXTI->FTSR;
  4576. 8001d9c: 4b1a ldr r3, [pc, #104] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4577. 8001d9e: 68db ldr r3, [r3, #12]
  4578. 8001da0: 61bb str r3, [r7, #24]
  4579. temp &= ~((uint32_t)iocurrent);
  4580. 8001da2: 693b ldr r3, [r7, #16]
  4581. 8001da4: 43db mvns r3, r3
  4582. 8001da6: 69ba ldr r2, [r7, #24]
  4583. 8001da8: 4013 ands r3, r2
  4584. 8001daa: 61bb str r3, [r7, #24]
  4585. if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
  4586. 8001dac: 683b ldr r3, [r7, #0]
  4587. 8001dae: 685b ldr r3, [r3, #4]
  4588. 8001db0: f403 1300 and.w r3, r3, #2097152 ; 0x200000
  4589. 8001db4: 2b00 cmp r3, #0
  4590. 8001db6: d003 beq.n 8001dc0 <HAL_GPIO_Init+0x2dc>
  4591. {
  4592. temp |= iocurrent;
  4593. 8001db8: 69ba ldr r2, [r7, #24]
  4594. 8001dba: 693b ldr r3, [r7, #16]
  4595. 8001dbc: 4313 orrs r3, r2
  4596. 8001dbe: 61bb str r3, [r7, #24]
  4597. }
  4598. EXTI->FTSR = temp;
  4599. 8001dc0: 4a11 ldr r2, [pc, #68] ; (8001e08 <HAL_GPIO_Init+0x324>)
  4600. 8001dc2: 69bb ldr r3, [r7, #24]
  4601. 8001dc4: 60d3 str r3, [r2, #12]
  4602. for(position = 0U; position < GPIO_NUMBER; position++)
  4603. 8001dc6: 69fb ldr r3, [r7, #28]
  4604. 8001dc8: 3301 adds r3, #1
  4605. 8001dca: 61fb str r3, [r7, #28]
  4606. 8001dcc: 69fb ldr r3, [r7, #28]
  4607. 8001dce: 2b0f cmp r3, #15
  4608. 8001dd0: f67f ae96 bls.w 8001b00 <HAL_GPIO_Init+0x1c>
  4609. }
  4610. }
  4611. }
  4612. }
  4613. 8001dd4: bf00 nop
  4614. 8001dd6: bf00 nop
  4615. 8001dd8: 3724 adds r7, #36 ; 0x24
  4616. 8001dda: 46bd mov sp, r7
  4617. 8001ddc: f85d 7b04 ldr.w r7, [sp], #4
  4618. 8001de0: 4770 bx lr
  4619. 8001de2: bf00 nop
  4620. 8001de4: 40023800 .word 0x40023800
  4621. 8001de8: 40013800 .word 0x40013800
  4622. 8001dec: 40020000 .word 0x40020000
  4623. 8001df0: 40020400 .word 0x40020400
  4624. 8001df4: 40020800 .word 0x40020800
  4625. 8001df8: 40020c00 .word 0x40020c00
  4626. 8001dfc: 40021000 .word 0x40021000
  4627. 8001e00: 40021400 .word 0x40021400
  4628. 8001e04: 40021800 .word 0x40021800
  4629. 8001e08: 40013c00 .word 0x40013c00
  4630. 08001e0c <HAL_GPIO_WritePin>:
  4631. * @arg GPIO_PIN_RESET: to clear the port pin
  4632. * @arg GPIO_PIN_SET: to set the port pin
  4633. * @retval None
  4634. */
  4635. void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
  4636. {
  4637. 8001e0c: b480 push {r7}
  4638. 8001e0e: b083 sub sp, #12
  4639. 8001e10: af00 add r7, sp, #0
  4640. 8001e12: 6078 str r0, [r7, #4]
  4641. 8001e14: 460b mov r3, r1
  4642. 8001e16: 807b strh r3, [r7, #2]
  4643. 8001e18: 4613 mov r3, r2
  4644. 8001e1a: 707b strb r3, [r7, #1]
  4645. /* Check the parameters */
  4646. assert_param(IS_GPIO_PIN(GPIO_Pin));
  4647. assert_param(IS_GPIO_PIN_ACTION(PinState));
  4648. if(PinState != GPIO_PIN_RESET)
  4649. 8001e1c: 787b ldrb r3, [r7, #1]
  4650. 8001e1e: 2b00 cmp r3, #0
  4651. 8001e20: d003 beq.n 8001e2a <HAL_GPIO_WritePin+0x1e>
  4652. {
  4653. GPIOx->BSRR = GPIO_Pin;
  4654. 8001e22: 887a ldrh r2, [r7, #2]
  4655. 8001e24: 687b ldr r3, [r7, #4]
  4656. 8001e26: 619a str r2, [r3, #24]
  4657. }
  4658. else
  4659. {
  4660. GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
  4661. }
  4662. }
  4663. 8001e28: e003 b.n 8001e32 <HAL_GPIO_WritePin+0x26>
  4664. GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U;
  4665. 8001e2a: 887b ldrh r3, [r7, #2]
  4666. 8001e2c: 041a lsls r2, r3, #16
  4667. 8001e2e: 687b ldr r3, [r7, #4]
  4668. 8001e30: 619a str r2, [r3, #24]
  4669. }
  4670. 8001e32: bf00 nop
  4671. 8001e34: 370c adds r7, #12
  4672. 8001e36: 46bd mov sp, r7
  4673. 8001e38: f85d 7b04 ldr.w r7, [sp], #4
  4674. 8001e3c: 4770 bx lr
  4675. 08001e3e <HAL_PCD_Init>:
  4676. * parameters in the PCD_InitTypeDef and initialize the associated handle.
  4677. * @param hpcd PCD handle
  4678. * @retval HAL status
  4679. */
  4680. HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd)
  4681. {
  4682. 8001e3e: b5f0 push {r4, r5, r6, r7, lr}
  4683. 8001e40: b08f sub sp, #60 ; 0x3c
  4684. 8001e42: af0a add r7, sp, #40 ; 0x28
  4685. 8001e44: 6078 str r0, [r7, #4]
  4686. USB_OTG_GlobalTypeDef *USBx;
  4687. uint8_t i;
  4688. /* Check the PCD handle allocation */
  4689. if (hpcd == NULL)
  4690. 8001e46: 687b ldr r3, [r7, #4]
  4691. 8001e48: 2b00 cmp r3, #0
  4692. 8001e4a: d101 bne.n 8001e50 <HAL_PCD_Init+0x12>
  4693. {
  4694. return HAL_ERROR;
  4695. 8001e4c: 2301 movs r3, #1
  4696. 8001e4e: e116 b.n 800207e <HAL_PCD_Init+0x240>
  4697. }
  4698. /* Check the parameters */
  4699. assert_param(IS_PCD_ALL_INSTANCE(hpcd->Instance));
  4700. USBx = hpcd->Instance;
  4701. 8001e50: 687b ldr r3, [r7, #4]
  4702. 8001e52: 681b ldr r3, [r3, #0]
  4703. 8001e54: 60bb str r3, [r7, #8]
  4704. if (hpcd->State == HAL_PCD_STATE_RESET)
  4705. 8001e56: 687b ldr r3, [r7, #4]
  4706. 8001e58: f893 33bd ldrb.w r3, [r3, #957] ; 0x3bd
  4707. 8001e5c: b2db uxtb r3, r3
  4708. 8001e5e: 2b00 cmp r3, #0
  4709. 8001e60: d106 bne.n 8001e70 <HAL_PCD_Init+0x32>
  4710. {
  4711. /* Allocate lock resource and initialize it */
  4712. hpcd->Lock = HAL_UNLOCKED;
  4713. 8001e62: 687b ldr r3, [r7, #4]
  4714. 8001e64: 2200 movs r2, #0
  4715. 8001e66: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  4716. /* Init the low level hardware */
  4717. hpcd->MspInitCallback(hpcd);
  4718. #else
  4719. /* Init the low level hardware : GPIO, CLOCK, NVIC... */
  4720. HAL_PCD_MspInit(hpcd);
  4721. 8001e6a: 6878 ldr r0, [r7, #4]
  4722. 8001e6c: f006 fcbc bl 80087e8 <HAL_PCD_MspInit>
  4723. #endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */
  4724. }
  4725. hpcd->State = HAL_PCD_STATE_BUSY;
  4726. 8001e70: 687b ldr r3, [r7, #4]
  4727. 8001e72: 2203 movs r2, #3
  4728. 8001e74: f883 23bd strb.w r2, [r3, #957] ; 0x3bd
  4729. /* Disable DMA mode for FS instance */
  4730. if ((USBx->CID & (0x1U << 8)) == 0U)
  4731. 8001e78: 68bb ldr r3, [r7, #8]
  4732. 8001e7a: 6bdb ldr r3, [r3, #60] ; 0x3c
  4733. 8001e7c: f403 7380 and.w r3, r3, #256 ; 0x100
  4734. 8001e80: 2b00 cmp r3, #0
  4735. 8001e82: d102 bne.n 8001e8a <HAL_PCD_Init+0x4c>
  4736. {
  4737. hpcd->Init.dma_enable = 0U;
  4738. 8001e84: 687b ldr r3, [r7, #4]
  4739. 8001e86: 2200 movs r2, #0
  4740. 8001e88: 611a str r2, [r3, #16]
  4741. }
  4742. /* Disable the Interrupts */
  4743. __HAL_PCD_DISABLE(hpcd);
  4744. 8001e8a: 687b ldr r3, [r7, #4]
  4745. 8001e8c: 681b ldr r3, [r3, #0]
  4746. 8001e8e: 4618 mov r0, r3
  4747. 8001e90: f003 fbcf bl 8005632 <USB_DisableGlobalInt>
  4748. /*Init the Core (common init.) */
  4749. if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK)
  4750. 8001e94: 687b ldr r3, [r7, #4]
  4751. 8001e96: 681b ldr r3, [r3, #0]
  4752. 8001e98: 603b str r3, [r7, #0]
  4753. 8001e9a: 687e ldr r6, [r7, #4]
  4754. 8001e9c: 466d mov r5, sp
  4755. 8001e9e: f106 0410 add.w r4, r6, #16
  4756. 8001ea2: cc0f ldmia r4!, {r0, r1, r2, r3}
  4757. 8001ea4: c50f stmia r5!, {r0, r1, r2, r3}
  4758. 8001ea6: cc0f ldmia r4!, {r0, r1, r2, r3}
  4759. 8001ea8: c50f stmia r5!, {r0, r1, r2, r3}
  4760. 8001eaa: e894 0003 ldmia.w r4, {r0, r1}
  4761. 8001eae: e885 0003 stmia.w r5, {r0, r1}
  4762. 8001eb2: 1d33 adds r3, r6, #4
  4763. 8001eb4: cb0e ldmia r3, {r1, r2, r3}
  4764. 8001eb6: 6838 ldr r0, [r7, #0]
  4765. 8001eb8: f003 faa6 bl 8005408 <USB_CoreInit>
  4766. 8001ebc: 4603 mov r3, r0
  4767. 8001ebe: 2b00 cmp r3, #0
  4768. 8001ec0: d005 beq.n 8001ece <HAL_PCD_Init+0x90>
  4769. {
  4770. hpcd->State = HAL_PCD_STATE_ERROR;
  4771. 8001ec2: 687b ldr r3, [r7, #4]
  4772. 8001ec4: 2202 movs r2, #2
  4773. 8001ec6: f883 23bd strb.w r2, [r3, #957] ; 0x3bd
  4774. return HAL_ERROR;
  4775. 8001eca: 2301 movs r3, #1
  4776. 8001ecc: e0d7 b.n 800207e <HAL_PCD_Init+0x240>
  4777. }
  4778. /* Force Device Mode*/
  4779. (void)USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE);
  4780. 8001ece: 687b ldr r3, [r7, #4]
  4781. 8001ed0: 681b ldr r3, [r3, #0]
  4782. 8001ed2: 2100 movs r1, #0
  4783. 8001ed4: 4618 mov r0, r3
  4784. 8001ed6: f003 fbbd bl 8005654 <USB_SetCurrentMode>
  4785. /* Init endpoints structures */
  4786. for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
  4787. 8001eda: 2300 movs r3, #0
  4788. 8001edc: 73fb strb r3, [r7, #15]
  4789. 8001ede: e04a b.n 8001f76 <HAL_PCD_Init+0x138>
  4790. {
  4791. /* Init ep structure */
  4792. hpcd->IN_ep[i].is_in = 1U;
  4793. 8001ee0: 7bfa ldrb r2, [r7, #15]
  4794. 8001ee2: 6879 ldr r1, [r7, #4]
  4795. 8001ee4: 4613 mov r3, r2
  4796. 8001ee6: 00db lsls r3, r3, #3
  4797. 8001ee8: 1a9b subs r3, r3, r2
  4798. 8001eea: 009b lsls r3, r3, #2
  4799. 8001eec: 440b add r3, r1
  4800. 8001eee: 333d adds r3, #61 ; 0x3d
  4801. 8001ef0: 2201 movs r2, #1
  4802. 8001ef2: 701a strb r2, [r3, #0]
  4803. hpcd->IN_ep[i].num = i;
  4804. 8001ef4: 7bfa ldrb r2, [r7, #15]
  4805. 8001ef6: 6879 ldr r1, [r7, #4]
  4806. 8001ef8: 4613 mov r3, r2
  4807. 8001efa: 00db lsls r3, r3, #3
  4808. 8001efc: 1a9b subs r3, r3, r2
  4809. 8001efe: 009b lsls r3, r3, #2
  4810. 8001f00: 440b add r3, r1
  4811. 8001f02: 333c adds r3, #60 ; 0x3c
  4812. 8001f04: 7bfa ldrb r2, [r7, #15]
  4813. 8001f06: 701a strb r2, [r3, #0]
  4814. hpcd->IN_ep[i].tx_fifo_num = i;
  4815. 8001f08: 7bfa ldrb r2, [r7, #15]
  4816. 8001f0a: 7bfb ldrb r3, [r7, #15]
  4817. 8001f0c: b298 uxth r0, r3
  4818. 8001f0e: 6879 ldr r1, [r7, #4]
  4819. 8001f10: 4613 mov r3, r2
  4820. 8001f12: 00db lsls r3, r3, #3
  4821. 8001f14: 1a9b subs r3, r3, r2
  4822. 8001f16: 009b lsls r3, r3, #2
  4823. 8001f18: 440b add r3, r1
  4824. 8001f1a: 3342 adds r3, #66 ; 0x42
  4825. 8001f1c: 4602 mov r2, r0
  4826. 8001f1e: 801a strh r2, [r3, #0]
  4827. /* Control until ep is activated */
  4828. hpcd->IN_ep[i].type = EP_TYPE_CTRL;
  4829. 8001f20: 7bfa ldrb r2, [r7, #15]
  4830. 8001f22: 6879 ldr r1, [r7, #4]
  4831. 8001f24: 4613 mov r3, r2
  4832. 8001f26: 00db lsls r3, r3, #3
  4833. 8001f28: 1a9b subs r3, r3, r2
  4834. 8001f2a: 009b lsls r3, r3, #2
  4835. 8001f2c: 440b add r3, r1
  4836. 8001f2e: 333f adds r3, #63 ; 0x3f
  4837. 8001f30: 2200 movs r2, #0
  4838. 8001f32: 701a strb r2, [r3, #0]
  4839. hpcd->IN_ep[i].maxpacket = 0U;
  4840. 8001f34: 7bfa ldrb r2, [r7, #15]
  4841. 8001f36: 6879 ldr r1, [r7, #4]
  4842. 8001f38: 4613 mov r3, r2
  4843. 8001f3a: 00db lsls r3, r3, #3
  4844. 8001f3c: 1a9b subs r3, r3, r2
  4845. 8001f3e: 009b lsls r3, r3, #2
  4846. 8001f40: 440b add r3, r1
  4847. 8001f42: 3344 adds r3, #68 ; 0x44
  4848. 8001f44: 2200 movs r2, #0
  4849. 8001f46: 601a str r2, [r3, #0]
  4850. hpcd->IN_ep[i].xfer_buff = 0U;
  4851. 8001f48: 7bfa ldrb r2, [r7, #15]
  4852. 8001f4a: 6879 ldr r1, [r7, #4]
  4853. 8001f4c: 4613 mov r3, r2
  4854. 8001f4e: 00db lsls r3, r3, #3
  4855. 8001f50: 1a9b subs r3, r3, r2
  4856. 8001f52: 009b lsls r3, r3, #2
  4857. 8001f54: 440b add r3, r1
  4858. 8001f56: 3348 adds r3, #72 ; 0x48
  4859. 8001f58: 2200 movs r2, #0
  4860. 8001f5a: 601a str r2, [r3, #0]
  4861. hpcd->IN_ep[i].xfer_len = 0U;
  4862. 8001f5c: 7bfa ldrb r2, [r7, #15]
  4863. 8001f5e: 6879 ldr r1, [r7, #4]
  4864. 8001f60: 4613 mov r3, r2
  4865. 8001f62: 00db lsls r3, r3, #3
  4866. 8001f64: 1a9b subs r3, r3, r2
  4867. 8001f66: 009b lsls r3, r3, #2
  4868. 8001f68: 440b add r3, r1
  4869. 8001f6a: 3350 adds r3, #80 ; 0x50
  4870. 8001f6c: 2200 movs r2, #0
  4871. 8001f6e: 601a str r2, [r3, #0]
  4872. for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
  4873. 8001f70: 7bfb ldrb r3, [r7, #15]
  4874. 8001f72: 3301 adds r3, #1
  4875. 8001f74: 73fb strb r3, [r7, #15]
  4876. 8001f76: 7bfa ldrb r2, [r7, #15]
  4877. 8001f78: 687b ldr r3, [r7, #4]
  4878. 8001f7a: 685b ldr r3, [r3, #4]
  4879. 8001f7c: 429a cmp r2, r3
  4880. 8001f7e: d3af bcc.n 8001ee0 <HAL_PCD_Init+0xa2>
  4881. }
  4882. for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
  4883. 8001f80: 2300 movs r3, #0
  4884. 8001f82: 73fb strb r3, [r7, #15]
  4885. 8001f84: e044 b.n 8002010 <HAL_PCD_Init+0x1d2>
  4886. {
  4887. hpcd->OUT_ep[i].is_in = 0U;
  4888. 8001f86: 7bfa ldrb r2, [r7, #15]
  4889. 8001f88: 6879 ldr r1, [r7, #4]
  4890. 8001f8a: 4613 mov r3, r2
  4891. 8001f8c: 00db lsls r3, r3, #3
  4892. 8001f8e: 1a9b subs r3, r3, r2
  4893. 8001f90: 009b lsls r3, r3, #2
  4894. 8001f92: 440b add r3, r1
  4895. 8001f94: f203 13fd addw r3, r3, #509 ; 0x1fd
  4896. 8001f98: 2200 movs r2, #0
  4897. 8001f9a: 701a strb r2, [r3, #0]
  4898. hpcd->OUT_ep[i].num = i;
  4899. 8001f9c: 7bfa ldrb r2, [r7, #15]
  4900. 8001f9e: 6879 ldr r1, [r7, #4]
  4901. 8001fa0: 4613 mov r3, r2
  4902. 8001fa2: 00db lsls r3, r3, #3
  4903. 8001fa4: 1a9b subs r3, r3, r2
  4904. 8001fa6: 009b lsls r3, r3, #2
  4905. 8001fa8: 440b add r3, r1
  4906. 8001faa: f503 73fe add.w r3, r3, #508 ; 0x1fc
  4907. 8001fae: 7bfa ldrb r2, [r7, #15]
  4908. 8001fb0: 701a strb r2, [r3, #0]
  4909. /* Control until ep is activated */
  4910. hpcd->OUT_ep[i].type = EP_TYPE_CTRL;
  4911. 8001fb2: 7bfa ldrb r2, [r7, #15]
  4912. 8001fb4: 6879 ldr r1, [r7, #4]
  4913. 8001fb6: 4613 mov r3, r2
  4914. 8001fb8: 00db lsls r3, r3, #3
  4915. 8001fba: 1a9b subs r3, r3, r2
  4916. 8001fbc: 009b lsls r3, r3, #2
  4917. 8001fbe: 440b add r3, r1
  4918. 8001fc0: f203 13ff addw r3, r3, #511 ; 0x1ff
  4919. 8001fc4: 2200 movs r2, #0
  4920. 8001fc6: 701a strb r2, [r3, #0]
  4921. hpcd->OUT_ep[i].maxpacket = 0U;
  4922. 8001fc8: 7bfa ldrb r2, [r7, #15]
  4923. 8001fca: 6879 ldr r1, [r7, #4]
  4924. 8001fcc: 4613 mov r3, r2
  4925. 8001fce: 00db lsls r3, r3, #3
  4926. 8001fd0: 1a9b subs r3, r3, r2
  4927. 8001fd2: 009b lsls r3, r3, #2
  4928. 8001fd4: 440b add r3, r1
  4929. 8001fd6: f503 7301 add.w r3, r3, #516 ; 0x204
  4930. 8001fda: 2200 movs r2, #0
  4931. 8001fdc: 601a str r2, [r3, #0]
  4932. hpcd->OUT_ep[i].xfer_buff = 0U;
  4933. 8001fde: 7bfa ldrb r2, [r7, #15]
  4934. 8001fe0: 6879 ldr r1, [r7, #4]
  4935. 8001fe2: 4613 mov r3, r2
  4936. 8001fe4: 00db lsls r3, r3, #3
  4937. 8001fe6: 1a9b subs r3, r3, r2
  4938. 8001fe8: 009b lsls r3, r3, #2
  4939. 8001fea: 440b add r3, r1
  4940. 8001fec: f503 7302 add.w r3, r3, #520 ; 0x208
  4941. 8001ff0: 2200 movs r2, #0
  4942. 8001ff2: 601a str r2, [r3, #0]
  4943. hpcd->OUT_ep[i].xfer_len = 0U;
  4944. 8001ff4: 7bfa ldrb r2, [r7, #15]
  4945. 8001ff6: 6879 ldr r1, [r7, #4]
  4946. 8001ff8: 4613 mov r3, r2
  4947. 8001ffa: 00db lsls r3, r3, #3
  4948. 8001ffc: 1a9b subs r3, r3, r2
  4949. 8001ffe: 009b lsls r3, r3, #2
  4950. 8002000: 440b add r3, r1
  4951. 8002002: f503 7304 add.w r3, r3, #528 ; 0x210
  4952. 8002006: 2200 movs r2, #0
  4953. 8002008: 601a str r2, [r3, #0]
  4954. for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
  4955. 800200a: 7bfb ldrb r3, [r7, #15]
  4956. 800200c: 3301 adds r3, #1
  4957. 800200e: 73fb strb r3, [r7, #15]
  4958. 8002010: 7bfa ldrb r2, [r7, #15]
  4959. 8002012: 687b ldr r3, [r7, #4]
  4960. 8002014: 685b ldr r3, [r3, #4]
  4961. 8002016: 429a cmp r2, r3
  4962. 8002018: d3b5 bcc.n 8001f86 <HAL_PCD_Init+0x148>
  4963. }
  4964. /* Init Device */
  4965. if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK)
  4966. 800201a: 687b ldr r3, [r7, #4]
  4967. 800201c: 681b ldr r3, [r3, #0]
  4968. 800201e: 603b str r3, [r7, #0]
  4969. 8002020: 687e ldr r6, [r7, #4]
  4970. 8002022: 466d mov r5, sp
  4971. 8002024: f106 0410 add.w r4, r6, #16
  4972. 8002028: cc0f ldmia r4!, {r0, r1, r2, r3}
  4973. 800202a: c50f stmia r5!, {r0, r1, r2, r3}
  4974. 800202c: cc0f ldmia r4!, {r0, r1, r2, r3}
  4975. 800202e: c50f stmia r5!, {r0, r1, r2, r3}
  4976. 8002030: e894 0003 ldmia.w r4, {r0, r1}
  4977. 8002034: e885 0003 stmia.w r5, {r0, r1}
  4978. 8002038: 1d33 adds r3, r6, #4
  4979. 800203a: cb0e ldmia r3, {r1, r2, r3}
  4980. 800203c: 6838 ldr r0, [r7, #0]
  4981. 800203e: f003 fb55 bl 80056ec <USB_DevInit>
  4982. 8002042: 4603 mov r3, r0
  4983. 8002044: 2b00 cmp r3, #0
  4984. 8002046: d005 beq.n 8002054 <HAL_PCD_Init+0x216>
  4985. {
  4986. hpcd->State = HAL_PCD_STATE_ERROR;
  4987. 8002048: 687b ldr r3, [r7, #4]
  4988. 800204a: 2202 movs r2, #2
  4989. 800204c: f883 23bd strb.w r2, [r3, #957] ; 0x3bd
  4990. return HAL_ERROR;
  4991. 8002050: 2301 movs r3, #1
  4992. 8002052: e014 b.n 800207e <HAL_PCD_Init+0x240>
  4993. }
  4994. hpcd->USB_Address = 0U;
  4995. 8002054: 687b ldr r3, [r7, #4]
  4996. 8002056: 2200 movs r2, #0
  4997. 8002058: f883 2038 strb.w r2, [r3, #56] ; 0x38
  4998. hpcd->State = HAL_PCD_STATE_READY;
  4999. 800205c: 687b ldr r3, [r7, #4]
  5000. 800205e: 2201 movs r2, #1
  5001. 8002060: f883 23bd strb.w r2, [r3, #957] ; 0x3bd
  5002. #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  5003. /* Activate LPM */
  5004. if (hpcd->Init.lpm_enable == 1U)
  5005. 8002064: 687b ldr r3, [r7, #4]
  5006. 8002066: 6a5b ldr r3, [r3, #36] ; 0x24
  5007. 8002068: 2b01 cmp r3, #1
  5008. 800206a: d102 bne.n 8002072 <HAL_PCD_Init+0x234>
  5009. {
  5010. (void)HAL_PCDEx_ActivateLPM(hpcd);
  5011. 800206c: 6878 ldr r0, [r7, #4]
  5012. 800206e: f001 f891 bl 8003194 <HAL_PCDEx_ActivateLPM>
  5013. }
  5014. #endif /* defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) */
  5015. (void)USB_DevDisconnect(hpcd->Instance);
  5016. 8002072: 687b ldr r3, [r7, #4]
  5017. 8002074: 681b ldr r3, [r3, #0]
  5018. 8002076: 4618 mov r0, r3
  5019. 8002078: f004 fbc4 bl 8006804 <USB_DevDisconnect>
  5020. return HAL_OK;
  5021. 800207c: 2300 movs r3, #0
  5022. }
  5023. 800207e: 4618 mov r0, r3
  5024. 8002080: 3714 adds r7, #20
  5025. 8002082: 46bd mov sp, r7
  5026. 8002084: bdf0 pop {r4, r5, r6, r7, pc}
  5027. 08002086 <HAL_PCD_Start>:
  5028. * @brief Start the USB device
  5029. * @param hpcd PCD handle
  5030. * @retval HAL status
  5031. */
  5032. HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd)
  5033. {
  5034. 8002086: b580 push {r7, lr}
  5035. 8002088: b084 sub sp, #16
  5036. 800208a: af00 add r7, sp, #0
  5037. 800208c: 6078 str r0, [r7, #4]
  5038. USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
  5039. 800208e: 687b ldr r3, [r7, #4]
  5040. 8002090: 681b ldr r3, [r3, #0]
  5041. 8002092: 60fb str r3, [r7, #12]
  5042. __HAL_LOCK(hpcd);
  5043. 8002094: 687b ldr r3, [r7, #4]
  5044. 8002096: f893 33bc ldrb.w r3, [r3, #956] ; 0x3bc
  5045. 800209a: 2b01 cmp r3, #1
  5046. 800209c: d101 bne.n 80020a2 <HAL_PCD_Start+0x1c>
  5047. 800209e: 2302 movs r3, #2
  5048. 80020a0: e020 b.n 80020e4 <HAL_PCD_Start+0x5e>
  5049. 80020a2: 687b ldr r3, [r7, #4]
  5050. 80020a4: 2201 movs r2, #1
  5051. 80020a6: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  5052. if ((hpcd->Init.battery_charging_enable == 1U) &&
  5053. 80020aa: 687b ldr r3, [r7, #4]
  5054. 80020ac: 6a9b ldr r3, [r3, #40] ; 0x28
  5055. 80020ae: 2b01 cmp r3, #1
  5056. 80020b0: d109 bne.n 80020c6 <HAL_PCD_Start+0x40>
  5057. (hpcd->Init.phy_itface != USB_OTG_ULPI_PHY))
  5058. 80020b2: 687b ldr r3, [r7, #4]
  5059. 80020b4: 699b ldr r3, [r3, #24]
  5060. if ((hpcd->Init.battery_charging_enable == 1U) &&
  5061. 80020b6: 2b01 cmp r3, #1
  5062. 80020b8: d005 beq.n 80020c6 <HAL_PCD_Start+0x40>
  5063. {
  5064. /* Enable USB Transceiver */
  5065. USBx->GCCFG |= USB_OTG_GCCFG_PWRDWN;
  5066. 80020ba: 68fb ldr r3, [r7, #12]
  5067. 80020bc: 6b9b ldr r3, [r3, #56] ; 0x38
  5068. 80020be: f443 3280 orr.w r2, r3, #65536 ; 0x10000
  5069. 80020c2: 68fb ldr r3, [r7, #12]
  5070. 80020c4: 639a str r2, [r3, #56] ; 0x38
  5071. }
  5072. __HAL_PCD_ENABLE(hpcd);
  5073. 80020c6: 687b ldr r3, [r7, #4]
  5074. 80020c8: 681b ldr r3, [r3, #0]
  5075. 80020ca: 4618 mov r0, r3
  5076. 80020cc: f003 faa0 bl 8005610 <USB_EnableGlobalInt>
  5077. (void)USB_DevConnect(hpcd->Instance);
  5078. 80020d0: 687b ldr r3, [r7, #4]
  5079. 80020d2: 681b ldr r3, [r3, #0]
  5080. 80020d4: 4618 mov r0, r3
  5081. 80020d6: f004 fb74 bl 80067c2 <USB_DevConnect>
  5082. __HAL_UNLOCK(hpcd);
  5083. 80020da: 687b ldr r3, [r7, #4]
  5084. 80020dc: 2200 movs r2, #0
  5085. 80020de: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  5086. return HAL_OK;
  5087. 80020e2: 2300 movs r3, #0
  5088. }
  5089. 80020e4: 4618 mov r0, r3
  5090. 80020e6: 3710 adds r7, #16
  5091. 80020e8: 46bd mov sp, r7
  5092. 80020ea: bd80 pop {r7, pc}
  5093. 080020ec <HAL_PCD_IRQHandler>:
  5094. * @brief Handles PCD interrupt request.
  5095. * @param hpcd PCD handle
  5096. * @retval HAL status
  5097. */
  5098. void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)
  5099. {
  5100. 80020ec: b590 push {r4, r7, lr}
  5101. 80020ee: b08d sub sp, #52 ; 0x34
  5102. 80020f0: af00 add r7, sp, #0
  5103. 80020f2: 6078 str r0, [r7, #4]
  5104. USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
  5105. 80020f4: 687b ldr r3, [r7, #4]
  5106. 80020f6: 681b ldr r3, [r3, #0]
  5107. 80020f8: 623b str r3, [r7, #32]
  5108. uint32_t USBx_BASE = (uint32_t)USBx;
  5109. 80020fa: 6a3b ldr r3, [r7, #32]
  5110. 80020fc: 61fb str r3, [r7, #28]
  5111. uint32_t epnum;
  5112. uint32_t fifoemptymsk;
  5113. uint32_t temp;
  5114. /* ensure that we are in device mode */
  5115. if (USB_GetMode(hpcd->Instance) == USB_OTG_MODE_DEVICE)
  5116. 80020fe: 687b ldr r3, [r7, #4]
  5117. 8002100: 681b ldr r3, [r3, #0]
  5118. 8002102: 4618 mov r0, r3
  5119. 8002104: f004 fc32 bl 800696c <USB_GetMode>
  5120. 8002108: 4603 mov r3, r0
  5121. 800210a: 2b00 cmp r3, #0
  5122. 800210c: f040 83ca bne.w 80028a4 <HAL_PCD_IRQHandler+0x7b8>
  5123. {
  5124. /* avoid spurious interrupt */
  5125. if (__HAL_PCD_IS_INVALID_INTERRUPT(hpcd))
  5126. 8002110: 687b ldr r3, [r7, #4]
  5127. 8002112: 681b ldr r3, [r3, #0]
  5128. 8002114: 4618 mov r0, r3
  5129. 8002116: f004 fb96 bl 8006846 <USB_ReadInterrupts>
  5130. 800211a: 4603 mov r3, r0
  5131. 800211c: 2b00 cmp r3, #0
  5132. 800211e: f000 83c0 beq.w 80028a2 <HAL_PCD_IRQHandler+0x7b6>
  5133. {
  5134. return;
  5135. }
  5136. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_MMIS))
  5137. 8002122: 687b ldr r3, [r7, #4]
  5138. 8002124: 681b ldr r3, [r3, #0]
  5139. 8002126: 4618 mov r0, r3
  5140. 8002128: f004 fb8d bl 8006846 <USB_ReadInterrupts>
  5141. 800212c: 4603 mov r3, r0
  5142. 800212e: f003 0302 and.w r3, r3, #2
  5143. 8002132: 2b02 cmp r3, #2
  5144. 8002134: d107 bne.n 8002146 <HAL_PCD_IRQHandler+0x5a>
  5145. {
  5146. /* incorrect mode, acknowledge the interrupt */
  5147. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_MMIS);
  5148. 8002136: 687b ldr r3, [r7, #4]
  5149. 8002138: 681b ldr r3, [r3, #0]
  5150. 800213a: 695a ldr r2, [r3, #20]
  5151. 800213c: 687b ldr r3, [r7, #4]
  5152. 800213e: 681b ldr r3, [r3, #0]
  5153. 8002140: f002 0202 and.w r2, r2, #2
  5154. 8002144: 615a str r2, [r3, #20]
  5155. }
  5156. /* Handle RxQLevel Interrupt */
  5157. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_RXFLVL))
  5158. 8002146: 687b ldr r3, [r7, #4]
  5159. 8002148: 681b ldr r3, [r3, #0]
  5160. 800214a: 4618 mov r0, r3
  5161. 800214c: f004 fb7b bl 8006846 <USB_ReadInterrupts>
  5162. 8002150: 4603 mov r3, r0
  5163. 8002152: f003 0310 and.w r3, r3, #16
  5164. 8002156: 2b10 cmp r3, #16
  5165. 8002158: d161 bne.n 800221e <HAL_PCD_IRQHandler+0x132>
  5166. {
  5167. USB_MASK_INTERRUPT(hpcd->Instance, USB_OTG_GINTSTS_RXFLVL);
  5168. 800215a: 687b ldr r3, [r7, #4]
  5169. 800215c: 681b ldr r3, [r3, #0]
  5170. 800215e: 699a ldr r2, [r3, #24]
  5171. 8002160: 687b ldr r3, [r7, #4]
  5172. 8002162: 681b ldr r3, [r3, #0]
  5173. 8002164: f022 0210 bic.w r2, r2, #16
  5174. 8002168: 619a str r2, [r3, #24]
  5175. temp = USBx->GRXSTSP;
  5176. 800216a: 6a3b ldr r3, [r7, #32]
  5177. 800216c: 6a1b ldr r3, [r3, #32]
  5178. 800216e: 61bb str r3, [r7, #24]
  5179. ep = &hpcd->OUT_ep[temp & USB_OTG_GRXSTSP_EPNUM];
  5180. 8002170: 69bb ldr r3, [r7, #24]
  5181. 8002172: f003 020f and.w r2, r3, #15
  5182. 8002176: 4613 mov r3, r2
  5183. 8002178: 00db lsls r3, r3, #3
  5184. 800217a: 1a9b subs r3, r3, r2
  5185. 800217c: 009b lsls r3, r3, #2
  5186. 800217e: f503 73fc add.w r3, r3, #504 ; 0x1f8
  5187. 8002182: 687a ldr r2, [r7, #4]
  5188. 8002184: 4413 add r3, r2
  5189. 8002186: 3304 adds r3, #4
  5190. 8002188: 617b str r3, [r7, #20]
  5191. if (((temp & USB_OTG_GRXSTSP_PKTSTS) >> 17) == STS_DATA_UPDT)
  5192. 800218a: 69bb ldr r3, [r7, #24]
  5193. 800218c: 0c5b lsrs r3, r3, #17
  5194. 800218e: f003 030f and.w r3, r3, #15
  5195. 8002192: 2b02 cmp r3, #2
  5196. 8002194: d124 bne.n 80021e0 <HAL_PCD_IRQHandler+0xf4>
  5197. {
  5198. if ((temp & USB_OTG_GRXSTSP_BCNT) != 0U)
  5199. 8002196: 69ba ldr r2, [r7, #24]
  5200. 8002198: f647 73f0 movw r3, #32752 ; 0x7ff0
  5201. 800219c: 4013 ands r3, r2
  5202. 800219e: 2b00 cmp r3, #0
  5203. 80021a0: d035 beq.n 800220e <HAL_PCD_IRQHandler+0x122>
  5204. {
  5205. (void)USB_ReadPacket(USBx, ep->xfer_buff,
  5206. 80021a2: 697b ldr r3, [r7, #20]
  5207. 80021a4: 68d9 ldr r1, [r3, #12]
  5208. (uint16_t)((temp & USB_OTG_GRXSTSP_BCNT) >> 4));
  5209. 80021a6: 69bb ldr r3, [r7, #24]
  5210. 80021a8: 091b lsrs r3, r3, #4
  5211. 80021aa: b29b uxth r3, r3
  5212. (void)USB_ReadPacket(USBx, ep->xfer_buff,
  5213. 80021ac: f3c3 030a ubfx r3, r3, #0, #11
  5214. 80021b0: b29b uxth r3, r3
  5215. 80021b2: 461a mov r2, r3
  5216. 80021b4: 6a38 ldr r0, [r7, #32]
  5217. 80021b6: f004 f9b2 bl 800651e <USB_ReadPacket>
  5218. ep->xfer_buff += (temp & USB_OTG_GRXSTSP_BCNT) >> 4;
  5219. 80021ba: 697b ldr r3, [r7, #20]
  5220. 80021bc: 68da ldr r2, [r3, #12]
  5221. 80021be: 69bb ldr r3, [r7, #24]
  5222. 80021c0: 091b lsrs r3, r3, #4
  5223. 80021c2: f3c3 030a ubfx r3, r3, #0, #11
  5224. 80021c6: 441a add r2, r3
  5225. 80021c8: 697b ldr r3, [r7, #20]
  5226. 80021ca: 60da str r2, [r3, #12]
  5227. ep->xfer_count += (temp & USB_OTG_GRXSTSP_BCNT) >> 4;
  5228. 80021cc: 697b ldr r3, [r7, #20]
  5229. 80021ce: 699a ldr r2, [r3, #24]
  5230. 80021d0: 69bb ldr r3, [r7, #24]
  5231. 80021d2: 091b lsrs r3, r3, #4
  5232. 80021d4: f3c3 030a ubfx r3, r3, #0, #11
  5233. 80021d8: 441a add r2, r3
  5234. 80021da: 697b ldr r3, [r7, #20]
  5235. 80021dc: 619a str r2, [r3, #24]
  5236. 80021de: e016 b.n 800220e <HAL_PCD_IRQHandler+0x122>
  5237. }
  5238. }
  5239. else if (((temp & USB_OTG_GRXSTSP_PKTSTS) >> 17) == STS_SETUP_UPDT)
  5240. 80021e0: 69bb ldr r3, [r7, #24]
  5241. 80021e2: 0c5b lsrs r3, r3, #17
  5242. 80021e4: f003 030f and.w r3, r3, #15
  5243. 80021e8: 2b06 cmp r3, #6
  5244. 80021ea: d110 bne.n 800220e <HAL_PCD_IRQHandler+0x122>
  5245. {
  5246. (void)USB_ReadPacket(USBx, (uint8_t *)hpcd->Setup, 8U);
  5247. 80021ec: 687b ldr r3, [r7, #4]
  5248. 80021ee: f503 7371 add.w r3, r3, #964 ; 0x3c4
  5249. 80021f2: 2208 movs r2, #8
  5250. 80021f4: 4619 mov r1, r3
  5251. 80021f6: 6a38 ldr r0, [r7, #32]
  5252. 80021f8: f004 f991 bl 800651e <USB_ReadPacket>
  5253. ep->xfer_count += (temp & USB_OTG_GRXSTSP_BCNT) >> 4;
  5254. 80021fc: 697b ldr r3, [r7, #20]
  5255. 80021fe: 699a ldr r2, [r3, #24]
  5256. 8002200: 69bb ldr r3, [r7, #24]
  5257. 8002202: 091b lsrs r3, r3, #4
  5258. 8002204: f3c3 030a ubfx r3, r3, #0, #11
  5259. 8002208: 441a add r2, r3
  5260. 800220a: 697b ldr r3, [r7, #20]
  5261. 800220c: 619a str r2, [r3, #24]
  5262. }
  5263. else
  5264. {
  5265. /* ... */
  5266. }
  5267. USB_UNMASK_INTERRUPT(hpcd->Instance, USB_OTG_GINTSTS_RXFLVL);
  5268. 800220e: 687b ldr r3, [r7, #4]
  5269. 8002210: 681b ldr r3, [r3, #0]
  5270. 8002212: 699a ldr r2, [r3, #24]
  5271. 8002214: 687b ldr r3, [r7, #4]
  5272. 8002216: 681b ldr r3, [r3, #0]
  5273. 8002218: f042 0210 orr.w r2, r2, #16
  5274. 800221c: 619a str r2, [r3, #24]
  5275. }
  5276. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_OEPINT))
  5277. 800221e: 687b ldr r3, [r7, #4]
  5278. 8002220: 681b ldr r3, [r3, #0]
  5279. 8002222: 4618 mov r0, r3
  5280. 8002224: f004 fb0f bl 8006846 <USB_ReadInterrupts>
  5281. 8002228: 4603 mov r3, r0
  5282. 800222a: f403 2300 and.w r3, r3, #524288 ; 0x80000
  5283. 800222e: f5b3 2f00 cmp.w r3, #524288 ; 0x80000
  5284. 8002232: d16e bne.n 8002312 <HAL_PCD_IRQHandler+0x226>
  5285. {
  5286. epnum = 0U;
  5287. 8002234: 2300 movs r3, #0
  5288. 8002236: 627b str r3, [r7, #36] ; 0x24
  5289. /* Read in the device interrupt bits */
  5290. ep_intr = USB_ReadDevAllOutEpInterrupt(hpcd->Instance);
  5291. 8002238: 687b ldr r3, [r7, #4]
  5292. 800223a: 681b ldr r3, [r3, #0]
  5293. 800223c: 4618 mov r0, r3
  5294. 800223e: f004 fb15 bl 800686c <USB_ReadDevAllOutEpInterrupt>
  5295. 8002242: 62b8 str r0, [r7, #40] ; 0x28
  5296. while (ep_intr != 0U)
  5297. 8002244: e062 b.n 800230c <HAL_PCD_IRQHandler+0x220>
  5298. {
  5299. if ((ep_intr & 0x1U) != 0U)
  5300. 8002246: 6abb ldr r3, [r7, #40] ; 0x28
  5301. 8002248: f003 0301 and.w r3, r3, #1
  5302. 800224c: 2b00 cmp r3, #0
  5303. 800224e: d057 beq.n 8002300 <HAL_PCD_IRQHandler+0x214>
  5304. {
  5305. epint = USB_ReadDevOutEPInterrupt(hpcd->Instance, (uint8_t)epnum);
  5306. 8002250: 687b ldr r3, [r7, #4]
  5307. 8002252: 681b ldr r3, [r3, #0]
  5308. 8002254: 6a7a ldr r2, [r7, #36] ; 0x24
  5309. 8002256: b2d2 uxtb r2, r2
  5310. 8002258: 4611 mov r1, r2
  5311. 800225a: 4618 mov r0, r3
  5312. 800225c: f004 fb3a bl 80068d4 <USB_ReadDevOutEPInterrupt>
  5313. 8002260: 6138 str r0, [r7, #16]
  5314. if ((epint & USB_OTG_DOEPINT_XFRC) == USB_OTG_DOEPINT_XFRC)
  5315. 8002262: 693b ldr r3, [r7, #16]
  5316. 8002264: f003 0301 and.w r3, r3, #1
  5317. 8002268: 2b00 cmp r3, #0
  5318. 800226a: d00c beq.n 8002286 <HAL_PCD_IRQHandler+0x19a>
  5319. {
  5320. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_XFRC);
  5321. 800226c: 6a7b ldr r3, [r7, #36] ; 0x24
  5322. 800226e: 015a lsls r2, r3, #5
  5323. 8002270: 69fb ldr r3, [r7, #28]
  5324. 8002272: 4413 add r3, r2
  5325. 8002274: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5326. 8002278: 461a mov r2, r3
  5327. 800227a: 2301 movs r3, #1
  5328. 800227c: 6093 str r3, [r2, #8]
  5329. (void)PCD_EP_OutXfrComplete_int(hpcd, epnum);
  5330. 800227e: 6a79 ldr r1, [r7, #36] ; 0x24
  5331. 8002280: 6878 ldr r0, [r7, #4]
  5332. 8002282: f000 fddd bl 8002e40 <PCD_EP_OutXfrComplete_int>
  5333. }
  5334. if ((epint & USB_OTG_DOEPINT_STUP) == USB_OTG_DOEPINT_STUP)
  5335. 8002286: 693b ldr r3, [r7, #16]
  5336. 8002288: f003 0308 and.w r3, r3, #8
  5337. 800228c: 2b00 cmp r3, #0
  5338. 800228e: d00c beq.n 80022aa <HAL_PCD_IRQHandler+0x1be>
  5339. {
  5340. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_STUP);
  5341. 8002290: 6a7b ldr r3, [r7, #36] ; 0x24
  5342. 8002292: 015a lsls r2, r3, #5
  5343. 8002294: 69fb ldr r3, [r7, #28]
  5344. 8002296: 4413 add r3, r2
  5345. 8002298: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5346. 800229c: 461a mov r2, r3
  5347. 800229e: 2308 movs r3, #8
  5348. 80022a0: 6093 str r3, [r2, #8]
  5349. /* Class B setup phase done for previous decoded setup */
  5350. (void)PCD_EP_OutSetupPacket_int(hpcd, epnum);
  5351. 80022a2: 6a79 ldr r1, [r7, #36] ; 0x24
  5352. 80022a4: 6878 ldr r0, [r7, #4]
  5353. 80022a6: f000 fed7 bl 8003058 <PCD_EP_OutSetupPacket_int>
  5354. }
  5355. if ((epint & USB_OTG_DOEPINT_OTEPDIS) == USB_OTG_DOEPINT_OTEPDIS)
  5356. 80022aa: 693b ldr r3, [r7, #16]
  5357. 80022ac: f003 0310 and.w r3, r3, #16
  5358. 80022b0: 2b00 cmp r3, #0
  5359. 80022b2: d008 beq.n 80022c6 <HAL_PCD_IRQHandler+0x1da>
  5360. {
  5361. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_OTEPDIS);
  5362. 80022b4: 6a7b ldr r3, [r7, #36] ; 0x24
  5363. 80022b6: 015a lsls r2, r3, #5
  5364. 80022b8: 69fb ldr r3, [r7, #28]
  5365. 80022ba: 4413 add r3, r2
  5366. 80022bc: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5367. 80022c0: 461a mov r2, r3
  5368. 80022c2: 2310 movs r3, #16
  5369. 80022c4: 6093 str r3, [r2, #8]
  5370. }
  5371. /* Clear Status Phase Received interrupt */
  5372. if ((epint & USB_OTG_DOEPINT_OTEPSPR) == USB_OTG_DOEPINT_OTEPSPR)
  5373. 80022c6: 693b ldr r3, [r7, #16]
  5374. 80022c8: f003 0320 and.w r3, r3, #32
  5375. 80022cc: 2b00 cmp r3, #0
  5376. 80022ce: d008 beq.n 80022e2 <HAL_PCD_IRQHandler+0x1f6>
  5377. {
  5378. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_OTEPSPR);
  5379. 80022d0: 6a7b ldr r3, [r7, #36] ; 0x24
  5380. 80022d2: 015a lsls r2, r3, #5
  5381. 80022d4: 69fb ldr r3, [r7, #28]
  5382. 80022d6: 4413 add r3, r2
  5383. 80022d8: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5384. 80022dc: 461a mov r2, r3
  5385. 80022de: 2320 movs r3, #32
  5386. 80022e0: 6093 str r3, [r2, #8]
  5387. }
  5388. /* Clear OUT NAK interrupt */
  5389. if ((epint & USB_OTG_DOEPINT_NAK) == USB_OTG_DOEPINT_NAK)
  5390. 80022e2: 693b ldr r3, [r7, #16]
  5391. 80022e4: f403 5300 and.w r3, r3, #8192 ; 0x2000
  5392. 80022e8: 2b00 cmp r3, #0
  5393. 80022ea: d009 beq.n 8002300 <HAL_PCD_IRQHandler+0x214>
  5394. {
  5395. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_NAK);
  5396. 80022ec: 6a7b ldr r3, [r7, #36] ; 0x24
  5397. 80022ee: 015a lsls r2, r3, #5
  5398. 80022f0: 69fb ldr r3, [r7, #28]
  5399. 80022f2: 4413 add r3, r2
  5400. 80022f4: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5401. 80022f8: 461a mov r2, r3
  5402. 80022fa: f44f 5300 mov.w r3, #8192 ; 0x2000
  5403. 80022fe: 6093 str r3, [r2, #8]
  5404. }
  5405. }
  5406. epnum++;
  5407. 8002300: 6a7b ldr r3, [r7, #36] ; 0x24
  5408. 8002302: 3301 adds r3, #1
  5409. 8002304: 627b str r3, [r7, #36] ; 0x24
  5410. ep_intr >>= 1U;
  5411. 8002306: 6abb ldr r3, [r7, #40] ; 0x28
  5412. 8002308: 085b lsrs r3, r3, #1
  5413. 800230a: 62bb str r3, [r7, #40] ; 0x28
  5414. while (ep_intr != 0U)
  5415. 800230c: 6abb ldr r3, [r7, #40] ; 0x28
  5416. 800230e: 2b00 cmp r3, #0
  5417. 8002310: d199 bne.n 8002246 <HAL_PCD_IRQHandler+0x15a>
  5418. }
  5419. }
  5420. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_IEPINT))
  5421. 8002312: 687b ldr r3, [r7, #4]
  5422. 8002314: 681b ldr r3, [r3, #0]
  5423. 8002316: 4618 mov r0, r3
  5424. 8002318: f004 fa95 bl 8006846 <USB_ReadInterrupts>
  5425. 800231c: 4603 mov r3, r0
  5426. 800231e: f403 2380 and.w r3, r3, #262144 ; 0x40000
  5427. 8002322: f5b3 2f80 cmp.w r3, #262144 ; 0x40000
  5428. 8002326: f040 80c0 bne.w 80024aa <HAL_PCD_IRQHandler+0x3be>
  5429. {
  5430. /* Read in the device interrupt bits */
  5431. ep_intr = USB_ReadDevAllInEpInterrupt(hpcd->Instance);
  5432. 800232a: 687b ldr r3, [r7, #4]
  5433. 800232c: 681b ldr r3, [r3, #0]
  5434. 800232e: 4618 mov r0, r3
  5435. 8002330: f004 fab6 bl 80068a0 <USB_ReadDevAllInEpInterrupt>
  5436. 8002334: 62b8 str r0, [r7, #40] ; 0x28
  5437. epnum = 0U;
  5438. 8002336: 2300 movs r3, #0
  5439. 8002338: 627b str r3, [r7, #36] ; 0x24
  5440. while (ep_intr != 0U)
  5441. 800233a: e0b2 b.n 80024a2 <HAL_PCD_IRQHandler+0x3b6>
  5442. {
  5443. if ((ep_intr & 0x1U) != 0U) /* In ITR */
  5444. 800233c: 6abb ldr r3, [r7, #40] ; 0x28
  5445. 800233e: f003 0301 and.w r3, r3, #1
  5446. 8002342: 2b00 cmp r3, #0
  5447. 8002344: f000 80a7 beq.w 8002496 <HAL_PCD_IRQHandler+0x3aa>
  5448. {
  5449. epint = USB_ReadDevInEPInterrupt(hpcd->Instance, (uint8_t)epnum);
  5450. 8002348: 687b ldr r3, [r7, #4]
  5451. 800234a: 681b ldr r3, [r3, #0]
  5452. 800234c: 6a7a ldr r2, [r7, #36] ; 0x24
  5453. 800234e: b2d2 uxtb r2, r2
  5454. 8002350: 4611 mov r1, r2
  5455. 8002352: 4618 mov r0, r3
  5456. 8002354: f004 fadc bl 8006910 <USB_ReadDevInEPInterrupt>
  5457. 8002358: 6138 str r0, [r7, #16]
  5458. if ((epint & USB_OTG_DIEPINT_XFRC) == USB_OTG_DIEPINT_XFRC)
  5459. 800235a: 693b ldr r3, [r7, #16]
  5460. 800235c: f003 0301 and.w r3, r3, #1
  5461. 8002360: 2b00 cmp r3, #0
  5462. 8002362: d057 beq.n 8002414 <HAL_PCD_IRQHandler+0x328>
  5463. {
  5464. fifoemptymsk = (uint32_t)(0x1UL << (epnum & EP_ADDR_MSK));
  5465. 8002364: 6a7b ldr r3, [r7, #36] ; 0x24
  5466. 8002366: f003 030f and.w r3, r3, #15
  5467. 800236a: 2201 movs r2, #1
  5468. 800236c: fa02 f303 lsl.w r3, r2, r3
  5469. 8002370: 60fb str r3, [r7, #12]
  5470. USBx_DEVICE->DIEPEMPMSK &= ~fifoemptymsk;
  5471. 8002372: 69fb ldr r3, [r7, #28]
  5472. 8002374: f503 6300 add.w r3, r3, #2048 ; 0x800
  5473. 8002378: 6b5a ldr r2, [r3, #52] ; 0x34
  5474. 800237a: 68fb ldr r3, [r7, #12]
  5475. 800237c: 43db mvns r3, r3
  5476. 800237e: 69f9 ldr r1, [r7, #28]
  5477. 8002380: f501 6100 add.w r1, r1, #2048 ; 0x800
  5478. 8002384: 4013 ands r3, r2
  5479. 8002386: 634b str r3, [r1, #52] ; 0x34
  5480. CLEAR_IN_EP_INTR(epnum, USB_OTG_DIEPINT_XFRC);
  5481. 8002388: 6a7b ldr r3, [r7, #36] ; 0x24
  5482. 800238a: 015a lsls r2, r3, #5
  5483. 800238c: 69fb ldr r3, [r7, #28]
  5484. 800238e: 4413 add r3, r2
  5485. 8002390: f503 6310 add.w r3, r3, #2304 ; 0x900
  5486. 8002394: 461a mov r2, r3
  5487. 8002396: 2301 movs r3, #1
  5488. 8002398: 6093 str r3, [r2, #8]
  5489. if (hpcd->Init.dma_enable == 1U)
  5490. 800239a: 687b ldr r3, [r7, #4]
  5491. 800239c: 691b ldr r3, [r3, #16]
  5492. 800239e: 2b01 cmp r3, #1
  5493. 80023a0: d132 bne.n 8002408 <HAL_PCD_IRQHandler+0x31c>
  5494. {
  5495. hpcd->IN_ep[epnum].xfer_buff += hpcd->IN_ep[epnum].maxpacket;
  5496. 80023a2: 6879 ldr r1, [r7, #4]
  5497. 80023a4: 6a7a ldr r2, [r7, #36] ; 0x24
  5498. 80023a6: 4613 mov r3, r2
  5499. 80023a8: 00db lsls r3, r3, #3
  5500. 80023aa: 1a9b subs r3, r3, r2
  5501. 80023ac: 009b lsls r3, r3, #2
  5502. 80023ae: 440b add r3, r1
  5503. 80023b0: 3348 adds r3, #72 ; 0x48
  5504. 80023b2: 6819 ldr r1, [r3, #0]
  5505. 80023b4: 6878 ldr r0, [r7, #4]
  5506. 80023b6: 6a7a ldr r2, [r7, #36] ; 0x24
  5507. 80023b8: 4613 mov r3, r2
  5508. 80023ba: 00db lsls r3, r3, #3
  5509. 80023bc: 1a9b subs r3, r3, r2
  5510. 80023be: 009b lsls r3, r3, #2
  5511. 80023c0: 4403 add r3, r0
  5512. 80023c2: 3344 adds r3, #68 ; 0x44
  5513. 80023c4: 681b ldr r3, [r3, #0]
  5514. 80023c6: 4419 add r1, r3
  5515. 80023c8: 6878 ldr r0, [r7, #4]
  5516. 80023ca: 6a7a ldr r2, [r7, #36] ; 0x24
  5517. 80023cc: 4613 mov r3, r2
  5518. 80023ce: 00db lsls r3, r3, #3
  5519. 80023d0: 1a9b subs r3, r3, r2
  5520. 80023d2: 009b lsls r3, r3, #2
  5521. 80023d4: 4403 add r3, r0
  5522. 80023d6: 3348 adds r3, #72 ; 0x48
  5523. 80023d8: 6019 str r1, [r3, #0]
  5524. /* this is ZLP, so prepare EP0 for next setup */
  5525. if ((epnum == 0U) && (hpcd->IN_ep[epnum].xfer_len == 0U))
  5526. 80023da: 6a7b ldr r3, [r7, #36] ; 0x24
  5527. 80023dc: 2b00 cmp r3, #0
  5528. 80023de: d113 bne.n 8002408 <HAL_PCD_IRQHandler+0x31c>
  5529. 80023e0: 6879 ldr r1, [r7, #4]
  5530. 80023e2: 6a7a ldr r2, [r7, #36] ; 0x24
  5531. 80023e4: 4613 mov r3, r2
  5532. 80023e6: 00db lsls r3, r3, #3
  5533. 80023e8: 1a9b subs r3, r3, r2
  5534. 80023ea: 009b lsls r3, r3, #2
  5535. 80023ec: 440b add r3, r1
  5536. 80023ee: 3350 adds r3, #80 ; 0x50
  5537. 80023f0: 681b ldr r3, [r3, #0]
  5538. 80023f2: 2b00 cmp r3, #0
  5539. 80023f4: d108 bne.n 8002408 <HAL_PCD_IRQHandler+0x31c>
  5540. {
  5541. /* prepare to rx more setup packets */
  5542. (void)USB_EP0_OutStart(hpcd->Instance, 1U, (uint8_t *)hpcd->Setup);
  5543. 80023f6: 687b ldr r3, [r7, #4]
  5544. 80023f8: 6818 ldr r0, [r3, #0]
  5545. 80023fa: 687b ldr r3, [r7, #4]
  5546. 80023fc: f503 7371 add.w r3, r3, #964 ; 0x3c4
  5547. 8002400: 461a mov r2, r3
  5548. 8002402: 2101 movs r1, #1
  5549. 8002404: f004 fae4 bl 80069d0 <USB_EP0_OutStart>
  5550. }
  5551. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  5552. hpcd->DataInStageCallback(hpcd, (uint8_t)epnum);
  5553. #else
  5554. HAL_PCD_DataInStageCallback(hpcd, (uint8_t)epnum);
  5555. 8002408: 6a7b ldr r3, [r7, #36] ; 0x24
  5556. 800240a: b2db uxtb r3, r3
  5557. 800240c: 4619 mov r1, r3
  5558. 800240e: 6878 ldr r0, [r7, #4]
  5559. 8002410: f006 fa8d bl 800892e <HAL_PCD_DataInStageCallback>
  5560. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  5561. }
  5562. if ((epint & USB_OTG_DIEPINT_TOC) == USB_OTG_DIEPINT_TOC)
  5563. 8002414: 693b ldr r3, [r7, #16]
  5564. 8002416: f003 0308 and.w r3, r3, #8
  5565. 800241a: 2b00 cmp r3, #0
  5566. 800241c: d008 beq.n 8002430 <HAL_PCD_IRQHandler+0x344>
  5567. {
  5568. CLEAR_IN_EP_INTR(epnum, USB_OTG_DIEPINT_TOC);
  5569. 800241e: 6a7b ldr r3, [r7, #36] ; 0x24
  5570. 8002420: 015a lsls r2, r3, #5
  5571. 8002422: 69fb ldr r3, [r7, #28]
  5572. 8002424: 4413 add r3, r2
  5573. 8002426: f503 6310 add.w r3, r3, #2304 ; 0x900
  5574. 800242a: 461a mov r2, r3
  5575. 800242c: 2308 movs r3, #8
  5576. 800242e: 6093 str r3, [r2, #8]
  5577. }
  5578. if ((epint & USB_OTG_DIEPINT_ITTXFE) == USB_OTG_DIEPINT_ITTXFE)
  5579. 8002430: 693b ldr r3, [r7, #16]
  5580. 8002432: f003 0310 and.w r3, r3, #16
  5581. 8002436: 2b00 cmp r3, #0
  5582. 8002438: d008 beq.n 800244c <HAL_PCD_IRQHandler+0x360>
  5583. {
  5584. CLEAR_IN_EP_INTR(epnum, USB_OTG_DIEPINT_ITTXFE);
  5585. 800243a: 6a7b ldr r3, [r7, #36] ; 0x24
  5586. 800243c: 015a lsls r2, r3, #5
  5587. 800243e: 69fb ldr r3, [r7, #28]
  5588. 8002440: 4413 add r3, r2
  5589. 8002442: f503 6310 add.w r3, r3, #2304 ; 0x900
  5590. 8002446: 461a mov r2, r3
  5591. 8002448: 2310 movs r3, #16
  5592. 800244a: 6093 str r3, [r2, #8]
  5593. }
  5594. if ((epint & USB_OTG_DIEPINT_INEPNE) == USB_OTG_DIEPINT_INEPNE)
  5595. 800244c: 693b ldr r3, [r7, #16]
  5596. 800244e: f003 0340 and.w r3, r3, #64 ; 0x40
  5597. 8002452: 2b00 cmp r3, #0
  5598. 8002454: d008 beq.n 8002468 <HAL_PCD_IRQHandler+0x37c>
  5599. {
  5600. CLEAR_IN_EP_INTR(epnum, USB_OTG_DIEPINT_INEPNE);
  5601. 8002456: 6a7b ldr r3, [r7, #36] ; 0x24
  5602. 8002458: 015a lsls r2, r3, #5
  5603. 800245a: 69fb ldr r3, [r7, #28]
  5604. 800245c: 4413 add r3, r2
  5605. 800245e: f503 6310 add.w r3, r3, #2304 ; 0x900
  5606. 8002462: 461a mov r2, r3
  5607. 8002464: 2340 movs r3, #64 ; 0x40
  5608. 8002466: 6093 str r3, [r2, #8]
  5609. }
  5610. if ((epint & USB_OTG_DIEPINT_EPDISD) == USB_OTG_DIEPINT_EPDISD)
  5611. 8002468: 693b ldr r3, [r7, #16]
  5612. 800246a: f003 0302 and.w r3, r3, #2
  5613. 800246e: 2b00 cmp r3, #0
  5614. 8002470: d008 beq.n 8002484 <HAL_PCD_IRQHandler+0x398>
  5615. {
  5616. CLEAR_IN_EP_INTR(epnum, USB_OTG_DIEPINT_EPDISD);
  5617. 8002472: 6a7b ldr r3, [r7, #36] ; 0x24
  5618. 8002474: 015a lsls r2, r3, #5
  5619. 8002476: 69fb ldr r3, [r7, #28]
  5620. 8002478: 4413 add r3, r2
  5621. 800247a: f503 6310 add.w r3, r3, #2304 ; 0x900
  5622. 800247e: 461a mov r2, r3
  5623. 8002480: 2302 movs r3, #2
  5624. 8002482: 6093 str r3, [r2, #8]
  5625. }
  5626. if ((epint & USB_OTG_DIEPINT_TXFE) == USB_OTG_DIEPINT_TXFE)
  5627. 8002484: 693b ldr r3, [r7, #16]
  5628. 8002486: f003 0380 and.w r3, r3, #128 ; 0x80
  5629. 800248a: 2b00 cmp r3, #0
  5630. 800248c: d003 beq.n 8002496 <HAL_PCD_IRQHandler+0x3aa>
  5631. {
  5632. (void)PCD_WriteEmptyTxFifo(hpcd, epnum);
  5633. 800248e: 6a79 ldr r1, [r7, #36] ; 0x24
  5634. 8002490: 6878 ldr r0, [r7, #4]
  5635. 8002492: f000 fc48 bl 8002d26 <PCD_WriteEmptyTxFifo>
  5636. }
  5637. }
  5638. epnum++;
  5639. 8002496: 6a7b ldr r3, [r7, #36] ; 0x24
  5640. 8002498: 3301 adds r3, #1
  5641. 800249a: 627b str r3, [r7, #36] ; 0x24
  5642. ep_intr >>= 1U;
  5643. 800249c: 6abb ldr r3, [r7, #40] ; 0x28
  5644. 800249e: 085b lsrs r3, r3, #1
  5645. 80024a0: 62bb str r3, [r7, #40] ; 0x28
  5646. while (ep_intr != 0U)
  5647. 80024a2: 6abb ldr r3, [r7, #40] ; 0x28
  5648. 80024a4: 2b00 cmp r3, #0
  5649. 80024a6: f47f af49 bne.w 800233c <HAL_PCD_IRQHandler+0x250>
  5650. }
  5651. }
  5652. /* Handle Resume Interrupt */
  5653. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_WKUINT))
  5654. 80024aa: 687b ldr r3, [r7, #4]
  5655. 80024ac: 681b ldr r3, [r3, #0]
  5656. 80024ae: 4618 mov r0, r3
  5657. 80024b0: f004 f9c9 bl 8006846 <USB_ReadInterrupts>
  5658. 80024b4: 4603 mov r3, r0
  5659. 80024b6: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
  5660. 80024ba: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
  5661. 80024be: d122 bne.n 8002506 <HAL_PCD_IRQHandler+0x41a>
  5662. {
  5663. /* Clear the Remote Wake-up Signaling */
  5664. USBx_DEVICE->DCTL &= ~USB_OTG_DCTL_RWUSIG;
  5665. 80024c0: 69fb ldr r3, [r7, #28]
  5666. 80024c2: f503 6300 add.w r3, r3, #2048 ; 0x800
  5667. 80024c6: 685b ldr r3, [r3, #4]
  5668. 80024c8: 69fa ldr r2, [r7, #28]
  5669. 80024ca: f502 6200 add.w r2, r2, #2048 ; 0x800
  5670. 80024ce: f023 0301 bic.w r3, r3, #1
  5671. 80024d2: 6053 str r3, [r2, #4]
  5672. if (hpcd->LPM_State == LPM_L1)
  5673. 80024d4: 687b ldr r3, [r7, #4]
  5674. 80024d6: f893 33f4 ldrb.w r3, [r3, #1012] ; 0x3f4
  5675. 80024da: 2b01 cmp r3, #1
  5676. 80024dc: d108 bne.n 80024f0 <HAL_PCD_IRQHandler+0x404>
  5677. {
  5678. hpcd->LPM_State = LPM_L0;
  5679. 80024de: 687b ldr r3, [r7, #4]
  5680. 80024e0: 2200 movs r2, #0
  5681. 80024e2: f883 23f4 strb.w r2, [r3, #1012] ; 0x3f4
  5682. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  5683. hpcd->LPMCallback(hpcd, PCD_LPM_L0_ACTIVE);
  5684. #else
  5685. HAL_PCDEx_LPM_Callback(hpcd, PCD_LPM_L0_ACTIVE);
  5686. 80024e6: 2100 movs r1, #0
  5687. 80024e8: 6878 ldr r0, [r7, #4]
  5688. 80024ea: f006 fc6f bl 8008dcc <HAL_PCDEx_LPM_Callback>
  5689. 80024ee: e002 b.n 80024f6 <HAL_PCD_IRQHandler+0x40a>
  5690. else
  5691. {
  5692. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  5693. hpcd->ResumeCallback(hpcd);
  5694. #else
  5695. HAL_PCD_ResumeCallback(hpcd);
  5696. 80024f0: 6878 ldr r0, [r7, #4]
  5697. 80024f2: f006 fa93 bl 8008a1c <HAL_PCD_ResumeCallback>
  5698. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  5699. }
  5700. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_WKUINT);
  5701. 80024f6: 687b ldr r3, [r7, #4]
  5702. 80024f8: 681b ldr r3, [r3, #0]
  5703. 80024fa: 695a ldr r2, [r3, #20]
  5704. 80024fc: 687b ldr r3, [r7, #4]
  5705. 80024fe: 681b ldr r3, [r3, #0]
  5706. 8002500: f002 4200 and.w r2, r2, #2147483648 ; 0x80000000
  5707. 8002504: 615a str r2, [r3, #20]
  5708. }
  5709. /* Handle Suspend Interrupt */
  5710. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_USBSUSP))
  5711. 8002506: 687b ldr r3, [r7, #4]
  5712. 8002508: 681b ldr r3, [r3, #0]
  5713. 800250a: 4618 mov r0, r3
  5714. 800250c: f004 f99b bl 8006846 <USB_ReadInterrupts>
  5715. 8002510: 4603 mov r3, r0
  5716. 8002512: f403 6300 and.w r3, r3, #2048 ; 0x800
  5717. 8002516: f5b3 6f00 cmp.w r3, #2048 ; 0x800
  5718. 800251a: d112 bne.n 8002542 <HAL_PCD_IRQHandler+0x456>
  5719. {
  5720. if ((USBx_DEVICE->DSTS & USB_OTG_DSTS_SUSPSTS) == USB_OTG_DSTS_SUSPSTS)
  5721. 800251c: 69fb ldr r3, [r7, #28]
  5722. 800251e: f503 6300 add.w r3, r3, #2048 ; 0x800
  5723. 8002522: 689b ldr r3, [r3, #8]
  5724. 8002524: f003 0301 and.w r3, r3, #1
  5725. 8002528: 2b01 cmp r3, #1
  5726. 800252a: d102 bne.n 8002532 <HAL_PCD_IRQHandler+0x446>
  5727. {
  5728. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  5729. hpcd->SuspendCallback(hpcd);
  5730. #else
  5731. HAL_PCD_SuspendCallback(hpcd);
  5732. 800252c: 6878 ldr r0, [r7, #4]
  5733. 800252e: f006 fa4f bl 80089d0 <HAL_PCD_SuspendCallback>
  5734. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  5735. }
  5736. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_USBSUSP);
  5737. 8002532: 687b ldr r3, [r7, #4]
  5738. 8002534: 681b ldr r3, [r3, #0]
  5739. 8002536: 695a ldr r2, [r3, #20]
  5740. 8002538: 687b ldr r3, [r7, #4]
  5741. 800253a: 681b ldr r3, [r3, #0]
  5742. 800253c: f402 6200 and.w r2, r2, #2048 ; 0x800
  5743. 8002540: 615a str r2, [r3, #20]
  5744. }
  5745. #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  5746. /* Handle LPM Interrupt */
  5747. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_LPMINT))
  5748. 8002542: 687b ldr r3, [r7, #4]
  5749. 8002544: 681b ldr r3, [r3, #0]
  5750. 8002546: 4618 mov r0, r3
  5751. 8002548: f004 f97d bl 8006846 <USB_ReadInterrupts>
  5752. 800254c: 4603 mov r3, r0
  5753. 800254e: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
  5754. 8002552: f1b3 6f00 cmp.w r3, #134217728 ; 0x8000000
  5755. 8002556: d121 bne.n 800259c <HAL_PCD_IRQHandler+0x4b0>
  5756. {
  5757. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_LPMINT);
  5758. 8002558: 687b ldr r3, [r7, #4]
  5759. 800255a: 681b ldr r3, [r3, #0]
  5760. 800255c: 695a ldr r2, [r3, #20]
  5761. 800255e: 687b ldr r3, [r7, #4]
  5762. 8002560: 681b ldr r3, [r3, #0]
  5763. 8002562: f002 6200 and.w r2, r2, #134217728 ; 0x8000000
  5764. 8002566: 615a str r2, [r3, #20]
  5765. if (hpcd->LPM_State == LPM_L0)
  5766. 8002568: 687b ldr r3, [r7, #4]
  5767. 800256a: f893 33f4 ldrb.w r3, [r3, #1012] ; 0x3f4
  5768. 800256e: 2b00 cmp r3, #0
  5769. 8002570: d111 bne.n 8002596 <HAL_PCD_IRQHandler+0x4aa>
  5770. {
  5771. hpcd->LPM_State = LPM_L1;
  5772. 8002572: 687b ldr r3, [r7, #4]
  5773. 8002574: 2201 movs r2, #1
  5774. 8002576: f883 23f4 strb.w r2, [r3, #1012] ; 0x3f4
  5775. hpcd->BESL = (hpcd->Instance->GLPMCFG & USB_OTG_GLPMCFG_BESL) >> 2U;
  5776. 800257a: 687b ldr r3, [r7, #4]
  5777. 800257c: 681b ldr r3, [r3, #0]
  5778. 800257e: 6d5b ldr r3, [r3, #84] ; 0x54
  5779. 8002580: 089b lsrs r3, r3, #2
  5780. 8002582: f003 020f and.w r2, r3, #15
  5781. 8002586: 687b ldr r3, [r7, #4]
  5782. 8002588: f8c3 23f8 str.w r2, [r3, #1016] ; 0x3f8
  5783. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  5784. hpcd->LPMCallback(hpcd, PCD_LPM_L1_ACTIVE);
  5785. #else
  5786. HAL_PCDEx_LPM_Callback(hpcd, PCD_LPM_L1_ACTIVE);
  5787. 800258c: 2101 movs r1, #1
  5788. 800258e: 6878 ldr r0, [r7, #4]
  5789. 8002590: f006 fc1c bl 8008dcc <HAL_PCDEx_LPM_Callback>
  5790. 8002594: e002 b.n 800259c <HAL_PCD_IRQHandler+0x4b0>
  5791. else
  5792. {
  5793. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  5794. hpcd->SuspendCallback(hpcd);
  5795. #else
  5796. HAL_PCD_SuspendCallback(hpcd);
  5797. 8002596: 6878 ldr r0, [r7, #4]
  5798. 8002598: f006 fa1a bl 80089d0 <HAL_PCD_SuspendCallback>
  5799. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  5800. }
  5801. }
  5802. #endif /* defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) */
  5803. /* Handle Reset Interrupt */
  5804. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_USBRST))
  5805. 800259c: 687b ldr r3, [r7, #4]
  5806. 800259e: 681b ldr r3, [r3, #0]
  5807. 80025a0: 4618 mov r0, r3
  5808. 80025a2: f004 f950 bl 8006846 <USB_ReadInterrupts>
  5809. 80025a6: 4603 mov r3, r0
  5810. 80025a8: f403 5380 and.w r3, r3, #4096 ; 0x1000
  5811. 80025ac: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
  5812. 80025b0: f040 80c7 bne.w 8002742 <HAL_PCD_IRQHandler+0x656>
  5813. {
  5814. USBx_DEVICE->DCTL &= ~USB_OTG_DCTL_RWUSIG;
  5815. 80025b4: 69fb ldr r3, [r7, #28]
  5816. 80025b6: f503 6300 add.w r3, r3, #2048 ; 0x800
  5817. 80025ba: 685b ldr r3, [r3, #4]
  5818. 80025bc: 69fa ldr r2, [r7, #28]
  5819. 80025be: f502 6200 add.w r2, r2, #2048 ; 0x800
  5820. 80025c2: f023 0301 bic.w r3, r3, #1
  5821. 80025c6: 6053 str r3, [r2, #4]
  5822. (void)USB_FlushTxFifo(hpcd->Instance, 0x10U);
  5823. 80025c8: 687b ldr r3, [r7, #4]
  5824. 80025ca: 681b ldr r3, [r3, #0]
  5825. 80025cc: 2110 movs r1, #16
  5826. 80025ce: 4618 mov r0, r3
  5827. 80025d0: f003 f9ea bl 80059a8 <USB_FlushTxFifo>
  5828. for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
  5829. 80025d4: 2300 movs r3, #0
  5830. 80025d6: 62fb str r3, [r7, #44] ; 0x2c
  5831. 80025d8: e056 b.n 8002688 <HAL_PCD_IRQHandler+0x59c>
  5832. {
  5833. USBx_INEP(i)->DIEPINT = 0xFB7FU;
  5834. 80025da: 6afb ldr r3, [r7, #44] ; 0x2c
  5835. 80025dc: 015a lsls r2, r3, #5
  5836. 80025de: 69fb ldr r3, [r7, #28]
  5837. 80025e0: 4413 add r3, r2
  5838. 80025e2: f503 6310 add.w r3, r3, #2304 ; 0x900
  5839. 80025e6: 461a mov r2, r3
  5840. 80025e8: f64f 337f movw r3, #64383 ; 0xfb7f
  5841. 80025ec: 6093 str r3, [r2, #8]
  5842. USBx_INEP(i)->DIEPCTL &= ~USB_OTG_DIEPCTL_STALL;
  5843. 80025ee: 6afb ldr r3, [r7, #44] ; 0x2c
  5844. 80025f0: 015a lsls r2, r3, #5
  5845. 80025f2: 69fb ldr r3, [r7, #28]
  5846. 80025f4: 4413 add r3, r2
  5847. 80025f6: f503 6310 add.w r3, r3, #2304 ; 0x900
  5848. 80025fa: 681b ldr r3, [r3, #0]
  5849. 80025fc: 6afa ldr r2, [r7, #44] ; 0x2c
  5850. 80025fe: 0151 lsls r1, r2, #5
  5851. 8002600: 69fa ldr r2, [r7, #28]
  5852. 8002602: 440a add r2, r1
  5853. 8002604: f502 6210 add.w r2, r2, #2304 ; 0x900
  5854. 8002608: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
  5855. 800260c: 6013 str r3, [r2, #0]
  5856. USBx_INEP(i)->DIEPCTL |= USB_OTG_DIEPCTL_SNAK;
  5857. 800260e: 6afb ldr r3, [r7, #44] ; 0x2c
  5858. 8002610: 015a lsls r2, r3, #5
  5859. 8002612: 69fb ldr r3, [r7, #28]
  5860. 8002614: 4413 add r3, r2
  5861. 8002616: f503 6310 add.w r3, r3, #2304 ; 0x900
  5862. 800261a: 681b ldr r3, [r3, #0]
  5863. 800261c: 6afa ldr r2, [r7, #44] ; 0x2c
  5864. 800261e: 0151 lsls r1, r2, #5
  5865. 8002620: 69fa ldr r2, [r7, #28]
  5866. 8002622: 440a add r2, r1
  5867. 8002624: f502 6210 add.w r2, r2, #2304 ; 0x900
  5868. 8002628: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
  5869. 800262c: 6013 str r3, [r2, #0]
  5870. USBx_OUTEP(i)->DOEPINT = 0xFB7FU;
  5871. 800262e: 6afb ldr r3, [r7, #44] ; 0x2c
  5872. 8002630: 015a lsls r2, r3, #5
  5873. 8002632: 69fb ldr r3, [r7, #28]
  5874. 8002634: 4413 add r3, r2
  5875. 8002636: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5876. 800263a: 461a mov r2, r3
  5877. 800263c: f64f 337f movw r3, #64383 ; 0xfb7f
  5878. 8002640: 6093 str r3, [r2, #8]
  5879. USBx_OUTEP(i)->DOEPCTL &= ~USB_OTG_DOEPCTL_STALL;
  5880. 8002642: 6afb ldr r3, [r7, #44] ; 0x2c
  5881. 8002644: 015a lsls r2, r3, #5
  5882. 8002646: 69fb ldr r3, [r7, #28]
  5883. 8002648: 4413 add r3, r2
  5884. 800264a: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5885. 800264e: 681b ldr r3, [r3, #0]
  5886. 8002650: 6afa ldr r2, [r7, #44] ; 0x2c
  5887. 8002652: 0151 lsls r1, r2, #5
  5888. 8002654: 69fa ldr r2, [r7, #28]
  5889. 8002656: 440a add r2, r1
  5890. 8002658: f502 6230 add.w r2, r2, #2816 ; 0xb00
  5891. 800265c: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
  5892. 8002660: 6013 str r3, [r2, #0]
  5893. USBx_OUTEP(i)->DOEPCTL |= USB_OTG_DOEPCTL_SNAK;
  5894. 8002662: 6afb ldr r3, [r7, #44] ; 0x2c
  5895. 8002664: 015a lsls r2, r3, #5
  5896. 8002666: 69fb ldr r3, [r7, #28]
  5897. 8002668: 4413 add r3, r2
  5898. 800266a: f503 6330 add.w r3, r3, #2816 ; 0xb00
  5899. 800266e: 681b ldr r3, [r3, #0]
  5900. 8002670: 6afa ldr r2, [r7, #44] ; 0x2c
  5901. 8002672: 0151 lsls r1, r2, #5
  5902. 8002674: 69fa ldr r2, [r7, #28]
  5903. 8002676: 440a add r2, r1
  5904. 8002678: f502 6230 add.w r2, r2, #2816 ; 0xb00
  5905. 800267c: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
  5906. 8002680: 6013 str r3, [r2, #0]
  5907. for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
  5908. 8002682: 6afb ldr r3, [r7, #44] ; 0x2c
  5909. 8002684: 3301 adds r3, #1
  5910. 8002686: 62fb str r3, [r7, #44] ; 0x2c
  5911. 8002688: 687b ldr r3, [r7, #4]
  5912. 800268a: 685b ldr r3, [r3, #4]
  5913. 800268c: 6afa ldr r2, [r7, #44] ; 0x2c
  5914. 800268e: 429a cmp r2, r3
  5915. 8002690: d3a3 bcc.n 80025da <HAL_PCD_IRQHandler+0x4ee>
  5916. }
  5917. USBx_DEVICE->DAINTMSK |= 0x10001U;
  5918. 8002692: 69fb ldr r3, [r7, #28]
  5919. 8002694: f503 6300 add.w r3, r3, #2048 ; 0x800
  5920. 8002698: 69db ldr r3, [r3, #28]
  5921. 800269a: 69fa ldr r2, [r7, #28]
  5922. 800269c: f502 6200 add.w r2, r2, #2048 ; 0x800
  5923. 80026a0: f043 1301 orr.w r3, r3, #65537 ; 0x10001
  5924. 80026a4: 61d3 str r3, [r2, #28]
  5925. if (hpcd->Init.use_dedicated_ep1 != 0U)
  5926. 80026a6: 687b ldr r3, [r7, #4]
  5927. 80026a8: 6b1b ldr r3, [r3, #48] ; 0x30
  5928. 80026aa: 2b00 cmp r3, #0
  5929. 80026ac: d016 beq.n 80026dc <HAL_PCD_IRQHandler+0x5f0>
  5930. {
  5931. USBx_DEVICE->DOUTEP1MSK |= USB_OTG_DOEPMSK_STUPM |
  5932. 80026ae: 69fb ldr r3, [r7, #28]
  5933. 80026b0: f503 6300 add.w r3, r3, #2048 ; 0x800
  5934. 80026b4: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
  5935. 80026b8: 69fa ldr r2, [r7, #28]
  5936. 80026ba: f502 6200 add.w r2, r2, #2048 ; 0x800
  5937. 80026be: f043 030b orr.w r3, r3, #11
  5938. 80026c2: f8c2 3084 str.w r3, [r2, #132] ; 0x84
  5939. USB_OTG_DOEPMSK_XFRCM |
  5940. USB_OTG_DOEPMSK_EPDM;
  5941. USBx_DEVICE->DINEP1MSK |= USB_OTG_DIEPMSK_TOM |
  5942. 80026c6: 69fb ldr r3, [r7, #28]
  5943. 80026c8: f503 6300 add.w r3, r3, #2048 ; 0x800
  5944. 80026cc: 6c5b ldr r3, [r3, #68] ; 0x44
  5945. 80026ce: 69fa ldr r2, [r7, #28]
  5946. 80026d0: f502 6200 add.w r2, r2, #2048 ; 0x800
  5947. 80026d4: f043 030b orr.w r3, r3, #11
  5948. 80026d8: 6453 str r3, [r2, #68] ; 0x44
  5949. 80026da: e015 b.n 8002708 <HAL_PCD_IRQHandler+0x61c>
  5950. USB_OTG_DIEPMSK_XFRCM |
  5951. USB_OTG_DIEPMSK_EPDM;
  5952. }
  5953. else
  5954. {
  5955. USBx_DEVICE->DOEPMSK |= USB_OTG_DOEPMSK_STUPM |
  5956. 80026dc: 69fb ldr r3, [r7, #28]
  5957. 80026de: f503 6300 add.w r3, r3, #2048 ; 0x800
  5958. 80026e2: 695b ldr r3, [r3, #20]
  5959. 80026e4: 69fa ldr r2, [r7, #28]
  5960. 80026e6: f502 6200 add.w r2, r2, #2048 ; 0x800
  5961. 80026ea: f443 5300 orr.w r3, r3, #8192 ; 0x2000
  5962. 80026ee: f043 032b orr.w r3, r3, #43 ; 0x2b
  5963. 80026f2: 6153 str r3, [r2, #20]
  5964. USB_OTG_DOEPMSK_XFRCM |
  5965. USB_OTG_DOEPMSK_EPDM |
  5966. USB_OTG_DOEPMSK_OTEPSPRM |
  5967. USB_OTG_DOEPMSK_NAKM;
  5968. USBx_DEVICE->DIEPMSK |= USB_OTG_DIEPMSK_TOM |
  5969. 80026f4: 69fb ldr r3, [r7, #28]
  5970. 80026f6: f503 6300 add.w r3, r3, #2048 ; 0x800
  5971. 80026fa: 691b ldr r3, [r3, #16]
  5972. 80026fc: 69fa ldr r2, [r7, #28]
  5973. 80026fe: f502 6200 add.w r2, r2, #2048 ; 0x800
  5974. 8002702: f043 030b orr.w r3, r3, #11
  5975. 8002706: 6113 str r3, [r2, #16]
  5976. USB_OTG_DIEPMSK_XFRCM |
  5977. USB_OTG_DIEPMSK_EPDM;
  5978. }
  5979. /* Set Default Address to 0 */
  5980. USBx_DEVICE->DCFG &= ~USB_OTG_DCFG_DAD;
  5981. 8002708: 69fb ldr r3, [r7, #28]
  5982. 800270a: f503 6300 add.w r3, r3, #2048 ; 0x800
  5983. 800270e: 681b ldr r3, [r3, #0]
  5984. 8002710: 69fa ldr r2, [r7, #28]
  5985. 8002712: f502 6200 add.w r2, r2, #2048 ; 0x800
  5986. 8002716: f423 63fe bic.w r3, r3, #2032 ; 0x7f0
  5987. 800271a: 6013 str r3, [r2, #0]
  5988. /* setup EP0 to receive SETUP packets */
  5989. (void)USB_EP0_OutStart(hpcd->Instance, (uint8_t)hpcd->Init.dma_enable,
  5990. 800271c: 687b ldr r3, [r7, #4]
  5991. 800271e: 6818 ldr r0, [r3, #0]
  5992. 8002720: 687b ldr r3, [r7, #4]
  5993. 8002722: 691b ldr r3, [r3, #16]
  5994. 8002724: b2d9 uxtb r1, r3
  5995. (uint8_t *)hpcd->Setup);
  5996. 8002726: 687b ldr r3, [r7, #4]
  5997. 8002728: f503 7371 add.w r3, r3, #964 ; 0x3c4
  5998. (void)USB_EP0_OutStart(hpcd->Instance, (uint8_t)hpcd->Init.dma_enable,
  5999. 800272c: 461a mov r2, r3
  6000. 800272e: f004 f94f bl 80069d0 <USB_EP0_OutStart>
  6001. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_USBRST);
  6002. 8002732: 687b ldr r3, [r7, #4]
  6003. 8002734: 681b ldr r3, [r3, #0]
  6004. 8002736: 695a ldr r2, [r3, #20]
  6005. 8002738: 687b ldr r3, [r7, #4]
  6006. 800273a: 681b ldr r3, [r3, #0]
  6007. 800273c: f402 5280 and.w r2, r2, #4096 ; 0x1000
  6008. 8002740: 615a str r2, [r3, #20]
  6009. }
  6010. /* Handle Enumeration done Interrupt */
  6011. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_ENUMDNE))
  6012. 8002742: 687b ldr r3, [r7, #4]
  6013. 8002744: 681b ldr r3, [r3, #0]
  6014. 8002746: 4618 mov r0, r3
  6015. 8002748: f004 f87d bl 8006846 <USB_ReadInterrupts>
  6016. 800274c: 4603 mov r3, r0
  6017. 800274e: f403 5300 and.w r3, r3, #8192 ; 0x2000
  6018. 8002752: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
  6019. 8002756: d124 bne.n 80027a2 <HAL_PCD_IRQHandler+0x6b6>
  6020. {
  6021. (void)USB_ActivateSetup(hpcd->Instance);
  6022. 8002758: 687b ldr r3, [r7, #4]
  6023. 800275a: 681b ldr r3, [r3, #0]
  6024. 800275c: 4618 mov r0, r3
  6025. 800275e: f004 f913 bl 8006988 <USB_ActivateSetup>
  6026. hpcd->Init.speed = USB_GetDevSpeed(hpcd->Instance);
  6027. 8002762: 687b ldr r3, [r7, #4]
  6028. 8002764: 681b ldr r3, [r3, #0]
  6029. 8002766: 4618 mov r0, r3
  6030. 8002768: f003 f97b bl 8005a62 <USB_GetDevSpeed>
  6031. 800276c: 4603 mov r3, r0
  6032. 800276e: 461a mov r2, r3
  6033. 8002770: 687b ldr r3, [r7, #4]
  6034. 8002772: 60da str r2, [r3, #12]
  6035. /* Set USB Turnaround time */
  6036. (void)USB_SetTurnaroundTime(hpcd->Instance,
  6037. 8002774: 687b ldr r3, [r7, #4]
  6038. 8002776: 681c ldr r4, [r3, #0]
  6039. 8002778: f000 fe16 bl 80033a8 <HAL_RCC_GetHCLKFreq>
  6040. 800277c: 4601 mov r1, r0
  6041. HAL_RCC_GetHCLKFreq(),
  6042. (uint8_t)hpcd->Init.speed);
  6043. 800277e: 687b ldr r3, [r7, #4]
  6044. 8002780: 68db ldr r3, [r3, #12]
  6045. (void)USB_SetTurnaroundTime(hpcd->Instance,
  6046. 8002782: b2db uxtb r3, r3
  6047. 8002784: 461a mov r2, r3
  6048. 8002786: 4620 mov r0, r4
  6049. 8002788: f002 fea0 bl 80054cc <USB_SetTurnaroundTime>
  6050. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  6051. hpcd->ResetCallback(hpcd);
  6052. #else
  6053. HAL_PCD_ResetCallback(hpcd);
  6054. 800278c: 6878 ldr r0, [r7, #4]
  6055. 800278e: f006 f8f6 bl 800897e <HAL_PCD_ResetCallback>
  6056. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  6057. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_ENUMDNE);
  6058. 8002792: 687b ldr r3, [r7, #4]
  6059. 8002794: 681b ldr r3, [r3, #0]
  6060. 8002796: 695a ldr r2, [r3, #20]
  6061. 8002798: 687b ldr r3, [r7, #4]
  6062. 800279a: 681b ldr r3, [r3, #0]
  6063. 800279c: f402 5200 and.w r2, r2, #8192 ; 0x2000
  6064. 80027a0: 615a str r2, [r3, #20]
  6065. }
  6066. /* Handle SOF Interrupt */
  6067. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_SOF))
  6068. 80027a2: 687b ldr r3, [r7, #4]
  6069. 80027a4: 681b ldr r3, [r3, #0]
  6070. 80027a6: 4618 mov r0, r3
  6071. 80027a8: f004 f84d bl 8006846 <USB_ReadInterrupts>
  6072. 80027ac: 4603 mov r3, r0
  6073. 80027ae: f003 0308 and.w r3, r3, #8
  6074. 80027b2: 2b08 cmp r3, #8
  6075. 80027b4: d10a bne.n 80027cc <HAL_PCD_IRQHandler+0x6e0>
  6076. {
  6077. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  6078. hpcd->SOFCallback(hpcd);
  6079. #else
  6080. HAL_PCD_SOFCallback(hpcd);
  6081. 80027b6: 6878 ldr r0, [r7, #4]
  6082. 80027b8: f006 f8d3 bl 8008962 <HAL_PCD_SOFCallback>
  6083. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  6084. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_SOF);
  6085. 80027bc: 687b ldr r3, [r7, #4]
  6086. 80027be: 681b ldr r3, [r3, #0]
  6087. 80027c0: 695a ldr r2, [r3, #20]
  6088. 80027c2: 687b ldr r3, [r7, #4]
  6089. 80027c4: 681b ldr r3, [r3, #0]
  6090. 80027c6: f002 0208 and.w r2, r2, #8
  6091. 80027ca: 615a str r2, [r3, #20]
  6092. }
  6093. /* Handle Incomplete ISO IN Interrupt */
  6094. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_IISOIXFR))
  6095. 80027cc: 687b ldr r3, [r7, #4]
  6096. 80027ce: 681b ldr r3, [r3, #0]
  6097. 80027d0: 4618 mov r0, r3
  6098. 80027d2: f004 f838 bl 8006846 <USB_ReadInterrupts>
  6099. 80027d6: 4603 mov r3, r0
  6100. 80027d8: f403 1380 and.w r3, r3, #1048576 ; 0x100000
  6101. 80027dc: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
  6102. 80027e0: d10f bne.n 8002802 <HAL_PCD_IRQHandler+0x716>
  6103. {
  6104. /* Keep application checking the corresponding Iso IN endpoint
  6105. causing the incomplete Interrupt */
  6106. epnum = 0U;
  6107. 80027e2: 2300 movs r3, #0
  6108. 80027e4: 627b str r3, [r7, #36] ; 0x24
  6109. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  6110. hpcd->ISOINIncompleteCallback(hpcd, (uint8_t)epnum);
  6111. #else
  6112. HAL_PCD_ISOINIncompleteCallback(hpcd, (uint8_t)epnum);
  6113. 80027e6: 6a7b ldr r3, [r7, #36] ; 0x24
  6114. 80027e8: b2db uxtb r3, r3
  6115. 80027ea: 4619 mov r1, r3
  6116. 80027ec: 6878 ldr r0, [r7, #4]
  6117. 80027ee: f006 f935 bl 8008a5c <HAL_PCD_ISOINIncompleteCallback>
  6118. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  6119. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_IISOIXFR);
  6120. 80027f2: 687b ldr r3, [r7, #4]
  6121. 80027f4: 681b ldr r3, [r3, #0]
  6122. 80027f6: 695a ldr r2, [r3, #20]
  6123. 80027f8: 687b ldr r3, [r7, #4]
  6124. 80027fa: 681b ldr r3, [r3, #0]
  6125. 80027fc: f402 1280 and.w r2, r2, #1048576 ; 0x100000
  6126. 8002800: 615a str r2, [r3, #20]
  6127. }
  6128. /* Handle Incomplete ISO OUT Interrupt */
  6129. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_PXFR_INCOMPISOOUT))
  6130. 8002802: 687b ldr r3, [r7, #4]
  6131. 8002804: 681b ldr r3, [r3, #0]
  6132. 8002806: 4618 mov r0, r3
  6133. 8002808: f004 f81d bl 8006846 <USB_ReadInterrupts>
  6134. 800280c: 4603 mov r3, r0
  6135. 800280e: f403 1300 and.w r3, r3, #2097152 ; 0x200000
  6136. 8002812: f5b3 1f00 cmp.w r3, #2097152 ; 0x200000
  6137. 8002816: d10f bne.n 8002838 <HAL_PCD_IRQHandler+0x74c>
  6138. {
  6139. /* Keep application checking the corresponding Iso OUT endpoint
  6140. causing the incomplete Interrupt */
  6141. epnum = 0U;
  6142. 8002818: 2300 movs r3, #0
  6143. 800281a: 627b str r3, [r7, #36] ; 0x24
  6144. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  6145. hpcd->ISOOUTIncompleteCallback(hpcd, (uint8_t)epnum);
  6146. #else
  6147. HAL_PCD_ISOOUTIncompleteCallback(hpcd, (uint8_t)epnum);
  6148. 800281c: 6a7b ldr r3, [r7, #36] ; 0x24
  6149. 800281e: b2db uxtb r3, r3
  6150. 8002820: 4619 mov r1, r3
  6151. 8002822: 6878 ldr r0, [r7, #4]
  6152. 8002824: f006 f908 bl 8008a38 <HAL_PCD_ISOOUTIncompleteCallback>
  6153. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  6154. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_PXFR_INCOMPISOOUT);
  6155. 8002828: 687b ldr r3, [r7, #4]
  6156. 800282a: 681b ldr r3, [r3, #0]
  6157. 800282c: 695a ldr r2, [r3, #20]
  6158. 800282e: 687b ldr r3, [r7, #4]
  6159. 8002830: 681b ldr r3, [r3, #0]
  6160. 8002832: f402 1200 and.w r2, r2, #2097152 ; 0x200000
  6161. 8002836: 615a str r2, [r3, #20]
  6162. }
  6163. /* Handle Connection event Interrupt */
  6164. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_SRQINT))
  6165. 8002838: 687b ldr r3, [r7, #4]
  6166. 800283a: 681b ldr r3, [r3, #0]
  6167. 800283c: 4618 mov r0, r3
  6168. 800283e: f004 f802 bl 8006846 <USB_ReadInterrupts>
  6169. 8002842: 4603 mov r3, r0
  6170. 8002844: f003 4380 and.w r3, r3, #1073741824 ; 0x40000000
  6171. 8002848: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
  6172. 800284c: d10a bne.n 8002864 <HAL_PCD_IRQHandler+0x778>
  6173. {
  6174. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  6175. hpcd->ConnectCallback(hpcd);
  6176. #else
  6177. HAL_PCD_ConnectCallback(hpcd);
  6178. 800284e: 6878 ldr r0, [r7, #4]
  6179. 8002850: f006 f916 bl 8008a80 <HAL_PCD_ConnectCallback>
  6180. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  6181. __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_SRQINT);
  6182. 8002854: 687b ldr r3, [r7, #4]
  6183. 8002856: 681b ldr r3, [r3, #0]
  6184. 8002858: 695a ldr r2, [r3, #20]
  6185. 800285a: 687b ldr r3, [r7, #4]
  6186. 800285c: 681b ldr r3, [r3, #0]
  6187. 800285e: f002 4280 and.w r2, r2, #1073741824 ; 0x40000000
  6188. 8002862: 615a str r2, [r3, #20]
  6189. }
  6190. /* Handle Disconnection event Interrupt */
  6191. if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_OTGINT))
  6192. 8002864: 687b ldr r3, [r7, #4]
  6193. 8002866: 681b ldr r3, [r3, #0]
  6194. 8002868: 4618 mov r0, r3
  6195. 800286a: f003 ffec bl 8006846 <USB_ReadInterrupts>
  6196. 800286e: 4603 mov r3, r0
  6197. 8002870: f003 0304 and.w r3, r3, #4
  6198. 8002874: 2b04 cmp r3, #4
  6199. 8002876: d115 bne.n 80028a4 <HAL_PCD_IRQHandler+0x7b8>
  6200. {
  6201. temp = hpcd->Instance->GOTGINT;
  6202. 8002878: 687b ldr r3, [r7, #4]
  6203. 800287a: 681b ldr r3, [r3, #0]
  6204. 800287c: 685b ldr r3, [r3, #4]
  6205. 800287e: 61bb str r3, [r7, #24]
  6206. if ((temp & USB_OTG_GOTGINT_SEDET) == USB_OTG_GOTGINT_SEDET)
  6207. 8002880: 69bb ldr r3, [r7, #24]
  6208. 8002882: f003 0304 and.w r3, r3, #4
  6209. 8002886: 2b00 cmp r3, #0
  6210. 8002888: d002 beq.n 8002890 <HAL_PCD_IRQHandler+0x7a4>
  6211. {
  6212. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  6213. hpcd->DisconnectCallback(hpcd);
  6214. #else
  6215. HAL_PCD_DisconnectCallback(hpcd);
  6216. 800288a: 6878 ldr r0, [r7, #4]
  6217. 800288c: f006 f906 bl 8008a9c <HAL_PCD_DisconnectCallback>
  6218. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  6219. }
  6220. hpcd->Instance->GOTGINT |= temp;
  6221. 8002890: 687b ldr r3, [r7, #4]
  6222. 8002892: 681b ldr r3, [r3, #0]
  6223. 8002894: 6859 ldr r1, [r3, #4]
  6224. 8002896: 687b ldr r3, [r7, #4]
  6225. 8002898: 681b ldr r3, [r3, #0]
  6226. 800289a: 69ba ldr r2, [r7, #24]
  6227. 800289c: 430a orrs r2, r1
  6228. 800289e: 605a str r2, [r3, #4]
  6229. 80028a0: e000 b.n 80028a4 <HAL_PCD_IRQHandler+0x7b8>
  6230. return;
  6231. 80028a2: bf00 nop
  6232. }
  6233. }
  6234. }
  6235. 80028a4: 3734 adds r7, #52 ; 0x34
  6236. 80028a6: 46bd mov sp, r7
  6237. 80028a8: bd90 pop {r4, r7, pc}
  6238. 080028aa <HAL_PCD_SetAddress>:
  6239. * @param hpcd PCD handle
  6240. * @param address new device address
  6241. * @retval HAL status
  6242. */
  6243. HAL_StatusTypeDef HAL_PCD_SetAddress(PCD_HandleTypeDef *hpcd, uint8_t address)
  6244. {
  6245. 80028aa: b580 push {r7, lr}
  6246. 80028ac: b082 sub sp, #8
  6247. 80028ae: af00 add r7, sp, #0
  6248. 80028b0: 6078 str r0, [r7, #4]
  6249. 80028b2: 460b mov r3, r1
  6250. 80028b4: 70fb strb r3, [r7, #3]
  6251. __HAL_LOCK(hpcd);
  6252. 80028b6: 687b ldr r3, [r7, #4]
  6253. 80028b8: f893 33bc ldrb.w r3, [r3, #956] ; 0x3bc
  6254. 80028bc: 2b01 cmp r3, #1
  6255. 80028be: d101 bne.n 80028c4 <HAL_PCD_SetAddress+0x1a>
  6256. 80028c0: 2302 movs r3, #2
  6257. 80028c2: e013 b.n 80028ec <HAL_PCD_SetAddress+0x42>
  6258. 80028c4: 687b ldr r3, [r7, #4]
  6259. 80028c6: 2201 movs r2, #1
  6260. 80028c8: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6261. hpcd->USB_Address = address;
  6262. 80028cc: 687b ldr r3, [r7, #4]
  6263. 80028ce: 78fa ldrb r2, [r7, #3]
  6264. 80028d0: f883 2038 strb.w r2, [r3, #56] ; 0x38
  6265. (void)USB_SetDevAddress(hpcd->Instance, address);
  6266. 80028d4: 687b ldr r3, [r7, #4]
  6267. 80028d6: 681b ldr r3, [r3, #0]
  6268. 80028d8: 78fa ldrb r2, [r7, #3]
  6269. 80028da: 4611 mov r1, r2
  6270. 80028dc: 4618 mov r0, r3
  6271. 80028de: f003 ff4a bl 8006776 <USB_SetDevAddress>
  6272. __HAL_UNLOCK(hpcd);
  6273. 80028e2: 687b ldr r3, [r7, #4]
  6274. 80028e4: 2200 movs r2, #0
  6275. 80028e6: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6276. return HAL_OK;
  6277. 80028ea: 2300 movs r3, #0
  6278. }
  6279. 80028ec: 4618 mov r0, r3
  6280. 80028ee: 3708 adds r7, #8
  6281. 80028f0: 46bd mov sp, r7
  6282. 80028f2: bd80 pop {r7, pc}
  6283. 080028f4 <HAL_PCD_EP_Open>:
  6284. * @param ep_type endpoint type
  6285. * @retval HAL status
  6286. */
  6287. HAL_StatusTypeDef HAL_PCD_EP_Open(PCD_HandleTypeDef *hpcd, uint8_t ep_addr,
  6288. uint16_t ep_mps, uint8_t ep_type)
  6289. {
  6290. 80028f4: b580 push {r7, lr}
  6291. 80028f6: b084 sub sp, #16
  6292. 80028f8: af00 add r7, sp, #0
  6293. 80028fa: 6078 str r0, [r7, #4]
  6294. 80028fc: 4608 mov r0, r1
  6295. 80028fe: 4611 mov r1, r2
  6296. 8002900: 461a mov r2, r3
  6297. 8002902: 4603 mov r3, r0
  6298. 8002904: 70fb strb r3, [r7, #3]
  6299. 8002906: 460b mov r3, r1
  6300. 8002908: 803b strh r3, [r7, #0]
  6301. 800290a: 4613 mov r3, r2
  6302. 800290c: 70bb strb r3, [r7, #2]
  6303. HAL_StatusTypeDef ret = HAL_OK;
  6304. 800290e: 2300 movs r3, #0
  6305. 8002910: 72fb strb r3, [r7, #11]
  6306. PCD_EPTypeDef *ep;
  6307. if ((ep_addr & 0x80U) == 0x80U)
  6308. 8002912: f997 3003 ldrsb.w r3, [r7, #3]
  6309. 8002916: 2b00 cmp r3, #0
  6310. 8002918: da0f bge.n 800293a <HAL_PCD_EP_Open+0x46>
  6311. {
  6312. ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
  6313. 800291a: 78fb ldrb r3, [r7, #3]
  6314. 800291c: f003 020f and.w r2, r3, #15
  6315. 8002920: 4613 mov r3, r2
  6316. 8002922: 00db lsls r3, r3, #3
  6317. 8002924: 1a9b subs r3, r3, r2
  6318. 8002926: 009b lsls r3, r3, #2
  6319. 8002928: 3338 adds r3, #56 ; 0x38
  6320. 800292a: 687a ldr r2, [r7, #4]
  6321. 800292c: 4413 add r3, r2
  6322. 800292e: 3304 adds r3, #4
  6323. 8002930: 60fb str r3, [r7, #12]
  6324. ep->is_in = 1U;
  6325. 8002932: 68fb ldr r3, [r7, #12]
  6326. 8002934: 2201 movs r2, #1
  6327. 8002936: 705a strb r2, [r3, #1]
  6328. 8002938: e00f b.n 800295a <HAL_PCD_EP_Open+0x66>
  6329. }
  6330. else
  6331. {
  6332. ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
  6333. 800293a: 78fb ldrb r3, [r7, #3]
  6334. 800293c: f003 020f and.w r2, r3, #15
  6335. 8002940: 4613 mov r3, r2
  6336. 8002942: 00db lsls r3, r3, #3
  6337. 8002944: 1a9b subs r3, r3, r2
  6338. 8002946: 009b lsls r3, r3, #2
  6339. 8002948: f503 73fc add.w r3, r3, #504 ; 0x1f8
  6340. 800294c: 687a ldr r2, [r7, #4]
  6341. 800294e: 4413 add r3, r2
  6342. 8002950: 3304 adds r3, #4
  6343. 8002952: 60fb str r3, [r7, #12]
  6344. ep->is_in = 0U;
  6345. 8002954: 68fb ldr r3, [r7, #12]
  6346. 8002956: 2200 movs r2, #0
  6347. 8002958: 705a strb r2, [r3, #1]
  6348. }
  6349. ep->num = ep_addr & EP_ADDR_MSK;
  6350. 800295a: 78fb ldrb r3, [r7, #3]
  6351. 800295c: f003 030f and.w r3, r3, #15
  6352. 8002960: b2da uxtb r2, r3
  6353. 8002962: 68fb ldr r3, [r7, #12]
  6354. 8002964: 701a strb r2, [r3, #0]
  6355. ep->maxpacket = ep_mps;
  6356. 8002966: 883a ldrh r2, [r7, #0]
  6357. 8002968: 68fb ldr r3, [r7, #12]
  6358. 800296a: 609a str r2, [r3, #8]
  6359. ep->type = ep_type;
  6360. 800296c: 68fb ldr r3, [r7, #12]
  6361. 800296e: 78ba ldrb r2, [r7, #2]
  6362. 8002970: 70da strb r2, [r3, #3]
  6363. if (ep->is_in != 0U)
  6364. 8002972: 68fb ldr r3, [r7, #12]
  6365. 8002974: 785b ldrb r3, [r3, #1]
  6366. 8002976: 2b00 cmp r3, #0
  6367. 8002978: d004 beq.n 8002984 <HAL_PCD_EP_Open+0x90>
  6368. {
  6369. /* Assign a Tx FIFO */
  6370. ep->tx_fifo_num = ep->num;
  6371. 800297a: 68fb ldr r3, [r7, #12]
  6372. 800297c: 781b ldrb r3, [r3, #0]
  6373. 800297e: b29a uxth r2, r3
  6374. 8002980: 68fb ldr r3, [r7, #12]
  6375. 8002982: 80da strh r2, [r3, #6]
  6376. }
  6377. /* Set initial data PID. */
  6378. if (ep_type == EP_TYPE_BULK)
  6379. 8002984: 78bb ldrb r3, [r7, #2]
  6380. 8002986: 2b02 cmp r3, #2
  6381. 8002988: d102 bne.n 8002990 <HAL_PCD_EP_Open+0x9c>
  6382. {
  6383. ep->data_pid_start = 0U;
  6384. 800298a: 68fb ldr r3, [r7, #12]
  6385. 800298c: 2200 movs r2, #0
  6386. 800298e: 711a strb r2, [r3, #4]
  6387. }
  6388. __HAL_LOCK(hpcd);
  6389. 8002990: 687b ldr r3, [r7, #4]
  6390. 8002992: f893 33bc ldrb.w r3, [r3, #956] ; 0x3bc
  6391. 8002996: 2b01 cmp r3, #1
  6392. 8002998: d101 bne.n 800299e <HAL_PCD_EP_Open+0xaa>
  6393. 800299a: 2302 movs r3, #2
  6394. 800299c: e00e b.n 80029bc <HAL_PCD_EP_Open+0xc8>
  6395. 800299e: 687b ldr r3, [r7, #4]
  6396. 80029a0: 2201 movs r2, #1
  6397. 80029a2: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6398. (void)USB_ActivateEndpoint(hpcd->Instance, ep);
  6399. 80029a6: 687b ldr r3, [r7, #4]
  6400. 80029a8: 681b ldr r3, [r3, #0]
  6401. 80029aa: 68f9 ldr r1, [r7, #12]
  6402. 80029ac: 4618 mov r0, r3
  6403. 80029ae: f003 f87d bl 8005aac <USB_ActivateEndpoint>
  6404. __HAL_UNLOCK(hpcd);
  6405. 80029b2: 687b ldr r3, [r7, #4]
  6406. 80029b4: 2200 movs r2, #0
  6407. 80029b6: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6408. return ret;
  6409. 80029ba: 7afb ldrb r3, [r7, #11]
  6410. }
  6411. 80029bc: 4618 mov r0, r3
  6412. 80029be: 3710 adds r7, #16
  6413. 80029c0: 46bd mov sp, r7
  6414. 80029c2: bd80 pop {r7, pc}
  6415. 080029c4 <HAL_PCD_EP_Close>:
  6416. * @param hpcd PCD handle
  6417. * @param ep_addr endpoint address
  6418. * @retval HAL status
  6419. */
  6420. HAL_StatusTypeDef HAL_PCD_EP_Close(PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
  6421. {
  6422. 80029c4: b580 push {r7, lr}
  6423. 80029c6: b084 sub sp, #16
  6424. 80029c8: af00 add r7, sp, #0
  6425. 80029ca: 6078 str r0, [r7, #4]
  6426. 80029cc: 460b mov r3, r1
  6427. 80029ce: 70fb strb r3, [r7, #3]
  6428. PCD_EPTypeDef *ep;
  6429. if ((ep_addr & 0x80U) == 0x80U)
  6430. 80029d0: f997 3003 ldrsb.w r3, [r7, #3]
  6431. 80029d4: 2b00 cmp r3, #0
  6432. 80029d6: da0f bge.n 80029f8 <HAL_PCD_EP_Close+0x34>
  6433. {
  6434. ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
  6435. 80029d8: 78fb ldrb r3, [r7, #3]
  6436. 80029da: f003 020f and.w r2, r3, #15
  6437. 80029de: 4613 mov r3, r2
  6438. 80029e0: 00db lsls r3, r3, #3
  6439. 80029e2: 1a9b subs r3, r3, r2
  6440. 80029e4: 009b lsls r3, r3, #2
  6441. 80029e6: 3338 adds r3, #56 ; 0x38
  6442. 80029e8: 687a ldr r2, [r7, #4]
  6443. 80029ea: 4413 add r3, r2
  6444. 80029ec: 3304 adds r3, #4
  6445. 80029ee: 60fb str r3, [r7, #12]
  6446. ep->is_in = 1U;
  6447. 80029f0: 68fb ldr r3, [r7, #12]
  6448. 80029f2: 2201 movs r2, #1
  6449. 80029f4: 705a strb r2, [r3, #1]
  6450. 80029f6: e00f b.n 8002a18 <HAL_PCD_EP_Close+0x54>
  6451. }
  6452. else
  6453. {
  6454. ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
  6455. 80029f8: 78fb ldrb r3, [r7, #3]
  6456. 80029fa: f003 020f and.w r2, r3, #15
  6457. 80029fe: 4613 mov r3, r2
  6458. 8002a00: 00db lsls r3, r3, #3
  6459. 8002a02: 1a9b subs r3, r3, r2
  6460. 8002a04: 009b lsls r3, r3, #2
  6461. 8002a06: f503 73fc add.w r3, r3, #504 ; 0x1f8
  6462. 8002a0a: 687a ldr r2, [r7, #4]
  6463. 8002a0c: 4413 add r3, r2
  6464. 8002a0e: 3304 adds r3, #4
  6465. 8002a10: 60fb str r3, [r7, #12]
  6466. ep->is_in = 0U;
  6467. 8002a12: 68fb ldr r3, [r7, #12]
  6468. 8002a14: 2200 movs r2, #0
  6469. 8002a16: 705a strb r2, [r3, #1]
  6470. }
  6471. ep->num = ep_addr & EP_ADDR_MSK;
  6472. 8002a18: 78fb ldrb r3, [r7, #3]
  6473. 8002a1a: f003 030f and.w r3, r3, #15
  6474. 8002a1e: b2da uxtb r2, r3
  6475. 8002a20: 68fb ldr r3, [r7, #12]
  6476. 8002a22: 701a strb r2, [r3, #0]
  6477. __HAL_LOCK(hpcd);
  6478. 8002a24: 687b ldr r3, [r7, #4]
  6479. 8002a26: f893 33bc ldrb.w r3, [r3, #956] ; 0x3bc
  6480. 8002a2a: 2b01 cmp r3, #1
  6481. 8002a2c: d101 bne.n 8002a32 <HAL_PCD_EP_Close+0x6e>
  6482. 8002a2e: 2302 movs r3, #2
  6483. 8002a30: e00e b.n 8002a50 <HAL_PCD_EP_Close+0x8c>
  6484. 8002a32: 687b ldr r3, [r7, #4]
  6485. 8002a34: 2201 movs r2, #1
  6486. 8002a36: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6487. (void)USB_DeactivateEndpoint(hpcd->Instance, ep);
  6488. 8002a3a: 687b ldr r3, [r7, #4]
  6489. 8002a3c: 681b ldr r3, [r3, #0]
  6490. 8002a3e: 68f9 ldr r1, [r7, #12]
  6491. 8002a40: 4618 mov r0, r3
  6492. 8002a42: f003 f8bb bl 8005bbc <USB_DeactivateEndpoint>
  6493. __HAL_UNLOCK(hpcd);
  6494. 8002a46: 687b ldr r3, [r7, #4]
  6495. 8002a48: 2200 movs r2, #0
  6496. 8002a4a: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6497. return HAL_OK;
  6498. 8002a4e: 2300 movs r3, #0
  6499. }
  6500. 8002a50: 4618 mov r0, r3
  6501. 8002a52: 3710 adds r7, #16
  6502. 8002a54: 46bd mov sp, r7
  6503. 8002a56: bd80 pop {r7, pc}
  6504. 08002a58 <HAL_PCD_EP_Receive>:
  6505. * @param pBuf pointer to the reception buffer
  6506. * @param len amount of data to be received
  6507. * @retval HAL status
  6508. */
  6509. HAL_StatusTypeDef HAL_PCD_EP_Receive(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len)
  6510. {
  6511. 8002a58: b580 push {r7, lr}
  6512. 8002a5a: b086 sub sp, #24
  6513. 8002a5c: af00 add r7, sp, #0
  6514. 8002a5e: 60f8 str r0, [r7, #12]
  6515. 8002a60: 607a str r2, [r7, #4]
  6516. 8002a62: 603b str r3, [r7, #0]
  6517. 8002a64: 460b mov r3, r1
  6518. 8002a66: 72fb strb r3, [r7, #11]
  6519. PCD_EPTypeDef *ep;
  6520. ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
  6521. 8002a68: 7afb ldrb r3, [r7, #11]
  6522. 8002a6a: f003 020f and.w r2, r3, #15
  6523. 8002a6e: 4613 mov r3, r2
  6524. 8002a70: 00db lsls r3, r3, #3
  6525. 8002a72: 1a9b subs r3, r3, r2
  6526. 8002a74: 009b lsls r3, r3, #2
  6527. 8002a76: f503 73fc add.w r3, r3, #504 ; 0x1f8
  6528. 8002a7a: 68fa ldr r2, [r7, #12]
  6529. 8002a7c: 4413 add r3, r2
  6530. 8002a7e: 3304 adds r3, #4
  6531. 8002a80: 617b str r3, [r7, #20]
  6532. /*setup and start the Xfer */
  6533. ep->xfer_buff = pBuf;
  6534. 8002a82: 697b ldr r3, [r7, #20]
  6535. 8002a84: 687a ldr r2, [r7, #4]
  6536. 8002a86: 60da str r2, [r3, #12]
  6537. ep->xfer_len = len;
  6538. 8002a88: 697b ldr r3, [r7, #20]
  6539. 8002a8a: 683a ldr r2, [r7, #0]
  6540. 8002a8c: 615a str r2, [r3, #20]
  6541. ep->xfer_count = 0U;
  6542. 8002a8e: 697b ldr r3, [r7, #20]
  6543. 8002a90: 2200 movs r2, #0
  6544. 8002a92: 619a str r2, [r3, #24]
  6545. ep->is_in = 0U;
  6546. 8002a94: 697b ldr r3, [r7, #20]
  6547. 8002a96: 2200 movs r2, #0
  6548. 8002a98: 705a strb r2, [r3, #1]
  6549. ep->num = ep_addr & EP_ADDR_MSK;
  6550. 8002a9a: 7afb ldrb r3, [r7, #11]
  6551. 8002a9c: f003 030f and.w r3, r3, #15
  6552. 8002aa0: b2da uxtb r2, r3
  6553. 8002aa2: 697b ldr r3, [r7, #20]
  6554. 8002aa4: 701a strb r2, [r3, #0]
  6555. if (hpcd->Init.dma_enable == 1U)
  6556. 8002aa6: 68fb ldr r3, [r7, #12]
  6557. 8002aa8: 691b ldr r3, [r3, #16]
  6558. 8002aaa: 2b01 cmp r3, #1
  6559. 8002aac: d102 bne.n 8002ab4 <HAL_PCD_EP_Receive+0x5c>
  6560. {
  6561. ep->dma_addr = (uint32_t)pBuf;
  6562. 8002aae: 687a ldr r2, [r7, #4]
  6563. 8002ab0: 697b ldr r3, [r7, #20]
  6564. 8002ab2: 611a str r2, [r3, #16]
  6565. }
  6566. if ((ep_addr & EP_ADDR_MSK) == 0U)
  6567. 8002ab4: 7afb ldrb r3, [r7, #11]
  6568. 8002ab6: f003 030f and.w r3, r3, #15
  6569. 8002aba: 2b00 cmp r3, #0
  6570. 8002abc: d109 bne.n 8002ad2 <HAL_PCD_EP_Receive+0x7a>
  6571. {
  6572. (void)USB_EP0StartXfer(hpcd->Instance, ep, (uint8_t)hpcd->Init.dma_enable);
  6573. 8002abe: 68fb ldr r3, [r7, #12]
  6574. 8002ac0: 6818 ldr r0, [r3, #0]
  6575. 8002ac2: 68fb ldr r3, [r7, #12]
  6576. 8002ac4: 691b ldr r3, [r3, #16]
  6577. 8002ac6: b2db uxtb r3, r3
  6578. 8002ac8: 461a mov r2, r3
  6579. 8002aca: 6979 ldr r1, [r7, #20]
  6580. 8002acc: f003 fb96 bl 80061fc <USB_EP0StartXfer>
  6581. 8002ad0: e008 b.n 8002ae4 <HAL_PCD_EP_Receive+0x8c>
  6582. }
  6583. else
  6584. {
  6585. (void)USB_EPStartXfer(hpcd->Instance, ep, (uint8_t)hpcd->Init.dma_enable);
  6586. 8002ad2: 68fb ldr r3, [r7, #12]
  6587. 8002ad4: 6818 ldr r0, [r3, #0]
  6588. 8002ad6: 68fb ldr r3, [r7, #12]
  6589. 8002ad8: 691b ldr r3, [r3, #16]
  6590. 8002ada: b2db uxtb r3, r3
  6591. 8002adc: 461a mov r2, r3
  6592. 8002ade: 6979 ldr r1, [r7, #20]
  6593. 8002ae0: f003 f948 bl 8005d74 <USB_EPStartXfer>
  6594. }
  6595. return HAL_OK;
  6596. 8002ae4: 2300 movs r3, #0
  6597. }
  6598. 8002ae6: 4618 mov r0, r3
  6599. 8002ae8: 3718 adds r7, #24
  6600. 8002aea: 46bd mov sp, r7
  6601. 8002aec: bd80 pop {r7, pc}
  6602. 08002aee <HAL_PCD_EP_GetRxCount>:
  6603. * @param hpcd PCD handle
  6604. * @param ep_addr endpoint address
  6605. * @retval Data Size
  6606. */
  6607. uint32_t HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
  6608. {
  6609. 8002aee: b480 push {r7}
  6610. 8002af0: b083 sub sp, #12
  6611. 8002af2: af00 add r7, sp, #0
  6612. 8002af4: 6078 str r0, [r7, #4]
  6613. 8002af6: 460b mov r3, r1
  6614. 8002af8: 70fb strb r3, [r7, #3]
  6615. return hpcd->OUT_ep[ep_addr & EP_ADDR_MSK].xfer_count;
  6616. 8002afa: 78fb ldrb r3, [r7, #3]
  6617. 8002afc: f003 020f and.w r2, r3, #15
  6618. 8002b00: 6879 ldr r1, [r7, #4]
  6619. 8002b02: 4613 mov r3, r2
  6620. 8002b04: 00db lsls r3, r3, #3
  6621. 8002b06: 1a9b subs r3, r3, r2
  6622. 8002b08: 009b lsls r3, r3, #2
  6623. 8002b0a: 440b add r3, r1
  6624. 8002b0c: f503 7305 add.w r3, r3, #532 ; 0x214
  6625. 8002b10: 681b ldr r3, [r3, #0]
  6626. }
  6627. 8002b12: 4618 mov r0, r3
  6628. 8002b14: 370c adds r7, #12
  6629. 8002b16: 46bd mov sp, r7
  6630. 8002b18: f85d 7b04 ldr.w r7, [sp], #4
  6631. 8002b1c: 4770 bx lr
  6632. 08002b1e <HAL_PCD_EP_Transmit>:
  6633. * @param pBuf pointer to the transmission buffer
  6634. * @param len amount of data to be sent
  6635. * @retval HAL status
  6636. */
  6637. HAL_StatusTypeDef HAL_PCD_EP_Transmit(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len)
  6638. {
  6639. 8002b1e: b580 push {r7, lr}
  6640. 8002b20: b086 sub sp, #24
  6641. 8002b22: af00 add r7, sp, #0
  6642. 8002b24: 60f8 str r0, [r7, #12]
  6643. 8002b26: 607a str r2, [r7, #4]
  6644. 8002b28: 603b str r3, [r7, #0]
  6645. 8002b2a: 460b mov r3, r1
  6646. 8002b2c: 72fb strb r3, [r7, #11]
  6647. PCD_EPTypeDef *ep;
  6648. ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
  6649. 8002b2e: 7afb ldrb r3, [r7, #11]
  6650. 8002b30: f003 020f and.w r2, r3, #15
  6651. 8002b34: 4613 mov r3, r2
  6652. 8002b36: 00db lsls r3, r3, #3
  6653. 8002b38: 1a9b subs r3, r3, r2
  6654. 8002b3a: 009b lsls r3, r3, #2
  6655. 8002b3c: 3338 adds r3, #56 ; 0x38
  6656. 8002b3e: 68fa ldr r2, [r7, #12]
  6657. 8002b40: 4413 add r3, r2
  6658. 8002b42: 3304 adds r3, #4
  6659. 8002b44: 617b str r3, [r7, #20]
  6660. /*setup and start the Xfer */
  6661. ep->xfer_buff = pBuf;
  6662. 8002b46: 697b ldr r3, [r7, #20]
  6663. 8002b48: 687a ldr r2, [r7, #4]
  6664. 8002b4a: 60da str r2, [r3, #12]
  6665. ep->xfer_len = len;
  6666. 8002b4c: 697b ldr r3, [r7, #20]
  6667. 8002b4e: 683a ldr r2, [r7, #0]
  6668. 8002b50: 615a str r2, [r3, #20]
  6669. ep->xfer_count = 0U;
  6670. 8002b52: 697b ldr r3, [r7, #20]
  6671. 8002b54: 2200 movs r2, #0
  6672. 8002b56: 619a str r2, [r3, #24]
  6673. ep->is_in = 1U;
  6674. 8002b58: 697b ldr r3, [r7, #20]
  6675. 8002b5a: 2201 movs r2, #1
  6676. 8002b5c: 705a strb r2, [r3, #1]
  6677. ep->num = ep_addr & EP_ADDR_MSK;
  6678. 8002b5e: 7afb ldrb r3, [r7, #11]
  6679. 8002b60: f003 030f and.w r3, r3, #15
  6680. 8002b64: b2da uxtb r2, r3
  6681. 8002b66: 697b ldr r3, [r7, #20]
  6682. 8002b68: 701a strb r2, [r3, #0]
  6683. if (hpcd->Init.dma_enable == 1U)
  6684. 8002b6a: 68fb ldr r3, [r7, #12]
  6685. 8002b6c: 691b ldr r3, [r3, #16]
  6686. 8002b6e: 2b01 cmp r3, #1
  6687. 8002b70: d102 bne.n 8002b78 <HAL_PCD_EP_Transmit+0x5a>
  6688. {
  6689. ep->dma_addr = (uint32_t)pBuf;
  6690. 8002b72: 687a ldr r2, [r7, #4]
  6691. 8002b74: 697b ldr r3, [r7, #20]
  6692. 8002b76: 611a str r2, [r3, #16]
  6693. }
  6694. if ((ep_addr & EP_ADDR_MSK) == 0U)
  6695. 8002b78: 7afb ldrb r3, [r7, #11]
  6696. 8002b7a: f003 030f and.w r3, r3, #15
  6697. 8002b7e: 2b00 cmp r3, #0
  6698. 8002b80: d109 bne.n 8002b96 <HAL_PCD_EP_Transmit+0x78>
  6699. {
  6700. (void)USB_EP0StartXfer(hpcd->Instance, ep, (uint8_t)hpcd->Init.dma_enable);
  6701. 8002b82: 68fb ldr r3, [r7, #12]
  6702. 8002b84: 6818 ldr r0, [r3, #0]
  6703. 8002b86: 68fb ldr r3, [r7, #12]
  6704. 8002b88: 691b ldr r3, [r3, #16]
  6705. 8002b8a: b2db uxtb r3, r3
  6706. 8002b8c: 461a mov r2, r3
  6707. 8002b8e: 6979 ldr r1, [r7, #20]
  6708. 8002b90: f003 fb34 bl 80061fc <USB_EP0StartXfer>
  6709. 8002b94: e008 b.n 8002ba8 <HAL_PCD_EP_Transmit+0x8a>
  6710. }
  6711. else
  6712. {
  6713. (void)USB_EPStartXfer(hpcd->Instance, ep, (uint8_t)hpcd->Init.dma_enable);
  6714. 8002b96: 68fb ldr r3, [r7, #12]
  6715. 8002b98: 6818 ldr r0, [r3, #0]
  6716. 8002b9a: 68fb ldr r3, [r7, #12]
  6717. 8002b9c: 691b ldr r3, [r3, #16]
  6718. 8002b9e: b2db uxtb r3, r3
  6719. 8002ba0: 461a mov r2, r3
  6720. 8002ba2: 6979 ldr r1, [r7, #20]
  6721. 8002ba4: f003 f8e6 bl 8005d74 <USB_EPStartXfer>
  6722. }
  6723. return HAL_OK;
  6724. 8002ba8: 2300 movs r3, #0
  6725. }
  6726. 8002baa: 4618 mov r0, r3
  6727. 8002bac: 3718 adds r7, #24
  6728. 8002bae: 46bd mov sp, r7
  6729. 8002bb0: bd80 pop {r7, pc}
  6730. 08002bb2 <HAL_PCD_EP_SetStall>:
  6731. * @param hpcd PCD handle
  6732. * @param ep_addr endpoint address
  6733. * @retval HAL status
  6734. */
  6735. HAL_StatusTypeDef HAL_PCD_EP_SetStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
  6736. {
  6737. 8002bb2: b580 push {r7, lr}
  6738. 8002bb4: b084 sub sp, #16
  6739. 8002bb6: af00 add r7, sp, #0
  6740. 8002bb8: 6078 str r0, [r7, #4]
  6741. 8002bba: 460b mov r3, r1
  6742. 8002bbc: 70fb strb r3, [r7, #3]
  6743. PCD_EPTypeDef *ep;
  6744. if (((uint32_t)ep_addr & EP_ADDR_MSK) > hpcd->Init.dev_endpoints)
  6745. 8002bbe: 78fb ldrb r3, [r7, #3]
  6746. 8002bc0: f003 020f and.w r2, r3, #15
  6747. 8002bc4: 687b ldr r3, [r7, #4]
  6748. 8002bc6: 685b ldr r3, [r3, #4]
  6749. 8002bc8: 429a cmp r2, r3
  6750. 8002bca: d901 bls.n 8002bd0 <HAL_PCD_EP_SetStall+0x1e>
  6751. {
  6752. return HAL_ERROR;
  6753. 8002bcc: 2301 movs r3, #1
  6754. 8002bce: e050 b.n 8002c72 <HAL_PCD_EP_SetStall+0xc0>
  6755. }
  6756. if ((0x80U & ep_addr) == 0x80U)
  6757. 8002bd0: f997 3003 ldrsb.w r3, [r7, #3]
  6758. 8002bd4: 2b00 cmp r3, #0
  6759. 8002bd6: da0f bge.n 8002bf8 <HAL_PCD_EP_SetStall+0x46>
  6760. {
  6761. ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
  6762. 8002bd8: 78fb ldrb r3, [r7, #3]
  6763. 8002bda: f003 020f and.w r2, r3, #15
  6764. 8002bde: 4613 mov r3, r2
  6765. 8002be0: 00db lsls r3, r3, #3
  6766. 8002be2: 1a9b subs r3, r3, r2
  6767. 8002be4: 009b lsls r3, r3, #2
  6768. 8002be6: 3338 adds r3, #56 ; 0x38
  6769. 8002be8: 687a ldr r2, [r7, #4]
  6770. 8002bea: 4413 add r3, r2
  6771. 8002bec: 3304 adds r3, #4
  6772. 8002bee: 60fb str r3, [r7, #12]
  6773. ep->is_in = 1U;
  6774. 8002bf0: 68fb ldr r3, [r7, #12]
  6775. 8002bf2: 2201 movs r2, #1
  6776. 8002bf4: 705a strb r2, [r3, #1]
  6777. 8002bf6: e00d b.n 8002c14 <HAL_PCD_EP_SetStall+0x62>
  6778. }
  6779. else
  6780. {
  6781. ep = &hpcd->OUT_ep[ep_addr];
  6782. 8002bf8: 78fa ldrb r2, [r7, #3]
  6783. 8002bfa: 4613 mov r3, r2
  6784. 8002bfc: 00db lsls r3, r3, #3
  6785. 8002bfe: 1a9b subs r3, r3, r2
  6786. 8002c00: 009b lsls r3, r3, #2
  6787. 8002c02: f503 73fc add.w r3, r3, #504 ; 0x1f8
  6788. 8002c06: 687a ldr r2, [r7, #4]
  6789. 8002c08: 4413 add r3, r2
  6790. 8002c0a: 3304 adds r3, #4
  6791. 8002c0c: 60fb str r3, [r7, #12]
  6792. ep->is_in = 0U;
  6793. 8002c0e: 68fb ldr r3, [r7, #12]
  6794. 8002c10: 2200 movs r2, #0
  6795. 8002c12: 705a strb r2, [r3, #1]
  6796. }
  6797. ep->is_stall = 1U;
  6798. 8002c14: 68fb ldr r3, [r7, #12]
  6799. 8002c16: 2201 movs r2, #1
  6800. 8002c18: 709a strb r2, [r3, #2]
  6801. ep->num = ep_addr & EP_ADDR_MSK;
  6802. 8002c1a: 78fb ldrb r3, [r7, #3]
  6803. 8002c1c: f003 030f and.w r3, r3, #15
  6804. 8002c20: b2da uxtb r2, r3
  6805. 8002c22: 68fb ldr r3, [r7, #12]
  6806. 8002c24: 701a strb r2, [r3, #0]
  6807. __HAL_LOCK(hpcd);
  6808. 8002c26: 687b ldr r3, [r7, #4]
  6809. 8002c28: f893 33bc ldrb.w r3, [r3, #956] ; 0x3bc
  6810. 8002c2c: 2b01 cmp r3, #1
  6811. 8002c2e: d101 bne.n 8002c34 <HAL_PCD_EP_SetStall+0x82>
  6812. 8002c30: 2302 movs r3, #2
  6813. 8002c32: e01e b.n 8002c72 <HAL_PCD_EP_SetStall+0xc0>
  6814. 8002c34: 687b ldr r3, [r7, #4]
  6815. 8002c36: 2201 movs r2, #1
  6816. 8002c38: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6817. (void)USB_EPSetStall(hpcd->Instance, ep);
  6818. 8002c3c: 687b ldr r3, [r7, #4]
  6819. 8002c3e: 681b ldr r3, [r3, #0]
  6820. 8002c40: 68f9 ldr r1, [r7, #12]
  6821. 8002c42: 4618 mov r0, r3
  6822. 8002c44: f003 fcc3 bl 80065ce <USB_EPSetStall>
  6823. if ((ep_addr & EP_ADDR_MSK) == 0U)
  6824. 8002c48: 78fb ldrb r3, [r7, #3]
  6825. 8002c4a: f003 030f and.w r3, r3, #15
  6826. 8002c4e: 2b00 cmp r3, #0
  6827. 8002c50: d10a bne.n 8002c68 <HAL_PCD_EP_SetStall+0xb6>
  6828. {
  6829. (void)USB_EP0_OutStart(hpcd->Instance, (uint8_t)hpcd->Init.dma_enable, (uint8_t *)hpcd->Setup);
  6830. 8002c52: 687b ldr r3, [r7, #4]
  6831. 8002c54: 6818 ldr r0, [r3, #0]
  6832. 8002c56: 687b ldr r3, [r7, #4]
  6833. 8002c58: 691b ldr r3, [r3, #16]
  6834. 8002c5a: b2d9 uxtb r1, r3
  6835. 8002c5c: 687b ldr r3, [r7, #4]
  6836. 8002c5e: f503 7371 add.w r3, r3, #964 ; 0x3c4
  6837. 8002c62: 461a mov r2, r3
  6838. 8002c64: f003 feb4 bl 80069d0 <USB_EP0_OutStart>
  6839. }
  6840. __HAL_UNLOCK(hpcd);
  6841. 8002c68: 687b ldr r3, [r7, #4]
  6842. 8002c6a: 2200 movs r2, #0
  6843. 8002c6c: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6844. return HAL_OK;
  6845. 8002c70: 2300 movs r3, #0
  6846. }
  6847. 8002c72: 4618 mov r0, r3
  6848. 8002c74: 3710 adds r7, #16
  6849. 8002c76: 46bd mov sp, r7
  6850. 8002c78: bd80 pop {r7, pc}
  6851. 08002c7a <HAL_PCD_EP_ClrStall>:
  6852. * @param hpcd PCD handle
  6853. * @param ep_addr endpoint address
  6854. * @retval HAL status
  6855. */
  6856. HAL_StatusTypeDef HAL_PCD_EP_ClrStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
  6857. {
  6858. 8002c7a: b580 push {r7, lr}
  6859. 8002c7c: b084 sub sp, #16
  6860. 8002c7e: af00 add r7, sp, #0
  6861. 8002c80: 6078 str r0, [r7, #4]
  6862. 8002c82: 460b mov r3, r1
  6863. 8002c84: 70fb strb r3, [r7, #3]
  6864. PCD_EPTypeDef *ep;
  6865. if (((uint32_t)ep_addr & 0x0FU) > hpcd->Init.dev_endpoints)
  6866. 8002c86: 78fb ldrb r3, [r7, #3]
  6867. 8002c88: f003 020f and.w r2, r3, #15
  6868. 8002c8c: 687b ldr r3, [r7, #4]
  6869. 8002c8e: 685b ldr r3, [r3, #4]
  6870. 8002c90: 429a cmp r2, r3
  6871. 8002c92: d901 bls.n 8002c98 <HAL_PCD_EP_ClrStall+0x1e>
  6872. {
  6873. return HAL_ERROR;
  6874. 8002c94: 2301 movs r3, #1
  6875. 8002c96: e042 b.n 8002d1e <HAL_PCD_EP_ClrStall+0xa4>
  6876. }
  6877. if ((0x80U & ep_addr) == 0x80U)
  6878. 8002c98: f997 3003 ldrsb.w r3, [r7, #3]
  6879. 8002c9c: 2b00 cmp r3, #0
  6880. 8002c9e: da0f bge.n 8002cc0 <HAL_PCD_EP_ClrStall+0x46>
  6881. {
  6882. ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK];
  6883. 8002ca0: 78fb ldrb r3, [r7, #3]
  6884. 8002ca2: f003 020f and.w r2, r3, #15
  6885. 8002ca6: 4613 mov r3, r2
  6886. 8002ca8: 00db lsls r3, r3, #3
  6887. 8002caa: 1a9b subs r3, r3, r2
  6888. 8002cac: 009b lsls r3, r3, #2
  6889. 8002cae: 3338 adds r3, #56 ; 0x38
  6890. 8002cb0: 687a ldr r2, [r7, #4]
  6891. 8002cb2: 4413 add r3, r2
  6892. 8002cb4: 3304 adds r3, #4
  6893. 8002cb6: 60fb str r3, [r7, #12]
  6894. ep->is_in = 1U;
  6895. 8002cb8: 68fb ldr r3, [r7, #12]
  6896. 8002cba: 2201 movs r2, #1
  6897. 8002cbc: 705a strb r2, [r3, #1]
  6898. 8002cbe: e00f b.n 8002ce0 <HAL_PCD_EP_ClrStall+0x66>
  6899. }
  6900. else
  6901. {
  6902. ep = &hpcd->OUT_ep[ep_addr & EP_ADDR_MSK];
  6903. 8002cc0: 78fb ldrb r3, [r7, #3]
  6904. 8002cc2: f003 020f and.w r2, r3, #15
  6905. 8002cc6: 4613 mov r3, r2
  6906. 8002cc8: 00db lsls r3, r3, #3
  6907. 8002cca: 1a9b subs r3, r3, r2
  6908. 8002ccc: 009b lsls r3, r3, #2
  6909. 8002cce: f503 73fc add.w r3, r3, #504 ; 0x1f8
  6910. 8002cd2: 687a ldr r2, [r7, #4]
  6911. 8002cd4: 4413 add r3, r2
  6912. 8002cd6: 3304 adds r3, #4
  6913. 8002cd8: 60fb str r3, [r7, #12]
  6914. ep->is_in = 0U;
  6915. 8002cda: 68fb ldr r3, [r7, #12]
  6916. 8002cdc: 2200 movs r2, #0
  6917. 8002cde: 705a strb r2, [r3, #1]
  6918. }
  6919. ep->is_stall = 0U;
  6920. 8002ce0: 68fb ldr r3, [r7, #12]
  6921. 8002ce2: 2200 movs r2, #0
  6922. 8002ce4: 709a strb r2, [r3, #2]
  6923. ep->num = ep_addr & EP_ADDR_MSK;
  6924. 8002ce6: 78fb ldrb r3, [r7, #3]
  6925. 8002ce8: f003 030f and.w r3, r3, #15
  6926. 8002cec: b2da uxtb r2, r3
  6927. 8002cee: 68fb ldr r3, [r7, #12]
  6928. 8002cf0: 701a strb r2, [r3, #0]
  6929. __HAL_LOCK(hpcd);
  6930. 8002cf2: 687b ldr r3, [r7, #4]
  6931. 8002cf4: f893 33bc ldrb.w r3, [r3, #956] ; 0x3bc
  6932. 8002cf8: 2b01 cmp r3, #1
  6933. 8002cfa: d101 bne.n 8002d00 <HAL_PCD_EP_ClrStall+0x86>
  6934. 8002cfc: 2302 movs r3, #2
  6935. 8002cfe: e00e b.n 8002d1e <HAL_PCD_EP_ClrStall+0xa4>
  6936. 8002d00: 687b ldr r3, [r7, #4]
  6937. 8002d02: 2201 movs r2, #1
  6938. 8002d04: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6939. (void)USB_EPClearStall(hpcd->Instance, ep);
  6940. 8002d08: 687b ldr r3, [r7, #4]
  6941. 8002d0a: 681b ldr r3, [r3, #0]
  6942. 8002d0c: 68f9 ldr r1, [r7, #12]
  6943. 8002d0e: 4618 mov r0, r3
  6944. 8002d10: f003 fccb bl 80066aa <USB_EPClearStall>
  6945. __HAL_UNLOCK(hpcd);
  6946. 8002d14: 687b ldr r3, [r7, #4]
  6947. 8002d16: 2200 movs r2, #0
  6948. 8002d18: f883 23bc strb.w r2, [r3, #956] ; 0x3bc
  6949. return HAL_OK;
  6950. 8002d1c: 2300 movs r3, #0
  6951. }
  6952. 8002d1e: 4618 mov r0, r3
  6953. 8002d20: 3710 adds r7, #16
  6954. 8002d22: 46bd mov sp, r7
  6955. 8002d24: bd80 pop {r7, pc}
  6956. 08002d26 <PCD_WriteEmptyTxFifo>:
  6957. * @param hpcd PCD handle
  6958. * @param epnum endpoint number
  6959. * @retval HAL status
  6960. */
  6961. static HAL_StatusTypeDef PCD_WriteEmptyTxFifo(PCD_HandleTypeDef *hpcd, uint32_t epnum)
  6962. {
  6963. 8002d26: b580 push {r7, lr}
  6964. 8002d28: b08a sub sp, #40 ; 0x28
  6965. 8002d2a: af02 add r7, sp, #8
  6966. 8002d2c: 6078 str r0, [r7, #4]
  6967. 8002d2e: 6039 str r1, [r7, #0]
  6968. USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
  6969. 8002d30: 687b ldr r3, [r7, #4]
  6970. 8002d32: 681b ldr r3, [r3, #0]
  6971. 8002d34: 617b str r3, [r7, #20]
  6972. uint32_t USBx_BASE = (uint32_t)USBx;
  6973. 8002d36: 697b ldr r3, [r7, #20]
  6974. 8002d38: 613b str r3, [r7, #16]
  6975. USB_OTG_EPTypeDef *ep;
  6976. uint32_t len;
  6977. uint32_t len32b;
  6978. uint32_t fifoemptymsk;
  6979. ep = &hpcd->IN_ep[epnum];
  6980. 8002d3a: 683a ldr r2, [r7, #0]
  6981. 8002d3c: 4613 mov r3, r2
  6982. 8002d3e: 00db lsls r3, r3, #3
  6983. 8002d40: 1a9b subs r3, r3, r2
  6984. 8002d42: 009b lsls r3, r3, #2
  6985. 8002d44: 3338 adds r3, #56 ; 0x38
  6986. 8002d46: 687a ldr r2, [r7, #4]
  6987. 8002d48: 4413 add r3, r2
  6988. 8002d4a: 3304 adds r3, #4
  6989. 8002d4c: 60fb str r3, [r7, #12]
  6990. if (ep->xfer_count > ep->xfer_len)
  6991. 8002d4e: 68fb ldr r3, [r7, #12]
  6992. 8002d50: 699a ldr r2, [r3, #24]
  6993. 8002d52: 68fb ldr r3, [r7, #12]
  6994. 8002d54: 695b ldr r3, [r3, #20]
  6995. 8002d56: 429a cmp r2, r3
  6996. 8002d58: d901 bls.n 8002d5e <PCD_WriteEmptyTxFifo+0x38>
  6997. {
  6998. return HAL_ERROR;
  6999. 8002d5a: 2301 movs r3, #1
  7000. 8002d5c: e06c b.n 8002e38 <PCD_WriteEmptyTxFifo+0x112>
  7001. }
  7002. len = ep->xfer_len - ep->xfer_count;
  7003. 8002d5e: 68fb ldr r3, [r7, #12]
  7004. 8002d60: 695a ldr r2, [r3, #20]
  7005. 8002d62: 68fb ldr r3, [r7, #12]
  7006. 8002d64: 699b ldr r3, [r3, #24]
  7007. 8002d66: 1ad3 subs r3, r2, r3
  7008. 8002d68: 61fb str r3, [r7, #28]
  7009. if (len > ep->maxpacket)
  7010. 8002d6a: 68fb ldr r3, [r7, #12]
  7011. 8002d6c: 689b ldr r3, [r3, #8]
  7012. 8002d6e: 69fa ldr r2, [r7, #28]
  7013. 8002d70: 429a cmp r2, r3
  7014. 8002d72: d902 bls.n 8002d7a <PCD_WriteEmptyTxFifo+0x54>
  7015. {
  7016. len = ep->maxpacket;
  7017. 8002d74: 68fb ldr r3, [r7, #12]
  7018. 8002d76: 689b ldr r3, [r3, #8]
  7019. 8002d78: 61fb str r3, [r7, #28]
  7020. }
  7021. len32b = (len + 3U) / 4U;
  7022. 8002d7a: 69fb ldr r3, [r7, #28]
  7023. 8002d7c: 3303 adds r3, #3
  7024. 8002d7e: 089b lsrs r3, r3, #2
  7025. 8002d80: 61bb str r3, [r7, #24]
  7026. while (((USBx_INEP(epnum)->DTXFSTS & USB_OTG_DTXFSTS_INEPTFSAV) >= len32b) &&
  7027. 8002d82: e02b b.n 8002ddc <PCD_WriteEmptyTxFifo+0xb6>
  7028. (ep->xfer_count < ep->xfer_len) && (ep->xfer_len != 0U))
  7029. {
  7030. /* Write the FIFO */
  7031. len = ep->xfer_len - ep->xfer_count;
  7032. 8002d84: 68fb ldr r3, [r7, #12]
  7033. 8002d86: 695a ldr r2, [r3, #20]
  7034. 8002d88: 68fb ldr r3, [r7, #12]
  7035. 8002d8a: 699b ldr r3, [r3, #24]
  7036. 8002d8c: 1ad3 subs r3, r2, r3
  7037. 8002d8e: 61fb str r3, [r7, #28]
  7038. if (len > ep->maxpacket)
  7039. 8002d90: 68fb ldr r3, [r7, #12]
  7040. 8002d92: 689b ldr r3, [r3, #8]
  7041. 8002d94: 69fa ldr r2, [r7, #28]
  7042. 8002d96: 429a cmp r2, r3
  7043. 8002d98: d902 bls.n 8002da0 <PCD_WriteEmptyTxFifo+0x7a>
  7044. {
  7045. len = ep->maxpacket;
  7046. 8002d9a: 68fb ldr r3, [r7, #12]
  7047. 8002d9c: 689b ldr r3, [r3, #8]
  7048. 8002d9e: 61fb str r3, [r7, #28]
  7049. }
  7050. len32b = (len + 3U) / 4U;
  7051. 8002da0: 69fb ldr r3, [r7, #28]
  7052. 8002da2: 3303 adds r3, #3
  7053. 8002da4: 089b lsrs r3, r3, #2
  7054. 8002da6: 61bb str r3, [r7, #24]
  7055. (void)USB_WritePacket(USBx, ep->xfer_buff, (uint8_t)epnum, (uint16_t)len,
  7056. 8002da8: 68fb ldr r3, [r7, #12]
  7057. 8002daa: 68d9 ldr r1, [r3, #12]
  7058. 8002dac: 683b ldr r3, [r7, #0]
  7059. 8002dae: b2da uxtb r2, r3
  7060. 8002db0: 69fb ldr r3, [r7, #28]
  7061. 8002db2: b298 uxth r0, r3
  7062. (uint8_t)hpcd->Init.dma_enable);
  7063. 8002db4: 687b ldr r3, [r7, #4]
  7064. 8002db6: 691b ldr r3, [r3, #16]
  7065. (void)USB_WritePacket(USBx, ep->xfer_buff, (uint8_t)epnum, (uint16_t)len,
  7066. 8002db8: b2db uxtb r3, r3
  7067. 8002dba: 9300 str r3, [sp, #0]
  7068. 8002dbc: 4603 mov r3, r0
  7069. 8002dbe: 6978 ldr r0, [r7, #20]
  7070. 8002dc0: f003 fb6f bl 80064a2 <USB_WritePacket>
  7071. ep->xfer_buff += len;
  7072. 8002dc4: 68fb ldr r3, [r7, #12]
  7073. 8002dc6: 68da ldr r2, [r3, #12]
  7074. 8002dc8: 69fb ldr r3, [r7, #28]
  7075. 8002dca: 441a add r2, r3
  7076. 8002dcc: 68fb ldr r3, [r7, #12]
  7077. 8002dce: 60da str r2, [r3, #12]
  7078. ep->xfer_count += len;
  7079. 8002dd0: 68fb ldr r3, [r7, #12]
  7080. 8002dd2: 699a ldr r2, [r3, #24]
  7081. 8002dd4: 69fb ldr r3, [r7, #28]
  7082. 8002dd6: 441a add r2, r3
  7083. 8002dd8: 68fb ldr r3, [r7, #12]
  7084. 8002dda: 619a str r2, [r3, #24]
  7085. while (((USBx_INEP(epnum)->DTXFSTS & USB_OTG_DTXFSTS_INEPTFSAV) >= len32b) &&
  7086. 8002ddc: 683b ldr r3, [r7, #0]
  7087. 8002dde: 015a lsls r2, r3, #5
  7088. 8002de0: 693b ldr r3, [r7, #16]
  7089. 8002de2: 4413 add r3, r2
  7090. 8002de4: f503 6310 add.w r3, r3, #2304 ; 0x900
  7091. 8002de8: 699b ldr r3, [r3, #24]
  7092. 8002dea: b29b uxth r3, r3
  7093. 8002dec: 69ba ldr r2, [r7, #24]
  7094. 8002dee: 429a cmp r2, r3
  7095. 8002df0: d809 bhi.n 8002e06 <PCD_WriteEmptyTxFifo+0xe0>
  7096. (ep->xfer_count < ep->xfer_len) && (ep->xfer_len != 0U))
  7097. 8002df2: 68fb ldr r3, [r7, #12]
  7098. 8002df4: 699a ldr r2, [r3, #24]
  7099. 8002df6: 68fb ldr r3, [r7, #12]
  7100. 8002df8: 695b ldr r3, [r3, #20]
  7101. while (((USBx_INEP(epnum)->DTXFSTS & USB_OTG_DTXFSTS_INEPTFSAV) >= len32b) &&
  7102. 8002dfa: 429a cmp r2, r3
  7103. 8002dfc: d203 bcs.n 8002e06 <PCD_WriteEmptyTxFifo+0xe0>
  7104. (ep->xfer_count < ep->xfer_len) && (ep->xfer_len != 0U))
  7105. 8002dfe: 68fb ldr r3, [r7, #12]
  7106. 8002e00: 695b ldr r3, [r3, #20]
  7107. 8002e02: 2b00 cmp r3, #0
  7108. 8002e04: d1be bne.n 8002d84 <PCD_WriteEmptyTxFifo+0x5e>
  7109. }
  7110. if (ep->xfer_len <= ep->xfer_count)
  7111. 8002e06: 68fb ldr r3, [r7, #12]
  7112. 8002e08: 695a ldr r2, [r3, #20]
  7113. 8002e0a: 68fb ldr r3, [r7, #12]
  7114. 8002e0c: 699b ldr r3, [r3, #24]
  7115. 8002e0e: 429a cmp r2, r3
  7116. 8002e10: d811 bhi.n 8002e36 <PCD_WriteEmptyTxFifo+0x110>
  7117. {
  7118. fifoemptymsk = (uint32_t)(0x1UL << (epnum & EP_ADDR_MSK));
  7119. 8002e12: 683b ldr r3, [r7, #0]
  7120. 8002e14: f003 030f and.w r3, r3, #15
  7121. 8002e18: 2201 movs r2, #1
  7122. 8002e1a: fa02 f303 lsl.w r3, r2, r3
  7123. 8002e1e: 60bb str r3, [r7, #8]
  7124. USBx_DEVICE->DIEPEMPMSK &= ~fifoemptymsk;
  7125. 8002e20: 693b ldr r3, [r7, #16]
  7126. 8002e22: f503 6300 add.w r3, r3, #2048 ; 0x800
  7127. 8002e26: 6b5a ldr r2, [r3, #52] ; 0x34
  7128. 8002e28: 68bb ldr r3, [r7, #8]
  7129. 8002e2a: 43db mvns r3, r3
  7130. 8002e2c: 6939 ldr r1, [r7, #16]
  7131. 8002e2e: f501 6100 add.w r1, r1, #2048 ; 0x800
  7132. 8002e32: 4013 ands r3, r2
  7133. 8002e34: 634b str r3, [r1, #52] ; 0x34
  7134. }
  7135. return HAL_OK;
  7136. 8002e36: 2300 movs r3, #0
  7137. }
  7138. 8002e38: 4618 mov r0, r3
  7139. 8002e3a: 3720 adds r7, #32
  7140. 8002e3c: 46bd mov sp, r7
  7141. 8002e3e: bd80 pop {r7, pc}
  7142. 08002e40 <PCD_EP_OutXfrComplete_int>:
  7143. * @param hpcd PCD handle
  7144. * @param epnum endpoint number
  7145. * @retval HAL status
  7146. */
  7147. static HAL_StatusTypeDef PCD_EP_OutXfrComplete_int(PCD_HandleTypeDef *hpcd, uint32_t epnum)
  7148. {
  7149. 8002e40: b580 push {r7, lr}
  7150. 8002e42: b086 sub sp, #24
  7151. 8002e44: af00 add r7, sp, #0
  7152. 8002e46: 6078 str r0, [r7, #4]
  7153. 8002e48: 6039 str r1, [r7, #0]
  7154. USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
  7155. 8002e4a: 687b ldr r3, [r7, #4]
  7156. 8002e4c: 681b ldr r3, [r3, #0]
  7157. 8002e4e: 617b str r3, [r7, #20]
  7158. uint32_t USBx_BASE = (uint32_t)USBx;
  7159. 8002e50: 697b ldr r3, [r7, #20]
  7160. 8002e52: 613b str r3, [r7, #16]
  7161. uint32_t gSNPSiD = *(__IO uint32_t *)(&USBx->CID + 0x1U);
  7162. 8002e54: 697b ldr r3, [r7, #20]
  7163. 8002e56: 333c adds r3, #60 ; 0x3c
  7164. 8002e58: 3304 adds r3, #4
  7165. 8002e5a: 681b ldr r3, [r3, #0]
  7166. 8002e5c: 60fb str r3, [r7, #12]
  7167. uint32_t DoepintReg = USBx_OUTEP(epnum)->DOEPINT;
  7168. 8002e5e: 683b ldr r3, [r7, #0]
  7169. 8002e60: 015a lsls r2, r3, #5
  7170. 8002e62: 693b ldr r3, [r7, #16]
  7171. 8002e64: 4413 add r3, r2
  7172. 8002e66: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7173. 8002e6a: 689b ldr r3, [r3, #8]
  7174. 8002e6c: 60bb str r3, [r7, #8]
  7175. if (hpcd->Init.dma_enable == 1U)
  7176. 8002e6e: 687b ldr r3, [r7, #4]
  7177. 8002e70: 691b ldr r3, [r3, #16]
  7178. 8002e72: 2b01 cmp r3, #1
  7179. 8002e74: f040 80a0 bne.w 8002fb8 <PCD_EP_OutXfrComplete_int+0x178>
  7180. {
  7181. if ((DoepintReg & USB_OTG_DOEPINT_STUP) == USB_OTG_DOEPINT_STUP) /* Class C */
  7182. 8002e78: 68bb ldr r3, [r7, #8]
  7183. 8002e7a: f003 0308 and.w r3, r3, #8
  7184. 8002e7e: 2b00 cmp r3, #0
  7185. 8002e80: d015 beq.n 8002eae <PCD_EP_OutXfrComplete_int+0x6e>
  7186. {
  7187. /* StupPktRcvd = 1 this is a setup packet */
  7188. if ((gSNPSiD > USB_OTG_CORE_ID_300A) &&
  7189. 8002e82: 68fb ldr r3, [r7, #12]
  7190. 8002e84: 4a72 ldr r2, [pc, #456] ; (8003050 <PCD_EP_OutXfrComplete_int+0x210>)
  7191. 8002e86: 4293 cmp r3, r2
  7192. 8002e88: f240 80dd bls.w 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7193. ((DoepintReg & USB_OTG_DOEPINT_STPKTRX) == USB_OTG_DOEPINT_STPKTRX))
  7194. 8002e8c: 68bb ldr r3, [r7, #8]
  7195. 8002e8e: f403 4300 and.w r3, r3, #32768 ; 0x8000
  7196. if ((gSNPSiD > USB_OTG_CORE_ID_300A) &&
  7197. 8002e92: 2b00 cmp r3, #0
  7198. 8002e94: f000 80d7 beq.w 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7199. {
  7200. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_STPKTRX);
  7201. 8002e98: 683b ldr r3, [r7, #0]
  7202. 8002e9a: 015a lsls r2, r3, #5
  7203. 8002e9c: 693b ldr r3, [r7, #16]
  7204. 8002e9e: 4413 add r3, r2
  7205. 8002ea0: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7206. 8002ea4: 461a mov r2, r3
  7207. 8002ea6: f44f 4300 mov.w r3, #32768 ; 0x8000
  7208. 8002eaa: 6093 str r3, [r2, #8]
  7209. 8002eac: e0cb b.n 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7210. }
  7211. }
  7212. else if ((DoepintReg & USB_OTG_DOEPINT_OTEPSPR) == USB_OTG_DOEPINT_OTEPSPR) /* Class E */
  7213. 8002eae: 68bb ldr r3, [r7, #8]
  7214. 8002eb0: f003 0320 and.w r3, r3, #32
  7215. 8002eb4: 2b00 cmp r3, #0
  7216. 8002eb6: d009 beq.n 8002ecc <PCD_EP_OutXfrComplete_int+0x8c>
  7217. {
  7218. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_OTEPSPR);
  7219. 8002eb8: 683b ldr r3, [r7, #0]
  7220. 8002eba: 015a lsls r2, r3, #5
  7221. 8002ebc: 693b ldr r3, [r7, #16]
  7222. 8002ebe: 4413 add r3, r2
  7223. 8002ec0: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7224. 8002ec4: 461a mov r2, r3
  7225. 8002ec6: 2320 movs r3, #32
  7226. 8002ec8: 6093 str r3, [r2, #8]
  7227. 8002eca: e0bc b.n 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7228. }
  7229. else if ((DoepintReg & (USB_OTG_DOEPINT_STUP | USB_OTG_DOEPINT_OTEPSPR)) == 0U)
  7230. 8002ecc: 68bb ldr r3, [r7, #8]
  7231. 8002ece: f003 0328 and.w r3, r3, #40 ; 0x28
  7232. 8002ed2: 2b00 cmp r3, #0
  7233. 8002ed4: f040 80b7 bne.w 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7234. {
  7235. /* StupPktRcvd = 1 this is a setup packet */
  7236. if ((gSNPSiD > USB_OTG_CORE_ID_300A) &&
  7237. 8002ed8: 68fb ldr r3, [r7, #12]
  7238. 8002eda: 4a5d ldr r2, [pc, #372] ; (8003050 <PCD_EP_OutXfrComplete_int+0x210>)
  7239. 8002edc: 4293 cmp r3, r2
  7240. 8002ede: d90f bls.n 8002f00 <PCD_EP_OutXfrComplete_int+0xc0>
  7241. ((DoepintReg & USB_OTG_DOEPINT_STPKTRX) == USB_OTG_DOEPINT_STPKTRX))
  7242. 8002ee0: 68bb ldr r3, [r7, #8]
  7243. 8002ee2: f403 4300 and.w r3, r3, #32768 ; 0x8000
  7244. if ((gSNPSiD > USB_OTG_CORE_ID_300A) &&
  7245. 8002ee6: 2b00 cmp r3, #0
  7246. 8002ee8: d00a beq.n 8002f00 <PCD_EP_OutXfrComplete_int+0xc0>
  7247. {
  7248. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_STPKTRX);
  7249. 8002eea: 683b ldr r3, [r7, #0]
  7250. 8002eec: 015a lsls r2, r3, #5
  7251. 8002eee: 693b ldr r3, [r7, #16]
  7252. 8002ef0: 4413 add r3, r2
  7253. 8002ef2: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7254. 8002ef6: 461a mov r2, r3
  7255. 8002ef8: f44f 4300 mov.w r3, #32768 ; 0x8000
  7256. 8002efc: 6093 str r3, [r2, #8]
  7257. 8002efe: e0a2 b.n 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7258. }
  7259. else
  7260. {
  7261. /* out data packet received over EP0 */
  7262. hpcd->OUT_ep[epnum].xfer_count =
  7263. hpcd->OUT_ep[epnum].maxpacket -
  7264. 8002f00: 6879 ldr r1, [r7, #4]
  7265. 8002f02: 683a ldr r2, [r7, #0]
  7266. 8002f04: 4613 mov r3, r2
  7267. 8002f06: 00db lsls r3, r3, #3
  7268. 8002f08: 1a9b subs r3, r3, r2
  7269. 8002f0a: 009b lsls r3, r3, #2
  7270. 8002f0c: 440b add r3, r1
  7271. 8002f0e: f503 7301 add.w r3, r3, #516 ; 0x204
  7272. 8002f12: 681a ldr r2, [r3, #0]
  7273. (USBx_OUTEP(epnum)->DOEPTSIZ & USB_OTG_DOEPTSIZ_XFRSIZ);
  7274. 8002f14: 683b ldr r3, [r7, #0]
  7275. 8002f16: 0159 lsls r1, r3, #5
  7276. 8002f18: 693b ldr r3, [r7, #16]
  7277. 8002f1a: 440b add r3, r1
  7278. 8002f1c: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7279. 8002f20: 691b ldr r3, [r3, #16]
  7280. 8002f22: f3c3 0312 ubfx r3, r3, #0, #19
  7281. hpcd->OUT_ep[epnum].maxpacket -
  7282. 8002f26: 1ad1 subs r1, r2, r3
  7283. hpcd->OUT_ep[epnum].xfer_count =
  7284. 8002f28: 6878 ldr r0, [r7, #4]
  7285. 8002f2a: 683a ldr r2, [r7, #0]
  7286. 8002f2c: 4613 mov r3, r2
  7287. 8002f2e: 00db lsls r3, r3, #3
  7288. 8002f30: 1a9b subs r3, r3, r2
  7289. 8002f32: 009b lsls r3, r3, #2
  7290. 8002f34: 4403 add r3, r0
  7291. 8002f36: f503 7305 add.w r3, r3, #532 ; 0x214
  7292. 8002f3a: 6019 str r1, [r3, #0]
  7293. hpcd->OUT_ep[epnum].xfer_buff += hpcd->OUT_ep[epnum].maxpacket;
  7294. 8002f3c: 6879 ldr r1, [r7, #4]
  7295. 8002f3e: 683a ldr r2, [r7, #0]
  7296. 8002f40: 4613 mov r3, r2
  7297. 8002f42: 00db lsls r3, r3, #3
  7298. 8002f44: 1a9b subs r3, r3, r2
  7299. 8002f46: 009b lsls r3, r3, #2
  7300. 8002f48: 440b add r3, r1
  7301. 8002f4a: f503 7302 add.w r3, r3, #520 ; 0x208
  7302. 8002f4e: 6819 ldr r1, [r3, #0]
  7303. 8002f50: 6878 ldr r0, [r7, #4]
  7304. 8002f52: 683a ldr r2, [r7, #0]
  7305. 8002f54: 4613 mov r3, r2
  7306. 8002f56: 00db lsls r3, r3, #3
  7307. 8002f58: 1a9b subs r3, r3, r2
  7308. 8002f5a: 009b lsls r3, r3, #2
  7309. 8002f5c: 4403 add r3, r0
  7310. 8002f5e: f503 7301 add.w r3, r3, #516 ; 0x204
  7311. 8002f62: 681b ldr r3, [r3, #0]
  7312. 8002f64: 4419 add r1, r3
  7313. 8002f66: 6878 ldr r0, [r7, #4]
  7314. 8002f68: 683a ldr r2, [r7, #0]
  7315. 8002f6a: 4613 mov r3, r2
  7316. 8002f6c: 00db lsls r3, r3, #3
  7317. 8002f6e: 1a9b subs r3, r3, r2
  7318. 8002f70: 009b lsls r3, r3, #2
  7319. 8002f72: 4403 add r3, r0
  7320. 8002f74: f503 7302 add.w r3, r3, #520 ; 0x208
  7321. 8002f78: 6019 str r1, [r3, #0]
  7322. if ((epnum == 0U) && (hpcd->OUT_ep[epnum].xfer_len == 0U))
  7323. 8002f7a: 683b ldr r3, [r7, #0]
  7324. 8002f7c: 2b00 cmp r3, #0
  7325. 8002f7e: d114 bne.n 8002faa <PCD_EP_OutXfrComplete_int+0x16a>
  7326. 8002f80: 6879 ldr r1, [r7, #4]
  7327. 8002f82: 683a ldr r2, [r7, #0]
  7328. 8002f84: 4613 mov r3, r2
  7329. 8002f86: 00db lsls r3, r3, #3
  7330. 8002f88: 1a9b subs r3, r3, r2
  7331. 8002f8a: 009b lsls r3, r3, #2
  7332. 8002f8c: 440b add r3, r1
  7333. 8002f8e: f503 7304 add.w r3, r3, #528 ; 0x210
  7334. 8002f92: 681b ldr r3, [r3, #0]
  7335. 8002f94: 2b00 cmp r3, #0
  7336. 8002f96: d108 bne.n 8002faa <PCD_EP_OutXfrComplete_int+0x16a>
  7337. {
  7338. /* this is ZLP, so prepare EP0 for next setup */
  7339. (void)USB_EP0_OutStart(hpcd->Instance, 1U, (uint8_t *)hpcd->Setup);
  7340. 8002f98: 687b ldr r3, [r7, #4]
  7341. 8002f9a: 6818 ldr r0, [r3, #0]
  7342. 8002f9c: 687b ldr r3, [r7, #4]
  7343. 8002f9e: f503 7371 add.w r3, r3, #964 ; 0x3c4
  7344. 8002fa2: 461a mov r2, r3
  7345. 8002fa4: 2101 movs r1, #1
  7346. 8002fa6: f003 fd13 bl 80069d0 <USB_EP0_OutStart>
  7347. }
  7348. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  7349. hpcd->DataOutStageCallback(hpcd, (uint8_t)epnum);
  7350. #else
  7351. HAL_PCD_DataOutStageCallback(hpcd, (uint8_t)epnum);
  7352. 8002faa: 683b ldr r3, [r7, #0]
  7353. 8002fac: b2db uxtb r3, r3
  7354. 8002fae: 4619 mov r1, r3
  7355. 8002fb0: 6878 ldr r0, [r7, #4]
  7356. 8002fb2: f005 fca1 bl 80088f8 <HAL_PCD_DataOutStageCallback>
  7357. 8002fb6: e046 b.n 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7358. /* ... */
  7359. }
  7360. }
  7361. else
  7362. {
  7363. if (gSNPSiD == USB_OTG_CORE_ID_310A)
  7364. 8002fb8: 68fb ldr r3, [r7, #12]
  7365. 8002fba: 4a26 ldr r2, [pc, #152] ; (8003054 <PCD_EP_OutXfrComplete_int+0x214>)
  7366. 8002fbc: 4293 cmp r3, r2
  7367. 8002fbe: d124 bne.n 800300a <PCD_EP_OutXfrComplete_int+0x1ca>
  7368. {
  7369. /* StupPktRcvd = 1 this is a setup packet */
  7370. if ((DoepintReg & USB_OTG_DOEPINT_STPKTRX) == USB_OTG_DOEPINT_STPKTRX)
  7371. 8002fc0: 68bb ldr r3, [r7, #8]
  7372. 8002fc2: f403 4300 and.w r3, r3, #32768 ; 0x8000
  7373. 8002fc6: 2b00 cmp r3, #0
  7374. 8002fc8: d00a beq.n 8002fe0 <PCD_EP_OutXfrComplete_int+0x1a0>
  7375. {
  7376. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_STPKTRX);
  7377. 8002fca: 683b ldr r3, [r7, #0]
  7378. 8002fcc: 015a lsls r2, r3, #5
  7379. 8002fce: 693b ldr r3, [r7, #16]
  7380. 8002fd0: 4413 add r3, r2
  7381. 8002fd2: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7382. 8002fd6: 461a mov r2, r3
  7383. 8002fd8: f44f 4300 mov.w r3, #32768 ; 0x8000
  7384. 8002fdc: 6093 str r3, [r2, #8]
  7385. 8002fde: e032 b.n 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7386. }
  7387. else
  7388. {
  7389. if ((DoepintReg & USB_OTG_DOEPINT_OTEPSPR) == USB_OTG_DOEPINT_OTEPSPR)
  7390. 8002fe0: 68bb ldr r3, [r7, #8]
  7391. 8002fe2: f003 0320 and.w r3, r3, #32
  7392. 8002fe6: 2b00 cmp r3, #0
  7393. 8002fe8: d008 beq.n 8002ffc <PCD_EP_OutXfrComplete_int+0x1bc>
  7394. {
  7395. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_OTEPSPR);
  7396. 8002fea: 683b ldr r3, [r7, #0]
  7397. 8002fec: 015a lsls r2, r3, #5
  7398. 8002fee: 693b ldr r3, [r7, #16]
  7399. 8002ff0: 4413 add r3, r2
  7400. 8002ff2: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7401. 8002ff6: 461a mov r2, r3
  7402. 8002ff8: 2320 movs r3, #32
  7403. 8002ffa: 6093 str r3, [r2, #8]
  7404. }
  7405. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  7406. hpcd->DataOutStageCallback(hpcd, (uint8_t)epnum);
  7407. #else
  7408. HAL_PCD_DataOutStageCallback(hpcd, (uint8_t)epnum);
  7409. 8002ffc: 683b ldr r3, [r7, #0]
  7410. 8002ffe: b2db uxtb r3, r3
  7411. 8003000: 4619 mov r1, r3
  7412. 8003002: 6878 ldr r0, [r7, #4]
  7413. 8003004: f005 fc78 bl 80088f8 <HAL_PCD_DataOutStageCallback>
  7414. 8003008: e01d b.n 8003046 <PCD_EP_OutXfrComplete_int+0x206>
  7415. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  7416. }
  7417. }
  7418. else
  7419. {
  7420. if ((epnum == 0U) && (hpcd->OUT_ep[epnum].xfer_len == 0U))
  7421. 800300a: 683b ldr r3, [r7, #0]
  7422. 800300c: 2b00 cmp r3, #0
  7423. 800300e: d114 bne.n 800303a <PCD_EP_OutXfrComplete_int+0x1fa>
  7424. 8003010: 6879 ldr r1, [r7, #4]
  7425. 8003012: 683a ldr r2, [r7, #0]
  7426. 8003014: 4613 mov r3, r2
  7427. 8003016: 00db lsls r3, r3, #3
  7428. 8003018: 1a9b subs r3, r3, r2
  7429. 800301a: 009b lsls r3, r3, #2
  7430. 800301c: 440b add r3, r1
  7431. 800301e: f503 7304 add.w r3, r3, #528 ; 0x210
  7432. 8003022: 681b ldr r3, [r3, #0]
  7433. 8003024: 2b00 cmp r3, #0
  7434. 8003026: d108 bne.n 800303a <PCD_EP_OutXfrComplete_int+0x1fa>
  7435. {
  7436. /* this is ZLP, so prepare EP0 for next setup */
  7437. (void)USB_EP0_OutStart(hpcd->Instance, 0U, (uint8_t *)hpcd->Setup);
  7438. 8003028: 687b ldr r3, [r7, #4]
  7439. 800302a: 6818 ldr r0, [r3, #0]
  7440. 800302c: 687b ldr r3, [r7, #4]
  7441. 800302e: f503 7371 add.w r3, r3, #964 ; 0x3c4
  7442. 8003032: 461a mov r2, r3
  7443. 8003034: 2100 movs r1, #0
  7444. 8003036: f003 fccb bl 80069d0 <USB_EP0_OutStart>
  7445. }
  7446. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  7447. hpcd->DataOutStageCallback(hpcd, (uint8_t)epnum);
  7448. #else
  7449. HAL_PCD_DataOutStageCallback(hpcd, (uint8_t)epnum);
  7450. 800303a: 683b ldr r3, [r7, #0]
  7451. 800303c: b2db uxtb r3, r3
  7452. 800303e: 4619 mov r1, r3
  7453. 8003040: 6878 ldr r0, [r7, #4]
  7454. 8003042: f005 fc59 bl 80088f8 <HAL_PCD_DataOutStageCallback>
  7455. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  7456. }
  7457. }
  7458. return HAL_OK;
  7459. 8003046: 2300 movs r3, #0
  7460. }
  7461. 8003048: 4618 mov r0, r3
  7462. 800304a: 3718 adds r7, #24
  7463. 800304c: 46bd mov sp, r7
  7464. 800304e: bd80 pop {r7, pc}
  7465. 8003050: 4f54300a .word 0x4f54300a
  7466. 8003054: 4f54310a .word 0x4f54310a
  7467. 08003058 <PCD_EP_OutSetupPacket_int>:
  7468. * @param hpcd PCD handle
  7469. * @param epnum endpoint number
  7470. * @retval HAL status
  7471. */
  7472. static HAL_StatusTypeDef PCD_EP_OutSetupPacket_int(PCD_HandleTypeDef *hpcd, uint32_t epnum)
  7473. {
  7474. 8003058: b580 push {r7, lr}
  7475. 800305a: b086 sub sp, #24
  7476. 800305c: af00 add r7, sp, #0
  7477. 800305e: 6078 str r0, [r7, #4]
  7478. 8003060: 6039 str r1, [r7, #0]
  7479. USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
  7480. 8003062: 687b ldr r3, [r7, #4]
  7481. 8003064: 681b ldr r3, [r3, #0]
  7482. 8003066: 617b str r3, [r7, #20]
  7483. uint32_t USBx_BASE = (uint32_t)USBx;
  7484. 8003068: 697b ldr r3, [r7, #20]
  7485. 800306a: 613b str r3, [r7, #16]
  7486. uint32_t gSNPSiD = *(__IO uint32_t *)(&USBx->CID + 0x1U);
  7487. 800306c: 697b ldr r3, [r7, #20]
  7488. 800306e: 333c adds r3, #60 ; 0x3c
  7489. 8003070: 3304 adds r3, #4
  7490. 8003072: 681b ldr r3, [r3, #0]
  7491. 8003074: 60fb str r3, [r7, #12]
  7492. uint32_t DoepintReg = USBx_OUTEP(epnum)->DOEPINT;
  7493. 8003076: 683b ldr r3, [r7, #0]
  7494. 8003078: 015a lsls r2, r3, #5
  7495. 800307a: 693b ldr r3, [r7, #16]
  7496. 800307c: 4413 add r3, r2
  7497. 800307e: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7498. 8003082: 689b ldr r3, [r3, #8]
  7499. 8003084: 60bb str r3, [r7, #8]
  7500. if ((gSNPSiD > USB_OTG_CORE_ID_300A) &&
  7501. 8003086: 68fb ldr r3, [r7, #12]
  7502. 8003088: 4a15 ldr r2, [pc, #84] ; (80030e0 <PCD_EP_OutSetupPacket_int+0x88>)
  7503. 800308a: 4293 cmp r3, r2
  7504. 800308c: d90e bls.n 80030ac <PCD_EP_OutSetupPacket_int+0x54>
  7505. ((DoepintReg & USB_OTG_DOEPINT_STPKTRX) == USB_OTG_DOEPINT_STPKTRX))
  7506. 800308e: 68bb ldr r3, [r7, #8]
  7507. 8003090: f403 4300 and.w r3, r3, #32768 ; 0x8000
  7508. if ((gSNPSiD > USB_OTG_CORE_ID_300A) &&
  7509. 8003094: 2b00 cmp r3, #0
  7510. 8003096: d009 beq.n 80030ac <PCD_EP_OutSetupPacket_int+0x54>
  7511. {
  7512. CLEAR_OUT_EP_INTR(epnum, USB_OTG_DOEPINT_STPKTRX);
  7513. 8003098: 683b ldr r3, [r7, #0]
  7514. 800309a: 015a lsls r2, r3, #5
  7515. 800309c: 693b ldr r3, [r7, #16]
  7516. 800309e: 4413 add r3, r2
  7517. 80030a0: f503 6330 add.w r3, r3, #2816 ; 0xb00
  7518. 80030a4: 461a mov r2, r3
  7519. 80030a6: f44f 4300 mov.w r3, #32768 ; 0x8000
  7520. 80030aa: 6093 str r3, [r2, #8]
  7521. /* Inform the upper layer that a setup packet is available */
  7522. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  7523. hpcd->SetupStageCallback(hpcd);
  7524. #else
  7525. HAL_PCD_SetupStageCallback(hpcd);
  7526. 80030ac: 6878 ldr r0, [r7, #4]
  7527. 80030ae: f005 fc11 bl 80088d4 <HAL_PCD_SetupStageCallback>
  7528. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  7529. if ((gSNPSiD > USB_OTG_CORE_ID_300A) && (hpcd->Init.dma_enable == 1U))
  7530. 80030b2: 68fb ldr r3, [r7, #12]
  7531. 80030b4: 4a0a ldr r2, [pc, #40] ; (80030e0 <PCD_EP_OutSetupPacket_int+0x88>)
  7532. 80030b6: 4293 cmp r3, r2
  7533. 80030b8: d90c bls.n 80030d4 <PCD_EP_OutSetupPacket_int+0x7c>
  7534. 80030ba: 687b ldr r3, [r7, #4]
  7535. 80030bc: 691b ldr r3, [r3, #16]
  7536. 80030be: 2b01 cmp r3, #1
  7537. 80030c0: d108 bne.n 80030d4 <PCD_EP_OutSetupPacket_int+0x7c>
  7538. {
  7539. (void)USB_EP0_OutStart(hpcd->Instance, 1U, (uint8_t *)hpcd->Setup);
  7540. 80030c2: 687b ldr r3, [r7, #4]
  7541. 80030c4: 6818 ldr r0, [r3, #0]
  7542. 80030c6: 687b ldr r3, [r7, #4]
  7543. 80030c8: f503 7371 add.w r3, r3, #964 ; 0x3c4
  7544. 80030cc: 461a mov r2, r3
  7545. 80030ce: 2101 movs r1, #1
  7546. 80030d0: f003 fc7e bl 80069d0 <USB_EP0_OutStart>
  7547. }
  7548. return HAL_OK;
  7549. 80030d4: 2300 movs r3, #0
  7550. }
  7551. 80030d6: 4618 mov r0, r3
  7552. 80030d8: 3718 adds r7, #24
  7553. 80030da: 46bd mov sp, r7
  7554. 80030dc: bd80 pop {r7, pc}
  7555. 80030de: bf00 nop
  7556. 80030e0: 4f54300a .word 0x4f54300a
  7557. 080030e4 <HAL_PCDEx_SetTxFiFo>:
  7558. * @param fifo The number of Tx fifo
  7559. * @param size Fifo size
  7560. * @retval HAL status
  7561. */
  7562. HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size)
  7563. {
  7564. 80030e4: b480 push {r7}
  7565. 80030e6: b085 sub sp, #20
  7566. 80030e8: af00 add r7, sp, #0
  7567. 80030ea: 6078 str r0, [r7, #4]
  7568. 80030ec: 460b mov r3, r1
  7569. 80030ee: 70fb strb r3, [r7, #3]
  7570. 80030f0: 4613 mov r3, r2
  7571. 80030f2: 803b strh r3, [r7, #0]
  7572. --> Txn should be configured with the minimum space of 16 words
  7573. The FIFO is used optimally when used TxFIFOs are allocated in the top
  7574. of the FIFO.Ex: use EP1 and EP2 as IN instead of EP1 and EP3 as IN ones.
  7575. When DMA is used 3n * FIFO locations should be reserved for internal DMA registers */
  7576. Tx_Offset = hpcd->Instance->GRXFSIZ;
  7577. 80030f4: 687b ldr r3, [r7, #4]
  7578. 80030f6: 681b ldr r3, [r3, #0]
  7579. 80030f8: 6a5b ldr r3, [r3, #36] ; 0x24
  7580. 80030fa: 60bb str r3, [r7, #8]
  7581. if (fifo == 0U)
  7582. 80030fc: 78fb ldrb r3, [r7, #3]
  7583. 80030fe: 2b00 cmp r3, #0
  7584. 8003100: d107 bne.n 8003112 <HAL_PCDEx_SetTxFiFo+0x2e>
  7585. {
  7586. hpcd->Instance->DIEPTXF0_HNPTXFSIZ = ((uint32_t)size << 16) | Tx_Offset;
  7587. 8003102: 883b ldrh r3, [r7, #0]
  7588. 8003104: 0419 lsls r1, r3, #16
  7589. 8003106: 687b ldr r3, [r7, #4]
  7590. 8003108: 681b ldr r3, [r3, #0]
  7591. 800310a: 68ba ldr r2, [r7, #8]
  7592. 800310c: 430a orrs r2, r1
  7593. 800310e: 629a str r2, [r3, #40] ; 0x28
  7594. 8003110: e028 b.n 8003164 <HAL_PCDEx_SetTxFiFo+0x80>
  7595. }
  7596. else
  7597. {
  7598. Tx_Offset += (hpcd->Instance->DIEPTXF0_HNPTXFSIZ) >> 16;
  7599. 8003112: 687b ldr r3, [r7, #4]
  7600. 8003114: 681b ldr r3, [r3, #0]
  7601. 8003116: 6a9b ldr r3, [r3, #40] ; 0x28
  7602. 8003118: 0c1b lsrs r3, r3, #16
  7603. 800311a: 68ba ldr r2, [r7, #8]
  7604. 800311c: 4413 add r3, r2
  7605. 800311e: 60bb str r3, [r7, #8]
  7606. for (i = 0U; i < (fifo - 1U); i++)
  7607. 8003120: 2300 movs r3, #0
  7608. 8003122: 73fb strb r3, [r7, #15]
  7609. 8003124: e00d b.n 8003142 <HAL_PCDEx_SetTxFiFo+0x5e>
  7610. {
  7611. Tx_Offset += (hpcd->Instance->DIEPTXF[i] >> 16);
  7612. 8003126: 687b ldr r3, [r7, #4]
  7613. 8003128: 681a ldr r2, [r3, #0]
  7614. 800312a: 7bfb ldrb r3, [r7, #15]
  7615. 800312c: 3340 adds r3, #64 ; 0x40
  7616. 800312e: 009b lsls r3, r3, #2
  7617. 8003130: 4413 add r3, r2
  7618. 8003132: 685b ldr r3, [r3, #4]
  7619. 8003134: 0c1b lsrs r3, r3, #16
  7620. 8003136: 68ba ldr r2, [r7, #8]
  7621. 8003138: 4413 add r3, r2
  7622. 800313a: 60bb str r3, [r7, #8]
  7623. for (i = 0U; i < (fifo - 1U); i++)
  7624. 800313c: 7bfb ldrb r3, [r7, #15]
  7625. 800313e: 3301 adds r3, #1
  7626. 8003140: 73fb strb r3, [r7, #15]
  7627. 8003142: 7bfa ldrb r2, [r7, #15]
  7628. 8003144: 78fb ldrb r3, [r7, #3]
  7629. 8003146: 3b01 subs r3, #1
  7630. 8003148: 429a cmp r2, r3
  7631. 800314a: d3ec bcc.n 8003126 <HAL_PCDEx_SetTxFiFo+0x42>
  7632. }
  7633. /* Multiply Tx_Size by 2 to get higher performance */
  7634. hpcd->Instance->DIEPTXF[fifo - 1U] = ((uint32_t)size << 16) | Tx_Offset;
  7635. 800314c: 883b ldrh r3, [r7, #0]
  7636. 800314e: 0418 lsls r0, r3, #16
  7637. 8003150: 687b ldr r3, [r7, #4]
  7638. 8003152: 6819 ldr r1, [r3, #0]
  7639. 8003154: 78fb ldrb r3, [r7, #3]
  7640. 8003156: 3b01 subs r3, #1
  7641. 8003158: 68ba ldr r2, [r7, #8]
  7642. 800315a: 4302 orrs r2, r0
  7643. 800315c: 3340 adds r3, #64 ; 0x40
  7644. 800315e: 009b lsls r3, r3, #2
  7645. 8003160: 440b add r3, r1
  7646. 8003162: 605a str r2, [r3, #4]
  7647. }
  7648. return HAL_OK;
  7649. 8003164: 2300 movs r3, #0
  7650. }
  7651. 8003166: 4618 mov r0, r3
  7652. 8003168: 3714 adds r7, #20
  7653. 800316a: 46bd mov sp, r7
  7654. 800316c: f85d 7b04 ldr.w r7, [sp], #4
  7655. 8003170: 4770 bx lr
  7656. 08003172 <HAL_PCDEx_SetRxFiFo>:
  7657. * @param hpcd PCD handle
  7658. * @param size Size of Rx fifo
  7659. * @retval HAL status
  7660. */
  7661. HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size)
  7662. {
  7663. 8003172: b480 push {r7}
  7664. 8003174: b083 sub sp, #12
  7665. 8003176: af00 add r7, sp, #0
  7666. 8003178: 6078 str r0, [r7, #4]
  7667. 800317a: 460b mov r3, r1
  7668. 800317c: 807b strh r3, [r7, #2]
  7669. hpcd->Instance->GRXFSIZ = size;
  7670. 800317e: 687b ldr r3, [r7, #4]
  7671. 8003180: 681b ldr r3, [r3, #0]
  7672. 8003182: 887a ldrh r2, [r7, #2]
  7673. 8003184: 625a str r2, [r3, #36] ; 0x24
  7674. return HAL_OK;
  7675. 8003186: 2300 movs r3, #0
  7676. }
  7677. 8003188: 4618 mov r0, r3
  7678. 800318a: 370c adds r7, #12
  7679. 800318c: 46bd mov sp, r7
  7680. 800318e: f85d 7b04 ldr.w r7, [sp], #4
  7681. 8003192: 4770 bx lr
  7682. 08003194 <HAL_PCDEx_ActivateLPM>:
  7683. * @brief Activate LPM feature.
  7684. * @param hpcd PCD handle
  7685. * @retval HAL status
  7686. */
  7687. HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd)
  7688. {
  7689. 8003194: b480 push {r7}
  7690. 8003196: b085 sub sp, #20
  7691. 8003198: af00 add r7, sp, #0
  7692. 800319a: 6078 str r0, [r7, #4]
  7693. USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
  7694. 800319c: 687b ldr r3, [r7, #4]
  7695. 800319e: 681b ldr r3, [r3, #0]
  7696. 80031a0: 60fb str r3, [r7, #12]
  7697. hpcd->lpm_active = 1U;
  7698. 80031a2: 687b ldr r3, [r7, #4]
  7699. 80031a4: 2201 movs r2, #1
  7700. 80031a6: f8c3 23fc str.w r2, [r3, #1020] ; 0x3fc
  7701. hpcd->LPM_State = LPM_L0;
  7702. 80031aa: 687b ldr r3, [r7, #4]
  7703. 80031ac: 2200 movs r2, #0
  7704. 80031ae: f883 23f4 strb.w r2, [r3, #1012] ; 0x3f4
  7705. USBx->GINTMSK |= USB_OTG_GINTMSK_LPMINTM;
  7706. 80031b2: 68fb ldr r3, [r7, #12]
  7707. 80031b4: 699b ldr r3, [r3, #24]
  7708. 80031b6: f043 6200 orr.w r2, r3, #134217728 ; 0x8000000
  7709. 80031ba: 68fb ldr r3, [r7, #12]
  7710. 80031bc: 619a str r2, [r3, #24]
  7711. USBx->GLPMCFG |= (USB_OTG_GLPMCFG_LPMEN | USB_OTG_GLPMCFG_LPMACK | USB_OTG_GLPMCFG_ENBESL);
  7712. 80031be: 68fb ldr r3, [r7, #12]
  7713. 80031c0: 6d5b ldr r3, [r3, #84] ; 0x54
  7714. 80031c2: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  7715. 80031c6: f043 0303 orr.w r3, r3, #3
  7716. 80031ca: 68fa ldr r2, [r7, #12]
  7717. 80031cc: 6553 str r3, [r2, #84] ; 0x54
  7718. return HAL_OK;
  7719. 80031ce: 2300 movs r3, #0
  7720. }
  7721. 80031d0: 4618 mov r0, r3
  7722. 80031d2: 3714 adds r7, #20
  7723. 80031d4: 46bd mov sp, r7
  7724. 80031d6: f85d 7b04 ldr.w r7, [sp], #4
  7725. 80031da: 4770 bx lr
  7726. 080031dc <HAL_RCC_ClockConfig>:
  7727. * HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
  7728. * (for more details refer to section above "Initialization/de-initialization functions")
  7729. * @retval None
  7730. */
  7731. HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
  7732. {
  7733. 80031dc: b580 push {r7, lr}
  7734. 80031de: b084 sub sp, #16
  7735. 80031e0: af00 add r7, sp, #0
  7736. 80031e2: 6078 str r0, [r7, #4]
  7737. 80031e4: 6039 str r1, [r7, #0]
  7738. uint32_t tickstart;
  7739. /* Check Null pointer */
  7740. if(RCC_ClkInitStruct == NULL)
  7741. 80031e6: 687b ldr r3, [r7, #4]
  7742. 80031e8: 2b00 cmp r3, #0
  7743. 80031ea: d101 bne.n 80031f0 <HAL_RCC_ClockConfig+0x14>
  7744. {
  7745. return HAL_ERROR;
  7746. 80031ec: 2301 movs r3, #1
  7747. 80031ee: e0cc b.n 800338a <HAL_RCC_ClockConfig+0x1ae>
  7748. /* To correctly read data from FLASH memory, the number of wait states (LATENCY)
  7749. must be correctly programmed according to the frequency of the CPU clock
  7750. (HCLK) and the supply voltage of the device. */
  7751. /* Increasing the number of wait states because of higher CPU frequency */
  7752. if(FLatency > __HAL_FLASH_GET_LATENCY())
  7753. 80031f0: 4b68 ldr r3, [pc, #416] ; (8003394 <HAL_RCC_ClockConfig+0x1b8>)
  7754. 80031f2: 681b ldr r3, [r3, #0]
  7755. 80031f4: f003 030f and.w r3, r3, #15
  7756. 80031f8: 683a ldr r2, [r7, #0]
  7757. 80031fa: 429a cmp r2, r3
  7758. 80031fc: d90c bls.n 8003218 <HAL_RCC_ClockConfig+0x3c>
  7759. {
  7760. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  7761. __HAL_FLASH_SET_LATENCY(FLatency);
  7762. 80031fe: 4b65 ldr r3, [pc, #404] ; (8003394 <HAL_RCC_ClockConfig+0x1b8>)
  7763. 8003200: 683a ldr r2, [r7, #0]
  7764. 8003202: b2d2 uxtb r2, r2
  7765. 8003204: 701a strb r2, [r3, #0]
  7766. /* Check that the new number of wait states is taken into account to access the Flash
  7767. memory by reading the FLASH_ACR register */
  7768. if(__HAL_FLASH_GET_LATENCY() != FLatency)
  7769. 8003206: 4b63 ldr r3, [pc, #396] ; (8003394 <HAL_RCC_ClockConfig+0x1b8>)
  7770. 8003208: 681b ldr r3, [r3, #0]
  7771. 800320a: f003 030f and.w r3, r3, #15
  7772. 800320e: 683a ldr r2, [r7, #0]
  7773. 8003210: 429a cmp r2, r3
  7774. 8003212: d001 beq.n 8003218 <HAL_RCC_ClockConfig+0x3c>
  7775. {
  7776. return HAL_ERROR;
  7777. 8003214: 2301 movs r3, #1
  7778. 8003216: e0b8 b.n 800338a <HAL_RCC_ClockConfig+0x1ae>
  7779. }
  7780. }
  7781. /*-------------------------- HCLK Configuration --------------------------*/
  7782. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
  7783. 8003218: 687b ldr r3, [r7, #4]
  7784. 800321a: 681b ldr r3, [r3, #0]
  7785. 800321c: f003 0302 and.w r3, r3, #2
  7786. 8003220: 2b00 cmp r3, #0
  7787. 8003222: d020 beq.n 8003266 <HAL_RCC_ClockConfig+0x8a>
  7788. {
  7789. /* Set the highest APBx dividers in order to ensure that we do not go through
  7790. a non-spec phase whatever we decrease or increase HCLK. */
  7791. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  7792. 8003224: 687b ldr r3, [r7, #4]
  7793. 8003226: 681b ldr r3, [r3, #0]
  7794. 8003228: f003 0304 and.w r3, r3, #4
  7795. 800322c: 2b00 cmp r3, #0
  7796. 800322e: d005 beq.n 800323c <HAL_RCC_ClockConfig+0x60>
  7797. {
  7798. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
  7799. 8003230: 4b59 ldr r3, [pc, #356] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7800. 8003232: 689b ldr r3, [r3, #8]
  7801. 8003234: 4a58 ldr r2, [pc, #352] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7802. 8003236: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00
  7803. 800323a: 6093 str r3, [r2, #8]
  7804. }
  7805. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
  7806. 800323c: 687b ldr r3, [r7, #4]
  7807. 800323e: 681b ldr r3, [r3, #0]
  7808. 8003240: f003 0308 and.w r3, r3, #8
  7809. 8003244: 2b00 cmp r3, #0
  7810. 8003246: d005 beq.n 8003254 <HAL_RCC_ClockConfig+0x78>
  7811. {
  7812. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
  7813. 8003248: 4b53 ldr r3, [pc, #332] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7814. 800324a: 689b ldr r3, [r3, #8]
  7815. 800324c: 4a52 ldr r2, [pc, #328] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7816. 800324e: f443 4360 orr.w r3, r3, #57344 ; 0xe000
  7817. 8003252: 6093 str r3, [r2, #8]
  7818. }
  7819. assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
  7820. MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
  7821. 8003254: 4b50 ldr r3, [pc, #320] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7822. 8003256: 689b ldr r3, [r3, #8]
  7823. 8003258: f023 02f0 bic.w r2, r3, #240 ; 0xf0
  7824. 800325c: 687b ldr r3, [r7, #4]
  7825. 800325e: 689b ldr r3, [r3, #8]
  7826. 8003260: 494d ldr r1, [pc, #308] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7827. 8003262: 4313 orrs r3, r2
  7828. 8003264: 608b str r3, [r1, #8]
  7829. }
  7830. /*------------------------- SYSCLK Configuration ---------------------------*/
  7831. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
  7832. 8003266: 687b ldr r3, [r7, #4]
  7833. 8003268: 681b ldr r3, [r3, #0]
  7834. 800326a: f003 0301 and.w r3, r3, #1
  7835. 800326e: 2b00 cmp r3, #0
  7836. 8003270: d044 beq.n 80032fc <HAL_RCC_ClockConfig+0x120>
  7837. {
  7838. assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
  7839. /* HSE is selected as System Clock Source */
  7840. if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
  7841. 8003272: 687b ldr r3, [r7, #4]
  7842. 8003274: 685b ldr r3, [r3, #4]
  7843. 8003276: 2b01 cmp r3, #1
  7844. 8003278: d107 bne.n 800328a <HAL_RCC_ClockConfig+0xae>
  7845. {
  7846. /* Check the HSE ready flag */
  7847. if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
  7848. 800327a: 4b47 ldr r3, [pc, #284] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7849. 800327c: 681b ldr r3, [r3, #0]
  7850. 800327e: f403 3300 and.w r3, r3, #131072 ; 0x20000
  7851. 8003282: 2b00 cmp r3, #0
  7852. 8003284: d119 bne.n 80032ba <HAL_RCC_ClockConfig+0xde>
  7853. {
  7854. return HAL_ERROR;
  7855. 8003286: 2301 movs r3, #1
  7856. 8003288: e07f b.n 800338a <HAL_RCC_ClockConfig+0x1ae>
  7857. }
  7858. }
  7859. /* PLL is selected as System Clock Source */
  7860. else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
  7861. 800328a: 687b ldr r3, [r7, #4]
  7862. 800328c: 685b ldr r3, [r3, #4]
  7863. 800328e: 2b02 cmp r3, #2
  7864. 8003290: d003 beq.n 800329a <HAL_RCC_ClockConfig+0xbe>
  7865. (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLRCLK))
  7866. 8003292: 687b ldr r3, [r7, #4]
  7867. 8003294: 685b ldr r3, [r3, #4]
  7868. else if((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
  7869. 8003296: 2b03 cmp r3, #3
  7870. 8003298: d107 bne.n 80032aa <HAL_RCC_ClockConfig+0xce>
  7871. {
  7872. /* Check the PLL ready flag */
  7873. if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
  7874. 800329a: 4b3f ldr r3, [pc, #252] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7875. 800329c: 681b ldr r3, [r3, #0]
  7876. 800329e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
  7877. 80032a2: 2b00 cmp r3, #0
  7878. 80032a4: d109 bne.n 80032ba <HAL_RCC_ClockConfig+0xde>
  7879. {
  7880. return HAL_ERROR;
  7881. 80032a6: 2301 movs r3, #1
  7882. 80032a8: e06f b.n 800338a <HAL_RCC_ClockConfig+0x1ae>
  7883. }
  7884. /* HSI is selected as System Clock Source */
  7885. else
  7886. {
  7887. /* Check the HSI ready flag */
  7888. if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
  7889. 80032aa: 4b3b ldr r3, [pc, #236] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7890. 80032ac: 681b ldr r3, [r3, #0]
  7891. 80032ae: f003 0302 and.w r3, r3, #2
  7892. 80032b2: 2b00 cmp r3, #0
  7893. 80032b4: d101 bne.n 80032ba <HAL_RCC_ClockConfig+0xde>
  7894. {
  7895. return HAL_ERROR;
  7896. 80032b6: 2301 movs r3, #1
  7897. 80032b8: e067 b.n 800338a <HAL_RCC_ClockConfig+0x1ae>
  7898. }
  7899. }
  7900. __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
  7901. 80032ba: 4b37 ldr r3, [pc, #220] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7902. 80032bc: 689b ldr r3, [r3, #8]
  7903. 80032be: f023 0203 bic.w r2, r3, #3
  7904. 80032c2: 687b ldr r3, [r7, #4]
  7905. 80032c4: 685b ldr r3, [r3, #4]
  7906. 80032c6: 4934 ldr r1, [pc, #208] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7907. 80032c8: 4313 orrs r3, r2
  7908. 80032ca: 608b str r3, [r1, #8]
  7909. /* Get Start Tick */
  7910. tickstart = HAL_GetTick();
  7911. 80032cc: f7fd ffe6 bl 800129c <HAL_GetTick>
  7912. 80032d0: 60f8 str r0, [r7, #12]
  7913. while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
  7914. 80032d2: e00a b.n 80032ea <HAL_RCC_ClockConfig+0x10e>
  7915. {
  7916. if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
  7917. 80032d4: f7fd ffe2 bl 800129c <HAL_GetTick>
  7918. 80032d8: 4602 mov r2, r0
  7919. 80032da: 68fb ldr r3, [r7, #12]
  7920. 80032dc: 1ad3 subs r3, r2, r3
  7921. 80032de: f241 3288 movw r2, #5000 ; 0x1388
  7922. 80032e2: 4293 cmp r3, r2
  7923. 80032e4: d901 bls.n 80032ea <HAL_RCC_ClockConfig+0x10e>
  7924. {
  7925. return HAL_TIMEOUT;
  7926. 80032e6: 2303 movs r3, #3
  7927. 80032e8: e04f b.n 800338a <HAL_RCC_ClockConfig+0x1ae>
  7928. while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
  7929. 80032ea: 4b2b ldr r3, [pc, #172] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7930. 80032ec: 689b ldr r3, [r3, #8]
  7931. 80032ee: f003 020c and.w r2, r3, #12
  7932. 80032f2: 687b ldr r3, [r7, #4]
  7933. 80032f4: 685b ldr r3, [r3, #4]
  7934. 80032f6: 009b lsls r3, r3, #2
  7935. 80032f8: 429a cmp r2, r3
  7936. 80032fa: d1eb bne.n 80032d4 <HAL_RCC_ClockConfig+0xf8>
  7937. }
  7938. }
  7939. }
  7940. /* Decreasing the number of wait states because of lower CPU frequency */
  7941. if(FLatency < __HAL_FLASH_GET_LATENCY())
  7942. 80032fc: 4b25 ldr r3, [pc, #148] ; (8003394 <HAL_RCC_ClockConfig+0x1b8>)
  7943. 80032fe: 681b ldr r3, [r3, #0]
  7944. 8003300: f003 030f and.w r3, r3, #15
  7945. 8003304: 683a ldr r2, [r7, #0]
  7946. 8003306: 429a cmp r2, r3
  7947. 8003308: d20c bcs.n 8003324 <HAL_RCC_ClockConfig+0x148>
  7948. {
  7949. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  7950. __HAL_FLASH_SET_LATENCY(FLatency);
  7951. 800330a: 4b22 ldr r3, [pc, #136] ; (8003394 <HAL_RCC_ClockConfig+0x1b8>)
  7952. 800330c: 683a ldr r2, [r7, #0]
  7953. 800330e: b2d2 uxtb r2, r2
  7954. 8003310: 701a strb r2, [r3, #0]
  7955. /* Check that the new number of wait states is taken into account to access the Flash
  7956. memory by reading the FLASH_ACR register */
  7957. if(__HAL_FLASH_GET_LATENCY() != FLatency)
  7958. 8003312: 4b20 ldr r3, [pc, #128] ; (8003394 <HAL_RCC_ClockConfig+0x1b8>)
  7959. 8003314: 681b ldr r3, [r3, #0]
  7960. 8003316: f003 030f and.w r3, r3, #15
  7961. 800331a: 683a ldr r2, [r7, #0]
  7962. 800331c: 429a cmp r2, r3
  7963. 800331e: d001 beq.n 8003324 <HAL_RCC_ClockConfig+0x148>
  7964. {
  7965. return HAL_ERROR;
  7966. 8003320: 2301 movs r3, #1
  7967. 8003322: e032 b.n 800338a <HAL_RCC_ClockConfig+0x1ae>
  7968. }
  7969. }
  7970. /*-------------------------- PCLK1 Configuration ---------------------------*/
  7971. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  7972. 8003324: 687b ldr r3, [r7, #4]
  7973. 8003326: 681b ldr r3, [r3, #0]
  7974. 8003328: f003 0304 and.w r3, r3, #4
  7975. 800332c: 2b00 cmp r3, #0
  7976. 800332e: d008 beq.n 8003342 <HAL_RCC_ClockConfig+0x166>
  7977. {
  7978. assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
  7979. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
  7980. 8003330: 4b19 ldr r3, [pc, #100] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7981. 8003332: 689b ldr r3, [r3, #8]
  7982. 8003334: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00
  7983. 8003338: 687b ldr r3, [r7, #4]
  7984. 800333a: 68db ldr r3, [r3, #12]
  7985. 800333c: 4916 ldr r1, [pc, #88] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  7986. 800333e: 4313 orrs r3, r2
  7987. 8003340: 608b str r3, [r1, #8]
  7988. }
  7989. /*-------------------------- PCLK2 Configuration ---------------------------*/
  7990. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
  7991. 8003342: 687b ldr r3, [r7, #4]
  7992. 8003344: 681b ldr r3, [r3, #0]
  7993. 8003346: f003 0308 and.w r3, r3, #8
  7994. 800334a: 2b00 cmp r3, #0
  7995. 800334c: d009 beq.n 8003362 <HAL_RCC_ClockConfig+0x186>
  7996. {
  7997. assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
  7998. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
  7999. 800334e: 4b12 ldr r3, [pc, #72] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  8000. 8003350: 689b ldr r3, [r3, #8]
  8001. 8003352: f423 4260 bic.w r2, r3, #57344 ; 0xe000
  8002. 8003356: 687b ldr r3, [r7, #4]
  8003. 8003358: 691b ldr r3, [r3, #16]
  8004. 800335a: 00db lsls r3, r3, #3
  8005. 800335c: 490e ldr r1, [pc, #56] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  8006. 800335e: 4313 orrs r3, r2
  8007. 8003360: 608b str r3, [r1, #8]
  8008. }
  8009. /* Update the SystemCoreClock global variable */
  8010. SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_Pos];
  8011. 8003362: f000 fb7f bl 8003a64 <HAL_RCC_GetSysClockFreq>
  8012. 8003366: 4602 mov r2, r0
  8013. 8003368: 4b0b ldr r3, [pc, #44] ; (8003398 <HAL_RCC_ClockConfig+0x1bc>)
  8014. 800336a: 689b ldr r3, [r3, #8]
  8015. 800336c: 091b lsrs r3, r3, #4
  8016. 800336e: f003 030f and.w r3, r3, #15
  8017. 8003372: 490a ldr r1, [pc, #40] ; (800339c <HAL_RCC_ClockConfig+0x1c0>)
  8018. 8003374: 5ccb ldrb r3, [r1, r3]
  8019. 8003376: fa22 f303 lsr.w r3, r2, r3
  8020. 800337a: 4a09 ldr r2, [pc, #36] ; (80033a0 <HAL_RCC_ClockConfig+0x1c4>)
  8021. 800337c: 6013 str r3, [r2, #0]
  8022. /* Configure the source of time base considering new system clocks settings */
  8023. HAL_InitTick (uwTickPrio);
  8024. 800337e: 4b09 ldr r3, [pc, #36] ; (80033a4 <HAL_RCC_ClockConfig+0x1c8>)
  8025. 8003380: 681b ldr r3, [r3, #0]
  8026. 8003382: 4618 mov r0, r3
  8027. 8003384: f7fd ff46 bl 8001214 <HAL_InitTick>
  8028. return HAL_OK;
  8029. 8003388: 2300 movs r3, #0
  8030. }
  8031. 800338a: 4618 mov r0, r3
  8032. 800338c: 3710 adds r7, #16
  8033. 800338e: 46bd mov sp, r7
  8034. 8003390: bd80 pop {r7, pc}
  8035. 8003392: bf00 nop
  8036. 8003394: 40023c00 .word 0x40023c00
  8037. 8003398: 40023800 .word 0x40023800
  8038. 800339c: 08008fa8 .word 0x08008fa8
  8039. 80033a0: 20000000 .word 0x20000000
  8040. 80033a4: 20000004 .word 0x20000004
  8041. 080033a8 <HAL_RCC_GetHCLKFreq>:
  8042. * @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency
  8043. * and updated within this function
  8044. * @retval HCLK frequency
  8045. */
  8046. uint32_t HAL_RCC_GetHCLKFreq(void)
  8047. {
  8048. 80033a8: b480 push {r7}
  8049. 80033aa: af00 add r7, sp, #0
  8050. return SystemCoreClock;
  8051. 80033ac: 4b03 ldr r3, [pc, #12] ; (80033bc <HAL_RCC_GetHCLKFreq+0x14>)
  8052. 80033ae: 681b ldr r3, [r3, #0]
  8053. }
  8054. 80033b0: 4618 mov r0, r3
  8055. 80033b2: 46bd mov sp, r7
  8056. 80033b4: f85d 7b04 ldr.w r7, [sp], #4
  8057. 80033b8: 4770 bx lr
  8058. 80033ba: bf00 nop
  8059. 80033bc: 20000000 .word 0x20000000
  8060. 080033c0 <HAL_RCC_GetPCLK1Freq>:
  8061. * @note Each time PCLK1 changes, this function must be called to update the
  8062. * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
  8063. * @retval PCLK1 frequency
  8064. */
  8065. uint32_t HAL_RCC_GetPCLK1Freq(void)
  8066. {
  8067. 80033c0: b580 push {r7, lr}
  8068. 80033c2: af00 add r7, sp, #0
  8069. /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
  8070. return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1)>> RCC_CFGR_PPRE1_Pos]);
  8071. 80033c4: f7ff fff0 bl 80033a8 <HAL_RCC_GetHCLKFreq>
  8072. 80033c8: 4602 mov r2, r0
  8073. 80033ca: 4b05 ldr r3, [pc, #20] ; (80033e0 <HAL_RCC_GetPCLK1Freq+0x20>)
  8074. 80033cc: 689b ldr r3, [r3, #8]
  8075. 80033ce: 0a9b lsrs r3, r3, #10
  8076. 80033d0: f003 0307 and.w r3, r3, #7
  8077. 80033d4: 4903 ldr r1, [pc, #12] ; (80033e4 <HAL_RCC_GetPCLK1Freq+0x24>)
  8078. 80033d6: 5ccb ldrb r3, [r1, r3]
  8079. 80033d8: fa22 f303 lsr.w r3, r2, r3
  8080. }
  8081. 80033dc: 4618 mov r0, r3
  8082. 80033de: bd80 pop {r7, pc}
  8083. 80033e0: 40023800 .word 0x40023800
  8084. 80033e4: 08008fb8 .word 0x08008fb8
  8085. 080033e8 <HAL_RCC_GetPCLK2Freq>:
  8086. * @note Each time PCLK2 changes, this function must be called to update the
  8087. * right PCLK2 value. Otherwise, any configuration based on this function will be incorrect.
  8088. * @retval PCLK2 frequency
  8089. */
  8090. uint32_t HAL_RCC_GetPCLK2Freq(void)
  8091. {
  8092. 80033e8: b580 push {r7, lr}
  8093. 80033ea: af00 add r7, sp, #0
  8094. /* Get HCLK source and Compute PCLK2 frequency ---------------------------*/
  8095. return (HAL_RCC_GetHCLKFreq()>> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2)>> RCC_CFGR_PPRE2_Pos]);
  8096. 80033ec: f7ff ffdc bl 80033a8 <HAL_RCC_GetHCLKFreq>
  8097. 80033f0: 4602 mov r2, r0
  8098. 80033f2: 4b05 ldr r3, [pc, #20] ; (8003408 <HAL_RCC_GetPCLK2Freq+0x20>)
  8099. 80033f4: 689b ldr r3, [r3, #8]
  8100. 80033f6: 0b5b lsrs r3, r3, #13
  8101. 80033f8: f003 0307 and.w r3, r3, #7
  8102. 80033fc: 4903 ldr r1, [pc, #12] ; (800340c <HAL_RCC_GetPCLK2Freq+0x24>)
  8103. 80033fe: 5ccb ldrb r3, [r1, r3]
  8104. 8003400: fa22 f303 lsr.w r3, r2, r3
  8105. }
  8106. 8003404: 4618 mov r0, r3
  8107. 8003406: bd80 pop {r7, pc}
  8108. 8003408: 40023800 .word 0x40023800
  8109. 800340c: 08008fb8 .word 0x08008fb8
  8110. 08003410 <HAL_RCCEx_PeriphCLKConfig>:
  8111. * the backup registers) and RCC_BDCR register are set to their reset values.
  8112. *
  8113. * @retval HAL status
  8114. */
  8115. HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
  8116. {
  8117. 8003410: b580 push {r7, lr}
  8118. 8003412: b08c sub sp, #48 ; 0x30
  8119. 8003414: af00 add r7, sp, #0
  8120. 8003416: 6078 str r0, [r7, #4]
  8121. uint32_t tickstart = 0U;
  8122. 8003418: 2300 movs r3, #0
  8123. 800341a: 627b str r3, [r7, #36] ; 0x24
  8124. uint32_t tmpreg1 = 0U;
  8125. 800341c: 2300 movs r3, #0
  8126. 800341e: 623b str r3, [r7, #32]
  8127. uint32_t plli2sp = 0U;
  8128. 8003420: 2300 movs r3, #0
  8129. 8003422: 61fb str r3, [r7, #28]
  8130. uint32_t plli2sq = 0U;
  8131. 8003424: 2300 movs r3, #0
  8132. 8003426: 61bb str r3, [r7, #24]
  8133. uint32_t plli2sr = 0U;
  8134. 8003428: 2300 movs r3, #0
  8135. 800342a: 617b str r3, [r7, #20]
  8136. uint32_t pllsaip = 0U;
  8137. 800342c: 2300 movs r3, #0
  8138. 800342e: 613b str r3, [r7, #16]
  8139. uint32_t pllsaiq = 0U;
  8140. 8003430: 2300 movs r3, #0
  8141. 8003432: 60fb str r3, [r7, #12]
  8142. uint32_t plli2sused = 0U;
  8143. 8003434: 2300 movs r3, #0
  8144. 8003436: 62fb str r3, [r7, #44] ; 0x2c
  8145. uint32_t pllsaiused = 0U;
  8146. 8003438: 2300 movs r3, #0
  8147. 800343a: 62bb str r3, [r7, #40] ; 0x28
  8148. /* Check the peripheral clock selection parameters */
  8149. assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection));
  8150. /*------------------------ I2S APB1 configuration --------------------------*/
  8151. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB1) == (RCC_PERIPHCLK_I2S_APB1))
  8152. 800343c: 687b ldr r3, [r7, #4]
  8153. 800343e: 681b ldr r3, [r3, #0]
  8154. 8003440: f003 0301 and.w r3, r3, #1
  8155. 8003444: 2b00 cmp r3, #0
  8156. 8003446: d010 beq.n 800346a <HAL_RCCEx_PeriphCLKConfig+0x5a>
  8157. {
  8158. /* Check the parameters */
  8159. assert_param(IS_RCC_I2SAPB1CLKSOURCE(PeriphClkInit->I2sApb1ClockSelection));
  8160. /* Configure I2S Clock source */
  8161. __HAL_RCC_I2S_APB1_CONFIG(PeriphClkInit->I2sApb1ClockSelection);
  8162. 8003448: 4b6f ldr r3, [pc, #444] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8163. 800344a: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
  8164. 800344e: f023 62c0 bic.w r2, r3, #100663296 ; 0x6000000
  8165. 8003452: 687b ldr r3, [r7, #4]
  8166. 8003454: 6b9b ldr r3, [r3, #56] ; 0x38
  8167. 8003456: 496c ldr r1, [pc, #432] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8168. 8003458: 4313 orrs r3, r2
  8169. 800345a: f8c1 308c str.w r3, [r1, #140] ; 0x8c
  8170. /* Enable the PLLI2S when it's used as clock source for I2S */
  8171. if(PeriphClkInit->I2sApb1ClockSelection == RCC_I2SAPB1CLKSOURCE_PLLI2S)
  8172. 800345e: 687b ldr r3, [r7, #4]
  8173. 8003460: 6b9b ldr r3, [r3, #56] ; 0x38
  8174. 8003462: 2b00 cmp r3, #0
  8175. 8003464: d101 bne.n 800346a <HAL_RCCEx_PeriphCLKConfig+0x5a>
  8176. {
  8177. plli2sused = 1U;
  8178. 8003466: 2301 movs r3, #1
  8179. 8003468: 62fb str r3, [r7, #44] ; 0x2c
  8180. }
  8181. }
  8182. /*--------------------------------------------------------------------------*/
  8183. /*---------------------------- I2S APB2 configuration ----------------------*/
  8184. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB2) == (RCC_PERIPHCLK_I2S_APB2))
  8185. 800346a: 687b ldr r3, [r7, #4]
  8186. 800346c: 681b ldr r3, [r3, #0]
  8187. 800346e: f003 0302 and.w r3, r3, #2
  8188. 8003472: 2b00 cmp r3, #0
  8189. 8003474: d010 beq.n 8003498 <HAL_RCCEx_PeriphCLKConfig+0x88>
  8190. {
  8191. /* Check the parameters */
  8192. assert_param(IS_RCC_I2SAPB2CLKSOURCE(PeriphClkInit->I2sApb2ClockSelection));
  8193. /* Configure I2S Clock source */
  8194. __HAL_RCC_I2S_APB2_CONFIG(PeriphClkInit->I2sApb2ClockSelection);
  8195. 8003476: 4b64 ldr r3, [pc, #400] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8196. 8003478: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
  8197. 800347c: f023 52c0 bic.w r2, r3, #402653184 ; 0x18000000
  8198. 8003480: 687b ldr r3, [r7, #4]
  8199. 8003482: 6bdb ldr r3, [r3, #60] ; 0x3c
  8200. 8003484: 4960 ldr r1, [pc, #384] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8201. 8003486: 4313 orrs r3, r2
  8202. 8003488: f8c1 308c str.w r3, [r1, #140] ; 0x8c
  8203. /* Enable the PLLI2S when it's used as clock source for I2S */
  8204. if(PeriphClkInit->I2sApb2ClockSelection == RCC_I2SAPB2CLKSOURCE_PLLI2S)
  8205. 800348c: 687b ldr r3, [r7, #4]
  8206. 800348e: 6bdb ldr r3, [r3, #60] ; 0x3c
  8207. 8003490: 2b00 cmp r3, #0
  8208. 8003492: d101 bne.n 8003498 <HAL_RCCEx_PeriphCLKConfig+0x88>
  8209. {
  8210. plli2sused = 1U;
  8211. 8003494: 2301 movs r3, #1
  8212. 8003496: 62fb str r3, [r7, #44] ; 0x2c
  8213. }
  8214. }
  8215. /*--------------------------------------------------------------------------*/
  8216. /*--------------------------- SAI1 configuration ---------------------------*/
  8217. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == (RCC_PERIPHCLK_SAI1))
  8218. 8003498: 687b ldr r3, [r7, #4]
  8219. 800349a: 681b ldr r3, [r3, #0]
  8220. 800349c: f003 0304 and.w r3, r3, #4
  8221. 80034a0: 2b00 cmp r3, #0
  8222. 80034a2: d017 beq.n 80034d4 <HAL_RCCEx_PeriphCLKConfig+0xc4>
  8223. {
  8224. /* Check the parameters */
  8225. assert_param(IS_RCC_SAI1CLKSOURCE(PeriphClkInit->Sai1ClockSelection));
  8226. /* Configure SAI1 Clock source */
  8227. __HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection);
  8228. 80034a4: 4b58 ldr r3, [pc, #352] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8229. 80034a6: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
  8230. 80034aa: f423 1240 bic.w r2, r3, #3145728 ; 0x300000
  8231. 80034ae: 687b ldr r3, [r7, #4]
  8232. 80034b0: 6b1b ldr r3, [r3, #48] ; 0x30
  8233. 80034b2: 4955 ldr r1, [pc, #340] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8234. 80034b4: 4313 orrs r3, r2
  8235. 80034b6: f8c1 308c str.w r3, [r1, #140] ; 0x8c
  8236. /* Enable the PLLI2S when it's used as clock source for SAI */
  8237. if(PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)
  8238. 80034ba: 687b ldr r3, [r7, #4]
  8239. 80034bc: 6b1b ldr r3, [r3, #48] ; 0x30
  8240. 80034be: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
  8241. 80034c2: d101 bne.n 80034c8 <HAL_RCCEx_PeriphCLKConfig+0xb8>
  8242. {
  8243. plli2sused = 1U;
  8244. 80034c4: 2301 movs r3, #1
  8245. 80034c6: 62fb str r3, [r7, #44] ; 0x2c
  8246. }
  8247. /* Enable the PLLSAI when it's used as clock source for SAI */
  8248. if(PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)
  8249. 80034c8: 687b ldr r3, [r7, #4]
  8250. 80034ca: 6b1b ldr r3, [r3, #48] ; 0x30
  8251. 80034cc: 2b00 cmp r3, #0
  8252. 80034ce: d101 bne.n 80034d4 <HAL_RCCEx_PeriphCLKConfig+0xc4>
  8253. {
  8254. pllsaiused = 1U;
  8255. 80034d0: 2301 movs r3, #1
  8256. 80034d2: 62bb str r3, [r7, #40] ; 0x28
  8257. }
  8258. }
  8259. /*--------------------------------------------------------------------------*/
  8260. /*-------------------------- SAI2 configuration ----------------------------*/
  8261. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == (RCC_PERIPHCLK_SAI2))
  8262. 80034d4: 687b ldr r3, [r7, #4]
  8263. 80034d6: 681b ldr r3, [r3, #0]
  8264. 80034d8: f003 0308 and.w r3, r3, #8
  8265. 80034dc: 2b00 cmp r3, #0
  8266. 80034de: d017 beq.n 8003510 <HAL_RCCEx_PeriphCLKConfig+0x100>
  8267. {
  8268. /* Check the parameters */
  8269. assert_param(IS_RCC_SAI2CLKSOURCE(PeriphClkInit->Sai2ClockSelection));
  8270. /* Configure SAI2 Clock source */
  8271. __HAL_RCC_SAI2_CONFIG(PeriphClkInit->Sai2ClockSelection);
  8272. 80034e0: 4b49 ldr r3, [pc, #292] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8273. 80034e2: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
  8274. 80034e6: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
  8275. 80034ea: 687b ldr r3, [r7, #4]
  8276. 80034ec: 6b5b ldr r3, [r3, #52] ; 0x34
  8277. 80034ee: 4946 ldr r1, [pc, #280] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8278. 80034f0: 4313 orrs r3, r2
  8279. 80034f2: f8c1 308c str.w r3, [r1, #140] ; 0x8c
  8280. /* Enable the PLLI2S when it's used as clock source for SAI */
  8281. if(PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)
  8282. 80034f6: 687b ldr r3, [r7, #4]
  8283. 80034f8: 6b5b ldr r3, [r3, #52] ; 0x34
  8284. 80034fa: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
  8285. 80034fe: d101 bne.n 8003504 <HAL_RCCEx_PeriphCLKConfig+0xf4>
  8286. {
  8287. plli2sused = 1U;
  8288. 8003500: 2301 movs r3, #1
  8289. 8003502: 62fb str r3, [r7, #44] ; 0x2c
  8290. }
  8291. /* Enable the PLLSAI when it's used as clock source for SAI */
  8292. if(PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)
  8293. 8003504: 687b ldr r3, [r7, #4]
  8294. 8003506: 6b5b ldr r3, [r3, #52] ; 0x34
  8295. 8003508: 2b00 cmp r3, #0
  8296. 800350a: d101 bne.n 8003510 <HAL_RCCEx_PeriphCLKConfig+0x100>
  8297. {
  8298. pllsaiused = 1U;
  8299. 800350c: 2301 movs r3, #1
  8300. 800350e: 62bb str r3, [r7, #40] ; 0x28
  8301. }
  8302. }
  8303. /*--------------------------------------------------------------------------*/
  8304. /*----------------------------- RTC configuration --------------------------*/
  8305. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == (RCC_PERIPHCLK_RTC))
  8306. 8003510: 687b ldr r3, [r7, #4]
  8307. 8003512: 681b ldr r3, [r3, #0]
  8308. 8003514: f003 0320 and.w r3, r3, #32
  8309. 8003518: 2b00 cmp r3, #0
  8310. 800351a: f000 808a beq.w 8003632 <HAL_RCCEx_PeriphCLKConfig+0x222>
  8311. {
  8312. /* Check for RTC Parameters used to output RTCCLK */
  8313. assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection));
  8314. /* Enable Power Clock*/
  8315. __HAL_RCC_PWR_CLK_ENABLE();
  8316. 800351e: 2300 movs r3, #0
  8317. 8003520: 60bb str r3, [r7, #8]
  8318. 8003522: 4b39 ldr r3, [pc, #228] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8319. 8003524: 6c1b ldr r3, [r3, #64] ; 0x40
  8320. 8003526: 4a38 ldr r2, [pc, #224] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8321. 8003528: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  8322. 800352c: 6413 str r3, [r2, #64] ; 0x40
  8323. 800352e: 4b36 ldr r3, [pc, #216] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8324. 8003530: 6c1b ldr r3, [r3, #64] ; 0x40
  8325. 8003532: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
  8326. 8003536: 60bb str r3, [r7, #8]
  8327. 8003538: 68bb ldr r3, [r7, #8]
  8328. /* Enable write access to Backup domain */
  8329. PWR->CR |= PWR_CR_DBP;
  8330. 800353a: 4b34 ldr r3, [pc, #208] ; (800360c <HAL_RCCEx_PeriphCLKConfig+0x1fc>)
  8331. 800353c: 681b ldr r3, [r3, #0]
  8332. 800353e: 4a33 ldr r2, [pc, #204] ; (800360c <HAL_RCCEx_PeriphCLKConfig+0x1fc>)
  8333. 8003540: f443 7380 orr.w r3, r3, #256 ; 0x100
  8334. 8003544: 6013 str r3, [r2, #0]
  8335. /* Get tick */
  8336. tickstart = HAL_GetTick();
  8337. 8003546: f7fd fea9 bl 800129c <HAL_GetTick>
  8338. 800354a: 6278 str r0, [r7, #36] ; 0x24
  8339. while((PWR->CR & PWR_CR_DBP) == RESET)
  8340. 800354c: e008 b.n 8003560 <HAL_RCCEx_PeriphCLKConfig+0x150>
  8341. {
  8342. if((HAL_GetTick() - tickstart ) > RCC_DBP_TIMEOUT_VALUE)
  8343. 800354e: f7fd fea5 bl 800129c <HAL_GetTick>
  8344. 8003552: 4602 mov r2, r0
  8345. 8003554: 6a7b ldr r3, [r7, #36] ; 0x24
  8346. 8003556: 1ad3 subs r3, r2, r3
  8347. 8003558: 2b02 cmp r3, #2
  8348. 800355a: d901 bls.n 8003560 <HAL_RCCEx_PeriphCLKConfig+0x150>
  8349. {
  8350. return HAL_TIMEOUT;
  8351. 800355c: 2303 movs r3, #3
  8352. 800355e: e278 b.n 8003a52 <HAL_RCCEx_PeriphCLKConfig+0x642>
  8353. while((PWR->CR & PWR_CR_DBP) == RESET)
  8354. 8003560: 4b2a ldr r3, [pc, #168] ; (800360c <HAL_RCCEx_PeriphCLKConfig+0x1fc>)
  8355. 8003562: 681b ldr r3, [r3, #0]
  8356. 8003564: f403 7380 and.w r3, r3, #256 ; 0x100
  8357. 8003568: 2b00 cmp r3, #0
  8358. 800356a: d0f0 beq.n 800354e <HAL_RCCEx_PeriphCLKConfig+0x13e>
  8359. }
  8360. }
  8361. /* Reset the Backup domain only if the RTC Clock source selection is modified from reset value */
  8362. tmpreg1 = (RCC->BDCR & RCC_BDCR_RTCSEL);
  8363. 800356c: 4b26 ldr r3, [pc, #152] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8364. 800356e: 6f1b ldr r3, [r3, #112] ; 0x70
  8365. 8003570: f403 7340 and.w r3, r3, #768 ; 0x300
  8366. 8003574: 623b str r3, [r7, #32]
  8367. if((tmpreg1 != 0x00000000U) && ((tmpreg1) != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)))
  8368. 8003576: 6a3b ldr r3, [r7, #32]
  8369. 8003578: 2b00 cmp r3, #0
  8370. 800357a: d02f beq.n 80035dc <HAL_RCCEx_PeriphCLKConfig+0x1cc>
  8371. 800357c: 687b ldr r3, [r7, #4]
  8372. 800357e: 6c1b ldr r3, [r3, #64] ; 0x40
  8373. 8003580: f403 7340 and.w r3, r3, #768 ; 0x300
  8374. 8003584: 6a3a ldr r2, [r7, #32]
  8375. 8003586: 429a cmp r2, r3
  8376. 8003588: d028 beq.n 80035dc <HAL_RCCEx_PeriphCLKConfig+0x1cc>
  8377. {
  8378. /* Store the content of BDCR register before the reset of Backup Domain */
  8379. tmpreg1 = (RCC->BDCR & ~(RCC_BDCR_RTCSEL));
  8380. 800358a: 4b1f ldr r3, [pc, #124] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8381. 800358c: 6f1b ldr r3, [r3, #112] ; 0x70
  8382. 800358e: f423 7340 bic.w r3, r3, #768 ; 0x300
  8383. 8003592: 623b str r3, [r7, #32]
  8384. /* RTC Clock selection can be changed only if the Backup Domain is reset */
  8385. __HAL_RCC_BACKUPRESET_FORCE();
  8386. 8003594: 4b1e ldr r3, [pc, #120] ; (8003610 <HAL_RCCEx_PeriphCLKConfig+0x200>)
  8387. 8003596: 2201 movs r2, #1
  8388. 8003598: 601a str r2, [r3, #0]
  8389. __HAL_RCC_BACKUPRESET_RELEASE();
  8390. 800359a: 4b1d ldr r3, [pc, #116] ; (8003610 <HAL_RCCEx_PeriphCLKConfig+0x200>)
  8391. 800359c: 2200 movs r2, #0
  8392. 800359e: 601a str r2, [r3, #0]
  8393. /* Restore the Content of BDCR register */
  8394. RCC->BDCR = tmpreg1;
  8395. 80035a0: 4a19 ldr r2, [pc, #100] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8396. 80035a2: 6a3b ldr r3, [r7, #32]
  8397. 80035a4: 6713 str r3, [r2, #112] ; 0x70
  8398. /* Wait for LSE reactivation if LSE was enable prior to Backup Domain reset */
  8399. if(HAL_IS_BIT_SET(RCC->BDCR, RCC_BDCR_LSEON))
  8400. 80035a6: 4b18 ldr r3, [pc, #96] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8401. 80035a8: 6f1b ldr r3, [r3, #112] ; 0x70
  8402. 80035aa: f003 0301 and.w r3, r3, #1
  8403. 80035ae: 2b01 cmp r3, #1
  8404. 80035b0: d114 bne.n 80035dc <HAL_RCCEx_PeriphCLKConfig+0x1cc>
  8405. {
  8406. /* Get tick */
  8407. tickstart = HAL_GetTick();
  8408. 80035b2: f7fd fe73 bl 800129c <HAL_GetTick>
  8409. 80035b6: 6278 str r0, [r7, #36] ; 0x24
  8410. /* Wait till LSE is ready */
  8411. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
  8412. 80035b8: e00a b.n 80035d0 <HAL_RCCEx_PeriphCLKConfig+0x1c0>
  8413. {
  8414. if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
  8415. 80035ba: f7fd fe6f bl 800129c <HAL_GetTick>
  8416. 80035be: 4602 mov r2, r0
  8417. 80035c0: 6a7b ldr r3, [r7, #36] ; 0x24
  8418. 80035c2: 1ad3 subs r3, r2, r3
  8419. 80035c4: f241 3288 movw r2, #5000 ; 0x1388
  8420. 80035c8: 4293 cmp r3, r2
  8421. 80035ca: d901 bls.n 80035d0 <HAL_RCCEx_PeriphCLKConfig+0x1c0>
  8422. {
  8423. return HAL_TIMEOUT;
  8424. 80035cc: 2303 movs r3, #3
  8425. 80035ce: e240 b.n 8003a52 <HAL_RCCEx_PeriphCLKConfig+0x642>
  8426. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
  8427. 80035d0: 4b0d ldr r3, [pc, #52] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8428. 80035d2: 6f1b ldr r3, [r3, #112] ; 0x70
  8429. 80035d4: f003 0302 and.w r3, r3, #2
  8430. 80035d8: 2b00 cmp r3, #0
  8431. 80035da: d0ee beq.n 80035ba <HAL_RCCEx_PeriphCLKConfig+0x1aa>
  8432. }
  8433. }
  8434. }
  8435. }
  8436. __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection);
  8437. 80035dc: 687b ldr r3, [r7, #4]
  8438. 80035de: 6c1b ldr r3, [r3, #64] ; 0x40
  8439. 80035e0: f403 7340 and.w r3, r3, #768 ; 0x300
  8440. 80035e4: f5b3 7f40 cmp.w r3, #768 ; 0x300
  8441. 80035e8: d114 bne.n 8003614 <HAL_RCCEx_PeriphCLKConfig+0x204>
  8442. 80035ea: 4b07 ldr r3, [pc, #28] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8443. 80035ec: 689b ldr r3, [r3, #8]
  8444. 80035ee: f423 12f8 bic.w r2, r3, #2031616 ; 0x1f0000
  8445. 80035f2: 687b ldr r3, [r7, #4]
  8446. 80035f4: 6c1b ldr r3, [r3, #64] ; 0x40
  8447. 80035f6: f023 4370 bic.w r3, r3, #4026531840 ; 0xf0000000
  8448. 80035fa: f423 7340 bic.w r3, r3, #768 ; 0x300
  8449. 80035fe: 4902 ldr r1, [pc, #8] ; (8003608 <HAL_RCCEx_PeriphCLKConfig+0x1f8>)
  8450. 8003600: 4313 orrs r3, r2
  8451. 8003602: 608b str r3, [r1, #8]
  8452. 8003604: e00c b.n 8003620 <HAL_RCCEx_PeriphCLKConfig+0x210>
  8453. 8003606: bf00 nop
  8454. 8003608: 40023800 .word 0x40023800
  8455. 800360c: 40007000 .word 0x40007000
  8456. 8003610: 42470e40 .word 0x42470e40
  8457. 8003614: 4b4a ldr r3, [pc, #296] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8458. 8003616: 689b ldr r3, [r3, #8]
  8459. 8003618: 4a49 ldr r2, [pc, #292] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8460. 800361a: f423 13f8 bic.w r3, r3, #2031616 ; 0x1f0000
  8461. 800361e: 6093 str r3, [r2, #8]
  8462. 8003620: 4b47 ldr r3, [pc, #284] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8463. 8003622: 6f1a ldr r2, [r3, #112] ; 0x70
  8464. 8003624: 687b ldr r3, [r7, #4]
  8465. 8003626: 6c1b ldr r3, [r3, #64] ; 0x40
  8466. 8003628: f3c3 030b ubfx r3, r3, #0, #12
  8467. 800362c: 4944 ldr r1, [pc, #272] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8468. 800362e: 4313 orrs r3, r2
  8469. 8003630: 670b str r3, [r1, #112] ; 0x70
  8470. }
  8471. /*--------------------------------------------------------------------------*/
  8472. /*---------------------------- TIM configuration ---------------------------*/
  8473. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_TIM) == (RCC_PERIPHCLK_TIM))
  8474. 8003632: 687b ldr r3, [r7, #4]
  8475. 8003634: 681b ldr r3, [r3, #0]
  8476. 8003636: f003 0310 and.w r3, r3, #16
  8477. 800363a: 2b00 cmp r3, #0
  8478. 800363c: d004 beq.n 8003648 <HAL_RCCEx_PeriphCLKConfig+0x238>
  8479. {
  8480. /* Configure Timer Prescaler */
  8481. __HAL_RCC_TIMCLKPRESCALER(PeriphClkInit->TIMPresSelection);
  8482. 800363e: 687b ldr r3, [r7, #4]
  8483. 8003640: f893 2058 ldrb.w r2, [r3, #88] ; 0x58
  8484. 8003644: 4b3f ldr r3, [pc, #252] ; (8003744 <HAL_RCCEx_PeriphCLKConfig+0x334>)
  8485. 8003646: 601a str r2, [r3, #0]
  8486. }
  8487. /*--------------------------------------------------------------------------*/
  8488. /*---------------------------- FMPI2C1 Configuration -----------------------*/
  8489. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_FMPI2C1) == RCC_PERIPHCLK_FMPI2C1)
  8490. 8003648: 687b ldr r3, [r7, #4]
  8491. 800364a: 681b ldr r3, [r3, #0]
  8492. 800364c: f003 0380 and.w r3, r3, #128 ; 0x80
  8493. 8003650: 2b00 cmp r3, #0
  8494. 8003652: d00a beq.n 800366a <HAL_RCCEx_PeriphCLKConfig+0x25a>
  8495. {
  8496. /* Check the parameters */
  8497. assert_param(IS_RCC_FMPI2C1CLKSOURCE(PeriphClkInit->Fmpi2c1ClockSelection));
  8498. /* Configure the FMPI2C1 clock source */
  8499. __HAL_RCC_FMPI2C1_CONFIG(PeriphClkInit->Fmpi2c1ClockSelection);
  8500. 8003654: 4b3a ldr r3, [pc, #232] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8501. 8003656: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
  8502. 800365a: f423 0240 bic.w r2, r3, #12582912 ; 0xc00000
  8503. 800365e: 687b ldr r3, [r7, #4]
  8504. 8003660: 6cdb ldr r3, [r3, #76] ; 0x4c
  8505. 8003662: 4937 ldr r1, [pc, #220] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8506. 8003664: 4313 orrs r3, r2
  8507. 8003666: f8c1 3094 str.w r3, [r1, #148] ; 0x94
  8508. }
  8509. /*--------------------------------------------------------------------------*/
  8510. /*------------------------------ CEC Configuration -------------------------*/
  8511. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC)
  8512. 800366a: 687b ldr r3, [r7, #4]
  8513. 800366c: 681b ldr r3, [r3, #0]
  8514. 800366e: f003 0340 and.w r3, r3, #64 ; 0x40
  8515. 8003672: 2b00 cmp r3, #0
  8516. 8003674: d00a beq.n 800368c <HAL_RCCEx_PeriphCLKConfig+0x27c>
  8517. {
  8518. /* Check the parameters */
  8519. assert_param(IS_RCC_CECCLKSOURCE(PeriphClkInit->CecClockSelection));
  8520. /* Configure the CEC clock source */
  8521. __HAL_RCC_CEC_CONFIG(PeriphClkInit->CecClockSelection);
  8522. 8003676: 4b32 ldr r3, [pc, #200] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8523. 8003678: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
  8524. 800367c: f023 6280 bic.w r2, r3, #67108864 ; 0x4000000
  8525. 8003680: 687b ldr r3, [r7, #4]
  8526. 8003682: 6c9b ldr r3, [r3, #72] ; 0x48
  8527. 8003684: 492e ldr r1, [pc, #184] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8528. 8003686: 4313 orrs r3, r2
  8529. 8003688: f8c1 3094 str.w r3, [r1, #148] ; 0x94
  8530. }
  8531. /*--------------------------------------------------------------------------*/
  8532. /*----------------------------- CLK48 Configuration ------------------------*/
  8533. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48)
  8534. 800368c: 687b ldr r3, [r7, #4]
  8535. 800368e: 681b ldr r3, [r3, #0]
  8536. 8003690: f403 7380 and.w r3, r3, #256 ; 0x100
  8537. 8003694: 2b00 cmp r3, #0
  8538. 8003696: d011 beq.n 80036bc <HAL_RCCEx_PeriphCLKConfig+0x2ac>
  8539. {
  8540. /* Check the parameters */
  8541. assert_param(IS_RCC_CLK48CLKSOURCE(PeriphClkInit->Clk48ClockSelection));
  8542. /* Configure the CLK48 clock source */
  8543. __HAL_RCC_CLK48_CONFIG(PeriphClkInit->Clk48ClockSelection);
  8544. 8003698: 4b29 ldr r3, [pc, #164] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8545. 800369a: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
  8546. 800369e: f023 6200 bic.w r2, r3, #134217728 ; 0x8000000
  8547. 80036a2: 687b ldr r3, [r7, #4]
  8548. 80036a4: 6d5b ldr r3, [r3, #84] ; 0x54
  8549. 80036a6: 4926 ldr r1, [pc, #152] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8550. 80036a8: 4313 orrs r3, r2
  8551. 80036aa: f8c1 3094 str.w r3, [r1, #148] ; 0x94
  8552. /* Enable the PLLSAI when it's used as clock source for CLK48 */
  8553. if(PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLSAIP)
  8554. 80036ae: 687b ldr r3, [r7, #4]
  8555. 80036b0: 6d5b ldr r3, [r3, #84] ; 0x54
  8556. 80036b2: f1b3 6f00 cmp.w r3, #134217728 ; 0x8000000
  8557. 80036b6: d101 bne.n 80036bc <HAL_RCCEx_PeriphCLKConfig+0x2ac>
  8558. {
  8559. pllsaiused = 1U;
  8560. 80036b8: 2301 movs r3, #1
  8561. 80036ba: 62bb str r3, [r7, #40] ; 0x28
  8562. }
  8563. }
  8564. /*--------------------------------------------------------------------------*/
  8565. /*----------------------------- SDIO Configuration -------------------------*/
  8566. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDIO) == RCC_PERIPHCLK_SDIO)
  8567. 80036bc: 687b ldr r3, [r7, #4]
  8568. 80036be: 681b ldr r3, [r3, #0]
  8569. 80036c0: f403 7300 and.w r3, r3, #512 ; 0x200
  8570. 80036c4: 2b00 cmp r3, #0
  8571. 80036c6: d00a beq.n 80036de <HAL_RCCEx_PeriphCLKConfig+0x2ce>
  8572. {
  8573. /* Check the parameters */
  8574. assert_param(IS_RCC_SDIOCLKSOURCE(PeriphClkInit->SdioClockSelection));
  8575. /* Configure the SDIO clock source */
  8576. __HAL_RCC_SDIO_CONFIG(PeriphClkInit->SdioClockSelection);
  8577. 80036c8: 4b1d ldr r3, [pc, #116] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8578. 80036ca: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
  8579. 80036ce: f023 5280 bic.w r2, r3, #268435456 ; 0x10000000
  8580. 80036d2: 687b ldr r3, [r7, #4]
  8581. 80036d4: 6c5b ldr r3, [r3, #68] ; 0x44
  8582. 80036d6: 491a ldr r1, [pc, #104] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8583. 80036d8: 4313 orrs r3, r2
  8584. 80036da: f8c1 3094 str.w r3, [r1, #148] ; 0x94
  8585. }
  8586. /*--------------------------------------------------------------------------*/
  8587. /*------------------------------ SPDIFRX Configuration ---------------------*/
  8588. if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX)
  8589. 80036de: 687b ldr r3, [r7, #4]
  8590. 80036e0: 681b ldr r3, [r3, #0]
  8591. 80036e2: f403 6380 and.w r3, r3, #1024 ; 0x400
  8592. 80036e6: 2b00 cmp r3, #0
  8593. 80036e8: d011 beq.n 800370e <HAL_RCCEx_PeriphCLKConfig+0x2fe>
  8594. {
  8595. /* Check the parameters */
  8596. assert_param(IS_RCC_SPDIFRXCLKSOURCE(PeriphClkInit->SpdifClockSelection));
  8597. /* Configure the SPDIFRX clock source */
  8598. __HAL_RCC_SPDIFRX_CONFIG(PeriphClkInit->SpdifClockSelection);
  8599. 80036ea: 4b15 ldr r3, [pc, #84] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8600. 80036ec: f8d3 3094 ldr.w r3, [r3, #148] ; 0x94
  8601. 80036f0: f023 5200 bic.w r2, r3, #536870912 ; 0x20000000
  8602. 80036f4: 687b ldr r3, [r7, #4]
  8603. 80036f6: 6d1b ldr r3, [r3, #80] ; 0x50
  8604. 80036f8: 4911 ldr r1, [pc, #68] ; (8003740 <HAL_RCCEx_PeriphCLKConfig+0x330>)
  8605. 80036fa: 4313 orrs r3, r2
  8606. 80036fc: f8c1 3094 str.w r3, [r1, #148] ; 0x94
  8607. /* Enable the PLLI2S when it's used as clock source for SPDIFRX */
  8608. if(PeriphClkInit->SpdifClockSelection == RCC_SPDIFRXCLKSOURCE_PLLI2SP)
  8609. 8003700: 687b ldr r3, [r7, #4]
  8610. 8003702: 6d1b ldr r3, [r3, #80] ; 0x50
  8611. 8003704: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
  8612. 8003708: d101 bne.n 800370e <HAL_RCCEx_PeriphCLKConfig+0x2fe>
  8613. {
  8614. plli2sused = 1U;
  8615. 800370a: 2301 movs r3, #1
  8616. 800370c: 62fb str r3, [r7, #44] ; 0x2c
  8617. /*--------------------------------------------------------------------------*/
  8618. /*---------------------------- PLLI2S Configuration ------------------------*/
  8619. /* PLLI2S is configured when a peripheral will use it as source clock : SAI1, SAI2, I2S on APB1,
  8620. I2S on APB2 or SPDIFRX */
  8621. if((plli2sused == 1U) || (PeriphClkInit->PeriphClockSelection == RCC_PERIPHCLK_PLLI2S))
  8622. 800370e: 6afb ldr r3, [r7, #44] ; 0x2c
  8623. 8003710: 2b01 cmp r3, #1
  8624. 8003712: d005 beq.n 8003720 <HAL_RCCEx_PeriphCLKConfig+0x310>
  8625. 8003714: 687b ldr r3, [r7, #4]
  8626. 8003716: 681b ldr r3, [r3, #0]
  8627. 8003718: f5b3 6f00 cmp.w r3, #2048 ; 0x800
  8628. 800371c: f040 80ff bne.w 800391e <HAL_RCCEx_PeriphCLKConfig+0x50e>
  8629. {
  8630. /* Disable the PLLI2S */
  8631. __HAL_RCC_PLLI2S_DISABLE();
  8632. 8003720: 4b09 ldr r3, [pc, #36] ; (8003748 <HAL_RCCEx_PeriphCLKConfig+0x338>)
  8633. 8003722: 2200 movs r2, #0
  8634. 8003724: 601a str r2, [r3, #0]
  8635. /* Get tick */
  8636. tickstart = HAL_GetTick();
  8637. 8003726: f7fd fdb9 bl 800129c <HAL_GetTick>
  8638. 800372a: 6278 str r0, [r7, #36] ; 0x24
  8639. /* Wait till PLLI2S is disabled */
  8640. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) != RESET)
  8641. 800372c: e00e b.n 800374c <HAL_RCCEx_PeriphCLKConfig+0x33c>
  8642. {
  8643. if((HAL_GetTick() - tickstart ) > PLLI2S_TIMEOUT_VALUE)
  8644. 800372e: f7fd fdb5 bl 800129c <HAL_GetTick>
  8645. 8003732: 4602 mov r2, r0
  8646. 8003734: 6a7b ldr r3, [r7, #36] ; 0x24
  8647. 8003736: 1ad3 subs r3, r2, r3
  8648. 8003738: 2b02 cmp r3, #2
  8649. 800373a: d907 bls.n 800374c <HAL_RCCEx_PeriphCLKConfig+0x33c>
  8650. {
  8651. /* return in case of Timeout detected */
  8652. return HAL_TIMEOUT;
  8653. 800373c: 2303 movs r3, #3
  8654. 800373e: e188 b.n 8003a52 <HAL_RCCEx_PeriphCLKConfig+0x642>
  8655. 8003740: 40023800 .word 0x40023800
  8656. 8003744: 424711e0 .word 0x424711e0
  8657. 8003748: 42470068 .word 0x42470068
  8658. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) != RESET)
  8659. 800374c: 4b7e ldr r3, [pc, #504] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8660. 800374e: 681b ldr r3, [r3, #0]
  8661. 8003750: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
  8662. 8003754: 2b00 cmp r3, #0
  8663. 8003756: d1ea bne.n 800372e <HAL_RCCEx_PeriphCLKConfig+0x31e>
  8664. /* check for common PLLI2S Parameters */
  8665. assert_param(IS_RCC_PLLI2SM_VALUE(PeriphClkInit->PLLI2S.PLLI2SM));
  8666. assert_param(IS_RCC_PLLI2SN_VALUE(PeriphClkInit->PLLI2S.PLLI2SN));
  8667. /*------ In Case of PLLI2S is selected as source clock for I2S -----------*/
  8668. if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB1) == RCC_PERIPHCLK_I2S_APB1) && (PeriphClkInit->I2sApb1ClockSelection == RCC_I2SAPB1CLKSOURCE_PLLI2S)) ||
  8669. 8003758: 687b ldr r3, [r7, #4]
  8670. 800375a: 681b ldr r3, [r3, #0]
  8671. 800375c: f003 0301 and.w r3, r3, #1
  8672. 8003760: 2b00 cmp r3, #0
  8673. 8003762: d003 beq.n 800376c <HAL_RCCEx_PeriphCLKConfig+0x35c>
  8674. 8003764: 687b ldr r3, [r7, #4]
  8675. 8003766: 6b9b ldr r3, [r3, #56] ; 0x38
  8676. 8003768: 2b00 cmp r3, #0
  8677. 800376a: d009 beq.n 8003780 <HAL_RCCEx_PeriphCLKConfig+0x370>
  8678. ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB2) == RCC_PERIPHCLK_I2S_APB2) && (PeriphClkInit->I2sApb2ClockSelection == RCC_I2SAPB2CLKSOURCE_PLLI2S)))
  8679. 800376c: 687b ldr r3, [r7, #4]
  8680. 800376e: 681b ldr r3, [r3, #0]
  8681. 8003770: f003 0302 and.w r3, r3, #2
  8682. if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB1) == RCC_PERIPHCLK_I2S_APB1) && (PeriphClkInit->I2sApb1ClockSelection == RCC_I2SAPB1CLKSOURCE_PLLI2S)) ||
  8683. 8003774: 2b00 cmp r3, #0
  8684. 8003776: d028 beq.n 80037ca <HAL_RCCEx_PeriphCLKConfig+0x3ba>
  8685. ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB2) == RCC_PERIPHCLK_I2S_APB2) && (PeriphClkInit->I2sApb2ClockSelection == RCC_I2SAPB2CLKSOURCE_PLLI2S)))
  8686. 8003778: 687b ldr r3, [r7, #4]
  8687. 800377a: 6bdb ldr r3, [r3, #60] ; 0x3c
  8688. 800377c: 2b00 cmp r3, #0
  8689. 800377e: d124 bne.n 80037ca <HAL_RCCEx_PeriphCLKConfig+0x3ba>
  8690. {
  8691. /* check for Parameters */
  8692. assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
  8693. /* Read PLLI2SP/PLLI2SQ value from PLLI2SCFGR register (this value is not needed for I2S configuration) */
  8694. plli2sp = ((((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SP) >> RCC_PLLI2SCFGR_PLLI2SP_Pos) + 1U) << 1U);
  8695. 8003780: 4b71 ldr r3, [pc, #452] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8696. 8003782: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
  8697. 8003786: 0c1b lsrs r3, r3, #16
  8698. 8003788: f003 0303 and.w r3, r3, #3
  8699. 800378c: 3301 adds r3, #1
  8700. 800378e: 005b lsls r3, r3, #1
  8701. 8003790: 61fb str r3, [r7, #28]
  8702. plli2sq = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SQ) >> RCC_PLLI2SCFGR_PLLI2SQ_Pos);
  8703. 8003792: 4b6d ldr r3, [pc, #436] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8704. 8003794: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
  8705. 8003798: 0e1b lsrs r3, r3, #24
  8706. 800379a: f003 030f and.w r3, r3, #15
  8707. 800379e: 61bb str r3, [r7, #24]
  8708. /* Configure the PLLI2S division factors */
  8709. /* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
  8710. /* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
  8711. __HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , plli2sp, plli2sq, PeriphClkInit->PLLI2S.PLLI2SR);
  8712. 80037a0: 687b ldr r3, [r7, #4]
  8713. 80037a2: 685a ldr r2, [r3, #4]
  8714. 80037a4: 687b ldr r3, [r7, #4]
  8715. 80037a6: 689b ldr r3, [r3, #8]
  8716. 80037a8: 019b lsls r3, r3, #6
  8717. 80037aa: 431a orrs r2, r3
  8718. 80037ac: 69fb ldr r3, [r7, #28]
  8719. 80037ae: 085b lsrs r3, r3, #1
  8720. 80037b0: 3b01 subs r3, #1
  8721. 80037b2: 041b lsls r3, r3, #16
  8722. 80037b4: 431a orrs r2, r3
  8723. 80037b6: 69bb ldr r3, [r7, #24]
  8724. 80037b8: 061b lsls r3, r3, #24
  8725. 80037ba: 431a orrs r2, r3
  8726. 80037bc: 687b ldr r3, [r7, #4]
  8727. 80037be: 695b ldr r3, [r3, #20]
  8728. 80037c0: 071b lsls r3, r3, #28
  8729. 80037c2: 4961 ldr r1, [pc, #388] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8730. 80037c4: 4313 orrs r3, r2
  8731. 80037c6: f8c1 3084 str.w r3, [r1, #132] ; 0x84
  8732. }
  8733. /*------- In Case of PLLI2S is selected as source clock for SAI ----------*/
  8734. if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)) ||
  8735. 80037ca: 687b ldr r3, [r7, #4]
  8736. 80037cc: 681b ldr r3, [r3, #0]
  8737. 80037ce: f003 0304 and.w r3, r3, #4
  8738. 80037d2: 2b00 cmp r3, #0
  8739. 80037d4: d004 beq.n 80037e0 <HAL_RCCEx_PeriphCLKConfig+0x3d0>
  8740. 80037d6: 687b ldr r3, [r7, #4]
  8741. 80037d8: 6b1b ldr r3, [r3, #48] ; 0x30
  8742. 80037da: f5b3 1f80 cmp.w r3, #1048576 ; 0x100000
  8743. 80037de: d00a beq.n 80037f6 <HAL_RCCEx_PeriphCLKConfig+0x3e6>
  8744. ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
  8745. 80037e0: 687b ldr r3, [r7, #4]
  8746. 80037e2: 681b ldr r3, [r3, #0]
  8747. 80037e4: f003 0308 and.w r3, r3, #8
  8748. if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)) ||
  8749. 80037e8: 2b00 cmp r3, #0
  8750. 80037ea: d035 beq.n 8003858 <HAL_RCCEx_PeriphCLKConfig+0x448>
  8751. ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
  8752. 80037ec: 687b ldr r3, [r7, #4]
  8753. 80037ee: 6b5b ldr r3, [r3, #52] ; 0x34
  8754. 80037f0: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
  8755. 80037f4: d130 bne.n 8003858 <HAL_RCCEx_PeriphCLKConfig+0x448>
  8756. assert_param(IS_RCC_PLLI2SQ_VALUE(PeriphClkInit->PLLI2S.PLLI2SQ));
  8757. /* Check for PLLI2S/DIVQ parameters */
  8758. assert_param(IS_RCC_PLLI2S_DIVQ_VALUE(PeriphClkInit->PLLI2SDivQ));
  8759. /* Read PLLI2SP/PLLI2SR value from PLLI2SCFGR register (this value is not needed for SAI configuration) */
  8760. plli2sp = ((((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SP) >> RCC_PLLI2SCFGR_PLLI2SP_Pos) + 1U) << 1U);
  8761. 80037f6: 4b54 ldr r3, [pc, #336] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8762. 80037f8: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
  8763. 80037fc: 0c1b lsrs r3, r3, #16
  8764. 80037fe: f003 0303 and.w r3, r3, #3
  8765. 8003802: 3301 adds r3, #1
  8766. 8003804: 005b lsls r3, r3, #1
  8767. 8003806: 61fb str r3, [r7, #28]
  8768. plli2sr = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLI2SCFGR_PLLI2SR_Pos);
  8769. 8003808: 4b4f ldr r3, [pc, #316] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8770. 800380a: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
  8771. 800380e: 0f1b lsrs r3, r3, #28
  8772. 8003810: f003 0307 and.w r3, r3, #7
  8773. 8003814: 617b str r3, [r7, #20]
  8774. /* Configure the PLLI2S division factors */
  8775. /* PLLI2S_VCO Input = PLL_SOURCE/PLLI2SM */
  8776. /* PLLI2S_VCO Output = PLLI2S_VCO Input * PLLI2SN */
  8777. /* SAI_CLK(first level) = PLLI2S_VCO Output/PLLI2SQ */
  8778. __HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , plli2sp, PeriphClkInit->PLLI2S.PLLI2SQ, plli2sr);
  8779. 8003816: 687b ldr r3, [r7, #4]
  8780. 8003818: 685a ldr r2, [r3, #4]
  8781. 800381a: 687b ldr r3, [r7, #4]
  8782. 800381c: 689b ldr r3, [r3, #8]
  8783. 800381e: 019b lsls r3, r3, #6
  8784. 8003820: 431a orrs r2, r3
  8785. 8003822: 69fb ldr r3, [r7, #28]
  8786. 8003824: 085b lsrs r3, r3, #1
  8787. 8003826: 3b01 subs r3, #1
  8788. 8003828: 041b lsls r3, r3, #16
  8789. 800382a: 431a orrs r2, r3
  8790. 800382c: 687b ldr r3, [r7, #4]
  8791. 800382e: 691b ldr r3, [r3, #16]
  8792. 8003830: 061b lsls r3, r3, #24
  8793. 8003832: 431a orrs r2, r3
  8794. 8003834: 697b ldr r3, [r7, #20]
  8795. 8003836: 071b lsls r3, r3, #28
  8796. 8003838: 4943 ldr r1, [pc, #268] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8797. 800383a: 4313 orrs r3, r2
  8798. 800383c: f8c1 3084 str.w r3, [r1, #132] ; 0x84
  8799. /* SAI_CLK_x = SAI_CLK(first level)/PLLI2SDIVQ */
  8800. __HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLI2SDivQ);
  8801. 8003840: 4b41 ldr r3, [pc, #260] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8802. 8003842: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
  8803. 8003846: f023 021f bic.w r2, r3, #31
  8804. 800384a: 687b ldr r3, [r7, #4]
  8805. 800384c: 6a9b ldr r3, [r3, #40] ; 0x28
  8806. 800384e: 3b01 subs r3, #1
  8807. 8003850: 493d ldr r1, [pc, #244] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8808. 8003852: 4313 orrs r3, r2
  8809. 8003854: f8c1 308c str.w r3, [r1, #140] ; 0x8c
  8810. }
  8811. /*------ In Case of PLLI2S is selected as source clock for SPDIFRX -------*/
  8812. if((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX) && (PeriphClkInit->SpdifClockSelection == RCC_SPDIFRXCLKSOURCE_PLLI2SP))
  8813. 8003858: 687b ldr r3, [r7, #4]
  8814. 800385a: 681b ldr r3, [r3, #0]
  8815. 800385c: f403 6380 and.w r3, r3, #1024 ; 0x400
  8816. 8003860: 2b00 cmp r3, #0
  8817. 8003862: d029 beq.n 80038b8 <HAL_RCCEx_PeriphCLKConfig+0x4a8>
  8818. 8003864: 687b ldr r3, [r7, #4]
  8819. 8003866: 6d1b ldr r3, [r3, #80] ; 0x50
  8820. 8003868: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
  8821. 800386c: d124 bne.n 80038b8 <HAL_RCCEx_PeriphCLKConfig+0x4a8>
  8822. {
  8823. /* check for Parameters */
  8824. assert_param(IS_RCC_PLLI2SP_VALUE(PeriphClkInit->PLLI2S.PLLI2SP));
  8825. /* Read PLLI2SR value from PLLI2SCFGR register (this value is not need for SAI configuration) */
  8826. plli2sq = ((((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SP) >> RCC_PLLI2SCFGR_PLLI2SP_Pos) + 1U) << 1U);
  8827. 800386e: 4b36 ldr r3, [pc, #216] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8828. 8003870: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
  8829. 8003874: 0c1b lsrs r3, r3, #16
  8830. 8003876: f003 0303 and.w r3, r3, #3
  8831. 800387a: 3301 adds r3, #1
  8832. 800387c: 005b lsls r3, r3, #1
  8833. 800387e: 61bb str r3, [r7, #24]
  8834. plli2sr = ((RCC->PLLI2SCFGR & RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLI2SCFGR_PLLI2SR_Pos);
  8835. 8003880: 4b31 ldr r3, [pc, #196] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8836. 8003882: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84
  8837. 8003886: 0f1b lsrs r3, r3, #28
  8838. 8003888: f003 0307 and.w r3, r3, #7
  8839. 800388c: 617b str r3, [r7, #20]
  8840. /* Configure the PLLI2S division factors */
  8841. /* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
  8842. /* SPDIFRXCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SP */
  8843. __HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SP, plli2sq, plli2sr);
  8844. 800388e: 687b ldr r3, [r7, #4]
  8845. 8003890: 685a ldr r2, [r3, #4]
  8846. 8003892: 687b ldr r3, [r7, #4]
  8847. 8003894: 689b ldr r3, [r3, #8]
  8848. 8003896: 019b lsls r3, r3, #6
  8849. 8003898: 431a orrs r2, r3
  8850. 800389a: 687b ldr r3, [r7, #4]
  8851. 800389c: 68db ldr r3, [r3, #12]
  8852. 800389e: 085b lsrs r3, r3, #1
  8853. 80038a0: 3b01 subs r3, #1
  8854. 80038a2: 041b lsls r3, r3, #16
  8855. 80038a4: 431a orrs r2, r3
  8856. 80038a6: 69bb ldr r3, [r7, #24]
  8857. 80038a8: 061b lsls r3, r3, #24
  8858. 80038aa: 431a orrs r2, r3
  8859. 80038ac: 697b ldr r3, [r7, #20]
  8860. 80038ae: 071b lsls r3, r3, #28
  8861. 80038b0: 4925 ldr r1, [pc, #148] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8862. 80038b2: 4313 orrs r3, r2
  8863. 80038b4: f8c1 3084 str.w r3, [r1, #132] ; 0x84
  8864. }
  8865. /*----------------- In Case of PLLI2S is just selected -----------------*/
  8866. if((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_PLLI2S) == RCC_PERIPHCLK_PLLI2S)
  8867. 80038b8: 687b ldr r3, [r7, #4]
  8868. 80038ba: 681b ldr r3, [r3, #0]
  8869. 80038bc: f403 6300 and.w r3, r3, #2048 ; 0x800
  8870. 80038c0: 2b00 cmp r3, #0
  8871. 80038c2: d016 beq.n 80038f2 <HAL_RCCEx_PeriphCLKConfig+0x4e2>
  8872. assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
  8873. assert_param(IS_RCC_PLLI2SQ_VALUE(PeriphClkInit->PLLI2S.PLLI2SQ));
  8874. /* Configure the PLLI2S division factors */
  8875. /* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
  8876. __HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SP, PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
  8877. 80038c4: 687b ldr r3, [r7, #4]
  8878. 80038c6: 685a ldr r2, [r3, #4]
  8879. 80038c8: 687b ldr r3, [r7, #4]
  8880. 80038ca: 689b ldr r3, [r3, #8]
  8881. 80038cc: 019b lsls r3, r3, #6
  8882. 80038ce: 431a orrs r2, r3
  8883. 80038d0: 687b ldr r3, [r7, #4]
  8884. 80038d2: 68db ldr r3, [r3, #12]
  8885. 80038d4: 085b lsrs r3, r3, #1
  8886. 80038d6: 3b01 subs r3, #1
  8887. 80038d8: 041b lsls r3, r3, #16
  8888. 80038da: 431a orrs r2, r3
  8889. 80038dc: 687b ldr r3, [r7, #4]
  8890. 80038de: 691b ldr r3, [r3, #16]
  8891. 80038e0: 061b lsls r3, r3, #24
  8892. 80038e2: 431a orrs r2, r3
  8893. 80038e4: 687b ldr r3, [r7, #4]
  8894. 80038e6: 695b ldr r3, [r3, #20]
  8895. 80038e8: 071b lsls r3, r3, #28
  8896. 80038ea: 4917 ldr r1, [pc, #92] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8897. 80038ec: 4313 orrs r3, r2
  8898. 80038ee: f8c1 3084 str.w r3, [r1, #132] ; 0x84
  8899. }
  8900. /* Enable the PLLI2S */
  8901. __HAL_RCC_PLLI2S_ENABLE();
  8902. 80038f2: 4b16 ldr r3, [pc, #88] ; (800394c <HAL_RCCEx_PeriphCLKConfig+0x53c>)
  8903. 80038f4: 2201 movs r2, #1
  8904. 80038f6: 601a str r2, [r3, #0]
  8905. /* Get tick */
  8906. tickstart = HAL_GetTick();
  8907. 80038f8: f7fd fcd0 bl 800129c <HAL_GetTick>
  8908. 80038fc: 6278 str r0, [r7, #36] ; 0x24
  8909. /* Wait till PLLI2S is ready */
  8910. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) == RESET)
  8911. 80038fe: e008 b.n 8003912 <HAL_RCCEx_PeriphCLKConfig+0x502>
  8912. {
  8913. if((HAL_GetTick() - tickstart ) > PLLI2S_TIMEOUT_VALUE)
  8914. 8003900: f7fd fccc bl 800129c <HAL_GetTick>
  8915. 8003904: 4602 mov r2, r0
  8916. 8003906: 6a7b ldr r3, [r7, #36] ; 0x24
  8917. 8003908: 1ad3 subs r3, r2, r3
  8918. 800390a: 2b02 cmp r3, #2
  8919. 800390c: d901 bls.n 8003912 <HAL_RCCEx_PeriphCLKConfig+0x502>
  8920. {
  8921. /* return in case of Timeout detected */
  8922. return HAL_TIMEOUT;
  8923. 800390e: 2303 movs r3, #3
  8924. 8003910: e09f b.n 8003a52 <HAL_RCCEx_PeriphCLKConfig+0x642>
  8925. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLI2SRDY) == RESET)
  8926. 8003912: 4b0d ldr r3, [pc, #52] ; (8003948 <HAL_RCCEx_PeriphCLKConfig+0x538>)
  8927. 8003914: 681b ldr r3, [r3, #0]
  8928. 8003916: f003 6300 and.w r3, r3, #134217728 ; 0x8000000
  8929. 800391a: 2b00 cmp r3, #0
  8930. 800391c: d0f0 beq.n 8003900 <HAL_RCCEx_PeriphCLKConfig+0x4f0>
  8931. }
  8932. /*--------------------------------------------------------------------------*/
  8933. /*----------------------------- PLLSAI Configuration -----------------------*/
  8934. /* PLLSAI is configured when a peripheral will use it as source clock : SAI1, SAI2, CLK48 or SDIO */
  8935. if(pllsaiused == 1U)
  8936. 800391e: 6abb ldr r3, [r7, #40] ; 0x28
  8937. 8003920: 2b01 cmp r3, #1
  8938. 8003922: f040 8095 bne.w 8003a50 <HAL_RCCEx_PeriphCLKConfig+0x640>
  8939. {
  8940. /* Disable PLLSAI Clock */
  8941. __HAL_RCC_PLLSAI_DISABLE();
  8942. 8003926: 4b0a ldr r3, [pc, #40] ; (8003950 <HAL_RCCEx_PeriphCLKConfig+0x540>)
  8943. 8003928: 2200 movs r2, #0
  8944. 800392a: 601a str r2, [r3, #0]
  8945. /* Get tick */
  8946. tickstart = HAL_GetTick();
  8947. 800392c: f7fd fcb6 bl 800129c <HAL_GetTick>
  8948. 8003930: 6278 str r0, [r7, #36] ; 0x24
  8949. /* Wait till PLLSAI is disabled */
  8950. while(__HAL_RCC_PLLSAI_GET_FLAG() != RESET)
  8951. 8003932: e00f b.n 8003954 <HAL_RCCEx_PeriphCLKConfig+0x544>
  8952. {
  8953. if((HAL_GetTick() - tickstart ) > PLLSAI_TIMEOUT_VALUE)
  8954. 8003934: f7fd fcb2 bl 800129c <HAL_GetTick>
  8955. 8003938: 4602 mov r2, r0
  8956. 800393a: 6a7b ldr r3, [r7, #36] ; 0x24
  8957. 800393c: 1ad3 subs r3, r2, r3
  8958. 800393e: 2b02 cmp r3, #2
  8959. 8003940: d908 bls.n 8003954 <HAL_RCCEx_PeriphCLKConfig+0x544>
  8960. {
  8961. /* return in case of Timeout detected */
  8962. return HAL_TIMEOUT;
  8963. 8003942: 2303 movs r3, #3
  8964. 8003944: e085 b.n 8003a52 <HAL_RCCEx_PeriphCLKConfig+0x642>
  8965. 8003946: bf00 nop
  8966. 8003948: 40023800 .word 0x40023800
  8967. 800394c: 42470068 .word 0x42470068
  8968. 8003950: 42470070 .word 0x42470070
  8969. while(__HAL_RCC_PLLSAI_GET_FLAG() != RESET)
  8970. 8003954: 4b41 ldr r3, [pc, #260] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  8971. 8003956: 681b ldr r3, [r3, #0]
  8972. 8003958: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
  8973. 800395c: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
  8974. 8003960: d0e8 beq.n 8003934 <HAL_RCCEx_PeriphCLKConfig+0x524>
  8975. /* Check the PLLSAI division factors */
  8976. assert_param(IS_RCC_PLLSAIM_VALUE(PeriphClkInit->PLLSAI.PLLSAIM));
  8977. assert_param(IS_RCC_PLLSAIN_VALUE(PeriphClkInit->PLLSAI.PLLSAIN));
  8978. /*------ In Case of PLLSAI is selected as source clock for SAI -----------*/
  8979. if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)) ||
  8980. 8003962: 687b ldr r3, [r7, #4]
  8981. 8003964: 681b ldr r3, [r3, #0]
  8982. 8003966: f003 0304 and.w r3, r3, #4
  8983. 800396a: 2b00 cmp r3, #0
  8984. 800396c: d003 beq.n 8003976 <HAL_RCCEx_PeriphCLKConfig+0x566>
  8985. 800396e: 687b ldr r3, [r7, #4]
  8986. 8003970: 6b1b ldr r3, [r3, #48] ; 0x30
  8987. 8003972: 2b00 cmp r3, #0
  8988. 8003974: d009 beq.n 800398a <HAL_RCCEx_PeriphCLKConfig+0x57a>
  8989. ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
  8990. 8003976: 687b ldr r3, [r7, #4]
  8991. 8003978: 681b ldr r3, [r3, #0]
  8992. 800397a: f003 0308 and.w r3, r3, #8
  8993. if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)) ||
  8994. 800397e: 2b00 cmp r3, #0
  8995. 8003980: d02b beq.n 80039da <HAL_RCCEx_PeriphCLKConfig+0x5ca>
  8996. ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
  8997. 8003982: 687b ldr r3, [r7, #4]
  8998. 8003984: 6b5b ldr r3, [r3, #52] ; 0x34
  8999. 8003986: 2b00 cmp r3, #0
  9000. 8003988: d127 bne.n 80039da <HAL_RCCEx_PeriphCLKConfig+0x5ca>
  9001. assert_param(IS_RCC_PLLSAIQ_VALUE(PeriphClkInit->PLLSAI.PLLSAIQ));
  9002. /* check for PLLSAI/DIVQ Parameter */
  9003. assert_param(IS_RCC_PLLSAI_DIVQ_VALUE(PeriphClkInit->PLLSAIDivQ));
  9004. /* Read PLLSAIP value from PLLSAICFGR register (this value is not needed for SAI configuration) */
  9005. pllsaip = ((((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIP) >> RCC_PLLSAICFGR_PLLSAIP_Pos) + 1U) << 1U);
  9006. 800398a: 4b34 ldr r3, [pc, #208] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  9007. 800398c: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
  9008. 8003990: 0c1b lsrs r3, r3, #16
  9009. 8003992: f003 0303 and.w r3, r3, #3
  9010. 8003996: 3301 adds r3, #1
  9011. 8003998: 005b lsls r3, r3, #1
  9012. 800399a: 613b str r3, [r7, #16]
  9013. /* PLLSAI_VCO Input = PLL_SOURCE/PLLM */
  9014. /* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN */
  9015. /* SAI_CLK(first level) = PLLSAI_VCO Output/PLLSAIQ */
  9016. __HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIM, PeriphClkInit->PLLSAI.PLLSAIN , pllsaip, PeriphClkInit->PLLSAI.PLLSAIQ, 0U);
  9017. 800399c: 687b ldr r3, [r7, #4]
  9018. 800399e: 699a ldr r2, [r3, #24]
  9019. 80039a0: 687b ldr r3, [r7, #4]
  9020. 80039a2: 69db ldr r3, [r3, #28]
  9021. 80039a4: 019b lsls r3, r3, #6
  9022. 80039a6: 431a orrs r2, r3
  9023. 80039a8: 693b ldr r3, [r7, #16]
  9024. 80039aa: 085b lsrs r3, r3, #1
  9025. 80039ac: 3b01 subs r3, #1
  9026. 80039ae: 041b lsls r3, r3, #16
  9027. 80039b0: 431a orrs r2, r3
  9028. 80039b2: 687b ldr r3, [r7, #4]
  9029. 80039b4: 6a5b ldr r3, [r3, #36] ; 0x24
  9030. 80039b6: 061b lsls r3, r3, #24
  9031. 80039b8: 4928 ldr r1, [pc, #160] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  9032. 80039ba: 4313 orrs r3, r2
  9033. 80039bc: f8c1 3088 str.w r3, [r1, #136] ; 0x88
  9034. /* SAI_CLK_x = SAI_CLK(first level)/PLLSAIDIVQ */
  9035. __HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLSAIDivQ);
  9036. 80039c0: 4b26 ldr r3, [pc, #152] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  9037. 80039c2: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c
  9038. 80039c6: f423 52f8 bic.w r2, r3, #7936 ; 0x1f00
  9039. 80039ca: 687b ldr r3, [r7, #4]
  9040. 80039cc: 6adb ldr r3, [r3, #44] ; 0x2c
  9041. 80039ce: 3b01 subs r3, #1
  9042. 80039d0: 021b lsls r3, r3, #8
  9043. 80039d2: 4922 ldr r1, [pc, #136] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  9044. 80039d4: 4313 orrs r3, r2
  9045. 80039d6: f8c1 308c str.w r3, [r1, #140] ; 0x8c
  9046. }
  9047. /*------ In Case of PLLSAI is selected as source clock for CLK48 ---------*/
  9048. /* In Case of PLLI2S is selected as source clock for CLK48 */
  9049. if((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48) && (PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLSAIP))
  9050. 80039da: 687b ldr r3, [r7, #4]
  9051. 80039dc: 681b ldr r3, [r3, #0]
  9052. 80039de: f403 7380 and.w r3, r3, #256 ; 0x100
  9053. 80039e2: 2b00 cmp r3, #0
  9054. 80039e4: d01d beq.n 8003a22 <HAL_RCCEx_PeriphCLKConfig+0x612>
  9055. 80039e6: 687b ldr r3, [r7, #4]
  9056. 80039e8: 6d5b ldr r3, [r3, #84] ; 0x54
  9057. 80039ea: f1b3 6f00 cmp.w r3, #134217728 ; 0x8000000
  9058. 80039ee: d118 bne.n 8003a22 <HAL_RCCEx_PeriphCLKConfig+0x612>
  9059. {
  9060. /* check for Parameters */
  9061. assert_param(IS_RCC_PLLSAIP_VALUE(PeriphClkInit->PLLSAI.PLLSAIP));
  9062. /* Read PLLSAIQ value from PLLI2SCFGR register (this value is not need for SAI configuration) */
  9063. pllsaiq = ((RCC->PLLSAICFGR & RCC_PLLSAICFGR_PLLSAIQ) >> RCC_PLLSAICFGR_PLLSAIQ_Pos);
  9064. 80039f0: 4b1a ldr r3, [pc, #104] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  9065. 80039f2: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88
  9066. 80039f6: 0e1b lsrs r3, r3, #24
  9067. 80039f8: f003 030f and.w r3, r3, #15
  9068. 80039fc: 60fb str r3, [r7, #12]
  9069. /* Configure the PLLSAI division factors */
  9070. /* PLLSAI_VCO = f(VCO clock) = f(PLLSAI clock input) * (PLLI2SN/PLLSAIM) */
  9071. /* 48CLK = f(PLLSAI clock output) = f(VCO clock) / PLLSAIP */
  9072. __HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIM, PeriphClkInit->PLLSAI.PLLSAIN , PeriphClkInit->PLLSAI.PLLSAIP, pllsaiq, 0U);
  9073. 80039fe: 687b ldr r3, [r7, #4]
  9074. 8003a00: 699a ldr r2, [r3, #24]
  9075. 8003a02: 687b ldr r3, [r7, #4]
  9076. 8003a04: 69db ldr r3, [r3, #28]
  9077. 8003a06: 019b lsls r3, r3, #6
  9078. 8003a08: 431a orrs r2, r3
  9079. 8003a0a: 687b ldr r3, [r7, #4]
  9080. 8003a0c: 6a1b ldr r3, [r3, #32]
  9081. 8003a0e: 085b lsrs r3, r3, #1
  9082. 8003a10: 3b01 subs r3, #1
  9083. 8003a12: 041b lsls r3, r3, #16
  9084. 8003a14: 431a orrs r2, r3
  9085. 8003a16: 68fb ldr r3, [r7, #12]
  9086. 8003a18: 061b lsls r3, r3, #24
  9087. 8003a1a: 4910 ldr r1, [pc, #64] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  9088. 8003a1c: 4313 orrs r3, r2
  9089. 8003a1e: f8c1 3088 str.w r3, [r1, #136] ; 0x88
  9090. }
  9091. /* Enable PLLSAI Clock */
  9092. __HAL_RCC_PLLSAI_ENABLE();
  9093. 8003a22: 4b0f ldr r3, [pc, #60] ; (8003a60 <HAL_RCCEx_PeriphCLKConfig+0x650>)
  9094. 8003a24: 2201 movs r2, #1
  9095. 8003a26: 601a str r2, [r3, #0]
  9096. /* Get tick */
  9097. tickstart = HAL_GetTick();
  9098. 8003a28: f7fd fc38 bl 800129c <HAL_GetTick>
  9099. 8003a2c: 6278 str r0, [r7, #36] ; 0x24
  9100. /* Wait till PLLSAI is ready */
  9101. while(__HAL_RCC_PLLSAI_GET_FLAG() == RESET)
  9102. 8003a2e: e008 b.n 8003a42 <HAL_RCCEx_PeriphCLKConfig+0x632>
  9103. {
  9104. if((HAL_GetTick() - tickstart ) > PLLSAI_TIMEOUT_VALUE)
  9105. 8003a30: f7fd fc34 bl 800129c <HAL_GetTick>
  9106. 8003a34: 4602 mov r2, r0
  9107. 8003a36: 6a7b ldr r3, [r7, #36] ; 0x24
  9108. 8003a38: 1ad3 subs r3, r2, r3
  9109. 8003a3a: 2b02 cmp r3, #2
  9110. 8003a3c: d901 bls.n 8003a42 <HAL_RCCEx_PeriphCLKConfig+0x632>
  9111. {
  9112. /* return in case of Timeout detected */
  9113. return HAL_TIMEOUT;
  9114. 8003a3e: 2303 movs r3, #3
  9115. 8003a40: e007 b.n 8003a52 <HAL_RCCEx_PeriphCLKConfig+0x642>
  9116. while(__HAL_RCC_PLLSAI_GET_FLAG() == RESET)
  9117. 8003a42: 4b06 ldr r3, [pc, #24] ; (8003a5c <HAL_RCCEx_PeriphCLKConfig+0x64c>)
  9118. 8003a44: 681b ldr r3, [r3, #0]
  9119. 8003a46: f003 5300 and.w r3, r3, #536870912 ; 0x20000000
  9120. 8003a4a: f1b3 5f00 cmp.w r3, #536870912 ; 0x20000000
  9121. 8003a4e: d1ef bne.n 8003a30 <HAL_RCCEx_PeriphCLKConfig+0x620>
  9122. }
  9123. }
  9124. }
  9125. return HAL_OK;
  9126. 8003a50: 2300 movs r3, #0
  9127. }
  9128. 8003a52: 4618 mov r0, r3
  9129. 8003a54: 3730 adds r7, #48 ; 0x30
  9130. 8003a56: 46bd mov sp, r7
  9131. 8003a58: bd80 pop {r7, pc}
  9132. 8003a5a: bf00 nop
  9133. 8003a5c: 40023800 .word 0x40023800
  9134. 8003a60: 42470070 .word 0x42470070
  9135. 08003a64 <HAL_RCC_GetSysClockFreq>:
  9136. *
  9137. *
  9138. * @retval SYSCLK frequency
  9139. */
  9140. uint32_t HAL_RCC_GetSysClockFreq(void)
  9141. {
  9142. 8003a64: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
  9143. 8003a68: b088 sub sp, #32
  9144. 8003a6a: af00 add r7, sp, #0
  9145. uint32_t pllm = 0U;
  9146. 8003a6c: 2300 movs r3, #0
  9147. 8003a6e: 617b str r3, [r7, #20]
  9148. uint32_t pllvco = 0U;
  9149. 8003a70: 2300 movs r3, #0
  9150. 8003a72: 61fb str r3, [r7, #28]
  9151. uint32_t pllp = 0U;
  9152. 8003a74: 2300 movs r3, #0
  9153. 8003a76: 613b str r3, [r7, #16]
  9154. uint32_t pllr = 0U;
  9155. 8003a78: 2300 movs r3, #0
  9156. 8003a7a: 60fb str r3, [r7, #12]
  9157. uint32_t sysclockfreq = 0U;
  9158. 8003a7c: 2300 movs r3, #0
  9159. 8003a7e: 61bb str r3, [r7, #24]
  9160. /* Get SYSCLK source -------------------------------------------------------*/
  9161. switch (RCC->CFGR & RCC_CFGR_SWS)
  9162. 8003a80: 4bce ldr r3, [pc, #824] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9163. 8003a82: 689b ldr r3, [r3, #8]
  9164. 8003a84: f003 030c and.w r3, r3, #12
  9165. 8003a88: 2b0c cmp r3, #12
  9166. 8003a8a: f200 818d bhi.w 8003da8 <HAL_RCC_GetSysClockFreq+0x344>
  9167. 8003a8e: a201 add r2, pc, #4 ; (adr r2, 8003a94 <HAL_RCC_GetSysClockFreq+0x30>)
  9168. 8003a90: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  9169. 8003a94: 08003ac9 .word 0x08003ac9
  9170. 8003a98: 08003da9 .word 0x08003da9
  9171. 8003a9c: 08003da9 .word 0x08003da9
  9172. 8003aa0: 08003da9 .word 0x08003da9
  9173. 8003aa4: 08003acf .word 0x08003acf
  9174. 8003aa8: 08003da9 .word 0x08003da9
  9175. 8003aac: 08003da9 .word 0x08003da9
  9176. 8003ab0: 08003da9 .word 0x08003da9
  9177. 8003ab4: 08003ad5 .word 0x08003ad5
  9178. 8003ab8: 08003da9 .word 0x08003da9
  9179. 8003abc: 08003da9 .word 0x08003da9
  9180. 8003ac0: 08003da9 .word 0x08003da9
  9181. 8003ac4: 08003c49 .word 0x08003c49
  9182. {
  9183. case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
  9184. {
  9185. sysclockfreq = HSI_VALUE;
  9186. 8003ac8: 4bbd ldr r3, [pc, #756] ; (8003dc0 <HAL_RCC_GetSysClockFreq+0x35c>)
  9187. 8003aca: 61bb str r3, [r7, #24]
  9188. break;
  9189. 8003acc: e16f b.n 8003dae <HAL_RCC_GetSysClockFreq+0x34a>
  9190. }
  9191. case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */
  9192. {
  9193. sysclockfreq = HSE_VALUE;
  9194. 8003ace: 4bbd ldr r3, [pc, #756] ; (8003dc4 <HAL_RCC_GetSysClockFreq+0x360>)
  9195. 8003ad0: 61bb str r3, [r7, #24]
  9196. break;
  9197. 8003ad2: e16c b.n 8003dae <HAL_RCC_GetSysClockFreq+0x34a>
  9198. }
  9199. case RCC_CFGR_SWS_PLL: /* PLL/PLLP used as system clock source */
  9200. {
  9201. /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN
  9202. SYSCLK = PLL_VCO / PLLP */
  9203. pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
  9204. 8003ad4: 4bb9 ldr r3, [pc, #740] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9205. 8003ad6: 685b ldr r3, [r3, #4]
  9206. 8003ad8: f003 033f and.w r3, r3, #63 ; 0x3f
  9207. 8003adc: 617b str r3, [r7, #20]
  9208. if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
  9209. 8003ade: 4bb7 ldr r3, [pc, #732] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9210. 8003ae0: 685b ldr r3, [r3, #4]
  9211. 8003ae2: f403 0380 and.w r3, r3, #4194304 ; 0x400000
  9212. 8003ae6: 2b00 cmp r3, #0
  9213. 8003ae8: d053 beq.n 8003b92 <HAL_RCC_GetSysClockFreq+0x12e>
  9214. {
  9215. /* HSE used as PLL clock source */
  9216. pllvco = (uint32_t) ((((uint64_t) HSE_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
  9217. 8003aea: 4bb4 ldr r3, [pc, #720] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9218. 8003aec: 685b ldr r3, [r3, #4]
  9219. 8003aee: 099b lsrs r3, r3, #6
  9220. 8003af0: 461a mov r2, r3
  9221. 8003af2: f04f 0300 mov.w r3, #0
  9222. 8003af6: f240 10ff movw r0, #511 ; 0x1ff
  9223. 8003afa: f04f 0100 mov.w r1, #0
  9224. 8003afe: ea02 0400 and.w r4, r2, r0
  9225. 8003b02: 603c str r4, [r7, #0]
  9226. 8003b04: 400b ands r3, r1
  9227. 8003b06: 607b str r3, [r7, #4]
  9228. 8003b08: e9d7 4500 ldrd r4, r5, [r7]
  9229. 8003b0c: 4620 mov r0, r4
  9230. 8003b0e: 4629 mov r1, r5
  9231. 8003b10: f04f 0200 mov.w r2, #0
  9232. 8003b14: f04f 0300 mov.w r3, #0
  9233. 8003b18: 014b lsls r3, r1, #5
  9234. 8003b1a: ea43 63d0 orr.w r3, r3, r0, lsr #27
  9235. 8003b1e: 0142 lsls r2, r0, #5
  9236. 8003b20: 4610 mov r0, r2
  9237. 8003b22: 4619 mov r1, r3
  9238. 8003b24: 4623 mov r3, r4
  9239. 8003b26: 1ac0 subs r0, r0, r3
  9240. 8003b28: 462b mov r3, r5
  9241. 8003b2a: eb61 0103 sbc.w r1, r1, r3
  9242. 8003b2e: f04f 0200 mov.w r2, #0
  9243. 8003b32: f04f 0300 mov.w r3, #0
  9244. 8003b36: 018b lsls r3, r1, #6
  9245. 8003b38: ea43 6390 orr.w r3, r3, r0, lsr #26
  9246. 8003b3c: 0182 lsls r2, r0, #6
  9247. 8003b3e: 1a12 subs r2, r2, r0
  9248. 8003b40: eb63 0301 sbc.w r3, r3, r1
  9249. 8003b44: f04f 0000 mov.w r0, #0
  9250. 8003b48: f04f 0100 mov.w r1, #0
  9251. 8003b4c: 00d9 lsls r1, r3, #3
  9252. 8003b4e: ea41 7152 orr.w r1, r1, r2, lsr #29
  9253. 8003b52: 00d0 lsls r0, r2, #3
  9254. 8003b54: 4602 mov r2, r0
  9255. 8003b56: 460b mov r3, r1
  9256. 8003b58: 4621 mov r1, r4
  9257. 8003b5a: 1852 adds r2, r2, r1
  9258. 8003b5c: 4629 mov r1, r5
  9259. 8003b5e: eb43 0101 adc.w r1, r3, r1
  9260. 8003b62: 460b mov r3, r1
  9261. 8003b64: f04f 0000 mov.w r0, #0
  9262. 8003b68: f04f 0100 mov.w r1, #0
  9263. 8003b6c: 0259 lsls r1, r3, #9
  9264. 8003b6e: ea41 51d2 orr.w r1, r1, r2, lsr #23
  9265. 8003b72: 0250 lsls r0, r2, #9
  9266. 8003b74: 4602 mov r2, r0
  9267. 8003b76: 460b mov r3, r1
  9268. 8003b78: 4610 mov r0, r2
  9269. 8003b7a: 4619 mov r1, r3
  9270. 8003b7c: 697b ldr r3, [r7, #20]
  9271. 8003b7e: 461a mov r2, r3
  9272. 8003b80: f04f 0300 mov.w r3, #0
  9273. 8003b84: f7fc fb3e bl 8000204 <__aeabi_uldivmod>
  9274. 8003b88: 4602 mov r2, r0
  9275. 8003b8a: 460b mov r3, r1
  9276. 8003b8c: 4613 mov r3, r2
  9277. 8003b8e: 61fb str r3, [r7, #28]
  9278. 8003b90: e04c b.n 8003c2c <HAL_RCC_GetSysClockFreq+0x1c8>
  9279. }
  9280. else
  9281. {
  9282. /* HSI used as PLL clock source */
  9283. pllvco = (uint32_t) ((((uint64_t) HSI_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
  9284. 8003b92: 4b8a ldr r3, [pc, #552] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9285. 8003b94: 685b ldr r3, [r3, #4]
  9286. 8003b96: 099b lsrs r3, r3, #6
  9287. 8003b98: 461a mov r2, r3
  9288. 8003b9a: f04f 0300 mov.w r3, #0
  9289. 8003b9e: f240 10ff movw r0, #511 ; 0x1ff
  9290. 8003ba2: f04f 0100 mov.w r1, #0
  9291. 8003ba6: ea02 0a00 and.w sl, r2, r0
  9292. 8003baa: ea03 0b01 and.w fp, r3, r1
  9293. 8003bae: 4650 mov r0, sl
  9294. 8003bb0: 4659 mov r1, fp
  9295. 8003bb2: f04f 0200 mov.w r2, #0
  9296. 8003bb6: f04f 0300 mov.w r3, #0
  9297. 8003bba: 014b lsls r3, r1, #5
  9298. 8003bbc: ea43 63d0 orr.w r3, r3, r0, lsr #27
  9299. 8003bc0: 0142 lsls r2, r0, #5
  9300. 8003bc2: 4610 mov r0, r2
  9301. 8003bc4: 4619 mov r1, r3
  9302. 8003bc6: ebb0 000a subs.w r0, r0, sl
  9303. 8003bca: eb61 010b sbc.w r1, r1, fp
  9304. 8003bce: f04f 0200 mov.w r2, #0
  9305. 8003bd2: f04f 0300 mov.w r3, #0
  9306. 8003bd6: 018b lsls r3, r1, #6
  9307. 8003bd8: ea43 6390 orr.w r3, r3, r0, lsr #26
  9308. 8003bdc: 0182 lsls r2, r0, #6
  9309. 8003bde: 1a12 subs r2, r2, r0
  9310. 8003be0: eb63 0301 sbc.w r3, r3, r1
  9311. 8003be4: f04f 0000 mov.w r0, #0
  9312. 8003be8: f04f 0100 mov.w r1, #0
  9313. 8003bec: 00d9 lsls r1, r3, #3
  9314. 8003bee: ea41 7152 orr.w r1, r1, r2, lsr #29
  9315. 8003bf2: 00d0 lsls r0, r2, #3
  9316. 8003bf4: 4602 mov r2, r0
  9317. 8003bf6: 460b mov r3, r1
  9318. 8003bf8: eb12 020a adds.w r2, r2, sl
  9319. 8003bfc: eb43 030b adc.w r3, r3, fp
  9320. 8003c00: f04f 0000 mov.w r0, #0
  9321. 8003c04: f04f 0100 mov.w r1, #0
  9322. 8003c08: 0299 lsls r1, r3, #10
  9323. 8003c0a: ea41 5192 orr.w r1, r1, r2, lsr #22
  9324. 8003c0e: 0290 lsls r0, r2, #10
  9325. 8003c10: 4602 mov r2, r0
  9326. 8003c12: 460b mov r3, r1
  9327. 8003c14: 4610 mov r0, r2
  9328. 8003c16: 4619 mov r1, r3
  9329. 8003c18: 697b ldr r3, [r7, #20]
  9330. 8003c1a: 461a mov r2, r3
  9331. 8003c1c: f04f 0300 mov.w r3, #0
  9332. 8003c20: f7fc faf0 bl 8000204 <__aeabi_uldivmod>
  9333. 8003c24: 4602 mov r2, r0
  9334. 8003c26: 460b mov r3, r1
  9335. 8003c28: 4613 mov r3, r2
  9336. 8003c2a: 61fb str r3, [r7, #28]
  9337. }
  9338. pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) *2U);
  9339. 8003c2c: 4b63 ldr r3, [pc, #396] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9340. 8003c2e: 685b ldr r3, [r3, #4]
  9341. 8003c30: 0c1b lsrs r3, r3, #16
  9342. 8003c32: f003 0303 and.w r3, r3, #3
  9343. 8003c36: 3301 adds r3, #1
  9344. 8003c38: 005b lsls r3, r3, #1
  9345. 8003c3a: 613b str r3, [r7, #16]
  9346. sysclockfreq = pllvco/pllp;
  9347. 8003c3c: 69fa ldr r2, [r7, #28]
  9348. 8003c3e: 693b ldr r3, [r7, #16]
  9349. 8003c40: fbb2 f3f3 udiv r3, r2, r3
  9350. 8003c44: 61bb str r3, [r7, #24]
  9351. break;
  9352. 8003c46: e0b2 b.n 8003dae <HAL_RCC_GetSysClockFreq+0x34a>
  9353. }
  9354. case RCC_CFGR_SWS_PLLR: /* PLL/PLLR used as system clock source */
  9355. {
  9356. /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN
  9357. SYSCLK = PLL_VCO / PLLR */
  9358. pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
  9359. 8003c48: 4b5c ldr r3, [pc, #368] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9360. 8003c4a: 685b ldr r3, [r3, #4]
  9361. 8003c4c: f003 033f and.w r3, r3, #63 ; 0x3f
  9362. 8003c50: 617b str r3, [r7, #20]
  9363. if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
  9364. 8003c52: 4b5a ldr r3, [pc, #360] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9365. 8003c54: 685b ldr r3, [r3, #4]
  9366. 8003c56: f403 0380 and.w r3, r3, #4194304 ; 0x400000
  9367. 8003c5a: 2b00 cmp r3, #0
  9368. 8003c5c: d04d beq.n 8003cfa <HAL_RCC_GetSysClockFreq+0x296>
  9369. {
  9370. /* HSE used as PLL clock source */
  9371. pllvco = (uint32_t) ((((uint64_t) HSE_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
  9372. 8003c5e: 4b57 ldr r3, [pc, #348] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9373. 8003c60: 685b ldr r3, [r3, #4]
  9374. 8003c62: 099b lsrs r3, r3, #6
  9375. 8003c64: 461a mov r2, r3
  9376. 8003c66: f04f 0300 mov.w r3, #0
  9377. 8003c6a: f240 10ff movw r0, #511 ; 0x1ff
  9378. 8003c6e: f04f 0100 mov.w r1, #0
  9379. 8003c72: ea02 0800 and.w r8, r2, r0
  9380. 8003c76: ea03 0901 and.w r9, r3, r1
  9381. 8003c7a: 4640 mov r0, r8
  9382. 8003c7c: 4649 mov r1, r9
  9383. 8003c7e: f04f 0200 mov.w r2, #0
  9384. 8003c82: f04f 0300 mov.w r3, #0
  9385. 8003c86: 014b lsls r3, r1, #5
  9386. 8003c88: ea43 63d0 orr.w r3, r3, r0, lsr #27
  9387. 8003c8c: 0142 lsls r2, r0, #5
  9388. 8003c8e: 4610 mov r0, r2
  9389. 8003c90: 4619 mov r1, r3
  9390. 8003c92: ebb0 0008 subs.w r0, r0, r8
  9391. 8003c96: eb61 0109 sbc.w r1, r1, r9
  9392. 8003c9a: f04f 0200 mov.w r2, #0
  9393. 8003c9e: f04f 0300 mov.w r3, #0
  9394. 8003ca2: 018b lsls r3, r1, #6
  9395. 8003ca4: ea43 6390 orr.w r3, r3, r0, lsr #26
  9396. 8003ca8: 0182 lsls r2, r0, #6
  9397. 8003caa: 1a12 subs r2, r2, r0
  9398. 8003cac: eb63 0301 sbc.w r3, r3, r1
  9399. 8003cb0: f04f 0000 mov.w r0, #0
  9400. 8003cb4: f04f 0100 mov.w r1, #0
  9401. 8003cb8: 00d9 lsls r1, r3, #3
  9402. 8003cba: ea41 7152 orr.w r1, r1, r2, lsr #29
  9403. 8003cbe: 00d0 lsls r0, r2, #3
  9404. 8003cc0: 4602 mov r2, r0
  9405. 8003cc2: 460b mov r3, r1
  9406. 8003cc4: eb12 0208 adds.w r2, r2, r8
  9407. 8003cc8: eb43 0309 adc.w r3, r3, r9
  9408. 8003ccc: f04f 0000 mov.w r0, #0
  9409. 8003cd0: f04f 0100 mov.w r1, #0
  9410. 8003cd4: 0259 lsls r1, r3, #9
  9411. 8003cd6: ea41 51d2 orr.w r1, r1, r2, lsr #23
  9412. 8003cda: 0250 lsls r0, r2, #9
  9413. 8003cdc: 4602 mov r2, r0
  9414. 8003cde: 460b mov r3, r1
  9415. 8003ce0: 4610 mov r0, r2
  9416. 8003ce2: 4619 mov r1, r3
  9417. 8003ce4: 697b ldr r3, [r7, #20]
  9418. 8003ce6: 461a mov r2, r3
  9419. 8003ce8: f04f 0300 mov.w r3, #0
  9420. 8003cec: f7fc fa8a bl 8000204 <__aeabi_uldivmod>
  9421. 8003cf0: 4602 mov r2, r0
  9422. 8003cf2: 460b mov r3, r1
  9423. 8003cf4: 4613 mov r3, r2
  9424. 8003cf6: 61fb str r3, [r7, #28]
  9425. 8003cf8: e04a b.n 8003d90 <HAL_RCC_GetSysClockFreq+0x32c>
  9426. }
  9427. else
  9428. {
  9429. /* HSI used as PLL clock source */
  9430. pllvco = (uint32_t) ((((uint64_t) HSI_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
  9431. 8003cfa: 4b30 ldr r3, [pc, #192] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9432. 8003cfc: 685b ldr r3, [r3, #4]
  9433. 8003cfe: 099b lsrs r3, r3, #6
  9434. 8003d00: 461a mov r2, r3
  9435. 8003d02: f04f 0300 mov.w r3, #0
  9436. 8003d06: f240 10ff movw r0, #511 ; 0x1ff
  9437. 8003d0a: f04f 0100 mov.w r1, #0
  9438. 8003d0e: ea02 0400 and.w r4, r2, r0
  9439. 8003d12: ea03 0501 and.w r5, r3, r1
  9440. 8003d16: 4620 mov r0, r4
  9441. 8003d18: 4629 mov r1, r5
  9442. 8003d1a: f04f 0200 mov.w r2, #0
  9443. 8003d1e: f04f 0300 mov.w r3, #0
  9444. 8003d22: 014b lsls r3, r1, #5
  9445. 8003d24: ea43 63d0 orr.w r3, r3, r0, lsr #27
  9446. 8003d28: 0142 lsls r2, r0, #5
  9447. 8003d2a: 4610 mov r0, r2
  9448. 8003d2c: 4619 mov r1, r3
  9449. 8003d2e: 1b00 subs r0, r0, r4
  9450. 8003d30: eb61 0105 sbc.w r1, r1, r5
  9451. 8003d34: f04f 0200 mov.w r2, #0
  9452. 8003d38: f04f 0300 mov.w r3, #0
  9453. 8003d3c: 018b lsls r3, r1, #6
  9454. 8003d3e: ea43 6390 orr.w r3, r3, r0, lsr #26
  9455. 8003d42: 0182 lsls r2, r0, #6
  9456. 8003d44: 1a12 subs r2, r2, r0
  9457. 8003d46: eb63 0301 sbc.w r3, r3, r1
  9458. 8003d4a: f04f 0000 mov.w r0, #0
  9459. 8003d4e: f04f 0100 mov.w r1, #0
  9460. 8003d52: 00d9 lsls r1, r3, #3
  9461. 8003d54: ea41 7152 orr.w r1, r1, r2, lsr #29
  9462. 8003d58: 00d0 lsls r0, r2, #3
  9463. 8003d5a: 4602 mov r2, r0
  9464. 8003d5c: 460b mov r3, r1
  9465. 8003d5e: 1912 adds r2, r2, r4
  9466. 8003d60: eb45 0303 adc.w r3, r5, r3
  9467. 8003d64: f04f 0000 mov.w r0, #0
  9468. 8003d68: f04f 0100 mov.w r1, #0
  9469. 8003d6c: 0299 lsls r1, r3, #10
  9470. 8003d6e: ea41 5192 orr.w r1, r1, r2, lsr #22
  9471. 8003d72: 0290 lsls r0, r2, #10
  9472. 8003d74: 4602 mov r2, r0
  9473. 8003d76: 460b mov r3, r1
  9474. 8003d78: 4610 mov r0, r2
  9475. 8003d7a: 4619 mov r1, r3
  9476. 8003d7c: 697b ldr r3, [r7, #20]
  9477. 8003d7e: 461a mov r2, r3
  9478. 8003d80: f04f 0300 mov.w r3, #0
  9479. 8003d84: f7fc fa3e bl 8000204 <__aeabi_uldivmod>
  9480. 8003d88: 4602 mov r2, r0
  9481. 8003d8a: 460b mov r3, r1
  9482. 8003d8c: 4613 mov r3, r2
  9483. 8003d8e: 61fb str r3, [r7, #28]
  9484. }
  9485. pllr = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> RCC_PLLCFGR_PLLR_Pos);
  9486. 8003d90: 4b0a ldr r3, [pc, #40] ; (8003dbc <HAL_RCC_GetSysClockFreq+0x358>)
  9487. 8003d92: 685b ldr r3, [r3, #4]
  9488. 8003d94: 0f1b lsrs r3, r3, #28
  9489. 8003d96: f003 0307 and.w r3, r3, #7
  9490. 8003d9a: 60fb str r3, [r7, #12]
  9491. sysclockfreq = pllvco/pllr;
  9492. 8003d9c: 69fa ldr r2, [r7, #28]
  9493. 8003d9e: 68fb ldr r3, [r7, #12]
  9494. 8003da0: fbb2 f3f3 udiv r3, r2, r3
  9495. 8003da4: 61bb str r3, [r7, #24]
  9496. break;
  9497. 8003da6: e002 b.n 8003dae <HAL_RCC_GetSysClockFreq+0x34a>
  9498. }
  9499. default:
  9500. {
  9501. sysclockfreq = HSI_VALUE;
  9502. 8003da8: 4b05 ldr r3, [pc, #20] ; (8003dc0 <HAL_RCC_GetSysClockFreq+0x35c>)
  9503. 8003daa: 61bb str r3, [r7, #24]
  9504. break;
  9505. 8003dac: bf00 nop
  9506. }
  9507. }
  9508. return sysclockfreq;
  9509. 8003dae: 69bb ldr r3, [r7, #24]
  9510. }
  9511. 8003db0: 4618 mov r0, r3
  9512. 8003db2: 3720 adds r7, #32
  9513. 8003db4: 46bd mov sp, r7
  9514. 8003db6: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
  9515. 8003dba: bf00 nop
  9516. 8003dbc: 40023800 .word 0x40023800
  9517. 8003dc0: 00f42400 .word 0x00f42400
  9518. 8003dc4: 007a1200 .word 0x007a1200
  9519. 08003dc8 <HAL_RCC_OscConfig>:
  9520. * @note This function add the PLL/PLLR factor management during PLL configuration this feature
  9521. * is only available in STM32F410xx/STM32F446xx/STM32F469xx/STM32F479xx/STM32F412Zx/STM32F412Vx/STM32F412Rx/STM32F412Cx devices
  9522. * @retval HAL status
  9523. */
  9524. HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
  9525. {
  9526. 8003dc8: b580 push {r7, lr}
  9527. 8003dca: b086 sub sp, #24
  9528. 8003dcc: af00 add r7, sp, #0
  9529. 8003dce: 6078 str r0, [r7, #4]
  9530. uint32_t tickstart, pll_config;
  9531. /* Check Null pointer */
  9532. if(RCC_OscInitStruct == NULL)
  9533. 8003dd0: 687b ldr r3, [r7, #4]
  9534. 8003dd2: 2b00 cmp r3, #0
  9535. 8003dd4: d101 bne.n 8003dda <HAL_RCC_OscConfig+0x12>
  9536. {
  9537. return HAL_ERROR;
  9538. 8003dd6: 2301 movs r3, #1
  9539. 8003dd8: e28d b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9540. }
  9541. /* Check the parameters */
  9542. assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
  9543. /*------------------------------- HSE Configuration ------------------------*/
  9544. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
  9545. 8003dda: 687b ldr r3, [r7, #4]
  9546. 8003ddc: 681b ldr r3, [r3, #0]
  9547. 8003dde: f003 0301 and.w r3, r3, #1
  9548. 8003de2: 2b00 cmp r3, #0
  9549. 8003de4: f000 8083 beq.w 8003eee <HAL_RCC_OscConfig+0x126>
  9550. {
  9551. /* Check the parameters */
  9552. assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
  9553. /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */
  9554. #if defined(STM32F446xx)
  9555. if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
  9556. 8003de8: 4b94 ldr r3, [pc, #592] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9557. 8003dea: 689b ldr r3, [r3, #8]
  9558. 8003dec: f003 030c and.w r3, r3, #12
  9559. 8003df0: 2b04 cmp r3, #4
  9560. 8003df2: d019 beq.n 8003e28 <HAL_RCC_OscConfig+0x60>
  9561. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)) ||\
  9562. 8003df4: 4b91 ldr r3, [pc, #580] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9563. 8003df6: 689b ldr r3, [r3, #8]
  9564. 8003df8: f003 030c and.w r3, r3, #12
  9565. if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
  9566. 8003dfc: 2b08 cmp r3, #8
  9567. 8003dfe: d106 bne.n 8003e0e <HAL_RCC_OscConfig+0x46>
  9568. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)) ||\
  9569. 8003e00: 4b8e ldr r3, [pc, #568] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9570. 8003e02: 685b ldr r3, [r3, #4]
  9571. 8003e04: f403 0380 and.w r3, r3, #4194304 ; 0x400000
  9572. 8003e08: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
  9573. 8003e0c: d00c beq.n 8003e28 <HAL_RCC_OscConfig+0x60>
  9574. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
  9575. 8003e0e: 4b8b ldr r3, [pc, #556] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9576. 8003e10: 689b ldr r3, [r3, #8]
  9577. 8003e12: f003 030c and.w r3, r3, #12
  9578. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)) ||\
  9579. 8003e16: 2b0c cmp r3, #12
  9580. 8003e18: d112 bne.n 8003e40 <HAL_RCC_OscConfig+0x78>
  9581. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
  9582. 8003e1a: 4b88 ldr r3, [pc, #544] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9583. 8003e1c: 685b ldr r3, [r3, #4]
  9584. 8003e1e: f403 0380 and.w r3, r3, #4194304 ; 0x400000
  9585. 8003e22: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000
  9586. 8003e26: d10b bne.n 8003e40 <HAL_RCC_OscConfig+0x78>
  9587. #else
  9588. if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
  9589. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
  9590. #endif /* STM32F446xx */
  9591. {
  9592. if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
  9593. 8003e28: 4b84 ldr r3, [pc, #528] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9594. 8003e2a: 681b ldr r3, [r3, #0]
  9595. 8003e2c: f403 3300 and.w r3, r3, #131072 ; 0x20000
  9596. 8003e30: 2b00 cmp r3, #0
  9597. 8003e32: d05b beq.n 8003eec <HAL_RCC_OscConfig+0x124>
  9598. 8003e34: 687b ldr r3, [r7, #4]
  9599. 8003e36: 685b ldr r3, [r3, #4]
  9600. 8003e38: 2b00 cmp r3, #0
  9601. 8003e3a: d157 bne.n 8003eec <HAL_RCC_OscConfig+0x124>
  9602. {
  9603. return HAL_ERROR;
  9604. 8003e3c: 2301 movs r3, #1
  9605. 8003e3e: e25a b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9606. }
  9607. }
  9608. else
  9609. {
  9610. /* Set the new HSE configuration ---------------------------------------*/
  9611. __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
  9612. 8003e40: 687b ldr r3, [r7, #4]
  9613. 8003e42: 685b ldr r3, [r3, #4]
  9614. 8003e44: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
  9615. 8003e48: d106 bne.n 8003e58 <HAL_RCC_OscConfig+0x90>
  9616. 8003e4a: 4b7c ldr r3, [pc, #496] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9617. 8003e4c: 681b ldr r3, [r3, #0]
  9618. 8003e4e: 4a7b ldr r2, [pc, #492] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9619. 8003e50: f443 3380 orr.w r3, r3, #65536 ; 0x10000
  9620. 8003e54: 6013 str r3, [r2, #0]
  9621. 8003e56: e01d b.n 8003e94 <HAL_RCC_OscConfig+0xcc>
  9622. 8003e58: 687b ldr r3, [r7, #4]
  9623. 8003e5a: 685b ldr r3, [r3, #4]
  9624. 8003e5c: f5b3 2fa0 cmp.w r3, #327680 ; 0x50000
  9625. 8003e60: d10c bne.n 8003e7c <HAL_RCC_OscConfig+0xb4>
  9626. 8003e62: 4b76 ldr r3, [pc, #472] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9627. 8003e64: 681b ldr r3, [r3, #0]
  9628. 8003e66: 4a75 ldr r2, [pc, #468] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9629. 8003e68: f443 2380 orr.w r3, r3, #262144 ; 0x40000
  9630. 8003e6c: 6013 str r3, [r2, #0]
  9631. 8003e6e: 4b73 ldr r3, [pc, #460] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9632. 8003e70: 681b ldr r3, [r3, #0]
  9633. 8003e72: 4a72 ldr r2, [pc, #456] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9634. 8003e74: f443 3380 orr.w r3, r3, #65536 ; 0x10000
  9635. 8003e78: 6013 str r3, [r2, #0]
  9636. 8003e7a: e00b b.n 8003e94 <HAL_RCC_OscConfig+0xcc>
  9637. 8003e7c: 4b6f ldr r3, [pc, #444] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9638. 8003e7e: 681b ldr r3, [r3, #0]
  9639. 8003e80: 4a6e ldr r2, [pc, #440] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9640. 8003e82: f423 3380 bic.w r3, r3, #65536 ; 0x10000
  9641. 8003e86: 6013 str r3, [r2, #0]
  9642. 8003e88: 4b6c ldr r3, [pc, #432] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9643. 8003e8a: 681b ldr r3, [r3, #0]
  9644. 8003e8c: 4a6b ldr r2, [pc, #428] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9645. 8003e8e: f423 2380 bic.w r3, r3, #262144 ; 0x40000
  9646. 8003e92: 6013 str r3, [r2, #0]
  9647. /* Check the HSE State */
  9648. if((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF)
  9649. 8003e94: 687b ldr r3, [r7, #4]
  9650. 8003e96: 685b ldr r3, [r3, #4]
  9651. 8003e98: 2b00 cmp r3, #0
  9652. 8003e9a: d013 beq.n 8003ec4 <HAL_RCC_OscConfig+0xfc>
  9653. {
  9654. /* Get Start Tick*/
  9655. tickstart = HAL_GetTick();
  9656. 8003e9c: f7fd f9fe bl 800129c <HAL_GetTick>
  9657. 8003ea0: 6138 str r0, [r7, #16]
  9658. /* Wait till HSE is ready */
  9659. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
  9660. 8003ea2: e008 b.n 8003eb6 <HAL_RCC_OscConfig+0xee>
  9661. {
  9662. if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
  9663. 8003ea4: f7fd f9fa bl 800129c <HAL_GetTick>
  9664. 8003ea8: 4602 mov r2, r0
  9665. 8003eaa: 693b ldr r3, [r7, #16]
  9666. 8003eac: 1ad3 subs r3, r2, r3
  9667. 8003eae: 2b64 cmp r3, #100 ; 0x64
  9668. 8003eb0: d901 bls.n 8003eb6 <HAL_RCC_OscConfig+0xee>
  9669. {
  9670. return HAL_TIMEOUT;
  9671. 8003eb2: 2303 movs r3, #3
  9672. 8003eb4: e21f b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9673. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
  9674. 8003eb6: 4b61 ldr r3, [pc, #388] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9675. 8003eb8: 681b ldr r3, [r3, #0]
  9676. 8003eba: f403 3300 and.w r3, r3, #131072 ; 0x20000
  9677. 8003ebe: 2b00 cmp r3, #0
  9678. 8003ec0: d0f0 beq.n 8003ea4 <HAL_RCC_OscConfig+0xdc>
  9679. 8003ec2: e014 b.n 8003eee <HAL_RCC_OscConfig+0x126>
  9680. }
  9681. }
  9682. else
  9683. {
  9684. /* Get Start Tick*/
  9685. tickstart = HAL_GetTick();
  9686. 8003ec4: f7fd f9ea bl 800129c <HAL_GetTick>
  9687. 8003ec8: 6138 str r0, [r7, #16]
  9688. /* Wait till HSE is bypassed or disabled */
  9689. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
  9690. 8003eca: e008 b.n 8003ede <HAL_RCC_OscConfig+0x116>
  9691. {
  9692. if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
  9693. 8003ecc: f7fd f9e6 bl 800129c <HAL_GetTick>
  9694. 8003ed0: 4602 mov r2, r0
  9695. 8003ed2: 693b ldr r3, [r7, #16]
  9696. 8003ed4: 1ad3 subs r3, r2, r3
  9697. 8003ed6: 2b64 cmp r3, #100 ; 0x64
  9698. 8003ed8: d901 bls.n 8003ede <HAL_RCC_OscConfig+0x116>
  9699. {
  9700. return HAL_TIMEOUT;
  9701. 8003eda: 2303 movs r3, #3
  9702. 8003edc: e20b b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9703. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
  9704. 8003ede: 4b57 ldr r3, [pc, #348] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9705. 8003ee0: 681b ldr r3, [r3, #0]
  9706. 8003ee2: f403 3300 and.w r3, r3, #131072 ; 0x20000
  9707. 8003ee6: 2b00 cmp r3, #0
  9708. 8003ee8: d1f0 bne.n 8003ecc <HAL_RCC_OscConfig+0x104>
  9709. 8003eea: e000 b.n 8003eee <HAL_RCC_OscConfig+0x126>
  9710. if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
  9711. 8003eec: bf00 nop
  9712. }
  9713. }
  9714. }
  9715. }
  9716. /*----------------------------- HSI Configuration --------------------------*/
  9717. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
  9718. 8003eee: 687b ldr r3, [r7, #4]
  9719. 8003ef0: 681b ldr r3, [r3, #0]
  9720. 8003ef2: f003 0302 and.w r3, r3, #2
  9721. 8003ef6: 2b00 cmp r3, #0
  9722. 8003ef8: d06f beq.n 8003fda <HAL_RCC_OscConfig+0x212>
  9723. assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
  9724. assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
  9725. /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
  9726. #if defined(STM32F446xx)
  9727. if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
  9728. 8003efa: 4b50 ldr r3, [pc, #320] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9729. 8003efc: 689b ldr r3, [r3, #8]
  9730. 8003efe: f003 030c and.w r3, r3, #12
  9731. 8003f02: 2b00 cmp r3, #0
  9732. 8003f04: d017 beq.n 8003f36 <HAL_RCC_OscConfig+0x16e>
  9733. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)) ||\
  9734. 8003f06: 4b4d ldr r3, [pc, #308] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9735. 8003f08: 689b ldr r3, [r3, #8]
  9736. 8003f0a: f003 030c and.w r3, r3, #12
  9737. if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
  9738. 8003f0e: 2b08 cmp r3, #8
  9739. 8003f10: d105 bne.n 8003f1e <HAL_RCC_OscConfig+0x156>
  9740. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)) ||\
  9741. 8003f12: 4b4a ldr r3, [pc, #296] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9742. 8003f14: 685b ldr r3, [r3, #4]
  9743. 8003f16: f403 0380 and.w r3, r3, #4194304 ; 0x400000
  9744. 8003f1a: 2b00 cmp r3, #0
  9745. 8003f1c: d00b beq.n 8003f36 <HAL_RCC_OscConfig+0x16e>
  9746. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
  9747. 8003f1e: 4b47 ldr r3, [pc, #284] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9748. 8003f20: 689b ldr r3, [r3, #8]
  9749. 8003f22: f003 030c and.w r3, r3, #12
  9750. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)) ||\
  9751. 8003f26: 2b0c cmp r3, #12
  9752. 8003f28: d11c bne.n 8003f64 <HAL_RCC_OscConfig+0x19c>
  9753. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
  9754. 8003f2a: 4b44 ldr r3, [pc, #272] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9755. 8003f2c: 685b ldr r3, [r3, #4]
  9756. 8003f2e: f403 0380 and.w r3, r3, #4194304 ; 0x400000
  9757. 8003f32: 2b00 cmp r3, #0
  9758. 8003f34: d116 bne.n 8003f64 <HAL_RCC_OscConfig+0x19c>
  9759. if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
  9760. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
  9761. #endif /* STM32F446xx */
  9762. {
  9763. /* When HSI is used as system clock it will not disabled */
  9764. if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
  9765. 8003f36: 4b41 ldr r3, [pc, #260] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9766. 8003f38: 681b ldr r3, [r3, #0]
  9767. 8003f3a: f003 0302 and.w r3, r3, #2
  9768. 8003f3e: 2b00 cmp r3, #0
  9769. 8003f40: d005 beq.n 8003f4e <HAL_RCC_OscConfig+0x186>
  9770. 8003f42: 687b ldr r3, [r7, #4]
  9771. 8003f44: 68db ldr r3, [r3, #12]
  9772. 8003f46: 2b01 cmp r3, #1
  9773. 8003f48: d001 beq.n 8003f4e <HAL_RCC_OscConfig+0x186>
  9774. {
  9775. return HAL_ERROR;
  9776. 8003f4a: 2301 movs r3, #1
  9777. 8003f4c: e1d3 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9778. }
  9779. /* Otherwise, just the calibration is allowed */
  9780. else
  9781. {
  9782. /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
  9783. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  9784. 8003f4e: 4b3b ldr r3, [pc, #236] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9785. 8003f50: 681b ldr r3, [r3, #0]
  9786. 8003f52: f023 02f8 bic.w r2, r3, #248 ; 0xf8
  9787. 8003f56: 687b ldr r3, [r7, #4]
  9788. 8003f58: 691b ldr r3, [r3, #16]
  9789. 8003f5a: 00db lsls r3, r3, #3
  9790. 8003f5c: 4937 ldr r1, [pc, #220] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9791. 8003f5e: 4313 orrs r3, r2
  9792. 8003f60: 600b str r3, [r1, #0]
  9793. if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
  9794. 8003f62: e03a b.n 8003fda <HAL_RCC_OscConfig+0x212>
  9795. }
  9796. }
  9797. else
  9798. {
  9799. /* Check the HSI State */
  9800. if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF)
  9801. 8003f64: 687b ldr r3, [r7, #4]
  9802. 8003f66: 68db ldr r3, [r3, #12]
  9803. 8003f68: 2b00 cmp r3, #0
  9804. 8003f6a: d020 beq.n 8003fae <HAL_RCC_OscConfig+0x1e6>
  9805. {
  9806. /* Enable the Internal High Speed oscillator (HSI). */
  9807. __HAL_RCC_HSI_ENABLE();
  9808. 8003f6c: 4b34 ldr r3, [pc, #208] ; (8004040 <HAL_RCC_OscConfig+0x278>)
  9809. 8003f6e: 2201 movs r2, #1
  9810. 8003f70: 601a str r2, [r3, #0]
  9811. /* Get Start Tick*/
  9812. tickstart = HAL_GetTick();
  9813. 8003f72: f7fd f993 bl 800129c <HAL_GetTick>
  9814. 8003f76: 6138 str r0, [r7, #16]
  9815. /* Wait till HSI is ready */
  9816. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
  9817. 8003f78: e008 b.n 8003f8c <HAL_RCC_OscConfig+0x1c4>
  9818. {
  9819. if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
  9820. 8003f7a: f7fd f98f bl 800129c <HAL_GetTick>
  9821. 8003f7e: 4602 mov r2, r0
  9822. 8003f80: 693b ldr r3, [r7, #16]
  9823. 8003f82: 1ad3 subs r3, r2, r3
  9824. 8003f84: 2b02 cmp r3, #2
  9825. 8003f86: d901 bls.n 8003f8c <HAL_RCC_OscConfig+0x1c4>
  9826. {
  9827. return HAL_TIMEOUT;
  9828. 8003f88: 2303 movs r3, #3
  9829. 8003f8a: e1b4 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9830. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
  9831. 8003f8c: 4b2b ldr r3, [pc, #172] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9832. 8003f8e: 681b ldr r3, [r3, #0]
  9833. 8003f90: f003 0302 and.w r3, r3, #2
  9834. 8003f94: 2b00 cmp r3, #0
  9835. 8003f96: d0f0 beq.n 8003f7a <HAL_RCC_OscConfig+0x1b2>
  9836. }
  9837. }
  9838. /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
  9839. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  9840. 8003f98: 4b28 ldr r3, [pc, #160] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9841. 8003f9a: 681b ldr r3, [r3, #0]
  9842. 8003f9c: f023 02f8 bic.w r2, r3, #248 ; 0xf8
  9843. 8003fa0: 687b ldr r3, [r7, #4]
  9844. 8003fa2: 691b ldr r3, [r3, #16]
  9845. 8003fa4: 00db lsls r3, r3, #3
  9846. 8003fa6: 4925 ldr r1, [pc, #148] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9847. 8003fa8: 4313 orrs r3, r2
  9848. 8003faa: 600b str r3, [r1, #0]
  9849. 8003fac: e015 b.n 8003fda <HAL_RCC_OscConfig+0x212>
  9850. }
  9851. else
  9852. {
  9853. /* Disable the Internal High Speed oscillator (HSI). */
  9854. __HAL_RCC_HSI_DISABLE();
  9855. 8003fae: 4b24 ldr r3, [pc, #144] ; (8004040 <HAL_RCC_OscConfig+0x278>)
  9856. 8003fb0: 2200 movs r2, #0
  9857. 8003fb2: 601a str r2, [r3, #0]
  9858. /* Get Start Tick*/
  9859. tickstart = HAL_GetTick();
  9860. 8003fb4: f7fd f972 bl 800129c <HAL_GetTick>
  9861. 8003fb8: 6138 str r0, [r7, #16]
  9862. /* Wait till HSI is ready */
  9863. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
  9864. 8003fba: e008 b.n 8003fce <HAL_RCC_OscConfig+0x206>
  9865. {
  9866. if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
  9867. 8003fbc: f7fd f96e bl 800129c <HAL_GetTick>
  9868. 8003fc0: 4602 mov r2, r0
  9869. 8003fc2: 693b ldr r3, [r7, #16]
  9870. 8003fc4: 1ad3 subs r3, r2, r3
  9871. 8003fc6: 2b02 cmp r3, #2
  9872. 8003fc8: d901 bls.n 8003fce <HAL_RCC_OscConfig+0x206>
  9873. {
  9874. return HAL_TIMEOUT;
  9875. 8003fca: 2303 movs r3, #3
  9876. 8003fcc: e193 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9877. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
  9878. 8003fce: 4b1b ldr r3, [pc, #108] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9879. 8003fd0: 681b ldr r3, [r3, #0]
  9880. 8003fd2: f003 0302 and.w r3, r3, #2
  9881. 8003fd6: 2b00 cmp r3, #0
  9882. 8003fd8: d1f0 bne.n 8003fbc <HAL_RCC_OscConfig+0x1f4>
  9883. }
  9884. }
  9885. }
  9886. }
  9887. /*------------------------------ LSI Configuration -------------------------*/
  9888. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
  9889. 8003fda: 687b ldr r3, [r7, #4]
  9890. 8003fdc: 681b ldr r3, [r3, #0]
  9891. 8003fde: f003 0308 and.w r3, r3, #8
  9892. 8003fe2: 2b00 cmp r3, #0
  9893. 8003fe4: d036 beq.n 8004054 <HAL_RCC_OscConfig+0x28c>
  9894. {
  9895. /* Check the parameters */
  9896. assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
  9897. /* Check the LSI State */
  9898. if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF)
  9899. 8003fe6: 687b ldr r3, [r7, #4]
  9900. 8003fe8: 695b ldr r3, [r3, #20]
  9901. 8003fea: 2b00 cmp r3, #0
  9902. 8003fec: d016 beq.n 800401c <HAL_RCC_OscConfig+0x254>
  9903. {
  9904. /* Enable the Internal Low Speed oscillator (LSI). */
  9905. __HAL_RCC_LSI_ENABLE();
  9906. 8003fee: 4b15 ldr r3, [pc, #84] ; (8004044 <HAL_RCC_OscConfig+0x27c>)
  9907. 8003ff0: 2201 movs r2, #1
  9908. 8003ff2: 601a str r2, [r3, #0]
  9909. /* Get Start Tick*/
  9910. tickstart = HAL_GetTick();
  9911. 8003ff4: f7fd f952 bl 800129c <HAL_GetTick>
  9912. 8003ff8: 6138 str r0, [r7, #16]
  9913. /* Wait till LSI is ready */
  9914. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
  9915. 8003ffa: e008 b.n 800400e <HAL_RCC_OscConfig+0x246>
  9916. {
  9917. if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
  9918. 8003ffc: f7fd f94e bl 800129c <HAL_GetTick>
  9919. 8004000: 4602 mov r2, r0
  9920. 8004002: 693b ldr r3, [r7, #16]
  9921. 8004004: 1ad3 subs r3, r2, r3
  9922. 8004006: 2b02 cmp r3, #2
  9923. 8004008: d901 bls.n 800400e <HAL_RCC_OscConfig+0x246>
  9924. {
  9925. return HAL_TIMEOUT;
  9926. 800400a: 2303 movs r3, #3
  9927. 800400c: e173 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9928. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
  9929. 800400e: 4b0b ldr r3, [pc, #44] ; (800403c <HAL_RCC_OscConfig+0x274>)
  9930. 8004010: 6f5b ldr r3, [r3, #116] ; 0x74
  9931. 8004012: f003 0302 and.w r3, r3, #2
  9932. 8004016: 2b00 cmp r3, #0
  9933. 8004018: d0f0 beq.n 8003ffc <HAL_RCC_OscConfig+0x234>
  9934. 800401a: e01b b.n 8004054 <HAL_RCC_OscConfig+0x28c>
  9935. }
  9936. }
  9937. else
  9938. {
  9939. /* Disable the Internal Low Speed oscillator (LSI). */
  9940. __HAL_RCC_LSI_DISABLE();
  9941. 800401c: 4b09 ldr r3, [pc, #36] ; (8004044 <HAL_RCC_OscConfig+0x27c>)
  9942. 800401e: 2200 movs r2, #0
  9943. 8004020: 601a str r2, [r3, #0]
  9944. /* Get Start Tick*/
  9945. tickstart = HAL_GetTick();
  9946. 8004022: f7fd f93b bl 800129c <HAL_GetTick>
  9947. 8004026: 6138 str r0, [r7, #16]
  9948. /* Wait till LSI is ready */
  9949. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
  9950. 8004028: e00e b.n 8004048 <HAL_RCC_OscConfig+0x280>
  9951. {
  9952. if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
  9953. 800402a: f7fd f937 bl 800129c <HAL_GetTick>
  9954. 800402e: 4602 mov r2, r0
  9955. 8004030: 693b ldr r3, [r7, #16]
  9956. 8004032: 1ad3 subs r3, r2, r3
  9957. 8004034: 2b02 cmp r3, #2
  9958. 8004036: d907 bls.n 8004048 <HAL_RCC_OscConfig+0x280>
  9959. {
  9960. return HAL_TIMEOUT;
  9961. 8004038: 2303 movs r3, #3
  9962. 800403a: e15c b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  9963. 800403c: 40023800 .word 0x40023800
  9964. 8004040: 42470000 .word 0x42470000
  9965. 8004044: 42470e80 .word 0x42470e80
  9966. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
  9967. 8004048: 4b8a ldr r3, [pc, #552] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  9968. 800404a: 6f5b ldr r3, [r3, #116] ; 0x74
  9969. 800404c: f003 0302 and.w r3, r3, #2
  9970. 8004050: 2b00 cmp r3, #0
  9971. 8004052: d1ea bne.n 800402a <HAL_RCC_OscConfig+0x262>
  9972. }
  9973. }
  9974. }
  9975. }
  9976. /*------------------------------ LSE Configuration -------------------------*/
  9977. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
  9978. 8004054: 687b ldr r3, [r7, #4]
  9979. 8004056: 681b ldr r3, [r3, #0]
  9980. 8004058: f003 0304 and.w r3, r3, #4
  9981. 800405c: 2b00 cmp r3, #0
  9982. 800405e: f000 8097 beq.w 8004190 <HAL_RCC_OscConfig+0x3c8>
  9983. {
  9984. FlagStatus pwrclkchanged = RESET;
  9985. 8004062: 2300 movs r3, #0
  9986. 8004064: 75fb strb r3, [r7, #23]
  9987. /* Check the parameters */
  9988. assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
  9989. /* Update LSE configuration in Backup Domain control register */
  9990. /* Requires to enable write access to Backup Domain of necessary */
  9991. if(__HAL_RCC_PWR_IS_CLK_DISABLED())
  9992. 8004066: 4b83 ldr r3, [pc, #524] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  9993. 8004068: 6c1b ldr r3, [r3, #64] ; 0x40
  9994. 800406a: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
  9995. 800406e: 2b00 cmp r3, #0
  9996. 8004070: d10f bne.n 8004092 <HAL_RCC_OscConfig+0x2ca>
  9997. {
  9998. __HAL_RCC_PWR_CLK_ENABLE();
  9999. 8004072: 2300 movs r3, #0
  10000. 8004074: 60bb str r3, [r7, #8]
  10001. 8004076: 4b7f ldr r3, [pc, #508] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10002. 8004078: 6c1b ldr r3, [r3, #64] ; 0x40
  10003. 800407a: 4a7e ldr r2, [pc, #504] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10004. 800407c: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  10005. 8004080: 6413 str r3, [r2, #64] ; 0x40
  10006. 8004082: 4b7c ldr r3, [pc, #496] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10007. 8004084: 6c1b ldr r3, [r3, #64] ; 0x40
  10008. 8004086: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
  10009. 800408a: 60bb str r3, [r7, #8]
  10010. 800408c: 68bb ldr r3, [r7, #8]
  10011. pwrclkchanged = SET;
  10012. 800408e: 2301 movs r3, #1
  10013. 8004090: 75fb strb r3, [r7, #23]
  10014. }
  10015. if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
  10016. 8004092: 4b79 ldr r3, [pc, #484] ; (8004278 <HAL_RCC_OscConfig+0x4b0>)
  10017. 8004094: 681b ldr r3, [r3, #0]
  10018. 8004096: f403 7380 and.w r3, r3, #256 ; 0x100
  10019. 800409a: 2b00 cmp r3, #0
  10020. 800409c: d118 bne.n 80040d0 <HAL_RCC_OscConfig+0x308>
  10021. {
  10022. /* Enable write access to Backup domain */
  10023. SET_BIT(PWR->CR, PWR_CR_DBP);
  10024. 800409e: 4b76 ldr r3, [pc, #472] ; (8004278 <HAL_RCC_OscConfig+0x4b0>)
  10025. 80040a0: 681b ldr r3, [r3, #0]
  10026. 80040a2: 4a75 ldr r2, [pc, #468] ; (8004278 <HAL_RCC_OscConfig+0x4b0>)
  10027. 80040a4: f443 7380 orr.w r3, r3, #256 ; 0x100
  10028. 80040a8: 6013 str r3, [r2, #0]
  10029. /* Wait for Backup domain Write protection disable */
  10030. tickstart = HAL_GetTick();
  10031. 80040aa: f7fd f8f7 bl 800129c <HAL_GetTick>
  10032. 80040ae: 6138 str r0, [r7, #16]
  10033. while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
  10034. 80040b0: e008 b.n 80040c4 <HAL_RCC_OscConfig+0x2fc>
  10035. {
  10036. if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
  10037. 80040b2: f7fd f8f3 bl 800129c <HAL_GetTick>
  10038. 80040b6: 4602 mov r2, r0
  10039. 80040b8: 693b ldr r3, [r7, #16]
  10040. 80040ba: 1ad3 subs r3, r2, r3
  10041. 80040bc: 2b02 cmp r3, #2
  10042. 80040be: d901 bls.n 80040c4 <HAL_RCC_OscConfig+0x2fc>
  10043. {
  10044. return HAL_TIMEOUT;
  10045. 80040c0: 2303 movs r3, #3
  10046. 80040c2: e118 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10047. while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
  10048. 80040c4: 4b6c ldr r3, [pc, #432] ; (8004278 <HAL_RCC_OscConfig+0x4b0>)
  10049. 80040c6: 681b ldr r3, [r3, #0]
  10050. 80040c8: f403 7380 and.w r3, r3, #256 ; 0x100
  10051. 80040cc: 2b00 cmp r3, #0
  10052. 80040ce: d0f0 beq.n 80040b2 <HAL_RCC_OscConfig+0x2ea>
  10053. }
  10054. }
  10055. }
  10056. /* Set the new LSE configuration -----------------------------------------*/
  10057. __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
  10058. 80040d0: 687b ldr r3, [r7, #4]
  10059. 80040d2: 689b ldr r3, [r3, #8]
  10060. 80040d4: 2b01 cmp r3, #1
  10061. 80040d6: d106 bne.n 80040e6 <HAL_RCC_OscConfig+0x31e>
  10062. 80040d8: 4b66 ldr r3, [pc, #408] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10063. 80040da: 6f1b ldr r3, [r3, #112] ; 0x70
  10064. 80040dc: 4a65 ldr r2, [pc, #404] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10065. 80040de: f043 0301 orr.w r3, r3, #1
  10066. 80040e2: 6713 str r3, [r2, #112] ; 0x70
  10067. 80040e4: e01c b.n 8004120 <HAL_RCC_OscConfig+0x358>
  10068. 80040e6: 687b ldr r3, [r7, #4]
  10069. 80040e8: 689b ldr r3, [r3, #8]
  10070. 80040ea: 2b05 cmp r3, #5
  10071. 80040ec: d10c bne.n 8004108 <HAL_RCC_OscConfig+0x340>
  10072. 80040ee: 4b61 ldr r3, [pc, #388] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10073. 80040f0: 6f1b ldr r3, [r3, #112] ; 0x70
  10074. 80040f2: 4a60 ldr r2, [pc, #384] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10075. 80040f4: f043 0304 orr.w r3, r3, #4
  10076. 80040f8: 6713 str r3, [r2, #112] ; 0x70
  10077. 80040fa: 4b5e ldr r3, [pc, #376] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10078. 80040fc: 6f1b ldr r3, [r3, #112] ; 0x70
  10079. 80040fe: 4a5d ldr r2, [pc, #372] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10080. 8004100: f043 0301 orr.w r3, r3, #1
  10081. 8004104: 6713 str r3, [r2, #112] ; 0x70
  10082. 8004106: e00b b.n 8004120 <HAL_RCC_OscConfig+0x358>
  10083. 8004108: 4b5a ldr r3, [pc, #360] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10084. 800410a: 6f1b ldr r3, [r3, #112] ; 0x70
  10085. 800410c: 4a59 ldr r2, [pc, #356] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10086. 800410e: f023 0301 bic.w r3, r3, #1
  10087. 8004112: 6713 str r3, [r2, #112] ; 0x70
  10088. 8004114: 4b57 ldr r3, [pc, #348] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10089. 8004116: 6f1b ldr r3, [r3, #112] ; 0x70
  10090. 8004118: 4a56 ldr r2, [pc, #344] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10091. 800411a: f023 0304 bic.w r3, r3, #4
  10092. 800411e: 6713 str r3, [r2, #112] ; 0x70
  10093. /* Check the LSE State */
  10094. if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
  10095. 8004120: 687b ldr r3, [r7, #4]
  10096. 8004122: 689b ldr r3, [r3, #8]
  10097. 8004124: 2b00 cmp r3, #0
  10098. 8004126: d015 beq.n 8004154 <HAL_RCC_OscConfig+0x38c>
  10099. {
  10100. /* Get Start Tick*/
  10101. tickstart = HAL_GetTick();
  10102. 8004128: f7fd f8b8 bl 800129c <HAL_GetTick>
  10103. 800412c: 6138 str r0, [r7, #16]
  10104. /* Wait till LSE is ready */
  10105. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
  10106. 800412e: e00a b.n 8004146 <HAL_RCC_OscConfig+0x37e>
  10107. {
  10108. if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
  10109. 8004130: f7fd f8b4 bl 800129c <HAL_GetTick>
  10110. 8004134: 4602 mov r2, r0
  10111. 8004136: 693b ldr r3, [r7, #16]
  10112. 8004138: 1ad3 subs r3, r2, r3
  10113. 800413a: f241 3288 movw r2, #5000 ; 0x1388
  10114. 800413e: 4293 cmp r3, r2
  10115. 8004140: d901 bls.n 8004146 <HAL_RCC_OscConfig+0x37e>
  10116. {
  10117. return HAL_TIMEOUT;
  10118. 8004142: 2303 movs r3, #3
  10119. 8004144: e0d7 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10120. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
  10121. 8004146: 4b4b ldr r3, [pc, #300] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10122. 8004148: 6f1b ldr r3, [r3, #112] ; 0x70
  10123. 800414a: f003 0302 and.w r3, r3, #2
  10124. 800414e: 2b00 cmp r3, #0
  10125. 8004150: d0ee beq.n 8004130 <HAL_RCC_OscConfig+0x368>
  10126. 8004152: e014 b.n 800417e <HAL_RCC_OscConfig+0x3b6>
  10127. }
  10128. }
  10129. else
  10130. {
  10131. /* Get Start Tick*/
  10132. tickstart = HAL_GetTick();
  10133. 8004154: f7fd f8a2 bl 800129c <HAL_GetTick>
  10134. 8004158: 6138 str r0, [r7, #16]
  10135. /* Wait till LSE is ready */
  10136. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
  10137. 800415a: e00a b.n 8004172 <HAL_RCC_OscConfig+0x3aa>
  10138. {
  10139. if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
  10140. 800415c: f7fd f89e bl 800129c <HAL_GetTick>
  10141. 8004160: 4602 mov r2, r0
  10142. 8004162: 693b ldr r3, [r7, #16]
  10143. 8004164: 1ad3 subs r3, r2, r3
  10144. 8004166: f241 3288 movw r2, #5000 ; 0x1388
  10145. 800416a: 4293 cmp r3, r2
  10146. 800416c: d901 bls.n 8004172 <HAL_RCC_OscConfig+0x3aa>
  10147. {
  10148. return HAL_TIMEOUT;
  10149. 800416e: 2303 movs r3, #3
  10150. 8004170: e0c1 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10151. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
  10152. 8004172: 4b40 ldr r3, [pc, #256] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10153. 8004174: 6f1b ldr r3, [r3, #112] ; 0x70
  10154. 8004176: f003 0302 and.w r3, r3, #2
  10155. 800417a: 2b00 cmp r3, #0
  10156. 800417c: d1ee bne.n 800415c <HAL_RCC_OscConfig+0x394>
  10157. }
  10158. }
  10159. }
  10160. /* Restore clock configuration if changed */
  10161. if(pwrclkchanged == SET)
  10162. 800417e: 7dfb ldrb r3, [r7, #23]
  10163. 8004180: 2b01 cmp r3, #1
  10164. 8004182: d105 bne.n 8004190 <HAL_RCC_OscConfig+0x3c8>
  10165. {
  10166. __HAL_RCC_PWR_CLK_DISABLE();
  10167. 8004184: 4b3b ldr r3, [pc, #236] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10168. 8004186: 6c1b ldr r3, [r3, #64] ; 0x40
  10169. 8004188: 4a3a ldr r2, [pc, #232] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10170. 800418a: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
  10171. 800418e: 6413 str r3, [r2, #64] ; 0x40
  10172. }
  10173. }
  10174. /*-------------------------------- PLL Configuration -----------------------*/
  10175. /* Check the parameters */
  10176. assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
  10177. if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
  10178. 8004190: 687b ldr r3, [r7, #4]
  10179. 8004192: 699b ldr r3, [r3, #24]
  10180. 8004194: 2b00 cmp r3, #0
  10181. 8004196: f000 80ad beq.w 80042f4 <HAL_RCC_OscConfig+0x52c>
  10182. {
  10183. /* Check if the PLL is used as system clock or not */
  10184. if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL)
  10185. 800419a: 4b36 ldr r3, [pc, #216] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10186. 800419c: 689b ldr r3, [r3, #8]
  10187. 800419e: f003 030c and.w r3, r3, #12
  10188. 80041a2: 2b08 cmp r3, #8
  10189. 80041a4: d060 beq.n 8004268 <HAL_RCC_OscConfig+0x4a0>
  10190. {
  10191. if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
  10192. 80041a6: 687b ldr r3, [r7, #4]
  10193. 80041a8: 699b ldr r3, [r3, #24]
  10194. 80041aa: 2b02 cmp r3, #2
  10195. 80041ac: d145 bne.n 800423a <HAL_RCC_OscConfig+0x472>
  10196. assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP));
  10197. assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ));
  10198. assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR));
  10199. /* Disable the main PLL. */
  10200. __HAL_RCC_PLL_DISABLE();
  10201. 80041ae: 4b33 ldr r3, [pc, #204] ; (800427c <HAL_RCC_OscConfig+0x4b4>)
  10202. 80041b0: 2200 movs r2, #0
  10203. 80041b2: 601a str r2, [r3, #0]
  10204. /* Get Start Tick*/
  10205. tickstart = HAL_GetTick();
  10206. 80041b4: f7fd f872 bl 800129c <HAL_GetTick>
  10207. 80041b8: 6138 str r0, [r7, #16]
  10208. /* Wait till PLL is ready */
  10209. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  10210. 80041ba: e008 b.n 80041ce <HAL_RCC_OscConfig+0x406>
  10211. {
  10212. if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
  10213. 80041bc: f7fd f86e bl 800129c <HAL_GetTick>
  10214. 80041c0: 4602 mov r2, r0
  10215. 80041c2: 693b ldr r3, [r7, #16]
  10216. 80041c4: 1ad3 subs r3, r2, r3
  10217. 80041c6: 2b02 cmp r3, #2
  10218. 80041c8: d901 bls.n 80041ce <HAL_RCC_OscConfig+0x406>
  10219. {
  10220. return HAL_TIMEOUT;
  10221. 80041ca: 2303 movs r3, #3
  10222. 80041cc: e093 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10223. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  10224. 80041ce: 4b29 ldr r3, [pc, #164] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10225. 80041d0: 681b ldr r3, [r3, #0]
  10226. 80041d2: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
  10227. 80041d6: 2b00 cmp r3, #0
  10228. 80041d8: d1f0 bne.n 80041bc <HAL_RCC_OscConfig+0x3f4>
  10229. }
  10230. }
  10231. /* Configure the main PLL clock source, multiplication and division factors. */
  10232. WRITE_REG(RCC->PLLCFGR, (RCC_OscInitStruct->PLL.PLLSource | \
  10233. 80041da: 687b ldr r3, [r7, #4]
  10234. 80041dc: 69da ldr r2, [r3, #28]
  10235. 80041de: 687b ldr r3, [r7, #4]
  10236. 80041e0: 6a1b ldr r3, [r3, #32]
  10237. 80041e2: 431a orrs r2, r3
  10238. 80041e4: 687b ldr r3, [r7, #4]
  10239. 80041e6: 6a5b ldr r3, [r3, #36] ; 0x24
  10240. 80041e8: 019b lsls r3, r3, #6
  10241. 80041ea: 431a orrs r2, r3
  10242. 80041ec: 687b ldr r3, [r7, #4]
  10243. 80041ee: 6a9b ldr r3, [r3, #40] ; 0x28
  10244. 80041f0: 085b lsrs r3, r3, #1
  10245. 80041f2: 3b01 subs r3, #1
  10246. 80041f4: 041b lsls r3, r3, #16
  10247. 80041f6: 431a orrs r2, r3
  10248. 80041f8: 687b ldr r3, [r7, #4]
  10249. 80041fa: 6adb ldr r3, [r3, #44] ; 0x2c
  10250. 80041fc: 061b lsls r3, r3, #24
  10251. 80041fe: 431a orrs r2, r3
  10252. 8004200: 687b ldr r3, [r7, #4]
  10253. 8004202: 6b1b ldr r3, [r3, #48] ; 0x30
  10254. 8004204: 071b lsls r3, r3, #28
  10255. 8004206: 491b ldr r1, [pc, #108] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10256. 8004208: 4313 orrs r3, r2
  10257. 800420a: 604b str r3, [r1, #4]
  10258. (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos) | \
  10259. (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos) | \
  10260. (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos) | \
  10261. (RCC_OscInitStruct->PLL.PLLR << RCC_PLLCFGR_PLLR_Pos)));
  10262. /* Enable the main PLL. */
  10263. __HAL_RCC_PLL_ENABLE();
  10264. 800420c: 4b1b ldr r3, [pc, #108] ; (800427c <HAL_RCC_OscConfig+0x4b4>)
  10265. 800420e: 2201 movs r2, #1
  10266. 8004210: 601a str r2, [r3, #0]
  10267. /* Get Start Tick*/
  10268. tickstart = HAL_GetTick();
  10269. 8004212: f7fd f843 bl 800129c <HAL_GetTick>
  10270. 8004216: 6138 str r0, [r7, #16]
  10271. /* Wait till PLL is ready */
  10272. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
  10273. 8004218: e008 b.n 800422c <HAL_RCC_OscConfig+0x464>
  10274. {
  10275. if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
  10276. 800421a: f7fd f83f bl 800129c <HAL_GetTick>
  10277. 800421e: 4602 mov r2, r0
  10278. 8004220: 693b ldr r3, [r7, #16]
  10279. 8004222: 1ad3 subs r3, r2, r3
  10280. 8004224: 2b02 cmp r3, #2
  10281. 8004226: d901 bls.n 800422c <HAL_RCC_OscConfig+0x464>
  10282. {
  10283. return HAL_TIMEOUT;
  10284. 8004228: 2303 movs r3, #3
  10285. 800422a: e064 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10286. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
  10287. 800422c: 4b11 ldr r3, [pc, #68] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10288. 800422e: 681b ldr r3, [r3, #0]
  10289. 8004230: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
  10290. 8004234: 2b00 cmp r3, #0
  10291. 8004236: d0f0 beq.n 800421a <HAL_RCC_OscConfig+0x452>
  10292. 8004238: e05c b.n 80042f4 <HAL_RCC_OscConfig+0x52c>
  10293. }
  10294. }
  10295. else
  10296. {
  10297. /* Disable the main PLL. */
  10298. __HAL_RCC_PLL_DISABLE();
  10299. 800423a: 4b10 ldr r3, [pc, #64] ; (800427c <HAL_RCC_OscConfig+0x4b4>)
  10300. 800423c: 2200 movs r2, #0
  10301. 800423e: 601a str r2, [r3, #0]
  10302. /* Get Start Tick*/
  10303. tickstart = HAL_GetTick();
  10304. 8004240: f7fd f82c bl 800129c <HAL_GetTick>
  10305. 8004244: 6138 str r0, [r7, #16]
  10306. /* Wait till PLL is ready */
  10307. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  10308. 8004246: e008 b.n 800425a <HAL_RCC_OscConfig+0x492>
  10309. {
  10310. if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
  10311. 8004248: f7fd f828 bl 800129c <HAL_GetTick>
  10312. 800424c: 4602 mov r2, r0
  10313. 800424e: 693b ldr r3, [r7, #16]
  10314. 8004250: 1ad3 subs r3, r2, r3
  10315. 8004252: 2b02 cmp r3, #2
  10316. 8004254: d901 bls.n 800425a <HAL_RCC_OscConfig+0x492>
  10317. {
  10318. return HAL_TIMEOUT;
  10319. 8004256: 2303 movs r3, #3
  10320. 8004258: e04d b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10321. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  10322. 800425a: 4b06 ldr r3, [pc, #24] ; (8004274 <HAL_RCC_OscConfig+0x4ac>)
  10323. 800425c: 681b ldr r3, [r3, #0]
  10324. 800425e: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
  10325. 8004262: 2b00 cmp r3, #0
  10326. 8004264: d1f0 bne.n 8004248 <HAL_RCC_OscConfig+0x480>
  10327. 8004266: e045 b.n 80042f4 <HAL_RCC_OscConfig+0x52c>
  10328. }
  10329. }
  10330. else
  10331. {
  10332. /* Check if there is a request to disable the PLL used as System clock source */
  10333. if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
  10334. 8004268: 687b ldr r3, [r7, #4]
  10335. 800426a: 699b ldr r3, [r3, #24]
  10336. 800426c: 2b01 cmp r3, #1
  10337. 800426e: d107 bne.n 8004280 <HAL_RCC_OscConfig+0x4b8>
  10338. {
  10339. return HAL_ERROR;
  10340. 8004270: 2301 movs r3, #1
  10341. 8004272: e040 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10342. 8004274: 40023800 .word 0x40023800
  10343. 8004278: 40007000 .word 0x40007000
  10344. 800427c: 42470060 .word 0x42470060
  10345. }
  10346. else
  10347. {
  10348. /* Do not return HAL_ERROR if request repeats the current configuration */
  10349. pll_config = RCC->PLLCFGR;
  10350. 8004280: 4b1f ldr r3, [pc, #124] ; (8004300 <HAL_RCC_OscConfig+0x538>)
  10351. 8004282: 685b ldr r3, [r3, #4]
  10352. 8004284: 60fb str r3, [r7, #12]
  10353. #if defined (RCC_PLLCFGR_PLLR)
  10354. if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
  10355. 8004286: 687b ldr r3, [r7, #4]
  10356. 8004288: 699b ldr r3, [r3, #24]
  10357. 800428a: 2b01 cmp r3, #1
  10358. 800428c: d030 beq.n 80042f0 <HAL_RCC_OscConfig+0x528>
  10359. (READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  10360. 800428e: 68fb ldr r3, [r7, #12]
  10361. 8004290: f403 0280 and.w r2, r3, #4194304 ; 0x400000
  10362. 8004294: 687b ldr r3, [r7, #4]
  10363. 8004296: 69db ldr r3, [r3, #28]
  10364. if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
  10365. 8004298: 429a cmp r2, r3
  10366. 800429a: d129 bne.n 80042f0 <HAL_RCC_OscConfig+0x528>
  10367. (READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
  10368. 800429c: 68fb ldr r3, [r7, #12]
  10369. 800429e: f003 023f and.w r2, r3, #63 ; 0x3f
  10370. 80042a2: 687b ldr r3, [r7, #4]
  10371. 80042a4: 6a1b ldr r3, [r3, #32]
  10372. (READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  10373. 80042a6: 429a cmp r2, r3
  10374. 80042a8: d122 bne.n 80042f0 <HAL_RCC_OscConfig+0x528>
  10375. (READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
  10376. 80042aa: 68fa ldr r2, [r7, #12]
  10377. 80042ac: f647 73c0 movw r3, #32704 ; 0x7fc0
  10378. 80042b0: 4013 ands r3, r2
  10379. 80042b2: 687a ldr r2, [r7, #4]
  10380. 80042b4: 6a52 ldr r2, [r2, #36] ; 0x24
  10381. 80042b6: 0192 lsls r2, r2, #6
  10382. (READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
  10383. 80042b8: 4293 cmp r3, r2
  10384. 80042ba: d119 bne.n 80042f0 <HAL_RCC_OscConfig+0x528>
  10385. (READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
  10386. 80042bc: 68fb ldr r3, [r7, #12]
  10387. 80042be: f403 3240 and.w r2, r3, #196608 ; 0x30000
  10388. 80042c2: 687b ldr r3, [r7, #4]
  10389. 80042c4: 6a9b ldr r3, [r3, #40] ; 0x28
  10390. 80042c6: 085b lsrs r3, r3, #1
  10391. 80042c8: 3b01 subs r3, #1
  10392. 80042ca: 041b lsls r3, r3, #16
  10393. (READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
  10394. 80042cc: 429a cmp r2, r3
  10395. 80042ce: d10f bne.n 80042f0 <HAL_RCC_OscConfig+0x528>
  10396. (READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)) ||
  10397. 80042d0: 68fb ldr r3, [r7, #12]
  10398. 80042d2: f003 6270 and.w r2, r3, #251658240 ; 0xf000000
  10399. 80042d6: 687b ldr r3, [r7, #4]
  10400. 80042d8: 6adb ldr r3, [r3, #44] ; 0x2c
  10401. 80042da: 061b lsls r3, r3, #24
  10402. (READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
  10403. 80042dc: 429a cmp r2, r3
  10404. 80042de: d107 bne.n 80042f0 <HAL_RCC_OscConfig+0x528>
  10405. (READ_BIT(pll_config, RCC_PLLCFGR_PLLR) != (RCC_OscInitStruct->PLL.PLLR << RCC_PLLCFGR_PLLR_Pos)))
  10406. 80042e0: 68fb ldr r3, [r7, #12]
  10407. 80042e2: f003 42e0 and.w r2, r3, #1879048192 ; 0x70000000
  10408. 80042e6: 687b ldr r3, [r7, #4]
  10409. 80042e8: 6b1b ldr r3, [r3, #48] ; 0x30
  10410. 80042ea: 071b lsls r3, r3, #28
  10411. (READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)) ||
  10412. 80042ec: 429a cmp r2, r3
  10413. 80042ee: d001 beq.n 80042f4 <HAL_RCC_OscConfig+0x52c>
  10414. (READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
  10415. (READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
  10416. (READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
  10417. #endif
  10418. {
  10419. return HAL_ERROR;
  10420. 80042f0: 2301 movs r3, #1
  10421. 80042f2: e000 b.n 80042f6 <HAL_RCC_OscConfig+0x52e>
  10422. }
  10423. }
  10424. }
  10425. }
  10426. return HAL_OK;
  10427. 80042f4: 2300 movs r3, #0
  10428. }
  10429. 80042f6: 4618 mov r0, r3
  10430. 80042f8: 3718 adds r7, #24
  10431. 80042fa: 46bd mov sp, r7
  10432. 80042fc: bd80 pop {r7, pc}
  10433. 80042fe: bf00 nop
  10434. 8004300: 40023800 .word 0x40023800
  10435. 08004304 <HAL_RTC_Init>:
  10436. * @param hrtc pointer to a RTC_HandleTypeDef structure that contains
  10437. * the configuration information for RTC.
  10438. * @retval HAL status
  10439. */
  10440. HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc)
  10441. {
  10442. 8004304: b580 push {r7, lr}
  10443. 8004306: b082 sub sp, #8
  10444. 8004308: af00 add r7, sp, #0
  10445. 800430a: 6078 str r0, [r7, #4]
  10446. /* Check the RTC peripheral state */
  10447. if(hrtc == NULL)
  10448. 800430c: 687b ldr r3, [r7, #4]
  10449. 800430e: 2b00 cmp r3, #0
  10450. 8004310: d101 bne.n 8004316 <HAL_RTC_Init+0x12>
  10451. {
  10452. return HAL_ERROR;
  10453. 8004312: 2301 movs r3, #1
  10454. 8004314: e083 b.n 800441e <HAL_RTC_Init+0x11a>
  10455. {
  10456. hrtc->MspDeInitCallback = HAL_RTC_MspDeInit;
  10457. }
  10458. }
  10459. #else
  10460. if(hrtc->State == HAL_RTC_STATE_RESET)
  10461. 8004316: 687b ldr r3, [r7, #4]
  10462. 8004318: 7f5b ldrb r3, [r3, #29]
  10463. 800431a: b2db uxtb r3, r3
  10464. 800431c: 2b00 cmp r3, #0
  10465. 800431e: d105 bne.n 800432c <HAL_RTC_Init+0x28>
  10466. {
  10467. /* Allocate lock resource and initialize it */
  10468. hrtc->Lock = HAL_UNLOCKED;
  10469. 8004320: 687b ldr r3, [r7, #4]
  10470. 8004322: 2200 movs r2, #0
  10471. 8004324: 771a strb r2, [r3, #28]
  10472. /* Initialize RTC MSP */
  10473. HAL_RTC_MspInit(hrtc);
  10474. 8004326: 6878 ldr r0, [r7, #4]
  10475. 8004328: f7fc fdae bl 8000e88 <HAL_RTC_MspInit>
  10476. }
  10477. #endif /* (USE_HAL_RTC_REGISTER_CALLBACKS) */
  10478. /* Set RTC state */
  10479. hrtc->State = HAL_RTC_STATE_BUSY;
  10480. 800432c: 687b ldr r3, [r7, #4]
  10481. 800432e: 2202 movs r2, #2
  10482. 8004330: 775a strb r2, [r3, #29]
  10483. /* Disable the write protection for RTC registers */
  10484. __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
  10485. 8004332: 687b ldr r3, [r7, #4]
  10486. 8004334: 681b ldr r3, [r3, #0]
  10487. 8004336: 22ca movs r2, #202 ; 0xca
  10488. 8004338: 625a str r2, [r3, #36] ; 0x24
  10489. 800433a: 687b ldr r3, [r7, #4]
  10490. 800433c: 681b ldr r3, [r3, #0]
  10491. 800433e: 2253 movs r2, #83 ; 0x53
  10492. 8004340: 625a str r2, [r3, #36] ; 0x24
  10493. /* Set Initialization mode */
  10494. if(RTC_EnterInitMode(hrtc) != HAL_OK)
  10495. 8004342: 6878 ldr r0, [r7, #4]
  10496. 8004344: f000 f9fb bl 800473e <RTC_EnterInitMode>
  10497. 8004348: 4603 mov r3, r0
  10498. 800434a: 2b00 cmp r3, #0
  10499. 800434c: d008 beq.n 8004360 <HAL_RTC_Init+0x5c>
  10500. {
  10501. /* Enable the write protection for RTC registers */
  10502. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  10503. 800434e: 687b ldr r3, [r7, #4]
  10504. 8004350: 681b ldr r3, [r3, #0]
  10505. 8004352: 22ff movs r2, #255 ; 0xff
  10506. 8004354: 625a str r2, [r3, #36] ; 0x24
  10507. /* Set RTC state */
  10508. hrtc->State = HAL_RTC_STATE_ERROR;
  10509. 8004356: 687b ldr r3, [r7, #4]
  10510. 8004358: 2204 movs r2, #4
  10511. 800435a: 775a strb r2, [r3, #29]
  10512. return HAL_ERROR;
  10513. 800435c: 2301 movs r3, #1
  10514. 800435e: e05e b.n 800441e <HAL_RTC_Init+0x11a>
  10515. }
  10516. else
  10517. {
  10518. /* Clear RTC_CR FMT, OSEL and POL Bits */
  10519. hrtc->Instance->CR &= ((uint32_t)~(RTC_CR_FMT | RTC_CR_OSEL | RTC_CR_POL));
  10520. 8004360: 687b ldr r3, [r7, #4]
  10521. 8004362: 681b ldr r3, [r3, #0]
  10522. 8004364: 689b ldr r3, [r3, #8]
  10523. 8004366: 687a ldr r2, [r7, #4]
  10524. 8004368: 6812 ldr r2, [r2, #0]
  10525. 800436a: f423 03e0 bic.w r3, r3, #7340032 ; 0x700000
  10526. 800436e: f023 0340 bic.w r3, r3, #64 ; 0x40
  10527. 8004372: 6093 str r3, [r2, #8]
  10528. /* Set RTC_CR register */
  10529. hrtc->Instance->CR |= (uint32_t)(hrtc->Init.HourFormat | hrtc->Init.OutPut | hrtc->Init.OutPutPolarity);
  10530. 8004374: 687b ldr r3, [r7, #4]
  10531. 8004376: 681b ldr r3, [r3, #0]
  10532. 8004378: 6899 ldr r1, [r3, #8]
  10533. 800437a: 687b ldr r3, [r7, #4]
  10534. 800437c: 685a ldr r2, [r3, #4]
  10535. 800437e: 687b ldr r3, [r7, #4]
  10536. 8004380: 691b ldr r3, [r3, #16]
  10537. 8004382: 431a orrs r2, r3
  10538. 8004384: 687b ldr r3, [r7, #4]
  10539. 8004386: 695b ldr r3, [r3, #20]
  10540. 8004388: 431a orrs r2, r3
  10541. 800438a: 687b ldr r3, [r7, #4]
  10542. 800438c: 681b ldr r3, [r3, #0]
  10543. 800438e: 430a orrs r2, r1
  10544. 8004390: 609a str r2, [r3, #8]
  10545. /* Configure the RTC PRER */
  10546. hrtc->Instance->PRER = (uint32_t)(hrtc->Init.SynchPrediv);
  10547. 8004392: 687b ldr r3, [r7, #4]
  10548. 8004394: 681b ldr r3, [r3, #0]
  10549. 8004396: 687a ldr r2, [r7, #4]
  10550. 8004398: 68d2 ldr r2, [r2, #12]
  10551. 800439a: 611a str r2, [r3, #16]
  10552. hrtc->Instance->PRER |= (uint32_t)(hrtc->Init.AsynchPrediv << 16U);
  10553. 800439c: 687b ldr r3, [r7, #4]
  10554. 800439e: 681b ldr r3, [r3, #0]
  10555. 80043a0: 6919 ldr r1, [r3, #16]
  10556. 80043a2: 687b ldr r3, [r7, #4]
  10557. 80043a4: 689b ldr r3, [r3, #8]
  10558. 80043a6: 041a lsls r2, r3, #16
  10559. 80043a8: 687b ldr r3, [r7, #4]
  10560. 80043aa: 681b ldr r3, [r3, #0]
  10561. 80043ac: 430a orrs r2, r1
  10562. 80043ae: 611a str r2, [r3, #16]
  10563. /* Exit Initialization mode */
  10564. hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
  10565. 80043b0: 687b ldr r3, [r7, #4]
  10566. 80043b2: 681b ldr r3, [r3, #0]
  10567. 80043b4: 68da ldr r2, [r3, #12]
  10568. 80043b6: 687b ldr r3, [r7, #4]
  10569. 80043b8: 681b ldr r3, [r3, #0]
  10570. 80043ba: f022 0280 bic.w r2, r2, #128 ; 0x80
  10571. 80043be: 60da str r2, [r3, #12]
  10572. /* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
  10573. if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == RESET)
  10574. 80043c0: 687b ldr r3, [r7, #4]
  10575. 80043c2: 681b ldr r3, [r3, #0]
  10576. 80043c4: 689b ldr r3, [r3, #8]
  10577. 80043c6: f003 0320 and.w r3, r3, #32
  10578. 80043ca: 2b00 cmp r3, #0
  10579. 80043cc: d10e bne.n 80043ec <HAL_RTC_Init+0xe8>
  10580. {
  10581. if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK)
  10582. 80043ce: 6878 ldr r0, [r7, #4]
  10583. 80043d0: f000 f98d bl 80046ee <HAL_RTC_WaitForSynchro>
  10584. 80043d4: 4603 mov r3, r0
  10585. 80043d6: 2b00 cmp r3, #0
  10586. 80043d8: d008 beq.n 80043ec <HAL_RTC_Init+0xe8>
  10587. {
  10588. /* Enable the write protection for RTC registers */
  10589. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  10590. 80043da: 687b ldr r3, [r7, #4]
  10591. 80043dc: 681b ldr r3, [r3, #0]
  10592. 80043de: 22ff movs r2, #255 ; 0xff
  10593. 80043e0: 625a str r2, [r3, #36] ; 0x24
  10594. hrtc->State = HAL_RTC_STATE_ERROR;
  10595. 80043e2: 687b ldr r3, [r7, #4]
  10596. 80043e4: 2204 movs r2, #4
  10597. 80043e6: 775a strb r2, [r3, #29]
  10598. return HAL_ERROR;
  10599. 80043e8: 2301 movs r3, #1
  10600. 80043ea: e018 b.n 800441e <HAL_RTC_Init+0x11a>
  10601. }
  10602. }
  10603. hrtc->Instance->TAFCR &= (uint32_t)~RTC_TAFCR_ALARMOUTTYPE;
  10604. 80043ec: 687b ldr r3, [r7, #4]
  10605. 80043ee: 681b ldr r3, [r3, #0]
  10606. 80043f0: 6c1a ldr r2, [r3, #64] ; 0x40
  10607. 80043f2: 687b ldr r3, [r7, #4]
  10608. 80043f4: 681b ldr r3, [r3, #0]
  10609. 80043f6: f422 2280 bic.w r2, r2, #262144 ; 0x40000
  10610. 80043fa: 641a str r2, [r3, #64] ; 0x40
  10611. hrtc->Instance->TAFCR |= (uint32_t)(hrtc->Init.OutPutType);
  10612. 80043fc: 687b ldr r3, [r7, #4]
  10613. 80043fe: 681b ldr r3, [r3, #0]
  10614. 8004400: 6c19 ldr r1, [r3, #64] ; 0x40
  10615. 8004402: 687b ldr r3, [r7, #4]
  10616. 8004404: 699a ldr r2, [r3, #24]
  10617. 8004406: 687b ldr r3, [r7, #4]
  10618. 8004408: 681b ldr r3, [r3, #0]
  10619. 800440a: 430a orrs r2, r1
  10620. 800440c: 641a str r2, [r3, #64] ; 0x40
  10621. /* Enable the write protection for RTC registers */
  10622. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  10623. 800440e: 687b ldr r3, [r7, #4]
  10624. 8004410: 681b ldr r3, [r3, #0]
  10625. 8004412: 22ff movs r2, #255 ; 0xff
  10626. 8004414: 625a str r2, [r3, #36] ; 0x24
  10627. /* Set RTC state */
  10628. hrtc->State = HAL_RTC_STATE_READY;
  10629. 8004416: 687b ldr r3, [r7, #4]
  10630. 8004418: 2201 movs r2, #1
  10631. 800441a: 775a strb r2, [r3, #29]
  10632. return HAL_OK;
  10633. 800441c: 2300 movs r3, #0
  10634. }
  10635. }
  10636. 800441e: 4618 mov r0, r3
  10637. 8004420: 3708 adds r7, #8
  10638. 8004422: 46bd mov sp, r7
  10639. 8004424: bd80 pop {r7, pc}
  10640. 08004426 <HAL_RTC_SetTime>:
  10641. * @arg RTC_FORMAT_BIN: Binary data format
  10642. * @arg RTC_FORMAT_BCD: BCD data format
  10643. * @retval HAL status
  10644. */
  10645. HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
  10646. {
  10647. 8004426: b590 push {r4, r7, lr}
  10648. 8004428: b087 sub sp, #28
  10649. 800442a: af00 add r7, sp, #0
  10650. 800442c: 60f8 str r0, [r7, #12]
  10651. 800442e: 60b9 str r1, [r7, #8]
  10652. 8004430: 607a str r2, [r7, #4]
  10653. uint32_t tmpreg = 0U;
  10654. 8004432: 2300 movs r3, #0
  10655. 8004434: 617b str r3, [r7, #20]
  10656. assert_param(IS_RTC_FORMAT(Format));
  10657. assert_param(IS_RTC_DAYLIGHT_SAVING(sTime->DayLightSaving));
  10658. assert_param(IS_RTC_STORE_OPERATION(sTime->StoreOperation));
  10659. /* Process Locked */
  10660. __HAL_LOCK(hrtc);
  10661. 8004436: 68fb ldr r3, [r7, #12]
  10662. 8004438: 7f1b ldrb r3, [r3, #28]
  10663. 800443a: 2b01 cmp r3, #1
  10664. 800443c: d101 bne.n 8004442 <HAL_RTC_SetTime+0x1c>
  10665. 800443e: 2302 movs r3, #2
  10666. 8004440: e0aa b.n 8004598 <HAL_RTC_SetTime+0x172>
  10667. 8004442: 68fb ldr r3, [r7, #12]
  10668. 8004444: 2201 movs r2, #1
  10669. 8004446: 771a strb r2, [r3, #28]
  10670. hrtc->State = HAL_RTC_STATE_BUSY;
  10671. 8004448: 68fb ldr r3, [r7, #12]
  10672. 800444a: 2202 movs r2, #2
  10673. 800444c: 775a strb r2, [r3, #29]
  10674. if(Format == RTC_FORMAT_BIN)
  10675. 800444e: 687b ldr r3, [r7, #4]
  10676. 8004450: 2b00 cmp r3, #0
  10677. 8004452: d126 bne.n 80044a2 <HAL_RTC_SetTime+0x7c>
  10678. {
  10679. if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
  10680. 8004454: 68fb ldr r3, [r7, #12]
  10681. 8004456: 681b ldr r3, [r3, #0]
  10682. 8004458: 689b ldr r3, [r3, #8]
  10683. 800445a: f003 0340 and.w r3, r3, #64 ; 0x40
  10684. 800445e: 2b00 cmp r3, #0
  10685. 8004460: d102 bne.n 8004468 <HAL_RTC_SetTime+0x42>
  10686. assert_param(IS_RTC_HOUR12(sTime->Hours));
  10687. assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat));
  10688. }
  10689. else
  10690. {
  10691. sTime->TimeFormat = 0x00U;
  10692. 8004462: 68bb ldr r3, [r7, #8]
  10693. 8004464: 2200 movs r2, #0
  10694. 8004466: 70da strb r2, [r3, #3]
  10695. assert_param(IS_RTC_HOUR24(sTime->Hours));
  10696. }
  10697. assert_param(IS_RTC_MINUTES(sTime->Minutes));
  10698. assert_param(IS_RTC_SECONDS(sTime->Seconds));
  10699. tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16U) | \
  10700. 8004468: 68bb ldr r3, [r7, #8]
  10701. 800446a: 781b ldrb r3, [r3, #0]
  10702. 800446c: 4618 mov r0, r3
  10703. 800446e: f000 f992 bl 8004796 <RTC_ByteToBcd2>
  10704. 8004472: 4603 mov r3, r0
  10705. 8004474: 041c lsls r4, r3, #16
  10706. ((uint32_t)RTC_ByteToBcd2(sTime->Minutes) << 8U) | \
  10707. 8004476: 68bb ldr r3, [r7, #8]
  10708. 8004478: 785b ldrb r3, [r3, #1]
  10709. 800447a: 4618 mov r0, r3
  10710. 800447c: f000 f98b bl 8004796 <RTC_ByteToBcd2>
  10711. 8004480: 4603 mov r3, r0
  10712. 8004482: 021b lsls r3, r3, #8
  10713. tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16U) | \
  10714. 8004484: 431c orrs r4, r3
  10715. ((uint32_t)RTC_ByteToBcd2(sTime->Seconds)) | \
  10716. 8004486: 68bb ldr r3, [r7, #8]
  10717. 8004488: 789b ldrb r3, [r3, #2]
  10718. 800448a: 4618 mov r0, r3
  10719. 800448c: f000 f983 bl 8004796 <RTC_ByteToBcd2>
  10720. 8004490: 4603 mov r3, r0
  10721. ((uint32_t)RTC_ByteToBcd2(sTime->Minutes) << 8U) | \
  10722. 8004492: ea44 0203 orr.w r2, r4, r3
  10723. (((uint32_t)sTime->TimeFormat) << 16U));
  10724. 8004496: 68bb ldr r3, [r7, #8]
  10725. 8004498: 78db ldrb r3, [r3, #3]
  10726. 800449a: 041b lsls r3, r3, #16
  10727. tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(sTime->Hours) << 16U) | \
  10728. 800449c: 4313 orrs r3, r2
  10729. 800449e: 617b str r3, [r7, #20]
  10730. 80044a0: e018 b.n 80044d4 <HAL_RTC_SetTime+0xae>
  10731. }
  10732. else
  10733. {
  10734. if((hrtc->Instance->CR & RTC_CR_FMT) != (uint32_t)RESET)
  10735. 80044a2: 68fb ldr r3, [r7, #12]
  10736. 80044a4: 681b ldr r3, [r3, #0]
  10737. 80044a6: 689b ldr r3, [r3, #8]
  10738. 80044a8: f003 0340 and.w r3, r3, #64 ; 0x40
  10739. 80044ac: 2b00 cmp r3, #0
  10740. 80044ae: d102 bne.n 80044b6 <HAL_RTC_SetTime+0x90>
  10741. assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sTime->Hours)));
  10742. assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat));
  10743. }
  10744. else
  10745. {
  10746. sTime->TimeFormat = 0x00U;
  10747. 80044b0: 68bb ldr r3, [r7, #8]
  10748. 80044b2: 2200 movs r2, #0
  10749. 80044b4: 70da strb r2, [r3, #3]
  10750. assert_param(IS_RTC_HOUR24(RTC_Bcd2ToByte(sTime->Hours)));
  10751. }
  10752. assert_param(IS_RTC_MINUTES(RTC_Bcd2ToByte(sTime->Minutes)));
  10753. assert_param(IS_RTC_SECONDS(RTC_Bcd2ToByte(sTime->Seconds)));
  10754. tmpreg = (((uint32_t)(sTime->Hours) << 16U) | \
  10755. 80044b6: 68bb ldr r3, [r7, #8]
  10756. 80044b8: 781b ldrb r3, [r3, #0]
  10757. 80044ba: 041a lsls r2, r3, #16
  10758. ((uint32_t)(sTime->Minutes) << 8U) | \
  10759. 80044bc: 68bb ldr r3, [r7, #8]
  10760. 80044be: 785b ldrb r3, [r3, #1]
  10761. 80044c0: 021b lsls r3, r3, #8
  10762. tmpreg = (((uint32_t)(sTime->Hours) << 16U) | \
  10763. 80044c2: 4313 orrs r3, r2
  10764. ((uint32_t)sTime->Seconds) | \
  10765. 80044c4: 68ba ldr r2, [r7, #8]
  10766. 80044c6: 7892 ldrb r2, [r2, #2]
  10767. ((uint32_t)(sTime->Minutes) << 8U) | \
  10768. 80044c8: 431a orrs r2, r3
  10769. ((uint32_t)(sTime->TimeFormat) << 16U));
  10770. 80044ca: 68bb ldr r3, [r7, #8]
  10771. 80044cc: 78db ldrb r3, [r3, #3]
  10772. 80044ce: 041b lsls r3, r3, #16
  10773. tmpreg = (((uint32_t)(sTime->Hours) << 16U) | \
  10774. 80044d0: 4313 orrs r3, r2
  10775. 80044d2: 617b str r3, [r7, #20]
  10776. }
  10777. /* Disable the write protection for RTC registers */
  10778. __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
  10779. 80044d4: 68fb ldr r3, [r7, #12]
  10780. 80044d6: 681b ldr r3, [r3, #0]
  10781. 80044d8: 22ca movs r2, #202 ; 0xca
  10782. 80044da: 625a str r2, [r3, #36] ; 0x24
  10783. 80044dc: 68fb ldr r3, [r7, #12]
  10784. 80044de: 681b ldr r3, [r3, #0]
  10785. 80044e0: 2253 movs r2, #83 ; 0x53
  10786. 80044e2: 625a str r2, [r3, #36] ; 0x24
  10787. /* Set Initialization mode */
  10788. if(RTC_EnterInitMode(hrtc) != HAL_OK)
  10789. 80044e4: 68f8 ldr r0, [r7, #12]
  10790. 80044e6: f000 f92a bl 800473e <RTC_EnterInitMode>
  10791. 80044ea: 4603 mov r3, r0
  10792. 80044ec: 2b00 cmp r3, #0
  10793. 80044ee: d00b beq.n 8004508 <HAL_RTC_SetTime+0xe2>
  10794. {
  10795. /* Enable the write protection for RTC registers */
  10796. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  10797. 80044f0: 68fb ldr r3, [r7, #12]
  10798. 80044f2: 681b ldr r3, [r3, #0]
  10799. 80044f4: 22ff movs r2, #255 ; 0xff
  10800. 80044f6: 625a str r2, [r3, #36] ; 0x24
  10801. /* Set RTC state */
  10802. hrtc->State = HAL_RTC_STATE_ERROR;
  10803. 80044f8: 68fb ldr r3, [r7, #12]
  10804. 80044fa: 2204 movs r2, #4
  10805. 80044fc: 775a strb r2, [r3, #29]
  10806. /* Process Unlocked */
  10807. __HAL_UNLOCK(hrtc);
  10808. 80044fe: 68fb ldr r3, [r7, #12]
  10809. 8004500: 2200 movs r2, #0
  10810. 8004502: 771a strb r2, [r3, #28]
  10811. return HAL_ERROR;
  10812. 8004504: 2301 movs r3, #1
  10813. 8004506: e047 b.n 8004598 <HAL_RTC_SetTime+0x172>
  10814. }
  10815. else
  10816. {
  10817. /* Set the RTC_TR register */
  10818. hrtc->Instance->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK);
  10819. 8004508: 68fb ldr r3, [r7, #12]
  10820. 800450a: 681a ldr r2, [r3, #0]
  10821. 800450c: 697b ldr r3, [r7, #20]
  10822. 800450e: f003 337f and.w r3, r3, #2139062143 ; 0x7f7f7f7f
  10823. 8004512: f023 43fe bic.w r3, r3, #2130706432 ; 0x7f000000
  10824. 8004516: 6013 str r3, [r2, #0]
  10825. /* This interface is deprecated. To manage Daylight Saving Time, please use HAL_RTC_DST_xxx functions */
  10826. hrtc->Instance->CR &= (uint32_t)~RTC_CR_BCK;
  10827. 8004518: 68fb ldr r3, [r7, #12]
  10828. 800451a: 681b ldr r3, [r3, #0]
  10829. 800451c: 689a ldr r2, [r3, #8]
  10830. 800451e: 68fb ldr r3, [r7, #12]
  10831. 8004520: 681b ldr r3, [r3, #0]
  10832. 8004522: f422 2280 bic.w r2, r2, #262144 ; 0x40000
  10833. 8004526: 609a str r2, [r3, #8]
  10834. /* This interface is deprecated. To manage Daylight Saving Time, please use HAL_RTC_DST_xxx functions */
  10835. hrtc->Instance->CR |= (uint32_t)(sTime->DayLightSaving | sTime->StoreOperation);
  10836. 8004528: 68fb ldr r3, [r7, #12]
  10837. 800452a: 681b ldr r3, [r3, #0]
  10838. 800452c: 6899 ldr r1, [r3, #8]
  10839. 800452e: 68bb ldr r3, [r7, #8]
  10840. 8004530: 68da ldr r2, [r3, #12]
  10841. 8004532: 68bb ldr r3, [r7, #8]
  10842. 8004534: 691b ldr r3, [r3, #16]
  10843. 8004536: 431a orrs r2, r3
  10844. 8004538: 68fb ldr r3, [r7, #12]
  10845. 800453a: 681b ldr r3, [r3, #0]
  10846. 800453c: 430a orrs r2, r1
  10847. 800453e: 609a str r2, [r3, #8]
  10848. /* Exit Initialization mode */
  10849. hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
  10850. 8004540: 68fb ldr r3, [r7, #12]
  10851. 8004542: 681b ldr r3, [r3, #0]
  10852. 8004544: 68da ldr r2, [r3, #12]
  10853. 8004546: 68fb ldr r3, [r7, #12]
  10854. 8004548: 681b ldr r3, [r3, #0]
  10855. 800454a: f022 0280 bic.w r2, r2, #128 ; 0x80
  10856. 800454e: 60da str r2, [r3, #12]
  10857. /* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
  10858. if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == RESET)
  10859. 8004550: 68fb ldr r3, [r7, #12]
  10860. 8004552: 681b ldr r3, [r3, #0]
  10861. 8004554: 689b ldr r3, [r3, #8]
  10862. 8004556: f003 0320 and.w r3, r3, #32
  10863. 800455a: 2b00 cmp r3, #0
  10864. 800455c: d111 bne.n 8004582 <HAL_RTC_SetTime+0x15c>
  10865. {
  10866. if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK)
  10867. 800455e: 68f8 ldr r0, [r7, #12]
  10868. 8004560: f000 f8c5 bl 80046ee <HAL_RTC_WaitForSynchro>
  10869. 8004564: 4603 mov r3, r0
  10870. 8004566: 2b00 cmp r3, #0
  10871. 8004568: d00b beq.n 8004582 <HAL_RTC_SetTime+0x15c>
  10872. {
  10873. /* Enable the write protection for RTC registers */
  10874. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  10875. 800456a: 68fb ldr r3, [r7, #12]
  10876. 800456c: 681b ldr r3, [r3, #0]
  10877. 800456e: 22ff movs r2, #255 ; 0xff
  10878. 8004570: 625a str r2, [r3, #36] ; 0x24
  10879. hrtc->State = HAL_RTC_STATE_ERROR;
  10880. 8004572: 68fb ldr r3, [r7, #12]
  10881. 8004574: 2204 movs r2, #4
  10882. 8004576: 775a strb r2, [r3, #29]
  10883. /* Process Unlocked */
  10884. __HAL_UNLOCK(hrtc);
  10885. 8004578: 68fb ldr r3, [r7, #12]
  10886. 800457a: 2200 movs r2, #0
  10887. 800457c: 771a strb r2, [r3, #28]
  10888. return HAL_ERROR;
  10889. 800457e: 2301 movs r3, #1
  10890. 8004580: e00a b.n 8004598 <HAL_RTC_SetTime+0x172>
  10891. }
  10892. }
  10893. /* Enable the write protection for RTC registers */
  10894. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  10895. 8004582: 68fb ldr r3, [r7, #12]
  10896. 8004584: 681b ldr r3, [r3, #0]
  10897. 8004586: 22ff movs r2, #255 ; 0xff
  10898. 8004588: 625a str r2, [r3, #36] ; 0x24
  10899. hrtc->State = HAL_RTC_STATE_READY;
  10900. 800458a: 68fb ldr r3, [r7, #12]
  10901. 800458c: 2201 movs r2, #1
  10902. 800458e: 775a strb r2, [r3, #29]
  10903. __HAL_UNLOCK(hrtc);
  10904. 8004590: 68fb ldr r3, [r7, #12]
  10905. 8004592: 2200 movs r2, #0
  10906. 8004594: 771a strb r2, [r3, #28]
  10907. return HAL_OK;
  10908. 8004596: 2300 movs r3, #0
  10909. }
  10910. }
  10911. 8004598: 4618 mov r0, r3
  10912. 800459a: 371c adds r7, #28
  10913. 800459c: 46bd mov sp, r7
  10914. 800459e: bd90 pop {r4, r7, pc}
  10915. 080045a0 <HAL_RTC_SetDate>:
  10916. * @arg RTC_FORMAT_BIN: Binary data format
  10917. * @arg RTC_FORMAT_BCD: BCD data format
  10918. * @retval HAL status
  10919. */
  10920. HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
  10921. {
  10922. 80045a0: b590 push {r4, r7, lr}
  10923. 80045a2: b087 sub sp, #28
  10924. 80045a4: af00 add r7, sp, #0
  10925. 80045a6: 60f8 str r0, [r7, #12]
  10926. 80045a8: 60b9 str r1, [r7, #8]
  10927. 80045aa: 607a str r2, [r7, #4]
  10928. uint32_t datetmpreg = 0U;
  10929. 80045ac: 2300 movs r3, #0
  10930. 80045ae: 617b str r3, [r7, #20]
  10931. /* Check the parameters */
  10932. assert_param(IS_RTC_FORMAT(Format));
  10933. /* Process Locked */
  10934. __HAL_LOCK(hrtc);
  10935. 80045b0: 68fb ldr r3, [r7, #12]
  10936. 80045b2: 7f1b ldrb r3, [r3, #28]
  10937. 80045b4: 2b01 cmp r3, #1
  10938. 80045b6: d101 bne.n 80045bc <HAL_RTC_SetDate+0x1c>
  10939. 80045b8: 2302 movs r3, #2
  10940. 80045ba: e094 b.n 80046e6 <HAL_RTC_SetDate+0x146>
  10941. 80045bc: 68fb ldr r3, [r7, #12]
  10942. 80045be: 2201 movs r2, #1
  10943. 80045c0: 771a strb r2, [r3, #28]
  10944. hrtc->State = HAL_RTC_STATE_BUSY;
  10945. 80045c2: 68fb ldr r3, [r7, #12]
  10946. 80045c4: 2202 movs r2, #2
  10947. 80045c6: 775a strb r2, [r3, #29]
  10948. if((Format == RTC_FORMAT_BIN) && ((sDate->Month & 0x10U) == 0x10U))
  10949. 80045c8: 687b ldr r3, [r7, #4]
  10950. 80045ca: 2b00 cmp r3, #0
  10951. 80045cc: d10e bne.n 80045ec <HAL_RTC_SetDate+0x4c>
  10952. 80045ce: 68bb ldr r3, [r7, #8]
  10953. 80045d0: 785b ldrb r3, [r3, #1]
  10954. 80045d2: f003 0310 and.w r3, r3, #16
  10955. 80045d6: 2b00 cmp r3, #0
  10956. 80045d8: d008 beq.n 80045ec <HAL_RTC_SetDate+0x4c>
  10957. {
  10958. sDate->Month = (uint8_t)((sDate->Month & (uint8_t)~(0x10U)) + (uint8_t)0x0AU);
  10959. 80045da: 68bb ldr r3, [r7, #8]
  10960. 80045dc: 785b ldrb r3, [r3, #1]
  10961. 80045de: f023 0310 bic.w r3, r3, #16
  10962. 80045e2: b2db uxtb r3, r3
  10963. 80045e4: 330a adds r3, #10
  10964. 80045e6: b2da uxtb r2, r3
  10965. 80045e8: 68bb ldr r3, [r7, #8]
  10966. 80045ea: 705a strb r2, [r3, #1]
  10967. }
  10968. assert_param(IS_RTC_WEEKDAY(sDate->WeekDay));
  10969. if(Format == RTC_FORMAT_BIN)
  10970. 80045ec: 687b ldr r3, [r7, #4]
  10971. 80045ee: 2b00 cmp r3, #0
  10972. 80045f0: d11c bne.n 800462c <HAL_RTC_SetDate+0x8c>
  10973. {
  10974. assert_param(IS_RTC_YEAR(sDate->Year));
  10975. assert_param(IS_RTC_MONTH(sDate->Month));
  10976. assert_param(IS_RTC_DATE(sDate->Date));
  10977. datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16U) | \
  10978. 80045f2: 68bb ldr r3, [r7, #8]
  10979. 80045f4: 78db ldrb r3, [r3, #3]
  10980. 80045f6: 4618 mov r0, r3
  10981. 80045f8: f000 f8cd bl 8004796 <RTC_ByteToBcd2>
  10982. 80045fc: 4603 mov r3, r0
  10983. 80045fe: 041c lsls r4, r3, #16
  10984. ((uint32_t)RTC_ByteToBcd2(sDate->Month) << 8U) | \
  10985. 8004600: 68bb ldr r3, [r7, #8]
  10986. 8004602: 785b ldrb r3, [r3, #1]
  10987. 8004604: 4618 mov r0, r3
  10988. 8004606: f000 f8c6 bl 8004796 <RTC_ByteToBcd2>
  10989. 800460a: 4603 mov r3, r0
  10990. 800460c: 021b lsls r3, r3, #8
  10991. datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16U) | \
  10992. 800460e: 431c orrs r4, r3
  10993. ((uint32_t)RTC_ByteToBcd2(sDate->Date)) | \
  10994. 8004610: 68bb ldr r3, [r7, #8]
  10995. 8004612: 789b ldrb r3, [r3, #2]
  10996. 8004614: 4618 mov r0, r3
  10997. 8004616: f000 f8be bl 8004796 <RTC_ByteToBcd2>
  10998. 800461a: 4603 mov r3, r0
  10999. ((uint32_t)RTC_ByteToBcd2(sDate->Month) << 8U) | \
  11000. 800461c: ea44 0203 orr.w r2, r4, r3
  11001. ((uint32_t)sDate->WeekDay << 13U));
  11002. 8004620: 68bb ldr r3, [r7, #8]
  11003. 8004622: 781b ldrb r3, [r3, #0]
  11004. 8004624: 035b lsls r3, r3, #13
  11005. datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << 16U) | \
  11006. 8004626: 4313 orrs r3, r2
  11007. 8004628: 617b str r3, [r7, #20]
  11008. 800462a: e00e b.n 800464a <HAL_RTC_SetDate+0xaa>
  11009. {
  11010. assert_param(IS_RTC_YEAR(RTC_Bcd2ToByte(sDate->Year)));
  11011. assert_param(IS_RTC_MONTH(RTC_Bcd2ToByte(sDate->Month)));
  11012. assert_param(IS_RTC_DATE(RTC_Bcd2ToByte(sDate->Date)));
  11013. datetmpreg = ((((uint32_t)sDate->Year) << 16U) | \
  11014. 800462c: 68bb ldr r3, [r7, #8]
  11015. 800462e: 78db ldrb r3, [r3, #3]
  11016. 8004630: 041a lsls r2, r3, #16
  11017. (((uint32_t)sDate->Month) << 8U) | \
  11018. 8004632: 68bb ldr r3, [r7, #8]
  11019. 8004634: 785b ldrb r3, [r3, #1]
  11020. 8004636: 021b lsls r3, r3, #8
  11021. datetmpreg = ((((uint32_t)sDate->Year) << 16U) | \
  11022. 8004638: 4313 orrs r3, r2
  11023. ((uint32_t)sDate->Date) | \
  11024. 800463a: 68ba ldr r2, [r7, #8]
  11025. 800463c: 7892 ldrb r2, [r2, #2]
  11026. (((uint32_t)sDate->Month) << 8U) | \
  11027. 800463e: 431a orrs r2, r3
  11028. (((uint32_t)sDate->WeekDay) << 13U));
  11029. 8004640: 68bb ldr r3, [r7, #8]
  11030. 8004642: 781b ldrb r3, [r3, #0]
  11031. 8004644: 035b lsls r3, r3, #13
  11032. datetmpreg = ((((uint32_t)sDate->Year) << 16U) | \
  11033. 8004646: 4313 orrs r3, r2
  11034. 8004648: 617b str r3, [r7, #20]
  11035. }
  11036. /* Disable the write protection for RTC registers */
  11037. __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
  11038. 800464a: 68fb ldr r3, [r7, #12]
  11039. 800464c: 681b ldr r3, [r3, #0]
  11040. 800464e: 22ca movs r2, #202 ; 0xca
  11041. 8004650: 625a str r2, [r3, #36] ; 0x24
  11042. 8004652: 68fb ldr r3, [r7, #12]
  11043. 8004654: 681b ldr r3, [r3, #0]
  11044. 8004656: 2253 movs r2, #83 ; 0x53
  11045. 8004658: 625a str r2, [r3, #36] ; 0x24
  11046. /* Set Initialization mode */
  11047. if(RTC_EnterInitMode(hrtc) != HAL_OK)
  11048. 800465a: 68f8 ldr r0, [r7, #12]
  11049. 800465c: f000 f86f bl 800473e <RTC_EnterInitMode>
  11050. 8004660: 4603 mov r3, r0
  11051. 8004662: 2b00 cmp r3, #0
  11052. 8004664: d00b beq.n 800467e <HAL_RTC_SetDate+0xde>
  11053. {
  11054. /* Enable the write protection for RTC registers */
  11055. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  11056. 8004666: 68fb ldr r3, [r7, #12]
  11057. 8004668: 681b ldr r3, [r3, #0]
  11058. 800466a: 22ff movs r2, #255 ; 0xff
  11059. 800466c: 625a str r2, [r3, #36] ; 0x24
  11060. /* Set RTC state*/
  11061. hrtc->State = HAL_RTC_STATE_ERROR;
  11062. 800466e: 68fb ldr r3, [r7, #12]
  11063. 8004670: 2204 movs r2, #4
  11064. 8004672: 775a strb r2, [r3, #29]
  11065. /* Process Unlocked */
  11066. __HAL_UNLOCK(hrtc);
  11067. 8004674: 68fb ldr r3, [r7, #12]
  11068. 8004676: 2200 movs r2, #0
  11069. 8004678: 771a strb r2, [r3, #28]
  11070. return HAL_ERROR;
  11071. 800467a: 2301 movs r3, #1
  11072. 800467c: e033 b.n 80046e6 <HAL_RTC_SetDate+0x146>
  11073. }
  11074. else
  11075. {
  11076. /* Set the RTC_DR register */
  11077. hrtc->Instance->DR = (uint32_t)(datetmpreg & RTC_DR_RESERVED_MASK);
  11078. 800467e: 68fb ldr r3, [r7, #12]
  11079. 8004680: 681a ldr r2, [r3, #0]
  11080. 8004682: 697b ldr r3, [r7, #20]
  11081. 8004684: f023 437f bic.w r3, r3, #4278190080 ; 0xff000000
  11082. 8004688: f023 03c0 bic.w r3, r3, #192 ; 0xc0
  11083. 800468c: 6053 str r3, [r2, #4]
  11084. /* Exit Initialization mode */
  11085. hrtc->Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
  11086. 800468e: 68fb ldr r3, [r7, #12]
  11087. 8004690: 681b ldr r3, [r3, #0]
  11088. 8004692: 68da ldr r2, [r3, #12]
  11089. 8004694: 68fb ldr r3, [r7, #12]
  11090. 8004696: 681b ldr r3, [r3, #0]
  11091. 8004698: f022 0280 bic.w r2, r2, #128 ; 0x80
  11092. 800469c: 60da str r2, [r3, #12]
  11093. /* If CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
  11094. if((hrtc->Instance->CR & RTC_CR_BYPSHAD) == RESET)
  11095. 800469e: 68fb ldr r3, [r7, #12]
  11096. 80046a0: 681b ldr r3, [r3, #0]
  11097. 80046a2: 689b ldr r3, [r3, #8]
  11098. 80046a4: f003 0320 and.w r3, r3, #32
  11099. 80046a8: 2b00 cmp r3, #0
  11100. 80046aa: d111 bne.n 80046d0 <HAL_RTC_SetDate+0x130>
  11101. {
  11102. if(HAL_RTC_WaitForSynchro(hrtc) != HAL_OK)
  11103. 80046ac: 68f8 ldr r0, [r7, #12]
  11104. 80046ae: f000 f81e bl 80046ee <HAL_RTC_WaitForSynchro>
  11105. 80046b2: 4603 mov r3, r0
  11106. 80046b4: 2b00 cmp r3, #0
  11107. 80046b6: d00b beq.n 80046d0 <HAL_RTC_SetDate+0x130>
  11108. {
  11109. /* Enable the write protection for RTC registers */
  11110. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  11111. 80046b8: 68fb ldr r3, [r7, #12]
  11112. 80046ba: 681b ldr r3, [r3, #0]
  11113. 80046bc: 22ff movs r2, #255 ; 0xff
  11114. 80046be: 625a str r2, [r3, #36] ; 0x24
  11115. hrtc->State = HAL_RTC_STATE_ERROR;
  11116. 80046c0: 68fb ldr r3, [r7, #12]
  11117. 80046c2: 2204 movs r2, #4
  11118. 80046c4: 775a strb r2, [r3, #29]
  11119. /* Process Unlocked */
  11120. __HAL_UNLOCK(hrtc);
  11121. 80046c6: 68fb ldr r3, [r7, #12]
  11122. 80046c8: 2200 movs r2, #0
  11123. 80046ca: 771a strb r2, [r3, #28]
  11124. return HAL_ERROR;
  11125. 80046cc: 2301 movs r3, #1
  11126. 80046ce: e00a b.n 80046e6 <HAL_RTC_SetDate+0x146>
  11127. }
  11128. }
  11129. /* Enable the write protection for RTC registers */
  11130. __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
  11131. 80046d0: 68fb ldr r3, [r7, #12]
  11132. 80046d2: 681b ldr r3, [r3, #0]
  11133. 80046d4: 22ff movs r2, #255 ; 0xff
  11134. 80046d6: 625a str r2, [r3, #36] ; 0x24
  11135. hrtc->State = HAL_RTC_STATE_READY ;
  11136. 80046d8: 68fb ldr r3, [r7, #12]
  11137. 80046da: 2201 movs r2, #1
  11138. 80046dc: 775a strb r2, [r3, #29]
  11139. /* Process Unlocked */
  11140. __HAL_UNLOCK(hrtc);
  11141. 80046de: 68fb ldr r3, [r7, #12]
  11142. 80046e0: 2200 movs r2, #0
  11143. 80046e2: 771a strb r2, [r3, #28]
  11144. return HAL_OK;
  11145. 80046e4: 2300 movs r3, #0
  11146. }
  11147. }
  11148. 80046e6: 4618 mov r0, r3
  11149. 80046e8: 371c adds r7, #28
  11150. 80046ea: 46bd mov sp, r7
  11151. 80046ec: bd90 pop {r4, r7, pc}
  11152. 080046ee <HAL_RTC_WaitForSynchro>:
  11153. * @param hrtc pointer to a RTC_HandleTypeDef structure that contains
  11154. * the configuration information for RTC.
  11155. * @retval HAL status
  11156. */
  11157. HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef* hrtc)
  11158. {
  11159. 80046ee: b580 push {r7, lr}
  11160. 80046f0: b084 sub sp, #16
  11161. 80046f2: af00 add r7, sp, #0
  11162. 80046f4: 6078 str r0, [r7, #4]
  11163. uint32_t tickstart = 0U;
  11164. 80046f6: 2300 movs r3, #0
  11165. 80046f8: 60fb str r3, [r7, #12]
  11166. /* Clear RSF flag */
  11167. hrtc->Instance->ISR &= (uint32_t)RTC_RSF_MASK;
  11168. 80046fa: 687b ldr r3, [r7, #4]
  11169. 80046fc: 681b ldr r3, [r3, #0]
  11170. 80046fe: 68da ldr r2, [r3, #12]
  11171. 8004700: 687b ldr r3, [r7, #4]
  11172. 8004702: 681b ldr r3, [r3, #0]
  11173. 8004704: f022 02a0 bic.w r2, r2, #160 ; 0xa0
  11174. 8004708: 60da str r2, [r3, #12]
  11175. /* Get tick */
  11176. tickstart = HAL_GetTick();
  11177. 800470a: f7fc fdc7 bl 800129c <HAL_GetTick>
  11178. 800470e: 60f8 str r0, [r7, #12]
  11179. /* Wait the registers to be synchronised */
  11180. while((hrtc->Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET)
  11181. 8004710: e009 b.n 8004726 <HAL_RTC_WaitForSynchro+0x38>
  11182. {
  11183. if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
  11184. 8004712: f7fc fdc3 bl 800129c <HAL_GetTick>
  11185. 8004716: 4602 mov r2, r0
  11186. 8004718: 68fb ldr r3, [r7, #12]
  11187. 800471a: 1ad3 subs r3, r2, r3
  11188. 800471c: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
  11189. 8004720: d901 bls.n 8004726 <HAL_RTC_WaitForSynchro+0x38>
  11190. {
  11191. return HAL_TIMEOUT;
  11192. 8004722: 2303 movs r3, #3
  11193. 8004724: e007 b.n 8004736 <HAL_RTC_WaitForSynchro+0x48>
  11194. while((hrtc->Instance->ISR & RTC_ISR_RSF) == (uint32_t)RESET)
  11195. 8004726: 687b ldr r3, [r7, #4]
  11196. 8004728: 681b ldr r3, [r3, #0]
  11197. 800472a: 68db ldr r3, [r3, #12]
  11198. 800472c: f003 0320 and.w r3, r3, #32
  11199. 8004730: 2b00 cmp r3, #0
  11200. 8004732: d0ee beq.n 8004712 <HAL_RTC_WaitForSynchro+0x24>
  11201. }
  11202. }
  11203. return HAL_OK;
  11204. 8004734: 2300 movs r3, #0
  11205. }
  11206. 8004736: 4618 mov r0, r3
  11207. 8004738: 3710 adds r7, #16
  11208. 800473a: 46bd mov sp, r7
  11209. 800473c: bd80 pop {r7, pc}
  11210. 0800473e <RTC_EnterInitMode>:
  11211. * @param hrtc pointer to a RTC_HandleTypeDef structure that contains
  11212. * the configuration information for RTC.
  11213. * @retval HAL status
  11214. */
  11215. HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef* hrtc)
  11216. {
  11217. 800473e: b580 push {r7, lr}
  11218. 8004740: b084 sub sp, #16
  11219. 8004742: af00 add r7, sp, #0
  11220. 8004744: 6078 str r0, [r7, #4]
  11221. uint32_t tickstart = 0U;
  11222. 8004746: 2300 movs r3, #0
  11223. 8004748: 60fb str r3, [r7, #12]
  11224. /* Check if the Initialization mode is set */
  11225. if((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
  11226. 800474a: 687b ldr r3, [r7, #4]
  11227. 800474c: 681b ldr r3, [r3, #0]
  11228. 800474e: 68db ldr r3, [r3, #12]
  11229. 8004750: f003 0340 and.w r3, r3, #64 ; 0x40
  11230. 8004754: 2b00 cmp r3, #0
  11231. 8004756: d119 bne.n 800478c <RTC_EnterInitMode+0x4e>
  11232. {
  11233. /* Set the Initialization mode */
  11234. hrtc->Instance->ISR = (uint32_t)RTC_INIT_MASK;
  11235. 8004758: 687b ldr r3, [r7, #4]
  11236. 800475a: 681b ldr r3, [r3, #0]
  11237. 800475c: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff
  11238. 8004760: 60da str r2, [r3, #12]
  11239. /* Get tick */
  11240. tickstart = HAL_GetTick();
  11241. 8004762: f7fc fd9b bl 800129c <HAL_GetTick>
  11242. 8004766: 60f8 str r0, [r7, #12]
  11243. /* Wait till RTC is in INIT state and if Time out is reached exit */
  11244. while((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
  11245. 8004768: e009 b.n 800477e <RTC_EnterInitMode+0x40>
  11246. {
  11247. if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)
  11248. 800476a: f7fc fd97 bl 800129c <HAL_GetTick>
  11249. 800476e: 4602 mov r2, r0
  11250. 8004770: 68fb ldr r3, [r7, #12]
  11251. 8004772: 1ad3 subs r3, r2, r3
  11252. 8004774: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8
  11253. 8004778: d901 bls.n 800477e <RTC_EnterInitMode+0x40>
  11254. {
  11255. return HAL_TIMEOUT;
  11256. 800477a: 2303 movs r3, #3
  11257. 800477c: e007 b.n 800478e <RTC_EnterInitMode+0x50>
  11258. while((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
  11259. 800477e: 687b ldr r3, [r7, #4]
  11260. 8004780: 681b ldr r3, [r3, #0]
  11261. 8004782: 68db ldr r3, [r3, #12]
  11262. 8004784: f003 0340 and.w r3, r3, #64 ; 0x40
  11263. 8004788: 2b00 cmp r3, #0
  11264. 800478a: d0ee beq.n 800476a <RTC_EnterInitMode+0x2c>
  11265. }
  11266. }
  11267. }
  11268. return HAL_OK;
  11269. 800478c: 2300 movs r3, #0
  11270. }
  11271. 800478e: 4618 mov r0, r3
  11272. 8004790: 3710 adds r7, #16
  11273. 8004792: 46bd mov sp, r7
  11274. 8004794: bd80 pop {r7, pc}
  11275. 08004796 <RTC_ByteToBcd2>:
  11276. * @brief Converts a 2 digit decimal to BCD format.
  11277. * @param Value Byte to be converted
  11278. * @retval Converted byte
  11279. */
  11280. uint8_t RTC_ByteToBcd2(uint8_t Value)
  11281. {
  11282. 8004796: b480 push {r7}
  11283. 8004798: b085 sub sp, #20
  11284. 800479a: af00 add r7, sp, #0
  11285. 800479c: 4603 mov r3, r0
  11286. 800479e: 71fb strb r3, [r7, #7]
  11287. uint32_t bcdhigh = 0U;
  11288. 80047a0: 2300 movs r3, #0
  11289. 80047a2: 60fb str r3, [r7, #12]
  11290. while(Value >= 10U)
  11291. 80047a4: e005 b.n 80047b2 <RTC_ByteToBcd2+0x1c>
  11292. {
  11293. bcdhigh++;
  11294. 80047a6: 68fb ldr r3, [r7, #12]
  11295. 80047a8: 3301 adds r3, #1
  11296. 80047aa: 60fb str r3, [r7, #12]
  11297. Value -= 10U;
  11298. 80047ac: 79fb ldrb r3, [r7, #7]
  11299. 80047ae: 3b0a subs r3, #10
  11300. 80047b0: 71fb strb r3, [r7, #7]
  11301. while(Value >= 10U)
  11302. 80047b2: 79fb ldrb r3, [r7, #7]
  11303. 80047b4: 2b09 cmp r3, #9
  11304. 80047b6: d8f6 bhi.n 80047a6 <RTC_ByteToBcd2+0x10>
  11305. }
  11306. return ((uint8_t)(bcdhigh << 4U) | Value);
  11307. 80047b8: 68fb ldr r3, [r7, #12]
  11308. 80047ba: b2db uxtb r3, r3
  11309. 80047bc: 011b lsls r3, r3, #4
  11310. 80047be: b2da uxtb r2, r3
  11311. 80047c0: 79fb ldrb r3, [r7, #7]
  11312. 80047c2: 4313 orrs r3, r2
  11313. 80047c4: b2db uxtb r3, r3
  11314. }
  11315. 80047c6: 4618 mov r0, r3
  11316. 80047c8: 3714 adds r7, #20
  11317. 80047ca: 46bd mov sp, r7
  11318. 80047cc: f85d 7b04 ldr.w r7, [sp], #4
  11319. 80047d0: 4770 bx lr
  11320. ...
  11321. 080047d4 <HAL_SMBUS_Init>:
  11322. * @param hsmbus pointer to a SMBUS_HandleTypeDef structure that contains
  11323. * the configuration information for the specified SMBUS
  11324. * @retval HAL status
  11325. */
  11326. HAL_StatusTypeDef HAL_SMBUS_Init(SMBUS_HandleTypeDef *hsmbus)
  11327. {
  11328. 80047d4: b580 push {r7, lr}
  11329. 80047d6: b084 sub sp, #16
  11330. 80047d8: af00 add r7, sp, #0
  11331. 80047da: 6078 str r0, [r7, #4]
  11332. uint32_t freqrange = 0U;
  11333. 80047dc: 2300 movs r3, #0
  11334. 80047de: 60fb str r3, [r7, #12]
  11335. uint32_t pclk1 = 0U;
  11336. 80047e0: 2300 movs r3, #0
  11337. 80047e2: 60bb str r3, [r7, #8]
  11338. /* Check the SMBUS handle allocation */
  11339. if (hsmbus == NULL)
  11340. 80047e4: 687b ldr r3, [r7, #4]
  11341. 80047e6: 2b00 cmp r3, #0
  11342. 80047e8: d101 bne.n 80047ee <HAL_SMBUS_Init+0x1a>
  11343. {
  11344. return HAL_ERROR;
  11345. 80047ea: 2301 movs r3, #1
  11346. 80047ec: e0aa b.n 8004944 <HAL_SMBUS_Init+0x170>
  11347. assert_param(IS_SMBUS_GENERAL_CALL(hsmbus->Init.GeneralCallMode));
  11348. assert_param(IS_SMBUS_NO_STRETCH(hsmbus->Init.NoStretchMode));
  11349. assert_param(IS_SMBUS_PEC(hsmbus->Init.PacketErrorCheckMode));
  11350. assert_param(IS_SMBUS_PERIPHERAL_MODE(hsmbus->Init.PeripheralMode));
  11351. if (hsmbus->State == HAL_SMBUS_STATE_RESET)
  11352. 80047ee: 687b ldr r3, [r7, #4]
  11353. 80047f0: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
  11354. 80047f4: b2db uxtb r3, r3
  11355. 80047f6: 2b00 cmp r3, #0
  11356. 80047f8: d106 bne.n 8004808 <HAL_SMBUS_Init+0x34>
  11357. {
  11358. /* Allocate lock resource and initialize it */
  11359. hsmbus->Lock = HAL_UNLOCKED;
  11360. 80047fa: 687b ldr r3, [r7, #4]
  11361. 80047fc: 2200 movs r2, #0
  11362. 80047fe: f883 203c strb.w r2, [r3, #60] ; 0x3c
  11363. /* Init the low level hardware : GPIO, CLOCK, NVIC */
  11364. hsmbus->MspInitCallback(hsmbus);
  11365. #else
  11366. /* Init the low level hardware : GPIO, CLOCK, NVIC */
  11367. HAL_SMBUS_MspInit(hsmbus);
  11368. 8004802: 6878 ldr r0, [r7, #4]
  11369. 8004804: f7fc faf8 bl 8000df8 <HAL_SMBUS_MspInit>
  11370. #endif /* USE_HAL_SMBUS_REGISTER_CALLBACKS */
  11371. }
  11372. hsmbus->State = HAL_SMBUS_STATE_BUSY;
  11373. 8004808: 687b ldr r3, [r7, #4]
  11374. 800480a: 2224 movs r2, #36 ; 0x24
  11375. 800480c: f883 203d strb.w r2, [r3, #61] ; 0x3d
  11376. /* Disable the selected SMBUS peripheral */
  11377. __HAL_SMBUS_DISABLE(hsmbus);
  11378. 8004810: 687b ldr r3, [r7, #4]
  11379. 8004812: 681b ldr r3, [r3, #0]
  11380. 8004814: 681a ldr r2, [r3, #0]
  11381. 8004816: 687b ldr r3, [r7, #4]
  11382. 8004818: 681b ldr r3, [r3, #0]
  11383. 800481a: f022 0201 bic.w r2, r2, #1
  11384. 800481e: 601a str r2, [r3, #0]
  11385. /* Get PCLK1 frequency */
  11386. pclk1 = HAL_RCC_GetPCLK1Freq();
  11387. 8004820: f7fe fdce bl 80033c0 <HAL_RCC_GetPCLK1Freq>
  11388. 8004824: 60b8 str r0, [r7, #8]
  11389. /* Calculate frequency range */
  11390. freqrange = SMBUS_FREQRANGE(pclk1);
  11391. 8004826: 68bb ldr r3, [r7, #8]
  11392. 8004828: 4a48 ldr r2, [pc, #288] ; (800494c <HAL_SMBUS_Init+0x178>)
  11393. 800482a: fba2 2303 umull r2, r3, r2, r3
  11394. 800482e: 0c9b lsrs r3, r3, #18
  11395. 8004830: 60fb str r3, [r7, #12]
  11396. /*---------------------------- SMBUSx CR2 Configuration ----------------------*/
  11397. /* Configure SMBUSx: Frequency range */
  11398. MODIFY_REG(hsmbus->Instance->CR2, I2C_CR2_FREQ, freqrange);
  11399. 8004832: 687b ldr r3, [r7, #4]
  11400. 8004834: 681b ldr r3, [r3, #0]
  11401. 8004836: 685b ldr r3, [r3, #4]
  11402. 8004838: f023 013f bic.w r1, r3, #63 ; 0x3f
  11403. 800483c: 687b ldr r3, [r7, #4]
  11404. 800483e: 681b ldr r3, [r3, #0]
  11405. 8004840: 68fa ldr r2, [r7, #12]
  11406. 8004842: 430a orrs r2, r1
  11407. 8004844: 605a str r2, [r3, #4]
  11408. /*---------------------------- SMBUSx TRISE Configuration --------------------*/
  11409. /* Configure SMBUSx: Rise Time */
  11410. MODIFY_REG(hsmbus->Instance->TRISE, I2C_TRISE_TRISE, SMBUS_RISE_TIME(freqrange));
  11411. 8004846: 687b ldr r3, [r7, #4]
  11412. 8004848: 681b ldr r3, [r3, #0]
  11413. 800484a: 6a1b ldr r3, [r3, #32]
  11414. 800484c: f023 013f bic.w r1, r3, #63 ; 0x3f
  11415. 8004850: 68fb ldr r3, [r7, #12]
  11416. 8004852: 1c5a adds r2, r3, #1
  11417. 8004854: 687b ldr r3, [r7, #4]
  11418. 8004856: 681b ldr r3, [r3, #0]
  11419. 8004858: 430a orrs r2, r1
  11420. 800485a: 621a str r2, [r3, #32]
  11421. /*---------------------------- SMBUSx CCR Configuration ----------------------*/
  11422. /* Configure SMBUSx: Speed */
  11423. MODIFY_REG(hsmbus->Instance->CCR, (I2C_CCR_FS | I2C_CCR_DUTY | I2C_CCR_CCR), SMBUS_SPEED_STANDARD(pclk1, hsmbus->Init.ClockSpeed));
  11424. 800485c: 687b ldr r3, [r7, #4]
  11425. 800485e: 681b ldr r3, [r3, #0]
  11426. 8004860: 69db ldr r3, [r3, #28]
  11427. 8004862: f423 434f bic.w r3, r3, #52992 ; 0xcf00
  11428. 8004866: f023 03ff bic.w r3, r3, #255 ; 0xff
  11429. 800486a: 687a ldr r2, [r7, #4]
  11430. 800486c: 6852 ldr r2, [r2, #4]
  11431. 800486e: 0052 lsls r2, r2, #1
  11432. 8004870: 68b9 ldr r1, [r7, #8]
  11433. 8004872: fbb1 f1f2 udiv r1, r1, r2
  11434. 8004876: f640 72fc movw r2, #4092 ; 0xffc
  11435. 800487a: 400a ands r2, r1
  11436. 800487c: 2a00 cmp r2, #0
  11437. 800487e: d006 beq.n 800488e <HAL_SMBUS_Init+0xba>
  11438. 8004880: 687a ldr r2, [r7, #4]
  11439. 8004882: 6852 ldr r2, [r2, #4]
  11440. 8004884: 0052 lsls r2, r2, #1
  11441. 8004886: 68b9 ldr r1, [r7, #8]
  11442. 8004888: fbb1 f2f2 udiv r2, r1, r2
  11443. 800488c: e000 b.n 8004890 <HAL_SMBUS_Init+0xbc>
  11444. 800488e: 2204 movs r2, #4
  11445. 8004890: 6879 ldr r1, [r7, #4]
  11446. 8004892: 6809 ldr r1, [r1, #0]
  11447. 8004894: 4313 orrs r3, r2
  11448. 8004896: 61cb str r3, [r1, #28]
  11449. /*---------------------------- SMBUSx CR1 Configuration ----------------------*/
  11450. /* Configure SMBUSx: Generalcall , PEC , Peripheral mode and NoStretch mode */
  11451. MODIFY_REG(hsmbus->Instance->CR1, (I2C_CR1_NOSTRETCH | I2C_CR1_ENGC | I2C_CR1_ENPEC | I2C_CR1_ENARP | I2C_CR1_SMBTYPE | I2C_CR1_SMBUS), (hsmbus->Init.NoStretchMode | hsmbus->Init.GeneralCallMode | hsmbus->Init.PacketErrorCheckMode | hsmbus->Init.PeripheralMode));
  11452. 8004898: 687b ldr r3, [r7, #4]
  11453. 800489a: 681b ldr r3, [r3, #0]
  11454. 800489c: 681b ldr r3, [r3, #0]
  11455. 800489e: f023 01fa bic.w r1, r3, #250 ; 0xfa
  11456. 80048a2: 687b ldr r3, [r7, #4]
  11457. 80048a4: 6a1a ldr r2, [r3, #32]
  11458. 80048a6: 687b ldr r3, [r7, #4]
  11459. 80048a8: 69db ldr r3, [r3, #28]
  11460. 80048aa: 431a orrs r2, r3
  11461. 80048ac: 687b ldr r3, [r7, #4]
  11462. 80048ae: 6a5b ldr r3, [r3, #36] ; 0x24
  11463. 80048b0: 431a orrs r2, r3
  11464. 80048b2: 687b ldr r3, [r7, #4]
  11465. 80048b4: 6a9b ldr r3, [r3, #40] ; 0x28
  11466. 80048b6: 431a orrs r2, r3
  11467. 80048b8: 687b ldr r3, [r7, #4]
  11468. 80048ba: 681b ldr r3, [r3, #0]
  11469. 80048bc: 430a orrs r2, r1
  11470. 80048be: 601a str r2, [r3, #0]
  11471. /*---------------------------- SMBUSx OAR1 Configuration ---------------------*/
  11472. /* Configure SMBUSx: Own Address1 and addressing mode */
  11473. MODIFY_REG(hsmbus->Instance->OAR1, (I2C_OAR1_ADDMODE | I2C_OAR1_ADD8_9 | I2C_OAR1_ADD1_7 | I2C_OAR1_ADD0), (hsmbus->Init.AddressingMode | hsmbus->Init.OwnAddress1));
  11474. 80048c0: 687b ldr r3, [r7, #4]
  11475. 80048c2: 681b ldr r3, [r3, #0]
  11476. 80048c4: 689b ldr r3, [r3, #8]
  11477. 80048c6: f423 4303 bic.w r3, r3, #33536 ; 0x8300
  11478. 80048ca: f023 03ff bic.w r3, r3, #255 ; 0xff
  11479. 80048ce: 687a ldr r2, [r7, #4]
  11480. 80048d0: 6911 ldr r1, [r2, #16]
  11481. 80048d2: 687a ldr r2, [r7, #4]
  11482. 80048d4: 68d2 ldr r2, [r2, #12]
  11483. 80048d6: 4311 orrs r1, r2
  11484. 80048d8: 687a ldr r2, [r7, #4]
  11485. 80048da: 6812 ldr r2, [r2, #0]
  11486. 80048dc: 430b orrs r3, r1
  11487. 80048de: 6093 str r3, [r2, #8]
  11488. /*---------------------------- SMBUSx OAR2 Configuration ---------------------*/
  11489. /* Configure SMBUSx: Dual mode and Own Address2 */
  11490. MODIFY_REG(hsmbus->Instance->OAR2, (I2C_OAR2_ENDUAL | I2C_OAR2_ADD2), (hsmbus->Init.DualAddressMode | hsmbus->Init.OwnAddress2));
  11491. 80048e0: 687b ldr r3, [r7, #4]
  11492. 80048e2: 681b ldr r3, [r3, #0]
  11493. 80048e4: 68db ldr r3, [r3, #12]
  11494. 80048e6: f023 01ff bic.w r1, r3, #255 ; 0xff
  11495. 80048ea: 687b ldr r3, [r7, #4]
  11496. 80048ec: 695a ldr r2, [r3, #20]
  11497. 80048ee: 687b ldr r3, [r7, #4]
  11498. 80048f0: 699b ldr r3, [r3, #24]
  11499. 80048f2: 431a orrs r2, r3
  11500. 80048f4: 687b ldr r3, [r7, #4]
  11501. 80048f6: 681b ldr r3, [r3, #0]
  11502. 80048f8: 430a orrs r2, r1
  11503. 80048fa: 60da str r2, [r3, #12]
  11504. #if defined(I2C_FLTR_ANOFF)
  11505. /*---------------------------- SMBUSx FLTR Configuration ------------------------*/
  11506. /* Configure SMBUSx: Analog noise filter */
  11507. SET_BIT(hsmbus->Instance->FLTR, hsmbus->Init.AnalogFilter);
  11508. 80048fc: 687b ldr r3, [r7, #4]
  11509. 80048fe: 681b ldr r3, [r3, #0]
  11510. 8004900: 6a59 ldr r1, [r3, #36] ; 0x24
  11511. 8004902: 687b ldr r3, [r7, #4]
  11512. 8004904: 689a ldr r2, [r3, #8]
  11513. 8004906: 687b ldr r3, [r7, #4]
  11514. 8004908: 681b ldr r3, [r3, #0]
  11515. 800490a: 430a orrs r2, r1
  11516. 800490c: 625a str r2, [r3, #36] ; 0x24
  11517. #endif
  11518. /* Enable the selected SMBUS peripheral */
  11519. __HAL_SMBUS_ENABLE(hsmbus);
  11520. 800490e: 687b ldr r3, [r7, #4]
  11521. 8004910: 681b ldr r3, [r3, #0]
  11522. 8004912: 681a ldr r2, [r3, #0]
  11523. 8004914: 687b ldr r3, [r7, #4]
  11524. 8004916: 681b ldr r3, [r3, #0]
  11525. 8004918: f042 0201 orr.w r2, r2, #1
  11526. 800491c: 601a str r2, [r3, #0]
  11527. hsmbus->ErrorCode = HAL_SMBUS_ERROR_NONE;
  11528. 800491e: 687b ldr r3, [r7, #4]
  11529. 8004920: 2200 movs r2, #0
  11530. 8004922: 641a str r2, [r3, #64] ; 0x40
  11531. hsmbus->State = HAL_SMBUS_STATE_READY;
  11532. 8004924: 687b ldr r3, [r7, #4]
  11533. 8004926: 2220 movs r2, #32
  11534. 8004928: f883 203d strb.w r2, [r3, #61] ; 0x3d
  11535. hsmbus->PreviousState = SMBUS_STATE_NONE;
  11536. 800492c: 687b ldr r3, [r7, #4]
  11537. 800492e: 2200 movs r2, #0
  11538. 8004930: 639a str r2, [r3, #56] ; 0x38
  11539. hsmbus->Mode = HAL_SMBUS_MODE_NONE;
  11540. 8004932: 687b ldr r3, [r7, #4]
  11541. 8004934: 2200 movs r2, #0
  11542. 8004936: f883 203e strb.w r2, [r3, #62] ; 0x3e
  11543. hsmbus->XferPEC = 0x00;
  11544. 800493a: 687b ldr r3, [r7, #4]
  11545. 800493c: 2200 movs r2, #0
  11546. 800493e: f883 204c strb.w r2, [r3, #76] ; 0x4c
  11547. return HAL_OK;
  11548. 8004942: 2300 movs r3, #0
  11549. }
  11550. 8004944: 4618 mov r0, r3
  11551. 8004946: 3710 adds r7, #16
  11552. 8004948: 46bd mov sp, r7
  11553. 800494a: bd80 pop {r7, pc}
  11554. 800494c: 431bde83 .word 0x431bde83
  11555. 08004950 <HAL_SPI_Init>:
  11556. * @param hspi pointer to a SPI_HandleTypeDef structure that contains
  11557. * the configuration information for SPI module.
  11558. * @retval HAL status
  11559. */
  11560. HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
  11561. {
  11562. 8004950: b580 push {r7, lr}
  11563. 8004952: b082 sub sp, #8
  11564. 8004954: af00 add r7, sp, #0
  11565. 8004956: 6078 str r0, [r7, #4]
  11566. /* Check the SPI handle allocation */
  11567. if (hspi == NULL)
  11568. 8004958: 687b ldr r3, [r7, #4]
  11569. 800495a: 2b00 cmp r3, #0
  11570. 800495c: d101 bne.n 8004962 <HAL_SPI_Init+0x12>
  11571. {
  11572. return HAL_ERROR;
  11573. 800495e: 2301 movs r3, #1
  11574. 8004960: e07b b.n 8004a5a <HAL_SPI_Init+0x10a>
  11575. assert_param(IS_SPI_DATASIZE(hspi->Init.DataSize));
  11576. assert_param(IS_SPI_NSS(hspi->Init.NSS));
  11577. assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
  11578. assert_param(IS_SPI_FIRST_BIT(hspi->Init.FirstBit));
  11579. assert_param(IS_SPI_TIMODE(hspi->Init.TIMode));
  11580. if (hspi->Init.TIMode == SPI_TIMODE_DISABLE)
  11581. 8004962: 687b ldr r3, [r7, #4]
  11582. 8004964: 6a5b ldr r3, [r3, #36] ; 0x24
  11583. 8004966: 2b00 cmp r3, #0
  11584. 8004968: d108 bne.n 800497c <HAL_SPI_Init+0x2c>
  11585. {
  11586. assert_param(IS_SPI_CPOL(hspi->Init.CLKPolarity));
  11587. assert_param(IS_SPI_CPHA(hspi->Init.CLKPhase));
  11588. if (hspi->Init.Mode == SPI_MODE_MASTER)
  11589. 800496a: 687b ldr r3, [r7, #4]
  11590. 800496c: 685b ldr r3, [r3, #4]
  11591. 800496e: f5b3 7f82 cmp.w r3, #260 ; 0x104
  11592. 8004972: d009 beq.n 8004988 <HAL_SPI_Init+0x38>
  11593. assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
  11594. }
  11595. else
  11596. {
  11597. /* Baudrate prescaler not use in Motoraola Slave mode. force to default value */
  11598. hspi->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
  11599. 8004974: 687b ldr r3, [r7, #4]
  11600. 8004976: 2200 movs r2, #0
  11601. 8004978: 61da str r2, [r3, #28]
  11602. 800497a: e005 b.n 8004988 <HAL_SPI_Init+0x38>
  11603. else
  11604. {
  11605. assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
  11606. /* Force polarity and phase to TI protocaol requirements */
  11607. hspi->Init.CLKPolarity = SPI_POLARITY_LOW;
  11608. 800497c: 687b ldr r3, [r7, #4]
  11609. 800497e: 2200 movs r2, #0
  11610. 8004980: 611a str r2, [r3, #16]
  11611. hspi->Init.CLKPhase = SPI_PHASE_1EDGE;
  11612. 8004982: 687b ldr r3, [r7, #4]
  11613. 8004984: 2200 movs r2, #0
  11614. 8004986: 615a str r2, [r3, #20]
  11615. if (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)
  11616. {
  11617. assert_param(IS_SPI_CRC_POLYNOMIAL(hspi->Init.CRCPolynomial));
  11618. }
  11619. #else
  11620. hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  11621. 8004988: 687b ldr r3, [r7, #4]
  11622. 800498a: 2200 movs r2, #0
  11623. 800498c: 629a str r2, [r3, #40] ; 0x28
  11624. #endif /* USE_SPI_CRC */
  11625. if (hspi->State == HAL_SPI_STATE_RESET)
  11626. 800498e: 687b ldr r3, [r7, #4]
  11627. 8004990: f893 3051 ldrb.w r3, [r3, #81] ; 0x51
  11628. 8004994: b2db uxtb r3, r3
  11629. 8004996: 2b00 cmp r3, #0
  11630. 8004998: d106 bne.n 80049a8 <HAL_SPI_Init+0x58>
  11631. {
  11632. /* Allocate lock resource and initialize it */
  11633. hspi->Lock = HAL_UNLOCKED;
  11634. 800499a: 687b ldr r3, [r7, #4]
  11635. 800499c: 2200 movs r2, #0
  11636. 800499e: f883 2050 strb.w r2, [r3, #80] ; 0x50
  11637. /* Init the low level hardware : GPIO, CLOCK, NVIC... */
  11638. hspi->MspInitCallback(hspi);
  11639. #else
  11640. /* Init the low level hardware : GPIO, CLOCK, NVIC... */
  11641. HAL_SPI_MspInit(hspi);
  11642. 80049a2: 6878 ldr r0, [r7, #4]
  11643. 80049a4: f7fc fa9a bl 8000edc <HAL_SPI_MspInit>
  11644. #endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
  11645. }
  11646. hspi->State = HAL_SPI_STATE_BUSY;
  11647. 80049a8: 687b ldr r3, [r7, #4]
  11648. 80049aa: 2202 movs r2, #2
  11649. 80049ac: f883 2051 strb.w r2, [r3, #81] ; 0x51
  11650. /* Disable the selected SPI peripheral */
  11651. __HAL_SPI_DISABLE(hspi);
  11652. 80049b0: 687b ldr r3, [r7, #4]
  11653. 80049b2: 681b ldr r3, [r3, #0]
  11654. 80049b4: 681a ldr r2, [r3, #0]
  11655. 80049b6: 687b ldr r3, [r7, #4]
  11656. 80049b8: 681b ldr r3, [r3, #0]
  11657. 80049ba: f022 0240 bic.w r2, r2, #64 ; 0x40
  11658. 80049be: 601a str r2, [r3, #0]
  11659. /*----------------------- SPIx CR1 & CR2 Configuration ---------------------*/
  11660. /* Configure : SPI Mode, Communication Mode, Data size, Clock polarity and phase, NSS management,
  11661. Communication speed, First bit and CRC calculation state */
  11662. WRITE_REG(hspi->Instance->CR1, ((hspi->Init.Mode & (SPI_CR1_MSTR | SPI_CR1_SSI)) |
  11663. 80049c0: 687b ldr r3, [r7, #4]
  11664. 80049c2: 685b ldr r3, [r3, #4]
  11665. 80049c4: f403 7282 and.w r2, r3, #260 ; 0x104
  11666. 80049c8: 687b ldr r3, [r7, #4]
  11667. 80049ca: 689b ldr r3, [r3, #8]
  11668. 80049cc: f403 4304 and.w r3, r3, #33792 ; 0x8400
  11669. 80049d0: 431a orrs r2, r3
  11670. 80049d2: 687b ldr r3, [r7, #4]
  11671. 80049d4: 68db ldr r3, [r3, #12]
  11672. 80049d6: f403 6300 and.w r3, r3, #2048 ; 0x800
  11673. 80049da: 431a orrs r2, r3
  11674. 80049dc: 687b ldr r3, [r7, #4]
  11675. 80049de: 691b ldr r3, [r3, #16]
  11676. 80049e0: f003 0302 and.w r3, r3, #2
  11677. 80049e4: 431a orrs r2, r3
  11678. 80049e6: 687b ldr r3, [r7, #4]
  11679. 80049e8: 695b ldr r3, [r3, #20]
  11680. 80049ea: f003 0301 and.w r3, r3, #1
  11681. 80049ee: 431a orrs r2, r3
  11682. 80049f0: 687b ldr r3, [r7, #4]
  11683. 80049f2: 699b ldr r3, [r3, #24]
  11684. 80049f4: f403 7300 and.w r3, r3, #512 ; 0x200
  11685. 80049f8: 431a orrs r2, r3
  11686. 80049fa: 687b ldr r3, [r7, #4]
  11687. 80049fc: 69db ldr r3, [r3, #28]
  11688. 80049fe: f003 0338 and.w r3, r3, #56 ; 0x38
  11689. 8004a02: 431a orrs r2, r3
  11690. 8004a04: 687b ldr r3, [r7, #4]
  11691. 8004a06: 6a1b ldr r3, [r3, #32]
  11692. 8004a08: f003 0380 and.w r3, r3, #128 ; 0x80
  11693. 8004a0c: ea42 0103 orr.w r1, r2, r3
  11694. 8004a10: 687b ldr r3, [r7, #4]
  11695. 8004a12: 6a9b ldr r3, [r3, #40] ; 0x28
  11696. 8004a14: f403 5200 and.w r2, r3, #8192 ; 0x2000
  11697. 8004a18: 687b ldr r3, [r7, #4]
  11698. 8004a1a: 681b ldr r3, [r3, #0]
  11699. 8004a1c: 430a orrs r2, r1
  11700. 8004a1e: 601a str r2, [r3, #0]
  11701. (hspi->Init.BaudRatePrescaler & SPI_CR1_BR_Msk) |
  11702. (hspi->Init.FirstBit & SPI_CR1_LSBFIRST) |
  11703. (hspi->Init.CRCCalculation & SPI_CR1_CRCEN)));
  11704. /* Configure : NSS management, TI Mode */
  11705. WRITE_REG(hspi->Instance->CR2, (((hspi->Init.NSS >> 16U) & SPI_CR2_SSOE) | (hspi->Init.TIMode & SPI_CR2_FRF)));
  11706. 8004a20: 687b ldr r3, [r7, #4]
  11707. 8004a22: 699b ldr r3, [r3, #24]
  11708. 8004a24: 0c1b lsrs r3, r3, #16
  11709. 8004a26: f003 0104 and.w r1, r3, #4
  11710. 8004a2a: 687b ldr r3, [r7, #4]
  11711. 8004a2c: 6a5b ldr r3, [r3, #36] ; 0x24
  11712. 8004a2e: f003 0210 and.w r2, r3, #16
  11713. 8004a32: 687b ldr r3, [r7, #4]
  11714. 8004a34: 681b ldr r3, [r3, #0]
  11715. 8004a36: 430a orrs r2, r1
  11716. 8004a38: 605a str r2, [r3, #4]
  11717. }
  11718. #endif /* USE_SPI_CRC */
  11719. #if defined(SPI_I2SCFGR_I2SMOD)
  11720. /* Activate the SPI mode (Make sure that I2SMOD bit in I2SCFGR register is reset) */
  11721. CLEAR_BIT(hspi->Instance->I2SCFGR, SPI_I2SCFGR_I2SMOD);
  11722. 8004a3a: 687b ldr r3, [r7, #4]
  11723. 8004a3c: 681b ldr r3, [r3, #0]
  11724. 8004a3e: 69da ldr r2, [r3, #28]
  11725. 8004a40: 687b ldr r3, [r7, #4]
  11726. 8004a42: 681b ldr r3, [r3, #0]
  11727. 8004a44: f422 6200 bic.w r2, r2, #2048 ; 0x800
  11728. 8004a48: 61da str r2, [r3, #28]
  11729. #endif /* SPI_I2SCFGR_I2SMOD */
  11730. hspi->ErrorCode = HAL_SPI_ERROR_NONE;
  11731. 8004a4a: 687b ldr r3, [r7, #4]
  11732. 8004a4c: 2200 movs r2, #0
  11733. 8004a4e: 655a str r2, [r3, #84] ; 0x54
  11734. hspi->State = HAL_SPI_STATE_READY;
  11735. 8004a50: 687b ldr r3, [r7, #4]
  11736. 8004a52: 2201 movs r2, #1
  11737. 8004a54: f883 2051 strb.w r2, [r3, #81] ; 0x51
  11738. return HAL_OK;
  11739. 8004a58: 2300 movs r3, #0
  11740. }
  11741. 8004a5a: 4618 mov r0, r3
  11742. 8004a5c: 3708 adds r7, #8
  11743. 8004a5e: 46bd mov sp, r7
  11744. 8004a60: bd80 pop {r7, pc}
  11745. 08004a62 <HAL_TIM_Base_Init>:
  11746. * Ex: call @ref HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init()
  11747. * @param htim TIM Base handle
  11748. * @retval HAL status
  11749. */
  11750. HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)
  11751. {
  11752. 8004a62: b580 push {r7, lr}
  11753. 8004a64: b082 sub sp, #8
  11754. 8004a66: af00 add r7, sp, #0
  11755. 8004a68: 6078 str r0, [r7, #4]
  11756. /* Check the TIM handle allocation */
  11757. if (htim == NULL)
  11758. 8004a6a: 687b ldr r3, [r7, #4]
  11759. 8004a6c: 2b00 cmp r3, #0
  11760. 8004a6e: d101 bne.n 8004a74 <HAL_TIM_Base_Init+0x12>
  11761. {
  11762. return HAL_ERROR;
  11763. 8004a70: 2301 movs r3, #1
  11764. 8004a72: e041 b.n 8004af8 <HAL_TIM_Base_Init+0x96>
  11765. assert_param(IS_TIM_INSTANCE(htim->Instance));
  11766. assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
  11767. assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
  11768. assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
  11769. if (htim->State == HAL_TIM_STATE_RESET)
  11770. 8004a74: 687b ldr r3, [r7, #4]
  11771. 8004a76: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
  11772. 8004a7a: b2db uxtb r3, r3
  11773. 8004a7c: 2b00 cmp r3, #0
  11774. 8004a7e: d106 bne.n 8004a8e <HAL_TIM_Base_Init+0x2c>
  11775. {
  11776. /* Allocate lock resource and initialize it */
  11777. htim->Lock = HAL_UNLOCKED;
  11778. 8004a80: 687b ldr r3, [r7, #4]
  11779. 8004a82: 2200 movs r2, #0
  11780. 8004a84: f883 203c strb.w r2, [r3, #60] ; 0x3c
  11781. }
  11782. /* Init the low level hardware : GPIO, CLOCK, NVIC */
  11783. htim->Base_MspInitCallback(htim);
  11784. #else
  11785. /* Init the low level hardware : GPIO, CLOCK, NVIC */
  11786. HAL_TIM_Base_MspInit(htim);
  11787. 8004a88: 6878 ldr r0, [r7, #4]
  11788. 8004a8a: f7fc faa3 bl 8000fd4 <HAL_TIM_Base_MspInit>
  11789. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  11790. }
  11791. /* Set the TIM state */
  11792. htim->State = HAL_TIM_STATE_BUSY;
  11793. 8004a8e: 687b ldr r3, [r7, #4]
  11794. 8004a90: 2202 movs r2, #2
  11795. 8004a92: f883 203d strb.w r2, [r3, #61] ; 0x3d
  11796. /* Set the Time Base configuration */
  11797. TIM_Base_SetConfig(htim->Instance, &htim->Init);
  11798. 8004a96: 687b ldr r3, [r7, #4]
  11799. 8004a98: 681a ldr r2, [r3, #0]
  11800. 8004a9a: 687b ldr r3, [r7, #4]
  11801. 8004a9c: 3304 adds r3, #4
  11802. 8004a9e: 4619 mov r1, r3
  11803. 8004aa0: 4610 mov r0, r2
  11804. 8004aa2: f000 f86f bl 8004b84 <TIM_Base_SetConfig>
  11805. /* Initialize the DMA burst operation state */
  11806. htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
  11807. 8004aa6: 687b ldr r3, [r7, #4]
  11808. 8004aa8: 2201 movs r2, #1
  11809. 8004aaa: f883 2046 strb.w r2, [r3, #70] ; 0x46
  11810. /* Initialize the TIM channels state */
  11811. TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  11812. 8004aae: 687b ldr r3, [r7, #4]
  11813. 8004ab0: 2201 movs r2, #1
  11814. 8004ab2: f883 203e strb.w r2, [r3, #62] ; 0x3e
  11815. 8004ab6: 687b ldr r3, [r7, #4]
  11816. 8004ab8: 2201 movs r2, #1
  11817. 8004aba: f883 203f strb.w r2, [r3, #63] ; 0x3f
  11818. 8004abe: 687b ldr r3, [r7, #4]
  11819. 8004ac0: 2201 movs r2, #1
  11820. 8004ac2: f883 2040 strb.w r2, [r3, #64] ; 0x40
  11821. 8004ac6: 687b ldr r3, [r7, #4]
  11822. 8004ac8: 2201 movs r2, #1
  11823. 8004aca: f883 2041 strb.w r2, [r3, #65] ; 0x41
  11824. TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  11825. 8004ace: 687b ldr r3, [r7, #4]
  11826. 8004ad0: 2201 movs r2, #1
  11827. 8004ad2: f883 2042 strb.w r2, [r3, #66] ; 0x42
  11828. 8004ad6: 687b ldr r3, [r7, #4]
  11829. 8004ad8: 2201 movs r2, #1
  11830. 8004ada: f883 2043 strb.w r2, [r3, #67] ; 0x43
  11831. 8004ade: 687b ldr r3, [r7, #4]
  11832. 8004ae0: 2201 movs r2, #1
  11833. 8004ae2: f883 2044 strb.w r2, [r3, #68] ; 0x44
  11834. 8004ae6: 687b ldr r3, [r7, #4]
  11835. 8004ae8: 2201 movs r2, #1
  11836. 8004aea: f883 2045 strb.w r2, [r3, #69] ; 0x45
  11837. /* Initialize the TIM state*/
  11838. htim->State = HAL_TIM_STATE_READY;
  11839. 8004aee: 687b ldr r3, [r7, #4]
  11840. 8004af0: 2201 movs r2, #1
  11841. 8004af2: f883 203d strb.w r2, [r3, #61] ; 0x3d
  11842. return HAL_OK;
  11843. 8004af6: 2300 movs r3, #0
  11844. }
  11845. 8004af8: 4618 mov r0, r3
  11846. 8004afa: 3708 adds r7, #8
  11847. 8004afc: 46bd mov sp, r7
  11848. 8004afe: bd80 pop {r7, pc}
  11849. 08004b00 <HAL_TIM_SlaveConfigSynchro>:
  11850. * timer input or external trigger input) and the Slave mode
  11851. * (Disable, Reset, Gated, Trigger, External clock mode 1).
  11852. * @retval HAL status
  11853. */
  11854. HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig)
  11855. {
  11856. 8004b00: b580 push {r7, lr}
  11857. 8004b02: b082 sub sp, #8
  11858. 8004b04: af00 add r7, sp, #0
  11859. 8004b06: 6078 str r0, [r7, #4]
  11860. 8004b08: 6039 str r1, [r7, #0]
  11861. /* Check the parameters */
  11862. assert_param(IS_TIM_SLAVE_INSTANCE(htim->Instance));
  11863. assert_param(IS_TIM_SLAVE_MODE(sSlaveConfig->SlaveMode));
  11864. assert_param(IS_TIM_TRIGGER_SELECTION(sSlaveConfig->InputTrigger));
  11865. __HAL_LOCK(htim);
  11866. 8004b0a: 687b ldr r3, [r7, #4]
  11867. 8004b0c: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
  11868. 8004b10: 2b01 cmp r3, #1
  11869. 8004b12: d101 bne.n 8004b18 <HAL_TIM_SlaveConfigSynchro+0x18>
  11870. 8004b14: 2302 movs r3, #2
  11871. 8004b16: e031 b.n 8004b7c <HAL_TIM_SlaveConfigSynchro+0x7c>
  11872. 8004b18: 687b ldr r3, [r7, #4]
  11873. 8004b1a: 2201 movs r2, #1
  11874. 8004b1c: f883 203c strb.w r2, [r3, #60] ; 0x3c
  11875. htim->State = HAL_TIM_STATE_BUSY;
  11876. 8004b20: 687b ldr r3, [r7, #4]
  11877. 8004b22: 2202 movs r2, #2
  11878. 8004b24: f883 203d strb.w r2, [r3, #61] ; 0x3d
  11879. if (TIM_SlaveTimer_SetConfig(htim, sSlaveConfig) != HAL_OK)
  11880. 8004b28: 6839 ldr r1, [r7, #0]
  11881. 8004b2a: 6878 ldr r0, [r7, #4]
  11882. 8004b2c: f000 f8ca bl 8004cc4 <TIM_SlaveTimer_SetConfig>
  11883. 8004b30: 4603 mov r3, r0
  11884. 8004b32: 2b00 cmp r3, #0
  11885. 8004b34: d009 beq.n 8004b4a <HAL_TIM_SlaveConfigSynchro+0x4a>
  11886. {
  11887. htim->State = HAL_TIM_STATE_READY;
  11888. 8004b36: 687b ldr r3, [r7, #4]
  11889. 8004b38: 2201 movs r2, #1
  11890. 8004b3a: f883 203d strb.w r2, [r3, #61] ; 0x3d
  11891. __HAL_UNLOCK(htim);
  11892. 8004b3e: 687b ldr r3, [r7, #4]
  11893. 8004b40: 2200 movs r2, #0
  11894. 8004b42: f883 203c strb.w r2, [r3, #60] ; 0x3c
  11895. return HAL_ERROR;
  11896. 8004b46: 2301 movs r3, #1
  11897. 8004b48: e018 b.n 8004b7c <HAL_TIM_SlaveConfigSynchro+0x7c>
  11898. }
  11899. /* Disable Trigger Interrupt */
  11900. __HAL_TIM_DISABLE_IT(htim, TIM_IT_TRIGGER);
  11901. 8004b4a: 687b ldr r3, [r7, #4]
  11902. 8004b4c: 681b ldr r3, [r3, #0]
  11903. 8004b4e: 68da ldr r2, [r3, #12]
  11904. 8004b50: 687b ldr r3, [r7, #4]
  11905. 8004b52: 681b ldr r3, [r3, #0]
  11906. 8004b54: f022 0240 bic.w r2, r2, #64 ; 0x40
  11907. 8004b58: 60da str r2, [r3, #12]
  11908. /* Disable Trigger DMA request */
  11909. __HAL_TIM_DISABLE_DMA(htim, TIM_DMA_TRIGGER);
  11910. 8004b5a: 687b ldr r3, [r7, #4]
  11911. 8004b5c: 681b ldr r3, [r3, #0]
  11912. 8004b5e: 68da ldr r2, [r3, #12]
  11913. 8004b60: 687b ldr r3, [r7, #4]
  11914. 8004b62: 681b ldr r3, [r3, #0]
  11915. 8004b64: f422 4280 bic.w r2, r2, #16384 ; 0x4000
  11916. 8004b68: 60da str r2, [r3, #12]
  11917. htim->State = HAL_TIM_STATE_READY;
  11918. 8004b6a: 687b ldr r3, [r7, #4]
  11919. 8004b6c: 2201 movs r2, #1
  11920. 8004b6e: f883 203d strb.w r2, [r3, #61] ; 0x3d
  11921. __HAL_UNLOCK(htim);
  11922. 8004b72: 687b ldr r3, [r7, #4]
  11923. 8004b74: 2200 movs r2, #0
  11924. 8004b76: f883 203c strb.w r2, [r3, #60] ; 0x3c
  11925. return HAL_OK;
  11926. 8004b7a: 2300 movs r3, #0
  11927. }
  11928. 8004b7c: 4618 mov r0, r3
  11929. 8004b7e: 3708 adds r7, #8
  11930. 8004b80: 46bd mov sp, r7
  11931. 8004b82: bd80 pop {r7, pc}
  11932. 08004b84 <TIM_Base_SetConfig>:
  11933. * @param TIMx TIM peripheral
  11934. * @param Structure TIM Base configuration structure
  11935. * @retval None
  11936. */
  11937. void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
  11938. {
  11939. 8004b84: b480 push {r7}
  11940. 8004b86: b085 sub sp, #20
  11941. 8004b88: af00 add r7, sp, #0
  11942. 8004b8a: 6078 str r0, [r7, #4]
  11943. 8004b8c: 6039 str r1, [r7, #0]
  11944. uint32_t tmpcr1;
  11945. tmpcr1 = TIMx->CR1;
  11946. 8004b8e: 687b ldr r3, [r7, #4]
  11947. 8004b90: 681b ldr r3, [r3, #0]
  11948. 8004b92: 60fb str r3, [r7, #12]
  11949. /* Set TIM Time Base Unit parameters ---------------------------------------*/
  11950. if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
  11951. 8004b94: 687b ldr r3, [r7, #4]
  11952. 8004b96: 4a40 ldr r2, [pc, #256] ; (8004c98 <TIM_Base_SetConfig+0x114>)
  11953. 8004b98: 4293 cmp r3, r2
  11954. 8004b9a: d013 beq.n 8004bc4 <TIM_Base_SetConfig+0x40>
  11955. 8004b9c: 687b ldr r3, [r7, #4]
  11956. 8004b9e: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
  11957. 8004ba2: d00f beq.n 8004bc4 <TIM_Base_SetConfig+0x40>
  11958. 8004ba4: 687b ldr r3, [r7, #4]
  11959. 8004ba6: 4a3d ldr r2, [pc, #244] ; (8004c9c <TIM_Base_SetConfig+0x118>)
  11960. 8004ba8: 4293 cmp r3, r2
  11961. 8004baa: d00b beq.n 8004bc4 <TIM_Base_SetConfig+0x40>
  11962. 8004bac: 687b ldr r3, [r7, #4]
  11963. 8004bae: 4a3c ldr r2, [pc, #240] ; (8004ca0 <TIM_Base_SetConfig+0x11c>)
  11964. 8004bb0: 4293 cmp r3, r2
  11965. 8004bb2: d007 beq.n 8004bc4 <TIM_Base_SetConfig+0x40>
  11966. 8004bb4: 687b ldr r3, [r7, #4]
  11967. 8004bb6: 4a3b ldr r2, [pc, #236] ; (8004ca4 <TIM_Base_SetConfig+0x120>)
  11968. 8004bb8: 4293 cmp r3, r2
  11969. 8004bba: d003 beq.n 8004bc4 <TIM_Base_SetConfig+0x40>
  11970. 8004bbc: 687b ldr r3, [r7, #4]
  11971. 8004bbe: 4a3a ldr r2, [pc, #232] ; (8004ca8 <TIM_Base_SetConfig+0x124>)
  11972. 8004bc0: 4293 cmp r3, r2
  11973. 8004bc2: d108 bne.n 8004bd6 <TIM_Base_SetConfig+0x52>
  11974. {
  11975. /* Select the Counter Mode */
  11976. tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
  11977. 8004bc4: 68fb ldr r3, [r7, #12]
  11978. 8004bc6: f023 0370 bic.w r3, r3, #112 ; 0x70
  11979. 8004bca: 60fb str r3, [r7, #12]
  11980. tmpcr1 |= Structure->CounterMode;
  11981. 8004bcc: 683b ldr r3, [r7, #0]
  11982. 8004bce: 685b ldr r3, [r3, #4]
  11983. 8004bd0: 68fa ldr r2, [r7, #12]
  11984. 8004bd2: 4313 orrs r3, r2
  11985. 8004bd4: 60fb str r3, [r7, #12]
  11986. }
  11987. if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
  11988. 8004bd6: 687b ldr r3, [r7, #4]
  11989. 8004bd8: 4a2f ldr r2, [pc, #188] ; (8004c98 <TIM_Base_SetConfig+0x114>)
  11990. 8004bda: 4293 cmp r3, r2
  11991. 8004bdc: d02b beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  11992. 8004bde: 687b ldr r3, [r7, #4]
  11993. 8004be0: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
  11994. 8004be4: d027 beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  11995. 8004be6: 687b ldr r3, [r7, #4]
  11996. 8004be8: 4a2c ldr r2, [pc, #176] ; (8004c9c <TIM_Base_SetConfig+0x118>)
  11997. 8004bea: 4293 cmp r3, r2
  11998. 8004bec: d023 beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  11999. 8004bee: 687b ldr r3, [r7, #4]
  12000. 8004bf0: 4a2b ldr r2, [pc, #172] ; (8004ca0 <TIM_Base_SetConfig+0x11c>)
  12001. 8004bf2: 4293 cmp r3, r2
  12002. 8004bf4: d01f beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12003. 8004bf6: 687b ldr r3, [r7, #4]
  12004. 8004bf8: 4a2a ldr r2, [pc, #168] ; (8004ca4 <TIM_Base_SetConfig+0x120>)
  12005. 8004bfa: 4293 cmp r3, r2
  12006. 8004bfc: d01b beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12007. 8004bfe: 687b ldr r3, [r7, #4]
  12008. 8004c00: 4a29 ldr r2, [pc, #164] ; (8004ca8 <TIM_Base_SetConfig+0x124>)
  12009. 8004c02: 4293 cmp r3, r2
  12010. 8004c04: d017 beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12011. 8004c06: 687b ldr r3, [r7, #4]
  12012. 8004c08: 4a28 ldr r2, [pc, #160] ; (8004cac <TIM_Base_SetConfig+0x128>)
  12013. 8004c0a: 4293 cmp r3, r2
  12014. 8004c0c: d013 beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12015. 8004c0e: 687b ldr r3, [r7, #4]
  12016. 8004c10: 4a27 ldr r2, [pc, #156] ; (8004cb0 <TIM_Base_SetConfig+0x12c>)
  12017. 8004c12: 4293 cmp r3, r2
  12018. 8004c14: d00f beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12019. 8004c16: 687b ldr r3, [r7, #4]
  12020. 8004c18: 4a26 ldr r2, [pc, #152] ; (8004cb4 <TIM_Base_SetConfig+0x130>)
  12021. 8004c1a: 4293 cmp r3, r2
  12022. 8004c1c: d00b beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12023. 8004c1e: 687b ldr r3, [r7, #4]
  12024. 8004c20: 4a25 ldr r2, [pc, #148] ; (8004cb8 <TIM_Base_SetConfig+0x134>)
  12025. 8004c22: 4293 cmp r3, r2
  12026. 8004c24: d007 beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12027. 8004c26: 687b ldr r3, [r7, #4]
  12028. 8004c28: 4a24 ldr r2, [pc, #144] ; (8004cbc <TIM_Base_SetConfig+0x138>)
  12029. 8004c2a: 4293 cmp r3, r2
  12030. 8004c2c: d003 beq.n 8004c36 <TIM_Base_SetConfig+0xb2>
  12031. 8004c2e: 687b ldr r3, [r7, #4]
  12032. 8004c30: 4a23 ldr r2, [pc, #140] ; (8004cc0 <TIM_Base_SetConfig+0x13c>)
  12033. 8004c32: 4293 cmp r3, r2
  12034. 8004c34: d108 bne.n 8004c48 <TIM_Base_SetConfig+0xc4>
  12035. {
  12036. /* Set the clock division */
  12037. tmpcr1 &= ~TIM_CR1_CKD;
  12038. 8004c36: 68fb ldr r3, [r7, #12]
  12039. 8004c38: f423 7340 bic.w r3, r3, #768 ; 0x300
  12040. 8004c3c: 60fb str r3, [r7, #12]
  12041. tmpcr1 |= (uint32_t)Structure->ClockDivision;
  12042. 8004c3e: 683b ldr r3, [r7, #0]
  12043. 8004c40: 68db ldr r3, [r3, #12]
  12044. 8004c42: 68fa ldr r2, [r7, #12]
  12045. 8004c44: 4313 orrs r3, r2
  12046. 8004c46: 60fb str r3, [r7, #12]
  12047. }
  12048. /* Set the auto-reload preload */
  12049. MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
  12050. 8004c48: 68fb ldr r3, [r7, #12]
  12051. 8004c4a: f023 0280 bic.w r2, r3, #128 ; 0x80
  12052. 8004c4e: 683b ldr r3, [r7, #0]
  12053. 8004c50: 695b ldr r3, [r3, #20]
  12054. 8004c52: 4313 orrs r3, r2
  12055. 8004c54: 60fb str r3, [r7, #12]
  12056. TIMx->CR1 = tmpcr1;
  12057. 8004c56: 687b ldr r3, [r7, #4]
  12058. 8004c58: 68fa ldr r2, [r7, #12]
  12059. 8004c5a: 601a str r2, [r3, #0]
  12060. /* Set the Autoreload value */
  12061. TIMx->ARR = (uint32_t)Structure->Period ;
  12062. 8004c5c: 683b ldr r3, [r7, #0]
  12063. 8004c5e: 689a ldr r2, [r3, #8]
  12064. 8004c60: 687b ldr r3, [r7, #4]
  12065. 8004c62: 62da str r2, [r3, #44] ; 0x2c
  12066. /* Set the Prescaler value */
  12067. TIMx->PSC = Structure->Prescaler;
  12068. 8004c64: 683b ldr r3, [r7, #0]
  12069. 8004c66: 681a ldr r2, [r3, #0]
  12070. 8004c68: 687b ldr r3, [r7, #4]
  12071. 8004c6a: 629a str r2, [r3, #40] ; 0x28
  12072. if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
  12073. 8004c6c: 687b ldr r3, [r7, #4]
  12074. 8004c6e: 4a0a ldr r2, [pc, #40] ; (8004c98 <TIM_Base_SetConfig+0x114>)
  12075. 8004c70: 4293 cmp r3, r2
  12076. 8004c72: d003 beq.n 8004c7c <TIM_Base_SetConfig+0xf8>
  12077. 8004c74: 687b ldr r3, [r7, #4]
  12078. 8004c76: 4a0c ldr r2, [pc, #48] ; (8004ca8 <TIM_Base_SetConfig+0x124>)
  12079. 8004c78: 4293 cmp r3, r2
  12080. 8004c7a: d103 bne.n 8004c84 <TIM_Base_SetConfig+0x100>
  12081. {
  12082. /* Set the Repetition Counter value */
  12083. TIMx->RCR = Structure->RepetitionCounter;
  12084. 8004c7c: 683b ldr r3, [r7, #0]
  12085. 8004c7e: 691a ldr r2, [r3, #16]
  12086. 8004c80: 687b ldr r3, [r7, #4]
  12087. 8004c82: 631a str r2, [r3, #48] ; 0x30
  12088. }
  12089. /* Generate an update event to reload the Prescaler
  12090. and the repetition counter (only for advanced timer) value immediately */
  12091. TIMx->EGR = TIM_EGR_UG;
  12092. 8004c84: 687b ldr r3, [r7, #4]
  12093. 8004c86: 2201 movs r2, #1
  12094. 8004c88: 615a str r2, [r3, #20]
  12095. }
  12096. 8004c8a: bf00 nop
  12097. 8004c8c: 3714 adds r7, #20
  12098. 8004c8e: 46bd mov sp, r7
  12099. 8004c90: f85d 7b04 ldr.w r7, [sp], #4
  12100. 8004c94: 4770 bx lr
  12101. 8004c96: bf00 nop
  12102. 8004c98: 40010000 .word 0x40010000
  12103. 8004c9c: 40000400 .word 0x40000400
  12104. 8004ca0: 40000800 .word 0x40000800
  12105. 8004ca4: 40000c00 .word 0x40000c00
  12106. 8004ca8: 40010400 .word 0x40010400
  12107. 8004cac: 40014000 .word 0x40014000
  12108. 8004cb0: 40014400 .word 0x40014400
  12109. 8004cb4: 40014800 .word 0x40014800
  12110. 8004cb8: 40001800 .word 0x40001800
  12111. 8004cbc: 40001c00 .word 0x40001c00
  12112. 8004cc0: 40002000 .word 0x40002000
  12113. 08004cc4 <TIM_SlaveTimer_SetConfig>:
  12114. * @param sSlaveConfig Slave timer configuration
  12115. * @retval None
  12116. */
  12117. static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim,
  12118. TIM_SlaveConfigTypeDef *sSlaveConfig)
  12119. {
  12120. 8004cc4: b580 push {r7, lr}
  12121. 8004cc6: b086 sub sp, #24
  12122. 8004cc8: af00 add r7, sp, #0
  12123. 8004cca: 6078 str r0, [r7, #4]
  12124. 8004ccc: 6039 str r1, [r7, #0]
  12125. HAL_StatusTypeDef status = HAL_OK;
  12126. 8004cce: 2300 movs r3, #0
  12127. 8004cd0: 75fb strb r3, [r7, #23]
  12128. uint32_t tmpsmcr;
  12129. uint32_t tmpccmr1;
  12130. uint32_t tmpccer;
  12131. /* Get the TIMx SMCR register value */
  12132. tmpsmcr = htim->Instance->SMCR;
  12133. 8004cd2: 687b ldr r3, [r7, #4]
  12134. 8004cd4: 681b ldr r3, [r3, #0]
  12135. 8004cd6: 689b ldr r3, [r3, #8]
  12136. 8004cd8: 613b str r3, [r7, #16]
  12137. /* Reset the Trigger Selection Bits */
  12138. tmpsmcr &= ~TIM_SMCR_TS;
  12139. 8004cda: 693b ldr r3, [r7, #16]
  12140. 8004cdc: f023 0370 bic.w r3, r3, #112 ; 0x70
  12141. 8004ce0: 613b str r3, [r7, #16]
  12142. /* Set the Input Trigger source */
  12143. tmpsmcr |= sSlaveConfig->InputTrigger;
  12144. 8004ce2: 683b ldr r3, [r7, #0]
  12145. 8004ce4: 685b ldr r3, [r3, #4]
  12146. 8004ce6: 693a ldr r2, [r7, #16]
  12147. 8004ce8: 4313 orrs r3, r2
  12148. 8004cea: 613b str r3, [r7, #16]
  12149. /* Reset the slave mode Bits */
  12150. tmpsmcr &= ~TIM_SMCR_SMS;
  12151. 8004cec: 693b ldr r3, [r7, #16]
  12152. 8004cee: f023 0307 bic.w r3, r3, #7
  12153. 8004cf2: 613b str r3, [r7, #16]
  12154. /* Set the slave mode */
  12155. tmpsmcr |= sSlaveConfig->SlaveMode;
  12156. 8004cf4: 683b ldr r3, [r7, #0]
  12157. 8004cf6: 681b ldr r3, [r3, #0]
  12158. 8004cf8: 693a ldr r2, [r7, #16]
  12159. 8004cfa: 4313 orrs r3, r2
  12160. 8004cfc: 613b str r3, [r7, #16]
  12161. /* Write to TIMx SMCR */
  12162. htim->Instance->SMCR = tmpsmcr;
  12163. 8004cfe: 687b ldr r3, [r7, #4]
  12164. 8004d00: 681b ldr r3, [r3, #0]
  12165. 8004d02: 693a ldr r2, [r7, #16]
  12166. 8004d04: 609a str r2, [r3, #8]
  12167. /* Configure the trigger prescaler, filter, and polarity */
  12168. switch (sSlaveConfig->InputTrigger)
  12169. 8004d06: 683b ldr r3, [r7, #0]
  12170. 8004d08: 685b ldr r3, [r3, #4]
  12171. 8004d0a: 2b70 cmp r3, #112 ; 0x70
  12172. 8004d0c: d01a beq.n 8004d44 <TIM_SlaveTimer_SetConfig+0x80>
  12173. 8004d0e: 2b70 cmp r3, #112 ; 0x70
  12174. 8004d10: d860 bhi.n 8004dd4 <TIM_SlaveTimer_SetConfig+0x110>
  12175. 8004d12: 2b60 cmp r3, #96 ; 0x60
  12176. 8004d14: d054 beq.n 8004dc0 <TIM_SlaveTimer_SetConfig+0xfc>
  12177. 8004d16: 2b60 cmp r3, #96 ; 0x60
  12178. 8004d18: d85c bhi.n 8004dd4 <TIM_SlaveTimer_SetConfig+0x110>
  12179. 8004d1a: 2b50 cmp r3, #80 ; 0x50
  12180. 8004d1c: d046 beq.n 8004dac <TIM_SlaveTimer_SetConfig+0xe8>
  12181. 8004d1e: 2b50 cmp r3, #80 ; 0x50
  12182. 8004d20: d858 bhi.n 8004dd4 <TIM_SlaveTimer_SetConfig+0x110>
  12183. 8004d22: 2b40 cmp r3, #64 ; 0x40
  12184. 8004d24: d019 beq.n 8004d5a <TIM_SlaveTimer_SetConfig+0x96>
  12185. 8004d26: 2b40 cmp r3, #64 ; 0x40
  12186. 8004d28: d854 bhi.n 8004dd4 <TIM_SlaveTimer_SetConfig+0x110>
  12187. 8004d2a: 2b30 cmp r3, #48 ; 0x30
  12188. 8004d2c: d055 beq.n 8004dda <TIM_SlaveTimer_SetConfig+0x116>
  12189. 8004d2e: 2b30 cmp r3, #48 ; 0x30
  12190. 8004d30: d850 bhi.n 8004dd4 <TIM_SlaveTimer_SetConfig+0x110>
  12191. 8004d32: 2b20 cmp r3, #32
  12192. 8004d34: d051 beq.n 8004dda <TIM_SlaveTimer_SetConfig+0x116>
  12193. 8004d36: 2b20 cmp r3, #32
  12194. 8004d38: d84c bhi.n 8004dd4 <TIM_SlaveTimer_SetConfig+0x110>
  12195. 8004d3a: 2b00 cmp r3, #0
  12196. 8004d3c: d04d beq.n 8004dda <TIM_SlaveTimer_SetConfig+0x116>
  12197. 8004d3e: 2b10 cmp r3, #16
  12198. 8004d40: d04b beq.n 8004dda <TIM_SlaveTimer_SetConfig+0x116>
  12199. 8004d42: e047 b.n 8004dd4 <TIM_SlaveTimer_SetConfig+0x110>
  12200. assert_param(IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE(htim->Instance));
  12201. assert_param(IS_TIM_TRIGGERPRESCALER(sSlaveConfig->TriggerPrescaler));
  12202. assert_param(IS_TIM_TRIGGERPOLARITY(sSlaveConfig->TriggerPolarity));
  12203. assert_param(IS_TIM_TRIGGERFILTER(sSlaveConfig->TriggerFilter));
  12204. /* Configure the ETR Trigger source */
  12205. TIM_ETR_SetConfig(htim->Instance,
  12206. 8004d44: 687b ldr r3, [r7, #4]
  12207. 8004d46: 6818 ldr r0, [r3, #0]
  12208. 8004d48: 683b ldr r3, [r7, #0]
  12209. 8004d4a: 68d9 ldr r1, [r3, #12]
  12210. 8004d4c: 683b ldr r3, [r7, #0]
  12211. 8004d4e: 689a ldr r2, [r3, #8]
  12212. 8004d50: 683b ldr r3, [r7, #0]
  12213. 8004d52: 691b ldr r3, [r3, #16]
  12214. 8004d54: f000 f8a6 bl 8004ea4 <TIM_ETR_SetConfig>
  12215. sSlaveConfig->TriggerPrescaler,
  12216. sSlaveConfig->TriggerPolarity,
  12217. sSlaveConfig->TriggerFilter);
  12218. break;
  12219. 8004d58: e040 b.n 8004ddc <TIM_SlaveTimer_SetConfig+0x118>
  12220. {
  12221. /* Check the parameters */
  12222. assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
  12223. assert_param(IS_TIM_TRIGGERFILTER(sSlaveConfig->TriggerFilter));
  12224. if (sSlaveConfig->SlaveMode == TIM_SLAVEMODE_GATED)
  12225. 8004d5a: 683b ldr r3, [r7, #0]
  12226. 8004d5c: 681b ldr r3, [r3, #0]
  12227. 8004d5e: 2b05 cmp r3, #5
  12228. 8004d60: d101 bne.n 8004d66 <TIM_SlaveTimer_SetConfig+0xa2>
  12229. {
  12230. return HAL_ERROR;
  12231. 8004d62: 2301 movs r3, #1
  12232. 8004d64: e03b b.n 8004dde <TIM_SlaveTimer_SetConfig+0x11a>
  12233. }
  12234. /* Disable the Channel 1: Reset the CC1E Bit */
  12235. tmpccer = htim->Instance->CCER;
  12236. 8004d66: 687b ldr r3, [r7, #4]
  12237. 8004d68: 681b ldr r3, [r3, #0]
  12238. 8004d6a: 6a1b ldr r3, [r3, #32]
  12239. 8004d6c: 60fb str r3, [r7, #12]
  12240. htim->Instance->CCER &= ~TIM_CCER_CC1E;
  12241. 8004d6e: 687b ldr r3, [r7, #4]
  12242. 8004d70: 681b ldr r3, [r3, #0]
  12243. 8004d72: 6a1a ldr r2, [r3, #32]
  12244. 8004d74: 687b ldr r3, [r7, #4]
  12245. 8004d76: 681b ldr r3, [r3, #0]
  12246. 8004d78: f022 0201 bic.w r2, r2, #1
  12247. 8004d7c: 621a str r2, [r3, #32]
  12248. tmpccmr1 = htim->Instance->CCMR1;
  12249. 8004d7e: 687b ldr r3, [r7, #4]
  12250. 8004d80: 681b ldr r3, [r3, #0]
  12251. 8004d82: 699b ldr r3, [r3, #24]
  12252. 8004d84: 60bb str r3, [r7, #8]
  12253. /* Set the filter */
  12254. tmpccmr1 &= ~TIM_CCMR1_IC1F;
  12255. 8004d86: 68bb ldr r3, [r7, #8]
  12256. 8004d88: f023 03f0 bic.w r3, r3, #240 ; 0xf0
  12257. 8004d8c: 60bb str r3, [r7, #8]
  12258. tmpccmr1 |= ((sSlaveConfig->TriggerFilter) << 4U);
  12259. 8004d8e: 683b ldr r3, [r7, #0]
  12260. 8004d90: 691b ldr r3, [r3, #16]
  12261. 8004d92: 011b lsls r3, r3, #4
  12262. 8004d94: 68ba ldr r2, [r7, #8]
  12263. 8004d96: 4313 orrs r3, r2
  12264. 8004d98: 60bb str r3, [r7, #8]
  12265. /* Write to TIMx CCMR1 and CCER registers */
  12266. htim->Instance->CCMR1 = tmpccmr1;
  12267. 8004d9a: 687b ldr r3, [r7, #4]
  12268. 8004d9c: 681b ldr r3, [r3, #0]
  12269. 8004d9e: 68ba ldr r2, [r7, #8]
  12270. 8004da0: 619a str r2, [r3, #24]
  12271. htim->Instance->CCER = tmpccer;
  12272. 8004da2: 687b ldr r3, [r7, #4]
  12273. 8004da4: 681b ldr r3, [r3, #0]
  12274. 8004da6: 68fa ldr r2, [r7, #12]
  12275. 8004da8: 621a str r2, [r3, #32]
  12276. break;
  12277. 8004daa: e017 b.n 8004ddc <TIM_SlaveTimer_SetConfig+0x118>
  12278. assert_param(IS_TIM_CC1_INSTANCE(htim->Instance));
  12279. assert_param(IS_TIM_TRIGGERPOLARITY(sSlaveConfig->TriggerPolarity));
  12280. assert_param(IS_TIM_TRIGGERFILTER(sSlaveConfig->TriggerFilter));
  12281. /* Configure TI1 Filter and Polarity */
  12282. TIM_TI1_ConfigInputStage(htim->Instance,
  12283. 8004dac: 687b ldr r3, [r7, #4]
  12284. 8004dae: 6818 ldr r0, [r3, #0]
  12285. 8004db0: 683b ldr r3, [r7, #0]
  12286. 8004db2: 6899 ldr r1, [r3, #8]
  12287. 8004db4: 683b ldr r3, [r7, #0]
  12288. 8004db6: 691b ldr r3, [r3, #16]
  12289. 8004db8: 461a mov r2, r3
  12290. 8004dba: f000 f814 bl 8004de6 <TIM_TI1_ConfigInputStage>
  12291. sSlaveConfig->TriggerPolarity,
  12292. sSlaveConfig->TriggerFilter);
  12293. break;
  12294. 8004dbe: e00d b.n 8004ddc <TIM_SlaveTimer_SetConfig+0x118>
  12295. assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
  12296. assert_param(IS_TIM_TRIGGERPOLARITY(sSlaveConfig->TriggerPolarity));
  12297. assert_param(IS_TIM_TRIGGERFILTER(sSlaveConfig->TriggerFilter));
  12298. /* Configure TI2 Filter and Polarity */
  12299. TIM_TI2_ConfigInputStage(htim->Instance,
  12300. 8004dc0: 687b ldr r3, [r7, #4]
  12301. 8004dc2: 6818 ldr r0, [r3, #0]
  12302. 8004dc4: 683b ldr r3, [r7, #0]
  12303. 8004dc6: 6899 ldr r1, [r3, #8]
  12304. 8004dc8: 683b ldr r3, [r7, #0]
  12305. 8004dca: 691b ldr r3, [r3, #16]
  12306. 8004dcc: 461a mov r2, r3
  12307. 8004dce: f000 f839 bl 8004e44 <TIM_TI2_ConfigInputStage>
  12308. sSlaveConfig->TriggerPolarity,
  12309. sSlaveConfig->TriggerFilter);
  12310. break;
  12311. 8004dd2: e003 b.n 8004ddc <TIM_SlaveTimer_SetConfig+0x118>
  12312. assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
  12313. break;
  12314. }
  12315. default:
  12316. status = HAL_ERROR;
  12317. 8004dd4: 2301 movs r3, #1
  12318. 8004dd6: 75fb strb r3, [r7, #23]
  12319. break;
  12320. 8004dd8: e000 b.n 8004ddc <TIM_SlaveTimer_SetConfig+0x118>
  12321. break;
  12322. 8004dda: bf00 nop
  12323. }
  12324. return status;
  12325. 8004ddc: 7dfb ldrb r3, [r7, #23]
  12326. }
  12327. 8004dde: 4618 mov r0, r3
  12328. 8004de0: 3718 adds r7, #24
  12329. 8004de2: 46bd mov sp, r7
  12330. 8004de4: bd80 pop {r7, pc}
  12331. 08004de6 <TIM_TI1_ConfigInputStage>:
  12332. * @param TIM_ICFilter Specifies the Input Capture Filter.
  12333. * This parameter must be a value between 0x00 and 0x0F.
  12334. * @retval None
  12335. */
  12336. static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
  12337. {
  12338. 8004de6: b480 push {r7}
  12339. 8004de8: b087 sub sp, #28
  12340. 8004dea: af00 add r7, sp, #0
  12341. 8004dec: 60f8 str r0, [r7, #12]
  12342. 8004dee: 60b9 str r1, [r7, #8]
  12343. 8004df0: 607a str r2, [r7, #4]
  12344. uint32_t tmpccmr1;
  12345. uint32_t tmpccer;
  12346. /* Disable the Channel 1: Reset the CC1E Bit */
  12347. tmpccer = TIMx->CCER;
  12348. 8004df2: 68fb ldr r3, [r7, #12]
  12349. 8004df4: 6a1b ldr r3, [r3, #32]
  12350. 8004df6: 617b str r3, [r7, #20]
  12351. TIMx->CCER &= ~TIM_CCER_CC1E;
  12352. 8004df8: 68fb ldr r3, [r7, #12]
  12353. 8004dfa: 6a1b ldr r3, [r3, #32]
  12354. 8004dfc: f023 0201 bic.w r2, r3, #1
  12355. 8004e00: 68fb ldr r3, [r7, #12]
  12356. 8004e02: 621a str r2, [r3, #32]
  12357. tmpccmr1 = TIMx->CCMR1;
  12358. 8004e04: 68fb ldr r3, [r7, #12]
  12359. 8004e06: 699b ldr r3, [r3, #24]
  12360. 8004e08: 613b str r3, [r7, #16]
  12361. /* Set the filter */
  12362. tmpccmr1 &= ~TIM_CCMR1_IC1F;
  12363. 8004e0a: 693b ldr r3, [r7, #16]
  12364. 8004e0c: f023 03f0 bic.w r3, r3, #240 ; 0xf0
  12365. 8004e10: 613b str r3, [r7, #16]
  12366. tmpccmr1 |= (TIM_ICFilter << 4U);
  12367. 8004e12: 687b ldr r3, [r7, #4]
  12368. 8004e14: 011b lsls r3, r3, #4
  12369. 8004e16: 693a ldr r2, [r7, #16]
  12370. 8004e18: 4313 orrs r3, r2
  12371. 8004e1a: 613b str r3, [r7, #16]
  12372. /* Select the Polarity and set the CC1E Bit */
  12373. tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP);
  12374. 8004e1c: 697b ldr r3, [r7, #20]
  12375. 8004e1e: f023 030a bic.w r3, r3, #10
  12376. 8004e22: 617b str r3, [r7, #20]
  12377. tmpccer |= TIM_ICPolarity;
  12378. 8004e24: 697a ldr r2, [r7, #20]
  12379. 8004e26: 68bb ldr r3, [r7, #8]
  12380. 8004e28: 4313 orrs r3, r2
  12381. 8004e2a: 617b str r3, [r7, #20]
  12382. /* Write to TIMx CCMR1 and CCER registers */
  12383. TIMx->CCMR1 = tmpccmr1;
  12384. 8004e2c: 68fb ldr r3, [r7, #12]
  12385. 8004e2e: 693a ldr r2, [r7, #16]
  12386. 8004e30: 619a str r2, [r3, #24]
  12387. TIMx->CCER = tmpccer;
  12388. 8004e32: 68fb ldr r3, [r7, #12]
  12389. 8004e34: 697a ldr r2, [r7, #20]
  12390. 8004e36: 621a str r2, [r3, #32]
  12391. }
  12392. 8004e38: bf00 nop
  12393. 8004e3a: 371c adds r7, #28
  12394. 8004e3c: 46bd mov sp, r7
  12395. 8004e3e: f85d 7b04 ldr.w r7, [sp], #4
  12396. 8004e42: 4770 bx lr
  12397. 08004e44 <TIM_TI2_ConfigInputStage>:
  12398. * @param TIM_ICFilter Specifies the Input Capture Filter.
  12399. * This parameter must be a value between 0x00 and 0x0F.
  12400. * @retval None
  12401. */
  12402. static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
  12403. {
  12404. 8004e44: b480 push {r7}
  12405. 8004e46: b087 sub sp, #28
  12406. 8004e48: af00 add r7, sp, #0
  12407. 8004e4a: 60f8 str r0, [r7, #12]
  12408. 8004e4c: 60b9 str r1, [r7, #8]
  12409. 8004e4e: 607a str r2, [r7, #4]
  12410. uint32_t tmpccmr1;
  12411. uint32_t tmpccer;
  12412. /* Disable the Channel 2: Reset the CC2E Bit */
  12413. TIMx->CCER &= ~TIM_CCER_CC2E;
  12414. 8004e50: 68fb ldr r3, [r7, #12]
  12415. 8004e52: 6a1b ldr r3, [r3, #32]
  12416. 8004e54: f023 0210 bic.w r2, r3, #16
  12417. 8004e58: 68fb ldr r3, [r7, #12]
  12418. 8004e5a: 621a str r2, [r3, #32]
  12419. tmpccmr1 = TIMx->CCMR1;
  12420. 8004e5c: 68fb ldr r3, [r7, #12]
  12421. 8004e5e: 699b ldr r3, [r3, #24]
  12422. 8004e60: 617b str r3, [r7, #20]
  12423. tmpccer = TIMx->CCER;
  12424. 8004e62: 68fb ldr r3, [r7, #12]
  12425. 8004e64: 6a1b ldr r3, [r3, #32]
  12426. 8004e66: 613b str r3, [r7, #16]
  12427. /* Set the filter */
  12428. tmpccmr1 &= ~TIM_CCMR1_IC2F;
  12429. 8004e68: 697b ldr r3, [r7, #20]
  12430. 8004e6a: f423 4370 bic.w r3, r3, #61440 ; 0xf000
  12431. 8004e6e: 617b str r3, [r7, #20]
  12432. tmpccmr1 |= (TIM_ICFilter << 12U);
  12433. 8004e70: 687b ldr r3, [r7, #4]
  12434. 8004e72: 031b lsls r3, r3, #12
  12435. 8004e74: 697a ldr r2, [r7, #20]
  12436. 8004e76: 4313 orrs r3, r2
  12437. 8004e78: 617b str r3, [r7, #20]
  12438. /* Select the Polarity and set the CC2E Bit */
  12439. tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP);
  12440. 8004e7a: 693b ldr r3, [r7, #16]
  12441. 8004e7c: f023 03a0 bic.w r3, r3, #160 ; 0xa0
  12442. 8004e80: 613b str r3, [r7, #16]
  12443. tmpccer |= (TIM_ICPolarity << 4U);
  12444. 8004e82: 68bb ldr r3, [r7, #8]
  12445. 8004e84: 011b lsls r3, r3, #4
  12446. 8004e86: 693a ldr r2, [r7, #16]
  12447. 8004e88: 4313 orrs r3, r2
  12448. 8004e8a: 613b str r3, [r7, #16]
  12449. /* Write to TIMx CCMR1 and CCER registers */
  12450. TIMx->CCMR1 = tmpccmr1 ;
  12451. 8004e8c: 68fb ldr r3, [r7, #12]
  12452. 8004e8e: 697a ldr r2, [r7, #20]
  12453. 8004e90: 619a str r2, [r3, #24]
  12454. TIMx->CCER = tmpccer;
  12455. 8004e92: 68fb ldr r3, [r7, #12]
  12456. 8004e94: 693a ldr r2, [r7, #16]
  12457. 8004e96: 621a str r2, [r3, #32]
  12458. }
  12459. 8004e98: bf00 nop
  12460. 8004e9a: 371c adds r7, #28
  12461. 8004e9c: 46bd mov sp, r7
  12462. 8004e9e: f85d 7b04 ldr.w r7, [sp], #4
  12463. 8004ea2: 4770 bx lr
  12464. 08004ea4 <TIM_ETR_SetConfig>:
  12465. * This parameter must be a value between 0x00 and 0x0F
  12466. * @retval None
  12467. */
  12468. void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
  12469. uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter)
  12470. {
  12471. 8004ea4: b480 push {r7}
  12472. 8004ea6: b087 sub sp, #28
  12473. 8004ea8: af00 add r7, sp, #0
  12474. 8004eaa: 60f8 str r0, [r7, #12]
  12475. 8004eac: 60b9 str r1, [r7, #8]
  12476. 8004eae: 607a str r2, [r7, #4]
  12477. 8004eb0: 603b str r3, [r7, #0]
  12478. uint32_t tmpsmcr;
  12479. tmpsmcr = TIMx->SMCR;
  12480. 8004eb2: 68fb ldr r3, [r7, #12]
  12481. 8004eb4: 689b ldr r3, [r3, #8]
  12482. 8004eb6: 617b str r3, [r7, #20]
  12483. /* Reset the ETR Bits */
  12484. tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
  12485. 8004eb8: 697b ldr r3, [r7, #20]
  12486. 8004eba: f423 437f bic.w r3, r3, #65280 ; 0xff00
  12487. 8004ebe: 617b str r3, [r7, #20]
  12488. /* Set the Prescaler, the Filter value and the Polarity */
  12489. tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U)));
  12490. 8004ec0: 683b ldr r3, [r7, #0]
  12491. 8004ec2: 021a lsls r2, r3, #8
  12492. 8004ec4: 687b ldr r3, [r7, #4]
  12493. 8004ec6: 431a orrs r2, r3
  12494. 8004ec8: 68bb ldr r3, [r7, #8]
  12495. 8004eca: 4313 orrs r3, r2
  12496. 8004ecc: 697a ldr r2, [r7, #20]
  12497. 8004ece: 4313 orrs r3, r2
  12498. 8004ed0: 617b str r3, [r7, #20]
  12499. /* Write to TIMx SMCR */
  12500. TIMx->SMCR = tmpsmcr;
  12501. 8004ed2: 68fb ldr r3, [r7, #12]
  12502. 8004ed4: 697a ldr r2, [r7, #20]
  12503. 8004ed6: 609a str r2, [r3, #8]
  12504. }
  12505. 8004ed8: bf00 nop
  12506. 8004eda: 371c adds r7, #28
  12507. 8004edc: 46bd mov sp, r7
  12508. 8004ede: f85d 7b04 ldr.w r7, [sp], #4
  12509. 8004ee2: 4770 bx lr
  12510. 08004ee4 <HAL_TIMEx_MasterConfigSynchronization>:
  12511. * mode.
  12512. * @retval HAL status
  12513. */
  12514. HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
  12515. TIM_MasterConfigTypeDef *sMasterConfig)
  12516. {
  12517. 8004ee4: b480 push {r7}
  12518. 8004ee6: b085 sub sp, #20
  12519. 8004ee8: af00 add r7, sp, #0
  12520. 8004eea: 6078 str r0, [r7, #4]
  12521. 8004eec: 6039 str r1, [r7, #0]
  12522. assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance));
  12523. assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger));
  12524. assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode));
  12525. /* Check input state */
  12526. __HAL_LOCK(htim);
  12527. 8004eee: 687b ldr r3, [r7, #4]
  12528. 8004ef0: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
  12529. 8004ef4: 2b01 cmp r3, #1
  12530. 8004ef6: d101 bne.n 8004efc <HAL_TIMEx_MasterConfigSynchronization+0x18>
  12531. 8004ef8: 2302 movs r3, #2
  12532. 8004efa: e05a b.n 8004fb2 <HAL_TIMEx_MasterConfigSynchronization+0xce>
  12533. 8004efc: 687b ldr r3, [r7, #4]
  12534. 8004efe: 2201 movs r2, #1
  12535. 8004f00: f883 203c strb.w r2, [r3, #60] ; 0x3c
  12536. /* Change the handler state */
  12537. htim->State = HAL_TIM_STATE_BUSY;
  12538. 8004f04: 687b ldr r3, [r7, #4]
  12539. 8004f06: 2202 movs r2, #2
  12540. 8004f08: f883 203d strb.w r2, [r3, #61] ; 0x3d
  12541. /* Get the TIMx CR2 register value */
  12542. tmpcr2 = htim->Instance->CR2;
  12543. 8004f0c: 687b ldr r3, [r7, #4]
  12544. 8004f0e: 681b ldr r3, [r3, #0]
  12545. 8004f10: 685b ldr r3, [r3, #4]
  12546. 8004f12: 60fb str r3, [r7, #12]
  12547. /* Get the TIMx SMCR register value */
  12548. tmpsmcr = htim->Instance->SMCR;
  12549. 8004f14: 687b ldr r3, [r7, #4]
  12550. 8004f16: 681b ldr r3, [r3, #0]
  12551. 8004f18: 689b ldr r3, [r3, #8]
  12552. 8004f1a: 60bb str r3, [r7, #8]
  12553. /* Reset the MMS Bits */
  12554. tmpcr2 &= ~TIM_CR2_MMS;
  12555. 8004f1c: 68fb ldr r3, [r7, #12]
  12556. 8004f1e: f023 0370 bic.w r3, r3, #112 ; 0x70
  12557. 8004f22: 60fb str r3, [r7, #12]
  12558. /* Select the TRGO source */
  12559. tmpcr2 |= sMasterConfig->MasterOutputTrigger;
  12560. 8004f24: 683b ldr r3, [r7, #0]
  12561. 8004f26: 681b ldr r3, [r3, #0]
  12562. 8004f28: 68fa ldr r2, [r7, #12]
  12563. 8004f2a: 4313 orrs r3, r2
  12564. 8004f2c: 60fb str r3, [r7, #12]
  12565. /* Update TIMx CR2 */
  12566. htim->Instance->CR2 = tmpcr2;
  12567. 8004f2e: 687b ldr r3, [r7, #4]
  12568. 8004f30: 681b ldr r3, [r3, #0]
  12569. 8004f32: 68fa ldr r2, [r7, #12]
  12570. 8004f34: 605a str r2, [r3, #4]
  12571. if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
  12572. 8004f36: 687b ldr r3, [r7, #4]
  12573. 8004f38: 681b ldr r3, [r3, #0]
  12574. 8004f3a: 4a21 ldr r2, [pc, #132] ; (8004fc0 <HAL_TIMEx_MasterConfigSynchronization+0xdc>)
  12575. 8004f3c: 4293 cmp r3, r2
  12576. 8004f3e: d022 beq.n 8004f86 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  12577. 8004f40: 687b ldr r3, [r7, #4]
  12578. 8004f42: 681b ldr r3, [r3, #0]
  12579. 8004f44: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000
  12580. 8004f48: d01d beq.n 8004f86 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  12581. 8004f4a: 687b ldr r3, [r7, #4]
  12582. 8004f4c: 681b ldr r3, [r3, #0]
  12583. 8004f4e: 4a1d ldr r2, [pc, #116] ; (8004fc4 <HAL_TIMEx_MasterConfigSynchronization+0xe0>)
  12584. 8004f50: 4293 cmp r3, r2
  12585. 8004f52: d018 beq.n 8004f86 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  12586. 8004f54: 687b ldr r3, [r7, #4]
  12587. 8004f56: 681b ldr r3, [r3, #0]
  12588. 8004f58: 4a1b ldr r2, [pc, #108] ; (8004fc8 <HAL_TIMEx_MasterConfigSynchronization+0xe4>)
  12589. 8004f5a: 4293 cmp r3, r2
  12590. 8004f5c: d013 beq.n 8004f86 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  12591. 8004f5e: 687b ldr r3, [r7, #4]
  12592. 8004f60: 681b ldr r3, [r3, #0]
  12593. 8004f62: 4a1a ldr r2, [pc, #104] ; (8004fcc <HAL_TIMEx_MasterConfigSynchronization+0xe8>)
  12594. 8004f64: 4293 cmp r3, r2
  12595. 8004f66: d00e beq.n 8004f86 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  12596. 8004f68: 687b ldr r3, [r7, #4]
  12597. 8004f6a: 681b ldr r3, [r3, #0]
  12598. 8004f6c: 4a18 ldr r2, [pc, #96] ; (8004fd0 <HAL_TIMEx_MasterConfigSynchronization+0xec>)
  12599. 8004f6e: 4293 cmp r3, r2
  12600. 8004f70: d009 beq.n 8004f86 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  12601. 8004f72: 687b ldr r3, [r7, #4]
  12602. 8004f74: 681b ldr r3, [r3, #0]
  12603. 8004f76: 4a17 ldr r2, [pc, #92] ; (8004fd4 <HAL_TIMEx_MasterConfigSynchronization+0xf0>)
  12604. 8004f78: 4293 cmp r3, r2
  12605. 8004f7a: d004 beq.n 8004f86 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  12606. 8004f7c: 687b ldr r3, [r7, #4]
  12607. 8004f7e: 681b ldr r3, [r3, #0]
  12608. 8004f80: 4a15 ldr r2, [pc, #84] ; (8004fd8 <HAL_TIMEx_MasterConfigSynchronization+0xf4>)
  12609. 8004f82: 4293 cmp r3, r2
  12610. 8004f84: d10c bne.n 8004fa0 <HAL_TIMEx_MasterConfigSynchronization+0xbc>
  12611. {
  12612. /* Reset the MSM Bit */
  12613. tmpsmcr &= ~TIM_SMCR_MSM;
  12614. 8004f86: 68bb ldr r3, [r7, #8]
  12615. 8004f88: f023 0380 bic.w r3, r3, #128 ; 0x80
  12616. 8004f8c: 60bb str r3, [r7, #8]
  12617. /* Set master mode */
  12618. tmpsmcr |= sMasterConfig->MasterSlaveMode;
  12619. 8004f8e: 683b ldr r3, [r7, #0]
  12620. 8004f90: 685b ldr r3, [r3, #4]
  12621. 8004f92: 68ba ldr r2, [r7, #8]
  12622. 8004f94: 4313 orrs r3, r2
  12623. 8004f96: 60bb str r3, [r7, #8]
  12624. /* Update TIMx SMCR */
  12625. htim->Instance->SMCR = tmpsmcr;
  12626. 8004f98: 687b ldr r3, [r7, #4]
  12627. 8004f9a: 681b ldr r3, [r3, #0]
  12628. 8004f9c: 68ba ldr r2, [r7, #8]
  12629. 8004f9e: 609a str r2, [r3, #8]
  12630. }
  12631. /* Change the htim state */
  12632. htim->State = HAL_TIM_STATE_READY;
  12633. 8004fa0: 687b ldr r3, [r7, #4]
  12634. 8004fa2: 2201 movs r2, #1
  12635. 8004fa4: f883 203d strb.w r2, [r3, #61] ; 0x3d
  12636. __HAL_UNLOCK(htim);
  12637. 8004fa8: 687b ldr r3, [r7, #4]
  12638. 8004faa: 2200 movs r2, #0
  12639. 8004fac: f883 203c strb.w r2, [r3, #60] ; 0x3c
  12640. return HAL_OK;
  12641. 8004fb0: 2300 movs r3, #0
  12642. }
  12643. 8004fb2: 4618 mov r0, r3
  12644. 8004fb4: 3714 adds r7, #20
  12645. 8004fb6: 46bd mov sp, r7
  12646. 8004fb8: f85d 7b04 ldr.w r7, [sp], #4
  12647. 8004fbc: 4770 bx lr
  12648. 8004fbe: bf00 nop
  12649. 8004fc0: 40010000 .word 0x40010000
  12650. 8004fc4: 40000400 .word 0x40000400
  12651. 8004fc8: 40000800 .word 0x40000800
  12652. 8004fcc: 40000c00 .word 0x40000c00
  12653. 8004fd0: 40010400 .word 0x40010400
  12654. 8004fd4: 40014000 .word 0x40014000
  12655. 8004fd8: 40001800 .word 0x40001800
  12656. 08004fdc <HAL_UART_Init>:
  12657. * @param huart Pointer to a UART_HandleTypeDef structure that contains
  12658. * the configuration information for the specified UART module.
  12659. * @retval HAL status
  12660. */
  12661. HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
  12662. {
  12663. 8004fdc: b580 push {r7, lr}
  12664. 8004fde: b082 sub sp, #8
  12665. 8004fe0: af00 add r7, sp, #0
  12666. 8004fe2: 6078 str r0, [r7, #4]
  12667. /* Check the UART handle allocation */
  12668. if (huart == NULL)
  12669. 8004fe4: 687b ldr r3, [r7, #4]
  12670. 8004fe6: 2b00 cmp r3, #0
  12671. 8004fe8: d101 bne.n 8004fee <HAL_UART_Init+0x12>
  12672. {
  12673. return HAL_ERROR;
  12674. 8004fea: 2301 movs r3, #1
  12675. 8004fec: e03f b.n 800506e <HAL_UART_Init+0x92>
  12676. assert_param(IS_UART_INSTANCE(huart->Instance));
  12677. }
  12678. assert_param(IS_UART_WORD_LENGTH(huart->Init.WordLength));
  12679. assert_param(IS_UART_OVERSAMPLING(huart->Init.OverSampling));
  12680. if (huart->gState == HAL_UART_STATE_RESET)
  12681. 8004fee: 687b ldr r3, [r7, #4]
  12682. 8004ff0: f893 303d ldrb.w r3, [r3, #61] ; 0x3d
  12683. 8004ff4: b2db uxtb r3, r3
  12684. 8004ff6: 2b00 cmp r3, #0
  12685. 8004ff8: d106 bne.n 8005008 <HAL_UART_Init+0x2c>
  12686. {
  12687. /* Allocate lock resource and initialize it */
  12688. huart->Lock = HAL_UNLOCKED;
  12689. 8004ffa: 687b ldr r3, [r7, #4]
  12690. 8004ffc: 2200 movs r2, #0
  12691. 8004ffe: f883 203c strb.w r2, [r3, #60] ; 0x3c
  12692. /* Init the low level hardware */
  12693. huart->MspInitCallback(huart);
  12694. #else
  12695. /* Init the low level hardware : GPIO, CLOCK */
  12696. HAL_UART_MspInit(huart);
  12697. 8005002: 6878 ldr r0, [r7, #4]
  12698. 8005004: f7fc f82c bl 8001060 <HAL_UART_MspInit>
  12699. #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
  12700. }
  12701. huart->gState = HAL_UART_STATE_BUSY;
  12702. 8005008: 687b ldr r3, [r7, #4]
  12703. 800500a: 2224 movs r2, #36 ; 0x24
  12704. 800500c: f883 203d strb.w r2, [r3, #61] ; 0x3d
  12705. /* Disable the peripheral */
  12706. __HAL_UART_DISABLE(huart);
  12707. 8005010: 687b ldr r3, [r7, #4]
  12708. 8005012: 681b ldr r3, [r3, #0]
  12709. 8005014: 68da ldr r2, [r3, #12]
  12710. 8005016: 687b ldr r3, [r7, #4]
  12711. 8005018: 681b ldr r3, [r3, #0]
  12712. 800501a: f422 5200 bic.w r2, r2, #8192 ; 0x2000
  12713. 800501e: 60da str r2, [r3, #12]
  12714. /* Set the UART Communication parameters */
  12715. UART_SetConfig(huart);
  12716. 8005020: 6878 ldr r0, [r7, #4]
  12717. 8005022: f000 f829 bl 8005078 <UART_SetConfig>
  12718. /* In asynchronous mode, the following bits must be kept cleared:
  12719. - LINEN and CLKEN bits in the USART_CR2 register,
  12720. - SCEN, HDSEL and IREN bits in the USART_CR3 register.*/
  12721. CLEAR_BIT(huart->Instance->CR2, (USART_CR2_LINEN | USART_CR2_CLKEN));
  12722. 8005026: 687b ldr r3, [r7, #4]
  12723. 8005028: 681b ldr r3, [r3, #0]
  12724. 800502a: 691a ldr r2, [r3, #16]
  12725. 800502c: 687b ldr r3, [r7, #4]
  12726. 800502e: 681b ldr r3, [r3, #0]
  12727. 8005030: f422 4290 bic.w r2, r2, #18432 ; 0x4800
  12728. 8005034: 611a str r2, [r3, #16]
  12729. CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
  12730. 8005036: 687b ldr r3, [r7, #4]
  12731. 8005038: 681b ldr r3, [r3, #0]
  12732. 800503a: 695a ldr r2, [r3, #20]
  12733. 800503c: 687b ldr r3, [r7, #4]
  12734. 800503e: 681b ldr r3, [r3, #0]
  12735. 8005040: f022 022a bic.w r2, r2, #42 ; 0x2a
  12736. 8005044: 615a str r2, [r3, #20]
  12737. /* Enable the peripheral */
  12738. __HAL_UART_ENABLE(huart);
  12739. 8005046: 687b ldr r3, [r7, #4]
  12740. 8005048: 681b ldr r3, [r3, #0]
  12741. 800504a: 68da ldr r2, [r3, #12]
  12742. 800504c: 687b ldr r3, [r7, #4]
  12743. 800504e: 681b ldr r3, [r3, #0]
  12744. 8005050: f442 5200 orr.w r2, r2, #8192 ; 0x2000
  12745. 8005054: 60da str r2, [r3, #12]
  12746. /* Initialize the UART state */
  12747. huart->ErrorCode = HAL_UART_ERROR_NONE;
  12748. 8005056: 687b ldr r3, [r7, #4]
  12749. 8005058: 2200 movs r2, #0
  12750. 800505a: 641a str r2, [r3, #64] ; 0x40
  12751. huart->gState = HAL_UART_STATE_READY;
  12752. 800505c: 687b ldr r3, [r7, #4]
  12753. 800505e: 2220 movs r2, #32
  12754. 8005060: f883 203d strb.w r2, [r3, #61] ; 0x3d
  12755. huart->RxState = HAL_UART_STATE_READY;
  12756. 8005064: 687b ldr r3, [r7, #4]
  12757. 8005066: 2220 movs r2, #32
  12758. 8005068: f883 203e strb.w r2, [r3, #62] ; 0x3e
  12759. return HAL_OK;
  12760. 800506c: 2300 movs r3, #0
  12761. }
  12762. 800506e: 4618 mov r0, r3
  12763. 8005070: 3708 adds r7, #8
  12764. 8005072: 46bd mov sp, r7
  12765. 8005074: bd80 pop {r7, pc}
  12766. ...
  12767. 08005078 <UART_SetConfig>:
  12768. * @param huart Pointer to a UART_HandleTypeDef structure that contains
  12769. * the configuration information for the specified UART module.
  12770. * @retval None
  12771. */
  12772. static void UART_SetConfig(UART_HandleTypeDef *huart)
  12773. {
  12774. 8005078: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  12775. 800507c: b09f sub sp, #124 ; 0x7c
  12776. 800507e: af00 add r7, sp, #0
  12777. 8005080: 66f8 str r0, [r7, #108] ; 0x6c
  12778. assert_param(IS_UART_MODE(huart->Init.Mode));
  12779. /*-------------------------- USART CR2 Configuration -----------------------*/
  12780. /* Configure the UART Stop Bits: Set STOP[13:12] bits
  12781. according to huart->Init.StopBits value */
  12782. MODIFY_REG(huart->Instance->CR2, USART_CR2_STOP, huart->Init.StopBits);
  12783. 8005082: 6efb ldr r3, [r7, #108] ; 0x6c
  12784. 8005084: 681b ldr r3, [r3, #0]
  12785. 8005086: 691b ldr r3, [r3, #16]
  12786. 8005088: f423 5040 bic.w r0, r3, #12288 ; 0x3000
  12787. 800508c: 6efb ldr r3, [r7, #108] ; 0x6c
  12788. 800508e: 68d9 ldr r1, [r3, #12]
  12789. 8005090: 6efb ldr r3, [r7, #108] ; 0x6c
  12790. 8005092: 681a ldr r2, [r3, #0]
  12791. 8005094: ea40 0301 orr.w r3, r0, r1
  12792. 8005098: 6113 str r3, [r2, #16]
  12793. Set the M bits according to huart->Init.WordLength value
  12794. Set PCE and PS bits according to huart->Init.Parity value
  12795. Set TE and RE bits according to huart->Init.Mode value
  12796. Set OVER8 bit according to huart->Init.OverSampling value */
  12797. tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode | huart->Init.OverSampling;
  12798. 800509a: 6efb ldr r3, [r7, #108] ; 0x6c
  12799. 800509c: 689a ldr r2, [r3, #8]
  12800. 800509e: 6efb ldr r3, [r7, #108] ; 0x6c
  12801. 80050a0: 691b ldr r3, [r3, #16]
  12802. 80050a2: 431a orrs r2, r3
  12803. 80050a4: 6efb ldr r3, [r7, #108] ; 0x6c
  12804. 80050a6: 695b ldr r3, [r3, #20]
  12805. 80050a8: 431a orrs r2, r3
  12806. 80050aa: 6efb ldr r3, [r7, #108] ; 0x6c
  12807. 80050ac: 69db ldr r3, [r3, #28]
  12808. 80050ae: 4313 orrs r3, r2
  12809. 80050b0: 673b str r3, [r7, #112] ; 0x70
  12810. MODIFY_REG(huart->Instance->CR1,
  12811. 80050b2: 6efb ldr r3, [r7, #108] ; 0x6c
  12812. 80050b4: 681b ldr r3, [r3, #0]
  12813. 80050b6: 68db ldr r3, [r3, #12]
  12814. 80050b8: f423 4116 bic.w r1, r3, #38400 ; 0x9600
  12815. 80050bc: f021 010c bic.w r1, r1, #12
  12816. 80050c0: 6efb ldr r3, [r7, #108] ; 0x6c
  12817. 80050c2: 681a ldr r2, [r3, #0]
  12818. 80050c4: 6f3b ldr r3, [r7, #112] ; 0x70
  12819. 80050c6: 430b orrs r3, r1
  12820. 80050c8: 60d3 str r3, [r2, #12]
  12821. (uint32_t)(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS | USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8),
  12822. tmpreg);
  12823. /*-------------------------- USART CR3 Configuration -----------------------*/
  12824. /* Configure the UART HFC: Set CTSE and RTSE bits according to huart->Init.HwFlowCtl value */
  12825. MODIFY_REG(huart->Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE), huart->Init.HwFlowCtl);
  12826. 80050ca: 6efb ldr r3, [r7, #108] ; 0x6c
  12827. 80050cc: 681b ldr r3, [r3, #0]
  12828. 80050ce: 695b ldr r3, [r3, #20]
  12829. 80050d0: f423 7040 bic.w r0, r3, #768 ; 0x300
  12830. 80050d4: 6efb ldr r3, [r7, #108] ; 0x6c
  12831. 80050d6: 6999 ldr r1, [r3, #24]
  12832. 80050d8: 6efb ldr r3, [r7, #108] ; 0x6c
  12833. 80050da: 681a ldr r2, [r3, #0]
  12834. 80050dc: ea40 0301 orr.w r3, r0, r1
  12835. 80050e0: 6153 str r3, [r2, #20]
  12836. if ((huart->Instance == USART1) || (huart->Instance == USART6) || (huart->Instance == UART9) || (huart->Instance == UART10))
  12837. {
  12838. pclk = HAL_RCC_GetPCLK2Freq();
  12839. }
  12840. #elif defined(USART6)
  12841. if ((huart->Instance == USART1) || (huart->Instance == USART6))
  12842. 80050e2: 6efb ldr r3, [r7, #108] ; 0x6c
  12843. 80050e4: 681a ldr r2, [r3, #0]
  12844. 80050e6: 4bc5 ldr r3, [pc, #788] ; (80053fc <UART_SetConfig+0x384>)
  12845. 80050e8: 429a cmp r2, r3
  12846. 80050ea: d004 beq.n 80050f6 <UART_SetConfig+0x7e>
  12847. 80050ec: 6efb ldr r3, [r7, #108] ; 0x6c
  12848. 80050ee: 681a ldr r2, [r3, #0]
  12849. 80050f0: 4bc3 ldr r3, [pc, #780] ; (8005400 <UART_SetConfig+0x388>)
  12850. 80050f2: 429a cmp r2, r3
  12851. 80050f4: d103 bne.n 80050fe <UART_SetConfig+0x86>
  12852. {
  12853. pclk = HAL_RCC_GetPCLK2Freq();
  12854. 80050f6: f7fe f977 bl 80033e8 <HAL_RCC_GetPCLK2Freq>
  12855. 80050fa: 6778 str r0, [r7, #116] ; 0x74
  12856. 80050fc: e002 b.n 8005104 <UART_SetConfig+0x8c>
  12857. pclk = HAL_RCC_GetPCLK2Freq();
  12858. }
  12859. #endif /* USART6 */
  12860. else
  12861. {
  12862. pclk = HAL_RCC_GetPCLK1Freq();
  12863. 80050fe: f7fe f95f bl 80033c0 <HAL_RCC_GetPCLK1Freq>
  12864. 8005102: 6778 str r0, [r7, #116] ; 0x74
  12865. }
  12866. /*-------------------------- USART BRR Configuration ---------------------*/
  12867. if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
  12868. 8005104: 6efb ldr r3, [r7, #108] ; 0x6c
  12869. 8005106: 69db ldr r3, [r3, #28]
  12870. 8005108: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
  12871. 800510c: f040 80b6 bne.w 800527c <UART_SetConfig+0x204>
  12872. {
  12873. huart->Instance->BRR = UART_BRR_SAMPLING8(pclk, huart->Init.BaudRate);
  12874. 8005110: 6f7b ldr r3, [r7, #116] ; 0x74
  12875. 8005112: 461c mov r4, r3
  12876. 8005114: f04f 0500 mov.w r5, #0
  12877. 8005118: 4622 mov r2, r4
  12878. 800511a: 462b mov r3, r5
  12879. 800511c: 1891 adds r1, r2, r2
  12880. 800511e: 6439 str r1, [r7, #64] ; 0x40
  12881. 8005120: 415b adcs r3, r3
  12882. 8005122: 647b str r3, [r7, #68] ; 0x44
  12883. 8005124: e9d7 2310 ldrd r2, r3, [r7, #64] ; 0x40
  12884. 8005128: 1912 adds r2, r2, r4
  12885. 800512a: eb45 0303 adc.w r3, r5, r3
  12886. 800512e: f04f 0000 mov.w r0, #0
  12887. 8005132: f04f 0100 mov.w r1, #0
  12888. 8005136: 00d9 lsls r1, r3, #3
  12889. 8005138: ea41 7152 orr.w r1, r1, r2, lsr #29
  12890. 800513c: 00d0 lsls r0, r2, #3
  12891. 800513e: 4602 mov r2, r0
  12892. 8005140: 460b mov r3, r1
  12893. 8005142: 1911 adds r1, r2, r4
  12894. 8005144: 6639 str r1, [r7, #96] ; 0x60
  12895. 8005146: 416b adcs r3, r5
  12896. 8005148: 667b str r3, [r7, #100] ; 0x64
  12897. 800514a: 6efb ldr r3, [r7, #108] ; 0x6c
  12898. 800514c: 685b ldr r3, [r3, #4]
  12899. 800514e: 461a mov r2, r3
  12900. 8005150: f04f 0300 mov.w r3, #0
  12901. 8005154: 1891 adds r1, r2, r2
  12902. 8005156: 63b9 str r1, [r7, #56] ; 0x38
  12903. 8005158: 415b adcs r3, r3
  12904. 800515a: 63fb str r3, [r7, #60] ; 0x3c
  12905. 800515c: e9d7 230e ldrd r2, r3, [r7, #56] ; 0x38
  12906. 8005160: e9d7 0118 ldrd r0, r1, [r7, #96] ; 0x60
  12907. 8005164: f7fb f84e bl 8000204 <__aeabi_uldivmod>
  12908. 8005168: 4602 mov r2, r0
  12909. 800516a: 460b mov r3, r1
  12910. 800516c: 4ba5 ldr r3, [pc, #660] ; (8005404 <UART_SetConfig+0x38c>)
  12911. 800516e: fba3 2302 umull r2, r3, r3, r2
  12912. 8005172: 095b lsrs r3, r3, #5
  12913. 8005174: 011e lsls r6, r3, #4
  12914. 8005176: 6f7b ldr r3, [r7, #116] ; 0x74
  12915. 8005178: 461c mov r4, r3
  12916. 800517a: f04f 0500 mov.w r5, #0
  12917. 800517e: 4622 mov r2, r4
  12918. 8005180: 462b mov r3, r5
  12919. 8005182: 1891 adds r1, r2, r2
  12920. 8005184: 6339 str r1, [r7, #48] ; 0x30
  12921. 8005186: 415b adcs r3, r3
  12922. 8005188: 637b str r3, [r7, #52] ; 0x34
  12923. 800518a: e9d7 230c ldrd r2, r3, [r7, #48] ; 0x30
  12924. 800518e: 1912 adds r2, r2, r4
  12925. 8005190: eb45 0303 adc.w r3, r5, r3
  12926. 8005194: f04f 0000 mov.w r0, #0
  12927. 8005198: f04f 0100 mov.w r1, #0
  12928. 800519c: 00d9 lsls r1, r3, #3
  12929. 800519e: ea41 7152 orr.w r1, r1, r2, lsr #29
  12930. 80051a2: 00d0 lsls r0, r2, #3
  12931. 80051a4: 4602 mov r2, r0
  12932. 80051a6: 460b mov r3, r1
  12933. 80051a8: 1911 adds r1, r2, r4
  12934. 80051aa: 65b9 str r1, [r7, #88] ; 0x58
  12935. 80051ac: 416b adcs r3, r5
  12936. 80051ae: 65fb str r3, [r7, #92] ; 0x5c
  12937. 80051b0: 6efb ldr r3, [r7, #108] ; 0x6c
  12938. 80051b2: 685b ldr r3, [r3, #4]
  12939. 80051b4: 461a mov r2, r3
  12940. 80051b6: f04f 0300 mov.w r3, #0
  12941. 80051ba: 1891 adds r1, r2, r2
  12942. 80051bc: 62b9 str r1, [r7, #40] ; 0x28
  12943. 80051be: 415b adcs r3, r3
  12944. 80051c0: 62fb str r3, [r7, #44] ; 0x2c
  12945. 80051c2: e9d7 230a ldrd r2, r3, [r7, #40] ; 0x28
  12946. 80051c6: e9d7 0116 ldrd r0, r1, [r7, #88] ; 0x58
  12947. 80051ca: f7fb f81b bl 8000204 <__aeabi_uldivmod>
  12948. 80051ce: 4602 mov r2, r0
  12949. 80051d0: 460b mov r3, r1
  12950. 80051d2: 4b8c ldr r3, [pc, #560] ; (8005404 <UART_SetConfig+0x38c>)
  12951. 80051d4: fba3 1302 umull r1, r3, r3, r2
  12952. 80051d8: 095b lsrs r3, r3, #5
  12953. 80051da: 2164 movs r1, #100 ; 0x64
  12954. 80051dc: fb01 f303 mul.w r3, r1, r3
  12955. 80051e0: 1ad3 subs r3, r2, r3
  12956. 80051e2: 00db lsls r3, r3, #3
  12957. 80051e4: 3332 adds r3, #50 ; 0x32
  12958. 80051e6: 4a87 ldr r2, [pc, #540] ; (8005404 <UART_SetConfig+0x38c>)
  12959. 80051e8: fba2 2303 umull r2, r3, r2, r3
  12960. 80051ec: 095b lsrs r3, r3, #5
  12961. 80051ee: 005b lsls r3, r3, #1
  12962. 80051f0: f403 73f8 and.w r3, r3, #496 ; 0x1f0
  12963. 80051f4: 441e add r6, r3
  12964. 80051f6: 6f7b ldr r3, [r7, #116] ; 0x74
  12965. 80051f8: 4618 mov r0, r3
  12966. 80051fa: f04f 0100 mov.w r1, #0
  12967. 80051fe: 4602 mov r2, r0
  12968. 8005200: 460b mov r3, r1
  12969. 8005202: 1894 adds r4, r2, r2
  12970. 8005204: 623c str r4, [r7, #32]
  12971. 8005206: 415b adcs r3, r3
  12972. 8005208: 627b str r3, [r7, #36] ; 0x24
  12973. 800520a: e9d7 2308 ldrd r2, r3, [r7, #32]
  12974. 800520e: 1812 adds r2, r2, r0
  12975. 8005210: eb41 0303 adc.w r3, r1, r3
  12976. 8005214: f04f 0400 mov.w r4, #0
  12977. 8005218: f04f 0500 mov.w r5, #0
  12978. 800521c: 00dd lsls r5, r3, #3
  12979. 800521e: ea45 7552 orr.w r5, r5, r2, lsr #29
  12980. 8005222: 00d4 lsls r4, r2, #3
  12981. 8005224: 4622 mov r2, r4
  12982. 8005226: 462b mov r3, r5
  12983. 8005228: 1814 adds r4, r2, r0
  12984. 800522a: 653c str r4, [r7, #80] ; 0x50
  12985. 800522c: 414b adcs r3, r1
  12986. 800522e: 657b str r3, [r7, #84] ; 0x54
  12987. 8005230: 6efb ldr r3, [r7, #108] ; 0x6c
  12988. 8005232: 685b ldr r3, [r3, #4]
  12989. 8005234: 461a mov r2, r3
  12990. 8005236: f04f 0300 mov.w r3, #0
  12991. 800523a: 1891 adds r1, r2, r2
  12992. 800523c: 61b9 str r1, [r7, #24]
  12993. 800523e: 415b adcs r3, r3
  12994. 8005240: 61fb str r3, [r7, #28]
  12995. 8005242: e9d7 2306 ldrd r2, r3, [r7, #24]
  12996. 8005246: e9d7 0114 ldrd r0, r1, [r7, #80] ; 0x50
  12997. 800524a: f7fa ffdb bl 8000204 <__aeabi_uldivmod>
  12998. 800524e: 4602 mov r2, r0
  12999. 8005250: 460b mov r3, r1
  13000. 8005252: 4b6c ldr r3, [pc, #432] ; (8005404 <UART_SetConfig+0x38c>)
  13001. 8005254: fba3 1302 umull r1, r3, r3, r2
  13002. 8005258: 095b lsrs r3, r3, #5
  13003. 800525a: 2164 movs r1, #100 ; 0x64
  13004. 800525c: fb01 f303 mul.w r3, r1, r3
  13005. 8005260: 1ad3 subs r3, r2, r3
  13006. 8005262: 00db lsls r3, r3, #3
  13007. 8005264: 3332 adds r3, #50 ; 0x32
  13008. 8005266: 4a67 ldr r2, [pc, #412] ; (8005404 <UART_SetConfig+0x38c>)
  13009. 8005268: fba2 2303 umull r2, r3, r2, r3
  13010. 800526c: 095b lsrs r3, r3, #5
  13011. 800526e: f003 0207 and.w r2, r3, #7
  13012. 8005272: 6efb ldr r3, [r7, #108] ; 0x6c
  13013. 8005274: 681b ldr r3, [r3, #0]
  13014. 8005276: 4432 add r2, r6
  13015. 8005278: 609a str r2, [r3, #8]
  13016. }
  13017. else
  13018. {
  13019. huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
  13020. }
  13021. }
  13022. 800527a: e0b9 b.n 80053f0 <UART_SetConfig+0x378>
  13023. huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
  13024. 800527c: 6f7b ldr r3, [r7, #116] ; 0x74
  13025. 800527e: 461c mov r4, r3
  13026. 8005280: f04f 0500 mov.w r5, #0
  13027. 8005284: 4622 mov r2, r4
  13028. 8005286: 462b mov r3, r5
  13029. 8005288: 1891 adds r1, r2, r2
  13030. 800528a: 6139 str r1, [r7, #16]
  13031. 800528c: 415b adcs r3, r3
  13032. 800528e: 617b str r3, [r7, #20]
  13033. 8005290: e9d7 2304 ldrd r2, r3, [r7, #16]
  13034. 8005294: 1912 adds r2, r2, r4
  13035. 8005296: eb45 0303 adc.w r3, r5, r3
  13036. 800529a: f04f 0000 mov.w r0, #0
  13037. 800529e: f04f 0100 mov.w r1, #0
  13038. 80052a2: 00d9 lsls r1, r3, #3
  13039. 80052a4: ea41 7152 orr.w r1, r1, r2, lsr #29
  13040. 80052a8: 00d0 lsls r0, r2, #3
  13041. 80052aa: 4602 mov r2, r0
  13042. 80052ac: 460b mov r3, r1
  13043. 80052ae: eb12 0804 adds.w r8, r2, r4
  13044. 80052b2: eb43 0905 adc.w r9, r3, r5
  13045. 80052b6: 6efb ldr r3, [r7, #108] ; 0x6c
  13046. 80052b8: 685b ldr r3, [r3, #4]
  13047. 80052ba: 4618 mov r0, r3
  13048. 80052bc: f04f 0100 mov.w r1, #0
  13049. 80052c0: f04f 0200 mov.w r2, #0
  13050. 80052c4: f04f 0300 mov.w r3, #0
  13051. 80052c8: 008b lsls r3, r1, #2
  13052. 80052ca: ea43 7390 orr.w r3, r3, r0, lsr #30
  13053. 80052ce: 0082 lsls r2, r0, #2
  13054. 80052d0: 4640 mov r0, r8
  13055. 80052d2: 4649 mov r1, r9
  13056. 80052d4: f7fa ff96 bl 8000204 <__aeabi_uldivmod>
  13057. 80052d8: 4602 mov r2, r0
  13058. 80052da: 460b mov r3, r1
  13059. 80052dc: 4b49 ldr r3, [pc, #292] ; (8005404 <UART_SetConfig+0x38c>)
  13060. 80052de: fba3 2302 umull r2, r3, r3, r2
  13061. 80052e2: 095b lsrs r3, r3, #5
  13062. 80052e4: 011e lsls r6, r3, #4
  13063. 80052e6: 6f7b ldr r3, [r7, #116] ; 0x74
  13064. 80052e8: 4618 mov r0, r3
  13065. 80052ea: f04f 0100 mov.w r1, #0
  13066. 80052ee: 4602 mov r2, r0
  13067. 80052f0: 460b mov r3, r1
  13068. 80052f2: 1894 adds r4, r2, r2
  13069. 80052f4: 60bc str r4, [r7, #8]
  13070. 80052f6: 415b adcs r3, r3
  13071. 80052f8: 60fb str r3, [r7, #12]
  13072. 80052fa: e9d7 2302 ldrd r2, r3, [r7, #8]
  13073. 80052fe: 1812 adds r2, r2, r0
  13074. 8005300: eb41 0303 adc.w r3, r1, r3
  13075. 8005304: f04f 0400 mov.w r4, #0
  13076. 8005308: f04f 0500 mov.w r5, #0
  13077. 800530c: 00dd lsls r5, r3, #3
  13078. 800530e: ea45 7552 orr.w r5, r5, r2, lsr #29
  13079. 8005312: 00d4 lsls r4, r2, #3
  13080. 8005314: 4622 mov r2, r4
  13081. 8005316: 462b mov r3, r5
  13082. 8005318: 1814 adds r4, r2, r0
  13083. 800531a: 64bc str r4, [r7, #72] ; 0x48
  13084. 800531c: 414b adcs r3, r1
  13085. 800531e: 64fb str r3, [r7, #76] ; 0x4c
  13086. 8005320: 6efb ldr r3, [r7, #108] ; 0x6c
  13087. 8005322: 685b ldr r3, [r3, #4]
  13088. 8005324: 4618 mov r0, r3
  13089. 8005326: f04f 0100 mov.w r1, #0
  13090. 800532a: f04f 0200 mov.w r2, #0
  13091. 800532e: f04f 0300 mov.w r3, #0
  13092. 8005332: 008b lsls r3, r1, #2
  13093. 8005334: ea43 7390 orr.w r3, r3, r0, lsr #30
  13094. 8005338: 0082 lsls r2, r0, #2
  13095. 800533a: e9d7 0112 ldrd r0, r1, [r7, #72] ; 0x48
  13096. 800533e: f7fa ff61 bl 8000204 <__aeabi_uldivmod>
  13097. 8005342: 4602 mov r2, r0
  13098. 8005344: 460b mov r3, r1
  13099. 8005346: 4b2f ldr r3, [pc, #188] ; (8005404 <UART_SetConfig+0x38c>)
  13100. 8005348: fba3 1302 umull r1, r3, r3, r2
  13101. 800534c: 095b lsrs r3, r3, #5
  13102. 800534e: 2164 movs r1, #100 ; 0x64
  13103. 8005350: fb01 f303 mul.w r3, r1, r3
  13104. 8005354: 1ad3 subs r3, r2, r3
  13105. 8005356: 011b lsls r3, r3, #4
  13106. 8005358: 3332 adds r3, #50 ; 0x32
  13107. 800535a: 4a2a ldr r2, [pc, #168] ; (8005404 <UART_SetConfig+0x38c>)
  13108. 800535c: fba2 2303 umull r2, r3, r2, r3
  13109. 8005360: 095b lsrs r3, r3, #5
  13110. 8005362: f003 03f0 and.w r3, r3, #240 ; 0xf0
  13111. 8005366: 441e add r6, r3
  13112. 8005368: 6f7b ldr r3, [r7, #116] ; 0x74
  13113. 800536a: 4618 mov r0, r3
  13114. 800536c: f04f 0100 mov.w r1, #0
  13115. 8005370: 4602 mov r2, r0
  13116. 8005372: 460b mov r3, r1
  13117. 8005374: 1894 adds r4, r2, r2
  13118. 8005376: 603c str r4, [r7, #0]
  13119. 8005378: 415b adcs r3, r3
  13120. 800537a: 607b str r3, [r7, #4]
  13121. 800537c: e9d7 2300 ldrd r2, r3, [r7]
  13122. 8005380: 1812 adds r2, r2, r0
  13123. 8005382: eb41 0303 adc.w r3, r1, r3
  13124. 8005386: f04f 0400 mov.w r4, #0
  13125. 800538a: f04f 0500 mov.w r5, #0
  13126. 800538e: 00dd lsls r5, r3, #3
  13127. 8005390: ea45 7552 orr.w r5, r5, r2, lsr #29
  13128. 8005394: 00d4 lsls r4, r2, #3
  13129. 8005396: 4622 mov r2, r4
  13130. 8005398: 462b mov r3, r5
  13131. 800539a: eb12 0a00 adds.w sl, r2, r0
  13132. 800539e: eb43 0b01 adc.w fp, r3, r1
  13133. 80053a2: 6efb ldr r3, [r7, #108] ; 0x6c
  13134. 80053a4: 685b ldr r3, [r3, #4]
  13135. 80053a6: 4618 mov r0, r3
  13136. 80053a8: f04f 0100 mov.w r1, #0
  13137. 80053ac: f04f 0200 mov.w r2, #0
  13138. 80053b0: f04f 0300 mov.w r3, #0
  13139. 80053b4: 008b lsls r3, r1, #2
  13140. 80053b6: ea43 7390 orr.w r3, r3, r0, lsr #30
  13141. 80053ba: 0082 lsls r2, r0, #2
  13142. 80053bc: 4650 mov r0, sl
  13143. 80053be: 4659 mov r1, fp
  13144. 80053c0: f7fa ff20 bl 8000204 <__aeabi_uldivmod>
  13145. 80053c4: 4602 mov r2, r0
  13146. 80053c6: 460b mov r3, r1
  13147. 80053c8: 4b0e ldr r3, [pc, #56] ; (8005404 <UART_SetConfig+0x38c>)
  13148. 80053ca: fba3 1302 umull r1, r3, r3, r2
  13149. 80053ce: 095b lsrs r3, r3, #5
  13150. 80053d0: 2164 movs r1, #100 ; 0x64
  13151. 80053d2: fb01 f303 mul.w r3, r1, r3
  13152. 80053d6: 1ad3 subs r3, r2, r3
  13153. 80053d8: 011b lsls r3, r3, #4
  13154. 80053da: 3332 adds r3, #50 ; 0x32
  13155. 80053dc: 4a09 ldr r2, [pc, #36] ; (8005404 <UART_SetConfig+0x38c>)
  13156. 80053de: fba2 2303 umull r2, r3, r2, r3
  13157. 80053e2: 095b lsrs r3, r3, #5
  13158. 80053e4: f003 020f and.w r2, r3, #15
  13159. 80053e8: 6efb ldr r3, [r7, #108] ; 0x6c
  13160. 80053ea: 681b ldr r3, [r3, #0]
  13161. 80053ec: 4432 add r2, r6
  13162. 80053ee: 609a str r2, [r3, #8]
  13163. }
  13164. 80053f0: bf00 nop
  13165. 80053f2: 377c adds r7, #124 ; 0x7c
  13166. 80053f4: 46bd mov sp, r7
  13167. 80053f6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  13168. 80053fa: bf00 nop
  13169. 80053fc: 40011000 .word 0x40011000
  13170. 8005400: 40011400 .word 0x40011400
  13171. 8005404: 51eb851f .word 0x51eb851f
  13172. 08005408 <USB_CoreInit>:
  13173. * @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains
  13174. * the configuration information for the specified USBx peripheral.
  13175. * @retval HAL status
  13176. */
  13177. HAL_StatusTypeDef USB_CoreInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg)
  13178. {
  13179. 8005408: b084 sub sp, #16
  13180. 800540a: b580 push {r7, lr}
  13181. 800540c: b084 sub sp, #16
  13182. 800540e: af00 add r7, sp, #0
  13183. 8005410: 6078 str r0, [r7, #4]
  13184. 8005412: f107 001c add.w r0, r7, #28
  13185. 8005416: e880 000e stmia.w r0, {r1, r2, r3}
  13186. HAL_StatusTypeDef ret;
  13187. if (cfg.phy_itface == USB_OTG_ULPI_PHY)
  13188. 800541a: 6b3b ldr r3, [r7, #48] ; 0x30
  13189. 800541c: 2b01 cmp r3, #1
  13190. 800541e: d122 bne.n 8005466 <USB_CoreInit+0x5e>
  13191. {
  13192. USBx->GCCFG &= ~(USB_OTG_GCCFG_PWRDWN);
  13193. 8005420: 687b ldr r3, [r7, #4]
  13194. 8005422: 6b9b ldr r3, [r3, #56] ; 0x38
  13195. 8005424: f423 3280 bic.w r2, r3, #65536 ; 0x10000
  13196. 8005428: 687b ldr r3, [r7, #4]
  13197. 800542a: 639a str r2, [r3, #56] ; 0x38
  13198. /* Init The ULPI Interface */
  13199. USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_TSDPS | USB_OTG_GUSBCFG_ULPIFSLS | USB_OTG_GUSBCFG_PHYSEL);
  13200. 800542c: 687b ldr r3, [r7, #4]
  13201. 800542e: 68db ldr r3, [r3, #12]
  13202. 8005430: f423 0384 bic.w r3, r3, #4325376 ; 0x420000
  13203. 8005434: f023 0340 bic.w r3, r3, #64 ; 0x40
  13204. 8005438: 687a ldr r2, [r7, #4]
  13205. 800543a: 60d3 str r3, [r2, #12]
  13206. /* Select vbus source */
  13207. USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_ULPIEVBUSD | USB_OTG_GUSBCFG_ULPIEVBUSI);
  13208. 800543c: 687b ldr r3, [r7, #4]
  13209. 800543e: 68db ldr r3, [r3, #12]
  13210. 8005440: f423 1240 bic.w r2, r3, #3145728 ; 0x300000
  13211. 8005444: 687b ldr r3, [r7, #4]
  13212. 8005446: 60da str r2, [r3, #12]
  13213. if (cfg.use_external_vbus == 1U)
  13214. 8005448: 6cfb ldr r3, [r7, #76] ; 0x4c
  13215. 800544a: 2b01 cmp r3, #1
  13216. 800544c: d105 bne.n 800545a <USB_CoreInit+0x52>
  13217. {
  13218. USBx->GUSBCFG |= USB_OTG_GUSBCFG_ULPIEVBUSD;
  13219. 800544e: 687b ldr r3, [r7, #4]
  13220. 8005450: 68db ldr r3, [r3, #12]
  13221. 8005452: f443 1280 orr.w r2, r3, #1048576 ; 0x100000
  13222. 8005456: 687b ldr r3, [r7, #4]
  13223. 8005458: 60da str r2, [r3, #12]
  13224. }
  13225. /* Reset after a PHY select */
  13226. ret = USB_CoreReset(USBx);
  13227. 800545a: 6878 ldr r0, [r7, #4]
  13228. 800545c: f001 fb16 bl 8006a8c <USB_CoreReset>
  13229. 8005460: 4603 mov r3, r0
  13230. 8005462: 73fb strb r3, [r7, #15]
  13231. 8005464: e01a b.n 800549c <USB_CoreInit+0x94>
  13232. }
  13233. else /* FS interface (embedded Phy) */
  13234. {
  13235. /* Select FS Embedded PHY */
  13236. USBx->GUSBCFG |= USB_OTG_GUSBCFG_PHYSEL;
  13237. 8005466: 687b ldr r3, [r7, #4]
  13238. 8005468: 68db ldr r3, [r3, #12]
  13239. 800546a: f043 0240 orr.w r2, r3, #64 ; 0x40
  13240. 800546e: 687b ldr r3, [r7, #4]
  13241. 8005470: 60da str r2, [r3, #12]
  13242. /* Reset after a PHY select */
  13243. ret = USB_CoreReset(USBx);
  13244. 8005472: 6878 ldr r0, [r7, #4]
  13245. 8005474: f001 fb0a bl 8006a8c <USB_CoreReset>
  13246. 8005478: 4603 mov r3, r0
  13247. 800547a: 73fb strb r3, [r7, #15]
  13248. if (cfg.battery_charging_enable == 0U)
  13249. 800547c: 6c3b ldr r3, [r7, #64] ; 0x40
  13250. 800547e: 2b00 cmp r3, #0
  13251. 8005480: d106 bne.n 8005490 <USB_CoreInit+0x88>
  13252. {
  13253. /* Activate the USB Transceiver */
  13254. USBx->GCCFG |= USB_OTG_GCCFG_PWRDWN;
  13255. 8005482: 687b ldr r3, [r7, #4]
  13256. 8005484: 6b9b ldr r3, [r3, #56] ; 0x38
  13257. 8005486: f443 3280 orr.w r2, r3, #65536 ; 0x10000
  13258. 800548a: 687b ldr r3, [r7, #4]
  13259. 800548c: 639a str r2, [r3, #56] ; 0x38
  13260. 800548e: e005 b.n 800549c <USB_CoreInit+0x94>
  13261. }
  13262. else
  13263. {
  13264. /* Deactivate the USB Transceiver */
  13265. USBx->GCCFG &= ~(USB_OTG_GCCFG_PWRDWN);
  13266. 8005490: 687b ldr r3, [r7, #4]
  13267. 8005492: 6b9b ldr r3, [r3, #56] ; 0x38
  13268. 8005494: f423 3280 bic.w r2, r3, #65536 ; 0x10000
  13269. 8005498: 687b ldr r3, [r7, #4]
  13270. 800549a: 639a str r2, [r3, #56] ; 0x38
  13271. }
  13272. }
  13273. if (cfg.dma_enable == 1U)
  13274. 800549c: 6abb ldr r3, [r7, #40] ; 0x28
  13275. 800549e: 2b01 cmp r3, #1
  13276. 80054a0: d10b bne.n 80054ba <USB_CoreInit+0xb2>
  13277. {
  13278. USBx->GAHBCFG |= USB_OTG_GAHBCFG_HBSTLEN_2;
  13279. 80054a2: 687b ldr r3, [r7, #4]
  13280. 80054a4: 689b ldr r3, [r3, #8]
  13281. 80054a6: f043 0206 orr.w r2, r3, #6
  13282. 80054aa: 687b ldr r3, [r7, #4]
  13283. 80054ac: 609a str r2, [r3, #8]
  13284. USBx->GAHBCFG |= USB_OTG_GAHBCFG_DMAEN;
  13285. 80054ae: 687b ldr r3, [r7, #4]
  13286. 80054b0: 689b ldr r3, [r3, #8]
  13287. 80054b2: f043 0220 orr.w r2, r3, #32
  13288. 80054b6: 687b ldr r3, [r7, #4]
  13289. 80054b8: 609a str r2, [r3, #8]
  13290. }
  13291. return ret;
  13292. 80054ba: 7bfb ldrb r3, [r7, #15]
  13293. }
  13294. 80054bc: 4618 mov r0, r3
  13295. 80054be: 3710 adds r7, #16
  13296. 80054c0: 46bd mov sp, r7
  13297. 80054c2: e8bd 4080 ldmia.w sp!, {r7, lr}
  13298. 80054c6: b004 add sp, #16
  13299. 80054c8: 4770 bx lr
  13300. ...
  13301. 080054cc <USB_SetTurnaroundTime>:
  13302. * @param hclk: AHB clock frequency
  13303. * @retval USB turnaround time In PHY Clocks number
  13304. */
  13305. HAL_StatusTypeDef USB_SetTurnaroundTime(USB_OTG_GlobalTypeDef *USBx,
  13306. uint32_t hclk, uint8_t speed)
  13307. {
  13308. 80054cc: b480 push {r7}
  13309. 80054ce: b087 sub sp, #28
  13310. 80054d0: af00 add r7, sp, #0
  13311. 80054d2: 60f8 str r0, [r7, #12]
  13312. 80054d4: 60b9 str r1, [r7, #8]
  13313. 80054d6: 4613 mov r3, r2
  13314. 80054d8: 71fb strb r3, [r7, #7]
  13315. /* The USBTRD is configured according to the tables below, depending on AHB frequency
  13316. used by application. In the low AHB frequency range it is used to stretch enough the USB response
  13317. time to IN tokens, the USB turnaround time, so to compensate for the longer AHB read access
  13318. latency to the Data FIFO */
  13319. if (speed == USBD_FS_SPEED)
  13320. 80054da: 79fb ldrb r3, [r7, #7]
  13321. 80054dc: 2b02 cmp r3, #2
  13322. 80054de: d165 bne.n 80055ac <USB_SetTurnaroundTime+0xe0>
  13323. {
  13324. if ((hclk >= 14200000U) && (hclk < 15000000U))
  13325. 80054e0: 68bb ldr r3, [r7, #8]
  13326. 80054e2: 4a41 ldr r2, [pc, #260] ; (80055e8 <USB_SetTurnaroundTime+0x11c>)
  13327. 80054e4: 4293 cmp r3, r2
  13328. 80054e6: d906 bls.n 80054f6 <USB_SetTurnaroundTime+0x2a>
  13329. 80054e8: 68bb ldr r3, [r7, #8]
  13330. 80054ea: 4a40 ldr r2, [pc, #256] ; (80055ec <USB_SetTurnaroundTime+0x120>)
  13331. 80054ec: 4293 cmp r3, r2
  13332. 80054ee: d202 bcs.n 80054f6 <USB_SetTurnaroundTime+0x2a>
  13333. {
  13334. /* hclk Clock Range between 14.2-15 MHz */
  13335. UsbTrd = 0xFU;
  13336. 80054f0: 230f movs r3, #15
  13337. 80054f2: 617b str r3, [r7, #20]
  13338. 80054f4: e062 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13339. }
  13340. else if ((hclk >= 15000000U) && (hclk < 16000000U))
  13341. 80054f6: 68bb ldr r3, [r7, #8]
  13342. 80054f8: 4a3c ldr r2, [pc, #240] ; (80055ec <USB_SetTurnaroundTime+0x120>)
  13343. 80054fa: 4293 cmp r3, r2
  13344. 80054fc: d306 bcc.n 800550c <USB_SetTurnaroundTime+0x40>
  13345. 80054fe: 68bb ldr r3, [r7, #8]
  13346. 8005500: 4a3b ldr r2, [pc, #236] ; (80055f0 <USB_SetTurnaroundTime+0x124>)
  13347. 8005502: 4293 cmp r3, r2
  13348. 8005504: d202 bcs.n 800550c <USB_SetTurnaroundTime+0x40>
  13349. {
  13350. /* hclk Clock Range between 15-16 MHz */
  13351. UsbTrd = 0xEU;
  13352. 8005506: 230e movs r3, #14
  13353. 8005508: 617b str r3, [r7, #20]
  13354. 800550a: e057 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13355. }
  13356. else if ((hclk >= 16000000U) && (hclk < 17200000U))
  13357. 800550c: 68bb ldr r3, [r7, #8]
  13358. 800550e: 4a38 ldr r2, [pc, #224] ; (80055f0 <USB_SetTurnaroundTime+0x124>)
  13359. 8005510: 4293 cmp r3, r2
  13360. 8005512: d306 bcc.n 8005522 <USB_SetTurnaroundTime+0x56>
  13361. 8005514: 68bb ldr r3, [r7, #8]
  13362. 8005516: 4a37 ldr r2, [pc, #220] ; (80055f4 <USB_SetTurnaroundTime+0x128>)
  13363. 8005518: 4293 cmp r3, r2
  13364. 800551a: d202 bcs.n 8005522 <USB_SetTurnaroundTime+0x56>
  13365. {
  13366. /* hclk Clock Range between 16-17.2 MHz */
  13367. UsbTrd = 0xDU;
  13368. 800551c: 230d movs r3, #13
  13369. 800551e: 617b str r3, [r7, #20]
  13370. 8005520: e04c b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13371. }
  13372. else if ((hclk >= 17200000U) && (hclk < 18500000U))
  13373. 8005522: 68bb ldr r3, [r7, #8]
  13374. 8005524: 4a33 ldr r2, [pc, #204] ; (80055f4 <USB_SetTurnaroundTime+0x128>)
  13375. 8005526: 4293 cmp r3, r2
  13376. 8005528: d306 bcc.n 8005538 <USB_SetTurnaroundTime+0x6c>
  13377. 800552a: 68bb ldr r3, [r7, #8]
  13378. 800552c: 4a32 ldr r2, [pc, #200] ; (80055f8 <USB_SetTurnaroundTime+0x12c>)
  13379. 800552e: 4293 cmp r3, r2
  13380. 8005530: d802 bhi.n 8005538 <USB_SetTurnaroundTime+0x6c>
  13381. {
  13382. /* hclk Clock Range between 17.2-18.5 MHz */
  13383. UsbTrd = 0xCU;
  13384. 8005532: 230c movs r3, #12
  13385. 8005534: 617b str r3, [r7, #20]
  13386. 8005536: e041 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13387. }
  13388. else if ((hclk >= 18500000U) && (hclk < 20000000U))
  13389. 8005538: 68bb ldr r3, [r7, #8]
  13390. 800553a: 4a2f ldr r2, [pc, #188] ; (80055f8 <USB_SetTurnaroundTime+0x12c>)
  13391. 800553c: 4293 cmp r3, r2
  13392. 800553e: d906 bls.n 800554e <USB_SetTurnaroundTime+0x82>
  13393. 8005540: 68bb ldr r3, [r7, #8]
  13394. 8005542: 4a2e ldr r2, [pc, #184] ; (80055fc <USB_SetTurnaroundTime+0x130>)
  13395. 8005544: 4293 cmp r3, r2
  13396. 8005546: d802 bhi.n 800554e <USB_SetTurnaroundTime+0x82>
  13397. {
  13398. /* hclk Clock Range between 18.5-20 MHz */
  13399. UsbTrd = 0xBU;
  13400. 8005548: 230b movs r3, #11
  13401. 800554a: 617b str r3, [r7, #20]
  13402. 800554c: e036 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13403. }
  13404. else if ((hclk >= 20000000U) && (hclk < 21800000U))
  13405. 800554e: 68bb ldr r3, [r7, #8]
  13406. 8005550: 4a2a ldr r2, [pc, #168] ; (80055fc <USB_SetTurnaroundTime+0x130>)
  13407. 8005552: 4293 cmp r3, r2
  13408. 8005554: d906 bls.n 8005564 <USB_SetTurnaroundTime+0x98>
  13409. 8005556: 68bb ldr r3, [r7, #8]
  13410. 8005558: 4a29 ldr r2, [pc, #164] ; (8005600 <USB_SetTurnaroundTime+0x134>)
  13411. 800555a: 4293 cmp r3, r2
  13412. 800555c: d802 bhi.n 8005564 <USB_SetTurnaroundTime+0x98>
  13413. {
  13414. /* hclk Clock Range between 20-21.8 MHz */
  13415. UsbTrd = 0xAU;
  13416. 800555e: 230a movs r3, #10
  13417. 8005560: 617b str r3, [r7, #20]
  13418. 8005562: e02b b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13419. }
  13420. else if ((hclk >= 21800000U) && (hclk < 24000000U))
  13421. 8005564: 68bb ldr r3, [r7, #8]
  13422. 8005566: 4a26 ldr r2, [pc, #152] ; (8005600 <USB_SetTurnaroundTime+0x134>)
  13423. 8005568: 4293 cmp r3, r2
  13424. 800556a: d906 bls.n 800557a <USB_SetTurnaroundTime+0xae>
  13425. 800556c: 68bb ldr r3, [r7, #8]
  13426. 800556e: 4a25 ldr r2, [pc, #148] ; (8005604 <USB_SetTurnaroundTime+0x138>)
  13427. 8005570: 4293 cmp r3, r2
  13428. 8005572: d202 bcs.n 800557a <USB_SetTurnaroundTime+0xae>
  13429. {
  13430. /* hclk Clock Range between 21.8-24 MHz */
  13431. UsbTrd = 0x9U;
  13432. 8005574: 2309 movs r3, #9
  13433. 8005576: 617b str r3, [r7, #20]
  13434. 8005578: e020 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13435. }
  13436. else if ((hclk >= 24000000U) && (hclk < 27700000U))
  13437. 800557a: 68bb ldr r3, [r7, #8]
  13438. 800557c: 4a21 ldr r2, [pc, #132] ; (8005604 <USB_SetTurnaroundTime+0x138>)
  13439. 800557e: 4293 cmp r3, r2
  13440. 8005580: d306 bcc.n 8005590 <USB_SetTurnaroundTime+0xc4>
  13441. 8005582: 68bb ldr r3, [r7, #8]
  13442. 8005584: 4a20 ldr r2, [pc, #128] ; (8005608 <USB_SetTurnaroundTime+0x13c>)
  13443. 8005586: 4293 cmp r3, r2
  13444. 8005588: d802 bhi.n 8005590 <USB_SetTurnaroundTime+0xc4>
  13445. {
  13446. /* hclk Clock Range between 24-27.7 MHz */
  13447. UsbTrd = 0x8U;
  13448. 800558a: 2308 movs r3, #8
  13449. 800558c: 617b str r3, [r7, #20]
  13450. 800558e: e015 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13451. }
  13452. else if ((hclk >= 27700000U) && (hclk < 32000000U))
  13453. 8005590: 68bb ldr r3, [r7, #8]
  13454. 8005592: 4a1d ldr r2, [pc, #116] ; (8005608 <USB_SetTurnaroundTime+0x13c>)
  13455. 8005594: 4293 cmp r3, r2
  13456. 8005596: d906 bls.n 80055a6 <USB_SetTurnaroundTime+0xda>
  13457. 8005598: 68bb ldr r3, [r7, #8]
  13458. 800559a: 4a1c ldr r2, [pc, #112] ; (800560c <USB_SetTurnaroundTime+0x140>)
  13459. 800559c: 4293 cmp r3, r2
  13460. 800559e: d202 bcs.n 80055a6 <USB_SetTurnaroundTime+0xda>
  13461. {
  13462. /* hclk Clock Range between 27.7-32 MHz */
  13463. UsbTrd = 0x7U;
  13464. 80055a0: 2307 movs r3, #7
  13465. 80055a2: 617b str r3, [r7, #20]
  13466. 80055a4: e00a b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13467. }
  13468. else /* if(hclk >= 32000000) */
  13469. {
  13470. /* hclk Clock Range between 32-200 MHz */
  13471. UsbTrd = 0x6U;
  13472. 80055a6: 2306 movs r3, #6
  13473. 80055a8: 617b str r3, [r7, #20]
  13474. 80055aa: e007 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13475. }
  13476. }
  13477. else if (speed == USBD_HS_SPEED)
  13478. 80055ac: 79fb ldrb r3, [r7, #7]
  13479. 80055ae: 2b00 cmp r3, #0
  13480. 80055b0: d102 bne.n 80055b8 <USB_SetTurnaroundTime+0xec>
  13481. {
  13482. UsbTrd = USBD_HS_TRDT_VALUE;
  13483. 80055b2: 2309 movs r3, #9
  13484. 80055b4: 617b str r3, [r7, #20]
  13485. 80055b6: e001 b.n 80055bc <USB_SetTurnaroundTime+0xf0>
  13486. }
  13487. else
  13488. {
  13489. UsbTrd = USBD_DEFAULT_TRDT_VALUE;
  13490. 80055b8: 2309 movs r3, #9
  13491. 80055ba: 617b str r3, [r7, #20]
  13492. }
  13493. USBx->GUSBCFG &= ~USB_OTG_GUSBCFG_TRDT;
  13494. 80055bc: 68fb ldr r3, [r7, #12]
  13495. 80055be: 68db ldr r3, [r3, #12]
  13496. 80055c0: f423 5270 bic.w r2, r3, #15360 ; 0x3c00
  13497. 80055c4: 68fb ldr r3, [r7, #12]
  13498. 80055c6: 60da str r2, [r3, #12]
  13499. USBx->GUSBCFG |= (uint32_t)((UsbTrd << 10) & USB_OTG_GUSBCFG_TRDT);
  13500. 80055c8: 68fb ldr r3, [r7, #12]
  13501. 80055ca: 68da ldr r2, [r3, #12]
  13502. 80055cc: 697b ldr r3, [r7, #20]
  13503. 80055ce: 029b lsls r3, r3, #10
  13504. 80055d0: f403 5370 and.w r3, r3, #15360 ; 0x3c00
  13505. 80055d4: 431a orrs r2, r3
  13506. 80055d6: 68fb ldr r3, [r7, #12]
  13507. 80055d8: 60da str r2, [r3, #12]
  13508. return HAL_OK;
  13509. 80055da: 2300 movs r3, #0
  13510. }
  13511. 80055dc: 4618 mov r0, r3
  13512. 80055de: 371c adds r7, #28
  13513. 80055e0: 46bd mov sp, r7
  13514. 80055e2: f85d 7b04 ldr.w r7, [sp], #4
  13515. 80055e6: 4770 bx lr
  13516. 80055e8: 00d8acbf .word 0x00d8acbf
  13517. 80055ec: 00e4e1c0 .word 0x00e4e1c0
  13518. 80055f0: 00f42400 .word 0x00f42400
  13519. 80055f4: 01067380 .word 0x01067380
  13520. 80055f8: 011a499f .word 0x011a499f
  13521. 80055fc: 01312cff .word 0x01312cff
  13522. 8005600: 014ca43f .word 0x014ca43f
  13523. 8005604: 016e3600 .word 0x016e3600
  13524. 8005608: 01a6ab1f .word 0x01a6ab1f
  13525. 800560c: 01e84800 .word 0x01e84800
  13526. 08005610 <USB_EnableGlobalInt>:
  13527. * Enables the controller's Global Int in the AHB Config reg
  13528. * @param USBx Selected device
  13529. * @retval HAL status
  13530. */
  13531. HAL_StatusTypeDef USB_EnableGlobalInt(USB_OTG_GlobalTypeDef *USBx)
  13532. {
  13533. 8005610: b480 push {r7}
  13534. 8005612: b083 sub sp, #12
  13535. 8005614: af00 add r7, sp, #0
  13536. 8005616: 6078 str r0, [r7, #4]
  13537. USBx->GAHBCFG |= USB_OTG_GAHBCFG_GINT;
  13538. 8005618: 687b ldr r3, [r7, #4]
  13539. 800561a: 689b ldr r3, [r3, #8]
  13540. 800561c: f043 0201 orr.w r2, r3, #1
  13541. 8005620: 687b ldr r3, [r7, #4]
  13542. 8005622: 609a str r2, [r3, #8]
  13543. return HAL_OK;
  13544. 8005624: 2300 movs r3, #0
  13545. }
  13546. 8005626: 4618 mov r0, r3
  13547. 8005628: 370c adds r7, #12
  13548. 800562a: 46bd mov sp, r7
  13549. 800562c: f85d 7b04 ldr.w r7, [sp], #4
  13550. 8005630: 4770 bx lr
  13551. 08005632 <USB_DisableGlobalInt>:
  13552. * Disable the controller's Global Int in the AHB Config reg
  13553. * @param USBx Selected device
  13554. * @retval HAL status
  13555. */
  13556. HAL_StatusTypeDef USB_DisableGlobalInt(USB_OTG_GlobalTypeDef *USBx)
  13557. {
  13558. 8005632: b480 push {r7}
  13559. 8005634: b083 sub sp, #12
  13560. 8005636: af00 add r7, sp, #0
  13561. 8005638: 6078 str r0, [r7, #4]
  13562. USBx->GAHBCFG &= ~USB_OTG_GAHBCFG_GINT;
  13563. 800563a: 687b ldr r3, [r7, #4]
  13564. 800563c: 689b ldr r3, [r3, #8]
  13565. 800563e: f023 0201 bic.w r2, r3, #1
  13566. 8005642: 687b ldr r3, [r7, #4]
  13567. 8005644: 609a str r2, [r3, #8]
  13568. return HAL_OK;
  13569. 8005646: 2300 movs r3, #0
  13570. }
  13571. 8005648: 4618 mov r0, r3
  13572. 800564a: 370c adds r7, #12
  13573. 800564c: 46bd mov sp, r7
  13574. 800564e: f85d 7b04 ldr.w r7, [sp], #4
  13575. 8005652: 4770 bx lr
  13576. 08005654 <USB_SetCurrentMode>:
  13577. * @arg USB_DEVICE_MODE Peripheral mode
  13578. * @arg USB_HOST_MODE Host mode
  13579. * @retval HAL status
  13580. */
  13581. HAL_StatusTypeDef USB_SetCurrentMode(USB_OTG_GlobalTypeDef *USBx, USB_OTG_ModeTypeDef mode)
  13582. {
  13583. 8005654: b580 push {r7, lr}
  13584. 8005656: b084 sub sp, #16
  13585. 8005658: af00 add r7, sp, #0
  13586. 800565a: 6078 str r0, [r7, #4]
  13587. 800565c: 460b mov r3, r1
  13588. 800565e: 70fb strb r3, [r7, #3]
  13589. uint32_t ms = 0U;
  13590. 8005660: 2300 movs r3, #0
  13591. 8005662: 60fb str r3, [r7, #12]
  13592. USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_FHMOD | USB_OTG_GUSBCFG_FDMOD);
  13593. 8005664: 687b ldr r3, [r7, #4]
  13594. 8005666: 68db ldr r3, [r3, #12]
  13595. 8005668: f023 42c0 bic.w r2, r3, #1610612736 ; 0x60000000
  13596. 800566c: 687b ldr r3, [r7, #4]
  13597. 800566e: 60da str r2, [r3, #12]
  13598. if (mode == USB_HOST_MODE)
  13599. 8005670: 78fb ldrb r3, [r7, #3]
  13600. 8005672: 2b01 cmp r3, #1
  13601. 8005674: d115 bne.n 80056a2 <USB_SetCurrentMode+0x4e>
  13602. {
  13603. USBx->GUSBCFG |= USB_OTG_GUSBCFG_FHMOD;
  13604. 8005676: 687b ldr r3, [r7, #4]
  13605. 8005678: 68db ldr r3, [r3, #12]
  13606. 800567a: f043 5200 orr.w r2, r3, #536870912 ; 0x20000000
  13607. 800567e: 687b ldr r3, [r7, #4]
  13608. 8005680: 60da str r2, [r3, #12]
  13609. do
  13610. {
  13611. HAL_Delay(1U);
  13612. 8005682: 2001 movs r0, #1
  13613. 8005684: f7fb fe16 bl 80012b4 <HAL_Delay>
  13614. ms++;
  13615. 8005688: 68fb ldr r3, [r7, #12]
  13616. 800568a: 3301 adds r3, #1
  13617. 800568c: 60fb str r3, [r7, #12]
  13618. } while ((USB_GetMode(USBx) != (uint32_t)USB_HOST_MODE) && (ms < 50U));
  13619. 800568e: 6878 ldr r0, [r7, #4]
  13620. 8005690: f001 f96c bl 800696c <USB_GetMode>
  13621. 8005694: 4603 mov r3, r0
  13622. 8005696: 2b01 cmp r3, #1
  13623. 8005698: d01e beq.n 80056d8 <USB_SetCurrentMode+0x84>
  13624. 800569a: 68fb ldr r3, [r7, #12]
  13625. 800569c: 2b31 cmp r3, #49 ; 0x31
  13626. 800569e: d9f0 bls.n 8005682 <USB_SetCurrentMode+0x2e>
  13627. 80056a0: e01a b.n 80056d8 <USB_SetCurrentMode+0x84>
  13628. }
  13629. else if (mode == USB_DEVICE_MODE)
  13630. 80056a2: 78fb ldrb r3, [r7, #3]
  13631. 80056a4: 2b00 cmp r3, #0
  13632. 80056a6: d115 bne.n 80056d4 <USB_SetCurrentMode+0x80>
  13633. {
  13634. USBx->GUSBCFG |= USB_OTG_GUSBCFG_FDMOD;
  13635. 80056a8: 687b ldr r3, [r7, #4]
  13636. 80056aa: 68db ldr r3, [r3, #12]
  13637. 80056ac: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000
  13638. 80056b0: 687b ldr r3, [r7, #4]
  13639. 80056b2: 60da str r2, [r3, #12]
  13640. do
  13641. {
  13642. HAL_Delay(1U);
  13643. 80056b4: 2001 movs r0, #1
  13644. 80056b6: f7fb fdfd bl 80012b4 <HAL_Delay>
  13645. ms++;
  13646. 80056ba: 68fb ldr r3, [r7, #12]
  13647. 80056bc: 3301 adds r3, #1
  13648. 80056be: 60fb str r3, [r7, #12]
  13649. } while ((USB_GetMode(USBx) != (uint32_t)USB_DEVICE_MODE) && (ms < 50U));
  13650. 80056c0: 6878 ldr r0, [r7, #4]
  13651. 80056c2: f001 f953 bl 800696c <USB_GetMode>
  13652. 80056c6: 4603 mov r3, r0
  13653. 80056c8: 2b00 cmp r3, #0
  13654. 80056ca: d005 beq.n 80056d8 <USB_SetCurrentMode+0x84>
  13655. 80056cc: 68fb ldr r3, [r7, #12]
  13656. 80056ce: 2b31 cmp r3, #49 ; 0x31
  13657. 80056d0: d9f0 bls.n 80056b4 <USB_SetCurrentMode+0x60>
  13658. 80056d2: e001 b.n 80056d8 <USB_SetCurrentMode+0x84>
  13659. }
  13660. else
  13661. {
  13662. return HAL_ERROR;
  13663. 80056d4: 2301 movs r3, #1
  13664. 80056d6: e005 b.n 80056e4 <USB_SetCurrentMode+0x90>
  13665. }
  13666. if (ms == 50U)
  13667. 80056d8: 68fb ldr r3, [r7, #12]
  13668. 80056da: 2b32 cmp r3, #50 ; 0x32
  13669. 80056dc: d101 bne.n 80056e2 <USB_SetCurrentMode+0x8e>
  13670. {
  13671. return HAL_ERROR;
  13672. 80056de: 2301 movs r3, #1
  13673. 80056e0: e000 b.n 80056e4 <USB_SetCurrentMode+0x90>
  13674. }
  13675. return HAL_OK;
  13676. 80056e2: 2300 movs r3, #0
  13677. }
  13678. 80056e4: 4618 mov r0, r3
  13679. 80056e6: 3710 adds r7, #16
  13680. 80056e8: 46bd mov sp, r7
  13681. 80056ea: bd80 pop {r7, pc}
  13682. 080056ec <USB_DevInit>:
  13683. * @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains
  13684. * the configuration information for the specified USBx peripheral.
  13685. * @retval HAL status
  13686. */
  13687. HAL_StatusTypeDef USB_DevInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg)
  13688. {
  13689. 80056ec: b084 sub sp, #16
  13690. 80056ee: b580 push {r7, lr}
  13691. 80056f0: b086 sub sp, #24
  13692. 80056f2: af00 add r7, sp, #0
  13693. 80056f4: 6078 str r0, [r7, #4]
  13694. 80056f6: f107 0024 add.w r0, r7, #36 ; 0x24
  13695. 80056fa: e880 000e stmia.w r0, {r1, r2, r3}
  13696. HAL_StatusTypeDef ret = HAL_OK;
  13697. 80056fe: 2300 movs r3, #0
  13698. 8005700: 75fb strb r3, [r7, #23]
  13699. uint32_t USBx_BASE = (uint32_t)USBx;
  13700. 8005702: 687b ldr r3, [r7, #4]
  13701. 8005704: 60fb str r3, [r7, #12]
  13702. uint32_t i;
  13703. for (i = 0U; i < 15U; i++)
  13704. 8005706: 2300 movs r3, #0
  13705. 8005708: 613b str r3, [r7, #16]
  13706. 800570a: e009 b.n 8005720 <USB_DevInit+0x34>
  13707. {
  13708. USBx->DIEPTXF[i] = 0U;
  13709. 800570c: 687a ldr r2, [r7, #4]
  13710. 800570e: 693b ldr r3, [r7, #16]
  13711. 8005710: 3340 adds r3, #64 ; 0x40
  13712. 8005712: 009b lsls r3, r3, #2
  13713. 8005714: 4413 add r3, r2
  13714. 8005716: 2200 movs r2, #0
  13715. 8005718: 605a str r2, [r3, #4]
  13716. for (i = 0U; i < 15U; i++)
  13717. 800571a: 693b ldr r3, [r7, #16]
  13718. 800571c: 3301 adds r3, #1
  13719. 800571e: 613b str r3, [r7, #16]
  13720. 8005720: 693b ldr r3, [r7, #16]
  13721. 8005722: 2b0e cmp r3, #14
  13722. 8005724: d9f2 bls.n 800570c <USB_DevInit+0x20>
  13723. }
  13724. #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
  13725. /* VBUS Sensing setup */
  13726. if (cfg.vbus_sensing_enable == 0U)
  13727. 8005726: 6cfb ldr r3, [r7, #76] ; 0x4c
  13728. 8005728: 2b00 cmp r3, #0
  13729. 800572a: d11c bne.n 8005766 <USB_DevInit+0x7a>
  13730. {
  13731. USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS;
  13732. 800572c: 68fb ldr r3, [r7, #12]
  13733. 800572e: f503 6300 add.w r3, r3, #2048 ; 0x800
  13734. 8005732: 685b ldr r3, [r3, #4]
  13735. 8005734: 68fa ldr r2, [r7, #12]
  13736. 8005736: f502 6200 add.w r2, r2, #2048 ; 0x800
  13737. 800573a: f043 0302 orr.w r3, r3, #2
  13738. 800573e: 6053 str r3, [r2, #4]
  13739. /* Deactivate VBUS Sensing B */
  13740. USBx->GCCFG &= ~USB_OTG_GCCFG_VBDEN;
  13741. 8005740: 687b ldr r3, [r7, #4]
  13742. 8005742: 6b9b ldr r3, [r3, #56] ; 0x38
  13743. 8005744: f423 1200 bic.w r2, r3, #2097152 ; 0x200000
  13744. 8005748: 687b ldr r3, [r7, #4]
  13745. 800574a: 639a str r2, [r3, #56] ; 0x38
  13746. /* B-peripheral session valid override enable */
  13747. USBx->GOTGCTL |= USB_OTG_GOTGCTL_BVALOEN;
  13748. 800574c: 687b ldr r3, [r7, #4]
  13749. 800574e: 681b ldr r3, [r3, #0]
  13750. 8005750: f043 0240 orr.w r2, r3, #64 ; 0x40
  13751. 8005754: 687b ldr r3, [r7, #4]
  13752. 8005756: 601a str r2, [r3, #0]
  13753. USBx->GOTGCTL |= USB_OTG_GOTGCTL_BVALOVAL;
  13754. 8005758: 687b ldr r3, [r7, #4]
  13755. 800575a: 681b ldr r3, [r3, #0]
  13756. 800575c: f043 0280 orr.w r2, r3, #128 ; 0x80
  13757. 8005760: 687b ldr r3, [r7, #4]
  13758. 8005762: 601a str r2, [r3, #0]
  13759. 8005764: e005 b.n 8005772 <USB_DevInit+0x86>
  13760. }
  13761. else
  13762. {
  13763. /* Enable HW VBUS sensing */
  13764. USBx->GCCFG |= USB_OTG_GCCFG_VBDEN;
  13765. 8005766: 687b ldr r3, [r7, #4]
  13766. 8005768: 6b9b ldr r3, [r3, #56] ; 0x38
  13767. 800576a: f443 1200 orr.w r2, r3, #2097152 ; 0x200000
  13768. 800576e: 687b ldr r3, [r7, #4]
  13769. 8005770: 639a str r2, [r3, #56] ; 0x38
  13770. USBx->GCCFG |= USB_OTG_GCCFG_VBUSBSEN;
  13771. }
  13772. #endif /* defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) */
  13773. /* Restart the Phy Clock */
  13774. USBx_PCGCCTL = 0U;
  13775. 8005772: 68fb ldr r3, [r7, #12]
  13776. 8005774: f503 6360 add.w r3, r3, #3584 ; 0xe00
  13777. 8005778: 461a mov r2, r3
  13778. 800577a: 2300 movs r3, #0
  13779. 800577c: 6013 str r3, [r2, #0]
  13780. /* Device mode configuration */
  13781. USBx_DEVICE->DCFG |= DCFG_FRAME_INTERVAL_80;
  13782. 800577e: 68fb ldr r3, [r7, #12]
  13783. 8005780: f503 6300 add.w r3, r3, #2048 ; 0x800
  13784. 8005784: 4619 mov r1, r3
  13785. 8005786: 68fb ldr r3, [r7, #12]
  13786. 8005788: f503 6300 add.w r3, r3, #2048 ; 0x800
  13787. 800578c: 461a mov r2, r3
  13788. 800578e: 680b ldr r3, [r1, #0]
  13789. 8005790: 6013 str r3, [r2, #0]
  13790. if (cfg.phy_itface == USB_OTG_ULPI_PHY)
  13791. 8005792: 6bbb ldr r3, [r7, #56] ; 0x38
  13792. 8005794: 2b01 cmp r3, #1
  13793. 8005796: d10c bne.n 80057b2 <USB_DevInit+0xc6>
  13794. {
  13795. if (cfg.speed == USBD_HS_SPEED)
  13796. 8005798: 6afb ldr r3, [r7, #44] ; 0x2c
  13797. 800579a: 2b00 cmp r3, #0
  13798. 800579c: d104 bne.n 80057a8 <USB_DevInit+0xbc>
  13799. {
  13800. /* Set Core speed to High speed mode */
  13801. (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_HIGH);
  13802. 800579e: 2100 movs r1, #0
  13803. 80057a0: 6878 ldr r0, [r7, #4]
  13804. 80057a2: f000 f945 bl 8005a30 <USB_SetDevSpeed>
  13805. 80057a6: e008 b.n 80057ba <USB_DevInit+0xce>
  13806. }
  13807. else
  13808. {
  13809. /* Set Core speed to Full speed mode */
  13810. (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_HIGH_IN_FULL);
  13811. 80057a8: 2101 movs r1, #1
  13812. 80057aa: 6878 ldr r0, [r7, #4]
  13813. 80057ac: f000 f940 bl 8005a30 <USB_SetDevSpeed>
  13814. 80057b0: e003 b.n 80057ba <USB_DevInit+0xce>
  13815. }
  13816. }
  13817. else
  13818. {
  13819. /* Set Core speed to Full speed mode */
  13820. (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_FULL);
  13821. 80057b2: 2103 movs r1, #3
  13822. 80057b4: 6878 ldr r0, [r7, #4]
  13823. 80057b6: f000 f93b bl 8005a30 <USB_SetDevSpeed>
  13824. }
  13825. /* Flush the FIFOs */
  13826. if (USB_FlushTxFifo(USBx, 0x10U) != HAL_OK) /* all Tx FIFOs */
  13827. 80057ba: 2110 movs r1, #16
  13828. 80057bc: 6878 ldr r0, [r7, #4]
  13829. 80057be: f000 f8f3 bl 80059a8 <USB_FlushTxFifo>
  13830. 80057c2: 4603 mov r3, r0
  13831. 80057c4: 2b00 cmp r3, #0
  13832. 80057c6: d001 beq.n 80057cc <USB_DevInit+0xe0>
  13833. {
  13834. ret = HAL_ERROR;
  13835. 80057c8: 2301 movs r3, #1
  13836. 80057ca: 75fb strb r3, [r7, #23]
  13837. }
  13838. if (USB_FlushRxFifo(USBx) != HAL_OK)
  13839. 80057cc: 6878 ldr r0, [r7, #4]
  13840. 80057ce: f000 f90f bl 80059f0 <USB_FlushRxFifo>
  13841. 80057d2: 4603 mov r3, r0
  13842. 80057d4: 2b00 cmp r3, #0
  13843. 80057d6: d001 beq.n 80057dc <USB_DevInit+0xf0>
  13844. {
  13845. ret = HAL_ERROR;
  13846. 80057d8: 2301 movs r3, #1
  13847. 80057da: 75fb strb r3, [r7, #23]
  13848. }
  13849. /* Clear all pending Device Interrupts */
  13850. USBx_DEVICE->DIEPMSK = 0U;
  13851. 80057dc: 68fb ldr r3, [r7, #12]
  13852. 80057de: f503 6300 add.w r3, r3, #2048 ; 0x800
  13853. 80057e2: 461a mov r2, r3
  13854. 80057e4: 2300 movs r3, #0
  13855. 80057e6: 6113 str r3, [r2, #16]
  13856. USBx_DEVICE->DOEPMSK = 0U;
  13857. 80057e8: 68fb ldr r3, [r7, #12]
  13858. 80057ea: f503 6300 add.w r3, r3, #2048 ; 0x800
  13859. 80057ee: 461a mov r2, r3
  13860. 80057f0: 2300 movs r3, #0
  13861. 80057f2: 6153 str r3, [r2, #20]
  13862. USBx_DEVICE->DAINTMSK = 0U;
  13863. 80057f4: 68fb ldr r3, [r7, #12]
  13864. 80057f6: f503 6300 add.w r3, r3, #2048 ; 0x800
  13865. 80057fa: 461a mov r2, r3
  13866. 80057fc: 2300 movs r3, #0
  13867. 80057fe: 61d3 str r3, [r2, #28]
  13868. for (i = 0U; i < cfg.dev_endpoints; i++)
  13869. 8005800: 2300 movs r3, #0
  13870. 8005802: 613b str r3, [r7, #16]
  13871. 8005804: e043 b.n 800588e <USB_DevInit+0x1a2>
  13872. {
  13873. if ((USBx_INEP(i)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == USB_OTG_DIEPCTL_EPENA)
  13874. 8005806: 693b ldr r3, [r7, #16]
  13875. 8005808: 015a lsls r2, r3, #5
  13876. 800580a: 68fb ldr r3, [r7, #12]
  13877. 800580c: 4413 add r3, r2
  13878. 800580e: f503 6310 add.w r3, r3, #2304 ; 0x900
  13879. 8005812: 681b ldr r3, [r3, #0]
  13880. 8005814: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
  13881. 8005818: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
  13882. 800581c: d118 bne.n 8005850 <USB_DevInit+0x164>
  13883. {
  13884. if (i == 0U)
  13885. 800581e: 693b ldr r3, [r7, #16]
  13886. 8005820: 2b00 cmp r3, #0
  13887. 8005822: d10a bne.n 800583a <USB_DevInit+0x14e>
  13888. {
  13889. USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_SNAK;
  13890. 8005824: 693b ldr r3, [r7, #16]
  13891. 8005826: 015a lsls r2, r3, #5
  13892. 8005828: 68fb ldr r3, [r7, #12]
  13893. 800582a: 4413 add r3, r2
  13894. 800582c: f503 6310 add.w r3, r3, #2304 ; 0x900
  13895. 8005830: 461a mov r2, r3
  13896. 8005832: f04f 6300 mov.w r3, #134217728 ; 0x8000000
  13897. 8005836: 6013 str r3, [r2, #0]
  13898. 8005838: e013 b.n 8005862 <USB_DevInit+0x176>
  13899. }
  13900. else
  13901. {
  13902. USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_EPDIS | USB_OTG_DIEPCTL_SNAK;
  13903. 800583a: 693b ldr r3, [r7, #16]
  13904. 800583c: 015a lsls r2, r3, #5
  13905. 800583e: 68fb ldr r3, [r7, #12]
  13906. 8005840: 4413 add r3, r2
  13907. 8005842: f503 6310 add.w r3, r3, #2304 ; 0x900
  13908. 8005846: 461a mov r2, r3
  13909. 8005848: f04f 4390 mov.w r3, #1207959552 ; 0x48000000
  13910. 800584c: 6013 str r3, [r2, #0]
  13911. 800584e: e008 b.n 8005862 <USB_DevInit+0x176>
  13912. }
  13913. }
  13914. else
  13915. {
  13916. USBx_INEP(i)->DIEPCTL = 0U;
  13917. 8005850: 693b ldr r3, [r7, #16]
  13918. 8005852: 015a lsls r2, r3, #5
  13919. 8005854: 68fb ldr r3, [r7, #12]
  13920. 8005856: 4413 add r3, r2
  13921. 8005858: f503 6310 add.w r3, r3, #2304 ; 0x900
  13922. 800585c: 461a mov r2, r3
  13923. 800585e: 2300 movs r3, #0
  13924. 8005860: 6013 str r3, [r2, #0]
  13925. }
  13926. USBx_INEP(i)->DIEPTSIZ = 0U;
  13927. 8005862: 693b ldr r3, [r7, #16]
  13928. 8005864: 015a lsls r2, r3, #5
  13929. 8005866: 68fb ldr r3, [r7, #12]
  13930. 8005868: 4413 add r3, r2
  13931. 800586a: f503 6310 add.w r3, r3, #2304 ; 0x900
  13932. 800586e: 461a mov r2, r3
  13933. 8005870: 2300 movs r3, #0
  13934. 8005872: 6113 str r3, [r2, #16]
  13935. USBx_INEP(i)->DIEPINT = 0xFB7FU;
  13936. 8005874: 693b ldr r3, [r7, #16]
  13937. 8005876: 015a lsls r2, r3, #5
  13938. 8005878: 68fb ldr r3, [r7, #12]
  13939. 800587a: 4413 add r3, r2
  13940. 800587c: f503 6310 add.w r3, r3, #2304 ; 0x900
  13941. 8005880: 461a mov r2, r3
  13942. 8005882: f64f 337f movw r3, #64383 ; 0xfb7f
  13943. 8005886: 6093 str r3, [r2, #8]
  13944. for (i = 0U; i < cfg.dev_endpoints; i++)
  13945. 8005888: 693b ldr r3, [r7, #16]
  13946. 800588a: 3301 adds r3, #1
  13947. 800588c: 613b str r3, [r7, #16]
  13948. 800588e: 6a7b ldr r3, [r7, #36] ; 0x24
  13949. 8005890: 693a ldr r2, [r7, #16]
  13950. 8005892: 429a cmp r2, r3
  13951. 8005894: d3b7 bcc.n 8005806 <USB_DevInit+0x11a>
  13952. }
  13953. for (i = 0U; i < cfg.dev_endpoints; i++)
  13954. 8005896: 2300 movs r3, #0
  13955. 8005898: 613b str r3, [r7, #16]
  13956. 800589a: e043 b.n 8005924 <USB_DevInit+0x238>
  13957. {
  13958. if ((USBx_OUTEP(i)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA)
  13959. 800589c: 693b ldr r3, [r7, #16]
  13960. 800589e: 015a lsls r2, r3, #5
  13961. 80058a0: 68fb ldr r3, [r7, #12]
  13962. 80058a2: 4413 add r3, r2
  13963. 80058a4: f503 6330 add.w r3, r3, #2816 ; 0xb00
  13964. 80058a8: 681b ldr r3, [r3, #0]
  13965. 80058aa: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
  13966. 80058ae: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
  13967. 80058b2: d118 bne.n 80058e6 <USB_DevInit+0x1fa>
  13968. {
  13969. if (i == 0U)
  13970. 80058b4: 693b ldr r3, [r7, #16]
  13971. 80058b6: 2b00 cmp r3, #0
  13972. 80058b8: d10a bne.n 80058d0 <USB_DevInit+0x1e4>
  13973. {
  13974. USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_SNAK;
  13975. 80058ba: 693b ldr r3, [r7, #16]
  13976. 80058bc: 015a lsls r2, r3, #5
  13977. 80058be: 68fb ldr r3, [r7, #12]
  13978. 80058c0: 4413 add r3, r2
  13979. 80058c2: f503 6330 add.w r3, r3, #2816 ; 0xb00
  13980. 80058c6: 461a mov r2, r3
  13981. 80058c8: f04f 6300 mov.w r3, #134217728 ; 0x8000000
  13982. 80058cc: 6013 str r3, [r2, #0]
  13983. 80058ce: e013 b.n 80058f8 <USB_DevInit+0x20c>
  13984. }
  13985. else
  13986. {
  13987. USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_EPDIS | USB_OTG_DOEPCTL_SNAK;
  13988. 80058d0: 693b ldr r3, [r7, #16]
  13989. 80058d2: 015a lsls r2, r3, #5
  13990. 80058d4: 68fb ldr r3, [r7, #12]
  13991. 80058d6: 4413 add r3, r2
  13992. 80058d8: f503 6330 add.w r3, r3, #2816 ; 0xb00
  13993. 80058dc: 461a mov r2, r3
  13994. 80058de: f04f 4390 mov.w r3, #1207959552 ; 0x48000000
  13995. 80058e2: 6013 str r3, [r2, #0]
  13996. 80058e4: e008 b.n 80058f8 <USB_DevInit+0x20c>
  13997. }
  13998. }
  13999. else
  14000. {
  14001. USBx_OUTEP(i)->DOEPCTL = 0U;
  14002. 80058e6: 693b ldr r3, [r7, #16]
  14003. 80058e8: 015a lsls r2, r3, #5
  14004. 80058ea: 68fb ldr r3, [r7, #12]
  14005. 80058ec: 4413 add r3, r2
  14006. 80058ee: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14007. 80058f2: 461a mov r2, r3
  14008. 80058f4: 2300 movs r3, #0
  14009. 80058f6: 6013 str r3, [r2, #0]
  14010. }
  14011. USBx_OUTEP(i)->DOEPTSIZ = 0U;
  14012. 80058f8: 693b ldr r3, [r7, #16]
  14013. 80058fa: 015a lsls r2, r3, #5
  14014. 80058fc: 68fb ldr r3, [r7, #12]
  14015. 80058fe: 4413 add r3, r2
  14016. 8005900: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14017. 8005904: 461a mov r2, r3
  14018. 8005906: 2300 movs r3, #0
  14019. 8005908: 6113 str r3, [r2, #16]
  14020. USBx_OUTEP(i)->DOEPINT = 0xFB7FU;
  14021. 800590a: 693b ldr r3, [r7, #16]
  14022. 800590c: 015a lsls r2, r3, #5
  14023. 800590e: 68fb ldr r3, [r7, #12]
  14024. 8005910: 4413 add r3, r2
  14025. 8005912: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14026. 8005916: 461a mov r2, r3
  14027. 8005918: f64f 337f movw r3, #64383 ; 0xfb7f
  14028. 800591c: 6093 str r3, [r2, #8]
  14029. for (i = 0U; i < cfg.dev_endpoints; i++)
  14030. 800591e: 693b ldr r3, [r7, #16]
  14031. 8005920: 3301 adds r3, #1
  14032. 8005922: 613b str r3, [r7, #16]
  14033. 8005924: 6a7b ldr r3, [r7, #36] ; 0x24
  14034. 8005926: 693a ldr r2, [r7, #16]
  14035. 8005928: 429a cmp r2, r3
  14036. 800592a: d3b7 bcc.n 800589c <USB_DevInit+0x1b0>
  14037. }
  14038. USBx_DEVICE->DIEPMSK &= ~(USB_OTG_DIEPMSK_TXFURM);
  14039. 800592c: 68fb ldr r3, [r7, #12]
  14040. 800592e: f503 6300 add.w r3, r3, #2048 ; 0x800
  14041. 8005932: 691b ldr r3, [r3, #16]
  14042. 8005934: 68fa ldr r2, [r7, #12]
  14043. 8005936: f502 6200 add.w r2, r2, #2048 ; 0x800
  14044. 800593a: f423 7380 bic.w r3, r3, #256 ; 0x100
  14045. 800593e: 6113 str r3, [r2, #16]
  14046. /* Disable all interrupts. */
  14047. USBx->GINTMSK = 0U;
  14048. 8005940: 687b ldr r3, [r7, #4]
  14049. 8005942: 2200 movs r2, #0
  14050. 8005944: 619a str r2, [r3, #24]
  14051. /* Clear any pending interrupts */
  14052. USBx->GINTSTS = 0xBFFFFFFFU;
  14053. 8005946: 687b ldr r3, [r7, #4]
  14054. 8005948: f06f 4280 mvn.w r2, #1073741824 ; 0x40000000
  14055. 800594c: 615a str r2, [r3, #20]
  14056. /* Enable the common interrupts */
  14057. if (cfg.dma_enable == 0U)
  14058. 800594e: 6b3b ldr r3, [r7, #48] ; 0x30
  14059. 8005950: 2b00 cmp r3, #0
  14060. 8005952: d105 bne.n 8005960 <USB_DevInit+0x274>
  14061. {
  14062. USBx->GINTMSK |= USB_OTG_GINTMSK_RXFLVLM;
  14063. 8005954: 687b ldr r3, [r7, #4]
  14064. 8005956: 699b ldr r3, [r3, #24]
  14065. 8005958: f043 0210 orr.w r2, r3, #16
  14066. 800595c: 687b ldr r3, [r7, #4]
  14067. 800595e: 619a str r2, [r3, #24]
  14068. }
  14069. /* Enable interrupts matching to the Device mode ONLY */
  14070. USBx->GINTMSK |= USB_OTG_GINTMSK_USBSUSPM | USB_OTG_GINTMSK_USBRST |
  14071. 8005960: 687b ldr r3, [r7, #4]
  14072. 8005962: 699a ldr r2, [r3, #24]
  14073. 8005964: 4b0f ldr r3, [pc, #60] ; (80059a4 <USB_DevInit+0x2b8>)
  14074. 8005966: 4313 orrs r3, r2
  14075. 8005968: 687a ldr r2, [r7, #4]
  14076. 800596a: 6193 str r3, [r2, #24]
  14077. USB_OTG_GINTMSK_ENUMDNEM | USB_OTG_GINTMSK_IEPINT |
  14078. USB_OTG_GINTMSK_OEPINT | USB_OTG_GINTMSK_IISOIXFRM |
  14079. USB_OTG_GINTMSK_PXFRM_IISOOXFRM | USB_OTG_GINTMSK_WUIM;
  14080. if (cfg.Sof_enable != 0U)
  14081. 800596c: 6bfb ldr r3, [r7, #60] ; 0x3c
  14082. 800596e: 2b00 cmp r3, #0
  14083. 8005970: d005 beq.n 800597e <USB_DevInit+0x292>
  14084. {
  14085. USBx->GINTMSK |= USB_OTG_GINTMSK_SOFM;
  14086. 8005972: 687b ldr r3, [r7, #4]
  14087. 8005974: 699b ldr r3, [r3, #24]
  14088. 8005976: f043 0208 orr.w r2, r3, #8
  14089. 800597a: 687b ldr r3, [r7, #4]
  14090. 800597c: 619a str r2, [r3, #24]
  14091. }
  14092. if (cfg.vbus_sensing_enable == 1U)
  14093. 800597e: 6cfb ldr r3, [r7, #76] ; 0x4c
  14094. 8005980: 2b01 cmp r3, #1
  14095. 8005982: d107 bne.n 8005994 <USB_DevInit+0x2a8>
  14096. {
  14097. USBx->GINTMSK |= (USB_OTG_GINTMSK_SRQIM | USB_OTG_GINTMSK_OTGINT);
  14098. 8005984: 687b ldr r3, [r7, #4]
  14099. 8005986: 699b ldr r3, [r3, #24]
  14100. 8005988: f043 4380 orr.w r3, r3, #1073741824 ; 0x40000000
  14101. 800598c: f043 0304 orr.w r3, r3, #4
  14102. 8005990: 687a ldr r2, [r7, #4]
  14103. 8005992: 6193 str r3, [r2, #24]
  14104. }
  14105. return ret;
  14106. 8005994: 7dfb ldrb r3, [r7, #23]
  14107. }
  14108. 8005996: 4618 mov r0, r3
  14109. 8005998: 3718 adds r7, #24
  14110. 800599a: 46bd mov sp, r7
  14111. 800599c: e8bd 4080 ldmia.w sp!, {r7, lr}
  14112. 80059a0: b004 add sp, #16
  14113. 80059a2: 4770 bx lr
  14114. 80059a4: 803c3800 .word 0x803c3800
  14115. 080059a8 <USB_FlushTxFifo>:
  14116. * This parameter can be a value from 1 to 15
  14117. 15 means Flush all Tx FIFOs
  14118. * @retval HAL status
  14119. */
  14120. HAL_StatusTypeDef USB_FlushTxFifo(USB_OTG_GlobalTypeDef *USBx, uint32_t num)
  14121. {
  14122. 80059a8: b480 push {r7}
  14123. 80059aa: b085 sub sp, #20
  14124. 80059ac: af00 add r7, sp, #0
  14125. 80059ae: 6078 str r0, [r7, #4]
  14126. 80059b0: 6039 str r1, [r7, #0]
  14127. __IO uint32_t count = 0U;
  14128. 80059b2: 2300 movs r3, #0
  14129. 80059b4: 60fb str r3, [r7, #12]
  14130. USBx->GRSTCTL = (USB_OTG_GRSTCTL_TXFFLSH | (num << 6));
  14131. 80059b6: 683b ldr r3, [r7, #0]
  14132. 80059b8: 019b lsls r3, r3, #6
  14133. 80059ba: f043 0220 orr.w r2, r3, #32
  14134. 80059be: 687b ldr r3, [r7, #4]
  14135. 80059c0: 611a str r2, [r3, #16]
  14136. do
  14137. {
  14138. if (++count > 200000U)
  14139. 80059c2: 68fb ldr r3, [r7, #12]
  14140. 80059c4: 3301 adds r3, #1
  14141. 80059c6: 60fb str r3, [r7, #12]
  14142. 80059c8: 4a08 ldr r2, [pc, #32] ; (80059ec <USB_FlushTxFifo+0x44>)
  14143. 80059ca: 4293 cmp r3, r2
  14144. 80059cc: d901 bls.n 80059d2 <USB_FlushTxFifo+0x2a>
  14145. {
  14146. return HAL_TIMEOUT;
  14147. 80059ce: 2303 movs r3, #3
  14148. 80059d0: e006 b.n 80059e0 <USB_FlushTxFifo+0x38>
  14149. }
  14150. } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_TXFFLSH) == USB_OTG_GRSTCTL_TXFFLSH);
  14151. 80059d2: 687b ldr r3, [r7, #4]
  14152. 80059d4: 691b ldr r3, [r3, #16]
  14153. 80059d6: f003 0320 and.w r3, r3, #32
  14154. 80059da: 2b20 cmp r3, #32
  14155. 80059dc: d0f1 beq.n 80059c2 <USB_FlushTxFifo+0x1a>
  14156. return HAL_OK;
  14157. 80059de: 2300 movs r3, #0
  14158. }
  14159. 80059e0: 4618 mov r0, r3
  14160. 80059e2: 3714 adds r7, #20
  14161. 80059e4: 46bd mov sp, r7
  14162. 80059e6: f85d 7b04 ldr.w r7, [sp], #4
  14163. 80059ea: 4770 bx lr
  14164. 80059ec: 00030d40 .word 0x00030d40
  14165. 080059f0 <USB_FlushRxFifo>:
  14166. * @brief USB_FlushRxFifo : Flush Rx FIFO
  14167. * @param USBx Selected device
  14168. * @retval HAL status
  14169. */
  14170. HAL_StatusTypeDef USB_FlushRxFifo(USB_OTG_GlobalTypeDef *USBx)
  14171. {
  14172. 80059f0: b480 push {r7}
  14173. 80059f2: b085 sub sp, #20
  14174. 80059f4: af00 add r7, sp, #0
  14175. 80059f6: 6078 str r0, [r7, #4]
  14176. __IO uint32_t count = 0U;
  14177. 80059f8: 2300 movs r3, #0
  14178. 80059fa: 60fb str r3, [r7, #12]
  14179. USBx->GRSTCTL = USB_OTG_GRSTCTL_RXFFLSH;
  14180. 80059fc: 687b ldr r3, [r7, #4]
  14181. 80059fe: 2210 movs r2, #16
  14182. 8005a00: 611a str r2, [r3, #16]
  14183. do
  14184. {
  14185. if (++count > 200000U)
  14186. 8005a02: 68fb ldr r3, [r7, #12]
  14187. 8005a04: 3301 adds r3, #1
  14188. 8005a06: 60fb str r3, [r7, #12]
  14189. 8005a08: 4a08 ldr r2, [pc, #32] ; (8005a2c <USB_FlushRxFifo+0x3c>)
  14190. 8005a0a: 4293 cmp r3, r2
  14191. 8005a0c: d901 bls.n 8005a12 <USB_FlushRxFifo+0x22>
  14192. {
  14193. return HAL_TIMEOUT;
  14194. 8005a0e: 2303 movs r3, #3
  14195. 8005a10: e006 b.n 8005a20 <USB_FlushRxFifo+0x30>
  14196. }
  14197. } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_RXFFLSH) == USB_OTG_GRSTCTL_RXFFLSH);
  14198. 8005a12: 687b ldr r3, [r7, #4]
  14199. 8005a14: 691b ldr r3, [r3, #16]
  14200. 8005a16: f003 0310 and.w r3, r3, #16
  14201. 8005a1a: 2b10 cmp r3, #16
  14202. 8005a1c: d0f1 beq.n 8005a02 <USB_FlushRxFifo+0x12>
  14203. return HAL_OK;
  14204. 8005a1e: 2300 movs r3, #0
  14205. }
  14206. 8005a20: 4618 mov r0, r3
  14207. 8005a22: 3714 adds r7, #20
  14208. 8005a24: 46bd mov sp, r7
  14209. 8005a26: f85d 7b04 ldr.w r7, [sp], #4
  14210. 8005a2a: 4770 bx lr
  14211. 8005a2c: 00030d40 .word 0x00030d40
  14212. 08005a30 <USB_SetDevSpeed>:
  14213. * @arg USB_OTG_SPEED_HIGH_IN_FULL: High speed core in Full Speed mode
  14214. * @arg USB_OTG_SPEED_FULL: Full speed mode
  14215. * @retval Hal status
  14216. */
  14217. HAL_StatusTypeDef USB_SetDevSpeed(USB_OTG_GlobalTypeDef *USBx, uint8_t speed)
  14218. {
  14219. 8005a30: b480 push {r7}
  14220. 8005a32: b085 sub sp, #20
  14221. 8005a34: af00 add r7, sp, #0
  14222. 8005a36: 6078 str r0, [r7, #4]
  14223. 8005a38: 460b mov r3, r1
  14224. 8005a3a: 70fb strb r3, [r7, #3]
  14225. uint32_t USBx_BASE = (uint32_t)USBx;
  14226. 8005a3c: 687b ldr r3, [r7, #4]
  14227. 8005a3e: 60fb str r3, [r7, #12]
  14228. USBx_DEVICE->DCFG |= speed;
  14229. 8005a40: 68fb ldr r3, [r7, #12]
  14230. 8005a42: f503 6300 add.w r3, r3, #2048 ; 0x800
  14231. 8005a46: 681a ldr r2, [r3, #0]
  14232. 8005a48: 78fb ldrb r3, [r7, #3]
  14233. 8005a4a: 68f9 ldr r1, [r7, #12]
  14234. 8005a4c: f501 6100 add.w r1, r1, #2048 ; 0x800
  14235. 8005a50: 4313 orrs r3, r2
  14236. 8005a52: 600b str r3, [r1, #0]
  14237. return HAL_OK;
  14238. 8005a54: 2300 movs r3, #0
  14239. }
  14240. 8005a56: 4618 mov r0, r3
  14241. 8005a58: 3714 adds r7, #20
  14242. 8005a5a: 46bd mov sp, r7
  14243. 8005a5c: f85d 7b04 ldr.w r7, [sp], #4
  14244. 8005a60: 4770 bx lr
  14245. 08005a62 <USB_GetDevSpeed>:
  14246. * This parameter can be one of these values:
  14247. * @arg USBD_HS_SPEED: High speed mode
  14248. * @arg USBD_FS_SPEED: Full speed mode
  14249. */
  14250. uint8_t USB_GetDevSpeed(USB_OTG_GlobalTypeDef *USBx)
  14251. {
  14252. 8005a62: b480 push {r7}
  14253. 8005a64: b087 sub sp, #28
  14254. 8005a66: af00 add r7, sp, #0
  14255. 8005a68: 6078 str r0, [r7, #4]
  14256. uint32_t USBx_BASE = (uint32_t)USBx;
  14257. 8005a6a: 687b ldr r3, [r7, #4]
  14258. 8005a6c: 613b str r3, [r7, #16]
  14259. uint8_t speed;
  14260. uint32_t DevEnumSpeed = USBx_DEVICE->DSTS & USB_OTG_DSTS_ENUMSPD;
  14261. 8005a6e: 693b ldr r3, [r7, #16]
  14262. 8005a70: f503 6300 add.w r3, r3, #2048 ; 0x800
  14263. 8005a74: 689b ldr r3, [r3, #8]
  14264. 8005a76: f003 0306 and.w r3, r3, #6
  14265. 8005a7a: 60fb str r3, [r7, #12]
  14266. if (DevEnumSpeed == DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ)
  14267. 8005a7c: 68fb ldr r3, [r7, #12]
  14268. 8005a7e: 2b00 cmp r3, #0
  14269. 8005a80: d102 bne.n 8005a88 <USB_GetDevSpeed+0x26>
  14270. {
  14271. speed = USBD_HS_SPEED;
  14272. 8005a82: 2300 movs r3, #0
  14273. 8005a84: 75fb strb r3, [r7, #23]
  14274. 8005a86: e00a b.n 8005a9e <USB_GetDevSpeed+0x3c>
  14275. }
  14276. else if ((DevEnumSpeed == DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ) ||
  14277. 8005a88: 68fb ldr r3, [r7, #12]
  14278. 8005a8a: 2b02 cmp r3, #2
  14279. 8005a8c: d002 beq.n 8005a94 <USB_GetDevSpeed+0x32>
  14280. 8005a8e: 68fb ldr r3, [r7, #12]
  14281. 8005a90: 2b06 cmp r3, #6
  14282. 8005a92: d102 bne.n 8005a9a <USB_GetDevSpeed+0x38>
  14283. (DevEnumSpeed == DSTS_ENUMSPD_FS_PHY_48MHZ))
  14284. {
  14285. speed = USBD_FS_SPEED;
  14286. 8005a94: 2302 movs r3, #2
  14287. 8005a96: 75fb strb r3, [r7, #23]
  14288. 8005a98: e001 b.n 8005a9e <USB_GetDevSpeed+0x3c>
  14289. }
  14290. else
  14291. {
  14292. speed = 0xFU;
  14293. 8005a9a: 230f movs r3, #15
  14294. 8005a9c: 75fb strb r3, [r7, #23]
  14295. }
  14296. return speed;
  14297. 8005a9e: 7dfb ldrb r3, [r7, #23]
  14298. }
  14299. 8005aa0: 4618 mov r0, r3
  14300. 8005aa2: 371c adds r7, #28
  14301. 8005aa4: 46bd mov sp, r7
  14302. 8005aa6: f85d 7b04 ldr.w r7, [sp], #4
  14303. 8005aaa: 4770 bx lr
  14304. 08005aac <USB_ActivateEndpoint>:
  14305. * @param USBx Selected device
  14306. * @param ep pointer to endpoint structure
  14307. * @retval HAL status
  14308. */
  14309. HAL_StatusTypeDef USB_ActivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep)
  14310. {
  14311. 8005aac: b480 push {r7}
  14312. 8005aae: b085 sub sp, #20
  14313. 8005ab0: af00 add r7, sp, #0
  14314. 8005ab2: 6078 str r0, [r7, #4]
  14315. 8005ab4: 6039 str r1, [r7, #0]
  14316. uint32_t USBx_BASE = (uint32_t)USBx;
  14317. 8005ab6: 687b ldr r3, [r7, #4]
  14318. 8005ab8: 60fb str r3, [r7, #12]
  14319. uint32_t epnum = (uint32_t)ep->num;
  14320. 8005aba: 683b ldr r3, [r7, #0]
  14321. 8005abc: 781b ldrb r3, [r3, #0]
  14322. 8005abe: 60bb str r3, [r7, #8]
  14323. if (ep->is_in == 1U)
  14324. 8005ac0: 683b ldr r3, [r7, #0]
  14325. 8005ac2: 785b ldrb r3, [r3, #1]
  14326. 8005ac4: 2b01 cmp r3, #1
  14327. 8005ac6: d13a bne.n 8005b3e <USB_ActivateEndpoint+0x92>
  14328. {
  14329. USBx_DEVICE->DAINTMSK |= USB_OTG_DAINTMSK_IEPM & (uint32_t)(1UL << (ep->num & EP_ADDR_MSK));
  14330. 8005ac8: 68fb ldr r3, [r7, #12]
  14331. 8005aca: f503 6300 add.w r3, r3, #2048 ; 0x800
  14332. 8005ace: 69da ldr r2, [r3, #28]
  14333. 8005ad0: 683b ldr r3, [r7, #0]
  14334. 8005ad2: 781b ldrb r3, [r3, #0]
  14335. 8005ad4: f003 030f and.w r3, r3, #15
  14336. 8005ad8: 2101 movs r1, #1
  14337. 8005ada: fa01 f303 lsl.w r3, r1, r3
  14338. 8005ade: b29b uxth r3, r3
  14339. 8005ae0: 68f9 ldr r1, [r7, #12]
  14340. 8005ae2: f501 6100 add.w r1, r1, #2048 ; 0x800
  14341. 8005ae6: 4313 orrs r3, r2
  14342. 8005ae8: 61cb str r3, [r1, #28]
  14343. if ((USBx_INEP(epnum)->DIEPCTL & USB_OTG_DIEPCTL_USBAEP) == 0U)
  14344. 8005aea: 68bb ldr r3, [r7, #8]
  14345. 8005aec: 015a lsls r2, r3, #5
  14346. 8005aee: 68fb ldr r3, [r7, #12]
  14347. 8005af0: 4413 add r3, r2
  14348. 8005af2: f503 6310 add.w r3, r3, #2304 ; 0x900
  14349. 8005af6: 681b ldr r3, [r3, #0]
  14350. 8005af8: f403 4300 and.w r3, r3, #32768 ; 0x8000
  14351. 8005afc: 2b00 cmp r3, #0
  14352. 8005afe: d155 bne.n 8005bac <USB_ActivateEndpoint+0x100>
  14353. {
  14354. USBx_INEP(epnum)->DIEPCTL |= (ep->maxpacket & USB_OTG_DIEPCTL_MPSIZ) |
  14355. 8005b00: 68bb ldr r3, [r7, #8]
  14356. 8005b02: 015a lsls r2, r3, #5
  14357. 8005b04: 68fb ldr r3, [r7, #12]
  14358. 8005b06: 4413 add r3, r2
  14359. 8005b08: f503 6310 add.w r3, r3, #2304 ; 0x900
  14360. 8005b0c: 681a ldr r2, [r3, #0]
  14361. 8005b0e: 683b ldr r3, [r7, #0]
  14362. 8005b10: 689b ldr r3, [r3, #8]
  14363. 8005b12: f3c3 010a ubfx r1, r3, #0, #11
  14364. ((uint32_t)ep->type << 18) | (epnum << 22) |
  14365. 8005b16: 683b ldr r3, [r7, #0]
  14366. 8005b18: 78db ldrb r3, [r3, #3]
  14367. 8005b1a: 049b lsls r3, r3, #18
  14368. USBx_INEP(epnum)->DIEPCTL |= (ep->maxpacket & USB_OTG_DIEPCTL_MPSIZ) |
  14369. 8005b1c: 4319 orrs r1, r3
  14370. ((uint32_t)ep->type << 18) | (epnum << 22) |
  14371. 8005b1e: 68bb ldr r3, [r7, #8]
  14372. 8005b20: 059b lsls r3, r3, #22
  14373. 8005b22: 430b orrs r3, r1
  14374. USBx_INEP(epnum)->DIEPCTL |= (ep->maxpacket & USB_OTG_DIEPCTL_MPSIZ) |
  14375. 8005b24: 4313 orrs r3, r2
  14376. 8005b26: 68ba ldr r2, [r7, #8]
  14377. 8005b28: 0151 lsls r1, r2, #5
  14378. 8005b2a: 68fa ldr r2, [r7, #12]
  14379. 8005b2c: 440a add r2, r1
  14380. 8005b2e: f502 6210 add.w r2, r2, #2304 ; 0x900
  14381. 8005b32: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  14382. 8005b36: f443 4300 orr.w r3, r3, #32768 ; 0x8000
  14383. 8005b3a: 6013 str r3, [r2, #0]
  14384. 8005b3c: e036 b.n 8005bac <USB_ActivateEndpoint+0x100>
  14385. USB_OTG_DIEPCTL_USBAEP;
  14386. }
  14387. }
  14388. else
  14389. {
  14390. USBx_DEVICE->DAINTMSK |= USB_OTG_DAINTMSK_OEPM & ((uint32_t)(1UL << (ep->num & EP_ADDR_MSK)) << 16);
  14391. 8005b3e: 68fb ldr r3, [r7, #12]
  14392. 8005b40: f503 6300 add.w r3, r3, #2048 ; 0x800
  14393. 8005b44: 69da ldr r2, [r3, #28]
  14394. 8005b46: 683b ldr r3, [r7, #0]
  14395. 8005b48: 781b ldrb r3, [r3, #0]
  14396. 8005b4a: f003 030f and.w r3, r3, #15
  14397. 8005b4e: 2101 movs r1, #1
  14398. 8005b50: fa01 f303 lsl.w r3, r1, r3
  14399. 8005b54: 041b lsls r3, r3, #16
  14400. 8005b56: 68f9 ldr r1, [r7, #12]
  14401. 8005b58: f501 6100 add.w r1, r1, #2048 ; 0x800
  14402. 8005b5c: 4313 orrs r3, r2
  14403. 8005b5e: 61cb str r3, [r1, #28]
  14404. if (((USBx_OUTEP(epnum)->DOEPCTL) & USB_OTG_DOEPCTL_USBAEP) == 0U)
  14405. 8005b60: 68bb ldr r3, [r7, #8]
  14406. 8005b62: 015a lsls r2, r3, #5
  14407. 8005b64: 68fb ldr r3, [r7, #12]
  14408. 8005b66: 4413 add r3, r2
  14409. 8005b68: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14410. 8005b6c: 681b ldr r3, [r3, #0]
  14411. 8005b6e: f403 4300 and.w r3, r3, #32768 ; 0x8000
  14412. 8005b72: 2b00 cmp r3, #0
  14413. 8005b74: d11a bne.n 8005bac <USB_ActivateEndpoint+0x100>
  14414. {
  14415. USBx_OUTEP(epnum)->DOEPCTL |= (ep->maxpacket & USB_OTG_DOEPCTL_MPSIZ) |
  14416. 8005b76: 68bb ldr r3, [r7, #8]
  14417. 8005b78: 015a lsls r2, r3, #5
  14418. 8005b7a: 68fb ldr r3, [r7, #12]
  14419. 8005b7c: 4413 add r3, r2
  14420. 8005b7e: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14421. 8005b82: 681a ldr r2, [r3, #0]
  14422. 8005b84: 683b ldr r3, [r7, #0]
  14423. 8005b86: 689b ldr r3, [r3, #8]
  14424. 8005b88: f3c3 010a ubfx r1, r3, #0, #11
  14425. ((uint32_t)ep->type << 18) |
  14426. 8005b8c: 683b ldr r3, [r7, #0]
  14427. 8005b8e: 78db ldrb r3, [r3, #3]
  14428. 8005b90: 049b lsls r3, r3, #18
  14429. USBx_OUTEP(epnum)->DOEPCTL |= (ep->maxpacket & USB_OTG_DOEPCTL_MPSIZ) |
  14430. 8005b92: 430b orrs r3, r1
  14431. 8005b94: 4313 orrs r3, r2
  14432. 8005b96: 68ba ldr r2, [r7, #8]
  14433. 8005b98: 0151 lsls r1, r2, #5
  14434. 8005b9a: 68fa ldr r2, [r7, #12]
  14435. 8005b9c: 440a add r2, r1
  14436. 8005b9e: f502 6230 add.w r2, r2, #2816 ; 0xb00
  14437. 8005ba2: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  14438. 8005ba6: f443 4300 orr.w r3, r3, #32768 ; 0x8000
  14439. 8005baa: 6013 str r3, [r2, #0]
  14440. USB_OTG_DIEPCTL_SD0PID_SEVNFRM |
  14441. USB_OTG_DOEPCTL_USBAEP;
  14442. }
  14443. }
  14444. return HAL_OK;
  14445. 8005bac: 2300 movs r3, #0
  14446. }
  14447. 8005bae: 4618 mov r0, r3
  14448. 8005bb0: 3714 adds r7, #20
  14449. 8005bb2: 46bd mov sp, r7
  14450. 8005bb4: f85d 7b04 ldr.w r7, [sp], #4
  14451. 8005bb8: 4770 bx lr
  14452. ...
  14453. 08005bbc <USB_DeactivateEndpoint>:
  14454. * @param USBx Selected device
  14455. * @param ep pointer to endpoint structure
  14456. * @retval HAL status
  14457. */
  14458. HAL_StatusTypeDef USB_DeactivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep)
  14459. {
  14460. 8005bbc: b480 push {r7}
  14461. 8005bbe: b085 sub sp, #20
  14462. 8005bc0: af00 add r7, sp, #0
  14463. 8005bc2: 6078 str r0, [r7, #4]
  14464. 8005bc4: 6039 str r1, [r7, #0]
  14465. uint32_t USBx_BASE = (uint32_t)USBx;
  14466. 8005bc6: 687b ldr r3, [r7, #4]
  14467. 8005bc8: 60fb str r3, [r7, #12]
  14468. uint32_t epnum = (uint32_t)ep->num;
  14469. 8005bca: 683b ldr r3, [r7, #0]
  14470. 8005bcc: 781b ldrb r3, [r3, #0]
  14471. 8005bce: 60bb str r3, [r7, #8]
  14472. /* Read DEPCTLn register */
  14473. if (ep->is_in == 1U)
  14474. 8005bd0: 683b ldr r3, [r7, #0]
  14475. 8005bd2: 785b ldrb r3, [r3, #1]
  14476. 8005bd4: 2b01 cmp r3, #1
  14477. 8005bd6: d161 bne.n 8005c9c <USB_DeactivateEndpoint+0xe0>
  14478. {
  14479. if ((USBx_INEP(epnum)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == USB_OTG_DIEPCTL_EPENA)
  14480. 8005bd8: 68bb ldr r3, [r7, #8]
  14481. 8005bda: 015a lsls r2, r3, #5
  14482. 8005bdc: 68fb ldr r3, [r7, #12]
  14483. 8005bde: 4413 add r3, r2
  14484. 8005be0: f503 6310 add.w r3, r3, #2304 ; 0x900
  14485. 8005be4: 681b ldr r3, [r3, #0]
  14486. 8005be6: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
  14487. 8005bea: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
  14488. 8005bee: d11f bne.n 8005c30 <USB_DeactivateEndpoint+0x74>
  14489. {
  14490. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SNAK;
  14491. 8005bf0: 68bb ldr r3, [r7, #8]
  14492. 8005bf2: 015a lsls r2, r3, #5
  14493. 8005bf4: 68fb ldr r3, [r7, #12]
  14494. 8005bf6: 4413 add r3, r2
  14495. 8005bf8: f503 6310 add.w r3, r3, #2304 ; 0x900
  14496. 8005bfc: 681b ldr r3, [r3, #0]
  14497. 8005bfe: 68ba ldr r2, [r7, #8]
  14498. 8005c00: 0151 lsls r1, r2, #5
  14499. 8005c02: 68fa ldr r2, [r7, #12]
  14500. 8005c04: 440a add r2, r1
  14501. 8005c06: f502 6210 add.w r2, r2, #2304 ; 0x900
  14502. 8005c0a: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
  14503. 8005c0e: 6013 str r3, [r2, #0]
  14504. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_EPDIS;
  14505. 8005c10: 68bb ldr r3, [r7, #8]
  14506. 8005c12: 015a lsls r2, r3, #5
  14507. 8005c14: 68fb ldr r3, [r7, #12]
  14508. 8005c16: 4413 add r3, r2
  14509. 8005c18: f503 6310 add.w r3, r3, #2304 ; 0x900
  14510. 8005c1c: 681b ldr r3, [r3, #0]
  14511. 8005c1e: 68ba ldr r2, [r7, #8]
  14512. 8005c20: 0151 lsls r1, r2, #5
  14513. 8005c22: 68fa ldr r2, [r7, #12]
  14514. 8005c24: 440a add r2, r1
  14515. 8005c26: f502 6210 add.w r2, r2, #2304 ; 0x900
  14516. 8005c2a: f043 4380 orr.w r3, r3, #1073741824 ; 0x40000000
  14517. 8005c2e: 6013 str r3, [r2, #0]
  14518. }
  14519. USBx_DEVICE->DEACHMSK &= ~(USB_OTG_DAINTMSK_IEPM & (uint32_t)(1UL << (ep->num & EP_ADDR_MSK)));
  14520. 8005c30: 68fb ldr r3, [r7, #12]
  14521. 8005c32: f503 6300 add.w r3, r3, #2048 ; 0x800
  14522. 8005c36: 6bda ldr r2, [r3, #60] ; 0x3c
  14523. 8005c38: 683b ldr r3, [r7, #0]
  14524. 8005c3a: 781b ldrb r3, [r3, #0]
  14525. 8005c3c: f003 030f and.w r3, r3, #15
  14526. 8005c40: 2101 movs r1, #1
  14527. 8005c42: fa01 f303 lsl.w r3, r1, r3
  14528. 8005c46: b29b uxth r3, r3
  14529. 8005c48: 43db mvns r3, r3
  14530. 8005c4a: 68f9 ldr r1, [r7, #12]
  14531. 8005c4c: f501 6100 add.w r1, r1, #2048 ; 0x800
  14532. 8005c50: 4013 ands r3, r2
  14533. 8005c52: 63cb str r3, [r1, #60] ; 0x3c
  14534. USBx_DEVICE->DAINTMSK &= ~(USB_OTG_DAINTMSK_IEPM & (uint32_t)(1UL << (ep->num & EP_ADDR_MSK)));
  14535. 8005c54: 68fb ldr r3, [r7, #12]
  14536. 8005c56: f503 6300 add.w r3, r3, #2048 ; 0x800
  14537. 8005c5a: 69da ldr r2, [r3, #28]
  14538. 8005c5c: 683b ldr r3, [r7, #0]
  14539. 8005c5e: 781b ldrb r3, [r3, #0]
  14540. 8005c60: f003 030f and.w r3, r3, #15
  14541. 8005c64: 2101 movs r1, #1
  14542. 8005c66: fa01 f303 lsl.w r3, r1, r3
  14543. 8005c6a: b29b uxth r3, r3
  14544. 8005c6c: 43db mvns r3, r3
  14545. 8005c6e: 68f9 ldr r1, [r7, #12]
  14546. 8005c70: f501 6100 add.w r1, r1, #2048 ; 0x800
  14547. 8005c74: 4013 ands r3, r2
  14548. 8005c76: 61cb str r3, [r1, #28]
  14549. USBx_INEP(epnum)->DIEPCTL &= ~(USB_OTG_DIEPCTL_USBAEP |
  14550. 8005c78: 68bb ldr r3, [r7, #8]
  14551. 8005c7a: 015a lsls r2, r3, #5
  14552. 8005c7c: 68fb ldr r3, [r7, #12]
  14553. 8005c7e: 4413 add r3, r2
  14554. 8005c80: f503 6310 add.w r3, r3, #2304 ; 0x900
  14555. 8005c84: 681a ldr r2, [r3, #0]
  14556. 8005c86: 68bb ldr r3, [r7, #8]
  14557. 8005c88: 0159 lsls r1, r3, #5
  14558. 8005c8a: 68fb ldr r3, [r7, #12]
  14559. 8005c8c: 440b add r3, r1
  14560. 8005c8e: f503 6310 add.w r3, r3, #2304 ; 0x900
  14561. 8005c92: 4619 mov r1, r3
  14562. 8005c94: 4b35 ldr r3, [pc, #212] ; (8005d6c <USB_DeactivateEndpoint+0x1b0>)
  14563. 8005c96: 4013 ands r3, r2
  14564. 8005c98: 600b str r3, [r1, #0]
  14565. 8005c9a: e060 b.n 8005d5e <USB_DeactivateEndpoint+0x1a2>
  14566. USB_OTG_DIEPCTL_SD0PID_SEVNFRM |
  14567. USB_OTG_DIEPCTL_EPTYP);
  14568. }
  14569. else
  14570. {
  14571. if ((USBx_OUTEP(epnum)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA)
  14572. 8005c9c: 68bb ldr r3, [r7, #8]
  14573. 8005c9e: 015a lsls r2, r3, #5
  14574. 8005ca0: 68fb ldr r3, [r7, #12]
  14575. 8005ca2: 4413 add r3, r2
  14576. 8005ca4: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14577. 8005ca8: 681b ldr r3, [r3, #0]
  14578. 8005caa: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
  14579. 8005cae: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
  14580. 8005cb2: d11f bne.n 8005cf4 <USB_DeactivateEndpoint+0x138>
  14581. {
  14582. USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_SNAK;
  14583. 8005cb4: 68bb ldr r3, [r7, #8]
  14584. 8005cb6: 015a lsls r2, r3, #5
  14585. 8005cb8: 68fb ldr r3, [r7, #12]
  14586. 8005cba: 4413 add r3, r2
  14587. 8005cbc: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14588. 8005cc0: 681b ldr r3, [r3, #0]
  14589. 8005cc2: 68ba ldr r2, [r7, #8]
  14590. 8005cc4: 0151 lsls r1, r2, #5
  14591. 8005cc6: 68fa ldr r2, [r7, #12]
  14592. 8005cc8: 440a add r2, r1
  14593. 8005cca: f502 6230 add.w r2, r2, #2816 ; 0xb00
  14594. 8005cce: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000
  14595. 8005cd2: 6013 str r3, [r2, #0]
  14596. USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_EPDIS;
  14597. 8005cd4: 68bb ldr r3, [r7, #8]
  14598. 8005cd6: 015a lsls r2, r3, #5
  14599. 8005cd8: 68fb ldr r3, [r7, #12]
  14600. 8005cda: 4413 add r3, r2
  14601. 8005cdc: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14602. 8005ce0: 681b ldr r3, [r3, #0]
  14603. 8005ce2: 68ba ldr r2, [r7, #8]
  14604. 8005ce4: 0151 lsls r1, r2, #5
  14605. 8005ce6: 68fa ldr r2, [r7, #12]
  14606. 8005ce8: 440a add r2, r1
  14607. 8005cea: f502 6230 add.w r2, r2, #2816 ; 0xb00
  14608. 8005cee: f043 4380 orr.w r3, r3, #1073741824 ; 0x40000000
  14609. 8005cf2: 6013 str r3, [r2, #0]
  14610. }
  14611. USBx_DEVICE->DEACHMSK &= ~(USB_OTG_DAINTMSK_OEPM & ((uint32_t)(1UL << (ep->num & EP_ADDR_MSK)) << 16));
  14612. 8005cf4: 68fb ldr r3, [r7, #12]
  14613. 8005cf6: f503 6300 add.w r3, r3, #2048 ; 0x800
  14614. 8005cfa: 6bda ldr r2, [r3, #60] ; 0x3c
  14615. 8005cfc: 683b ldr r3, [r7, #0]
  14616. 8005cfe: 781b ldrb r3, [r3, #0]
  14617. 8005d00: f003 030f and.w r3, r3, #15
  14618. 8005d04: 2101 movs r1, #1
  14619. 8005d06: fa01 f303 lsl.w r3, r1, r3
  14620. 8005d0a: 041b lsls r3, r3, #16
  14621. 8005d0c: 43db mvns r3, r3
  14622. 8005d0e: 68f9 ldr r1, [r7, #12]
  14623. 8005d10: f501 6100 add.w r1, r1, #2048 ; 0x800
  14624. 8005d14: 4013 ands r3, r2
  14625. 8005d16: 63cb str r3, [r1, #60] ; 0x3c
  14626. USBx_DEVICE->DAINTMSK &= ~(USB_OTG_DAINTMSK_OEPM & ((uint32_t)(1UL << (ep->num & EP_ADDR_MSK)) << 16));
  14627. 8005d18: 68fb ldr r3, [r7, #12]
  14628. 8005d1a: f503 6300 add.w r3, r3, #2048 ; 0x800
  14629. 8005d1e: 69da ldr r2, [r3, #28]
  14630. 8005d20: 683b ldr r3, [r7, #0]
  14631. 8005d22: 781b ldrb r3, [r3, #0]
  14632. 8005d24: f003 030f and.w r3, r3, #15
  14633. 8005d28: 2101 movs r1, #1
  14634. 8005d2a: fa01 f303 lsl.w r3, r1, r3
  14635. 8005d2e: 041b lsls r3, r3, #16
  14636. 8005d30: 43db mvns r3, r3
  14637. 8005d32: 68f9 ldr r1, [r7, #12]
  14638. 8005d34: f501 6100 add.w r1, r1, #2048 ; 0x800
  14639. 8005d38: 4013 ands r3, r2
  14640. 8005d3a: 61cb str r3, [r1, #28]
  14641. USBx_OUTEP(epnum)->DOEPCTL &= ~(USB_OTG_DOEPCTL_USBAEP |
  14642. 8005d3c: 68bb ldr r3, [r7, #8]
  14643. 8005d3e: 015a lsls r2, r3, #5
  14644. 8005d40: 68fb ldr r3, [r7, #12]
  14645. 8005d42: 4413 add r3, r2
  14646. 8005d44: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14647. 8005d48: 681a ldr r2, [r3, #0]
  14648. 8005d4a: 68bb ldr r3, [r7, #8]
  14649. 8005d4c: 0159 lsls r1, r3, #5
  14650. 8005d4e: 68fb ldr r3, [r7, #12]
  14651. 8005d50: 440b add r3, r1
  14652. 8005d52: f503 6330 add.w r3, r3, #2816 ; 0xb00
  14653. 8005d56: 4619 mov r1, r3
  14654. 8005d58: 4b05 ldr r3, [pc, #20] ; (8005d70 <USB_DeactivateEndpoint+0x1b4>)
  14655. 8005d5a: 4013 ands r3, r2
  14656. 8005d5c: 600b str r3, [r1, #0]
  14657. USB_OTG_DOEPCTL_MPSIZ |
  14658. USB_OTG_DOEPCTL_SD0PID_SEVNFRM |
  14659. USB_OTG_DOEPCTL_EPTYP);
  14660. }
  14661. return HAL_OK;
  14662. 8005d5e: 2300 movs r3, #0
  14663. }
  14664. 8005d60: 4618 mov r0, r3
  14665. 8005d62: 3714 adds r7, #20
  14666. 8005d64: 46bd mov sp, r7
  14667. 8005d66: f85d 7b04 ldr.w r7, [sp], #4
  14668. 8005d6a: 4770 bx lr
  14669. 8005d6c: ec337800 .word 0xec337800
  14670. 8005d70: eff37800 .word 0xeff37800
  14671. 08005d74 <USB_EPStartXfer>:
  14672. * 0 : DMA feature not used
  14673. * 1 : DMA feature used
  14674. * @retval HAL status
  14675. */
  14676. HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep, uint8_t dma)
  14677. {
  14678. 8005d74: b580 push {r7, lr}
  14679. 8005d76: b08a sub sp, #40 ; 0x28
  14680. 8005d78: af02 add r7, sp, #8
  14681. 8005d7a: 60f8 str r0, [r7, #12]
  14682. 8005d7c: 60b9 str r1, [r7, #8]
  14683. 8005d7e: 4613 mov r3, r2
  14684. 8005d80: 71fb strb r3, [r7, #7]
  14685. uint32_t USBx_BASE = (uint32_t)USBx;
  14686. 8005d82: 68fb ldr r3, [r7, #12]
  14687. 8005d84: 61fb str r3, [r7, #28]
  14688. uint32_t epnum = (uint32_t)ep->num;
  14689. 8005d86: 68bb ldr r3, [r7, #8]
  14690. 8005d88: 781b ldrb r3, [r3, #0]
  14691. 8005d8a: 61bb str r3, [r7, #24]
  14692. uint16_t pktcnt;
  14693. /* IN endpoint */
  14694. if (ep->is_in == 1U)
  14695. 8005d8c: 68bb ldr r3, [r7, #8]
  14696. 8005d8e: 785b ldrb r3, [r3, #1]
  14697. 8005d90: 2b01 cmp r3, #1
  14698. 8005d92: f040 815c bne.w 800604e <USB_EPStartXfer+0x2da>
  14699. {
  14700. /* Zero Length Packet? */
  14701. if (ep->xfer_len == 0U)
  14702. 8005d96: 68bb ldr r3, [r7, #8]
  14703. 8005d98: 695b ldr r3, [r3, #20]
  14704. 8005d9a: 2b00 cmp r3, #0
  14705. 8005d9c: d132 bne.n 8005e04 <USB_EPStartXfer+0x90>
  14706. {
  14707. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_PKTCNT);
  14708. 8005d9e: 69bb ldr r3, [r7, #24]
  14709. 8005da0: 015a lsls r2, r3, #5
  14710. 8005da2: 69fb ldr r3, [r7, #28]
  14711. 8005da4: 4413 add r3, r2
  14712. 8005da6: f503 6310 add.w r3, r3, #2304 ; 0x900
  14713. 8005daa: 691b ldr r3, [r3, #16]
  14714. 8005dac: 69ba ldr r2, [r7, #24]
  14715. 8005dae: 0151 lsls r1, r2, #5
  14716. 8005db0: 69fa ldr r2, [r7, #28]
  14717. 8005db2: 440a add r2, r1
  14718. 8005db4: f502 6210 add.w r2, r2, #2304 ; 0x900
  14719. 8005db8: f023 53ff bic.w r3, r3, #534773760 ; 0x1fe00000
  14720. 8005dbc: f423 13c0 bic.w r3, r3, #1572864 ; 0x180000
  14721. 8005dc0: 6113 str r3, [r2, #16]
  14722. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (1U << 19));
  14723. 8005dc2: 69bb ldr r3, [r7, #24]
  14724. 8005dc4: 015a lsls r2, r3, #5
  14725. 8005dc6: 69fb ldr r3, [r7, #28]
  14726. 8005dc8: 4413 add r3, r2
  14727. 8005dca: f503 6310 add.w r3, r3, #2304 ; 0x900
  14728. 8005dce: 691b ldr r3, [r3, #16]
  14729. 8005dd0: 69ba ldr r2, [r7, #24]
  14730. 8005dd2: 0151 lsls r1, r2, #5
  14731. 8005dd4: 69fa ldr r2, [r7, #28]
  14732. 8005dd6: 440a add r2, r1
  14733. 8005dd8: f502 6210 add.w r2, r2, #2304 ; 0x900
  14734. 8005ddc: f443 2300 orr.w r3, r3, #524288 ; 0x80000
  14735. 8005de0: 6113 str r3, [r2, #16]
  14736. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_XFRSIZ);
  14737. 8005de2: 69bb ldr r3, [r7, #24]
  14738. 8005de4: 015a lsls r2, r3, #5
  14739. 8005de6: 69fb ldr r3, [r7, #28]
  14740. 8005de8: 4413 add r3, r2
  14741. 8005dea: f503 6310 add.w r3, r3, #2304 ; 0x900
  14742. 8005dee: 691b ldr r3, [r3, #16]
  14743. 8005df0: 69ba ldr r2, [r7, #24]
  14744. 8005df2: 0151 lsls r1, r2, #5
  14745. 8005df4: 69fa ldr r2, [r7, #28]
  14746. 8005df6: 440a add r2, r1
  14747. 8005df8: f502 6210 add.w r2, r2, #2304 ; 0x900
  14748. 8005dfc: 0cdb lsrs r3, r3, #19
  14749. 8005dfe: 04db lsls r3, r3, #19
  14750. 8005e00: 6113 str r3, [r2, #16]
  14751. 8005e02: e074 b.n 8005eee <USB_EPStartXfer+0x17a>
  14752. /* Program the transfer size and packet count
  14753. * as follows: xfersize = N * maxpacket +
  14754. * short_packet pktcnt = N + (short_packet
  14755. * exist ? 1 : 0)
  14756. */
  14757. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_XFRSIZ);
  14758. 8005e04: 69bb ldr r3, [r7, #24]
  14759. 8005e06: 015a lsls r2, r3, #5
  14760. 8005e08: 69fb ldr r3, [r7, #28]
  14761. 8005e0a: 4413 add r3, r2
  14762. 8005e0c: f503 6310 add.w r3, r3, #2304 ; 0x900
  14763. 8005e10: 691b ldr r3, [r3, #16]
  14764. 8005e12: 69ba ldr r2, [r7, #24]
  14765. 8005e14: 0151 lsls r1, r2, #5
  14766. 8005e16: 69fa ldr r2, [r7, #28]
  14767. 8005e18: 440a add r2, r1
  14768. 8005e1a: f502 6210 add.w r2, r2, #2304 ; 0x900
  14769. 8005e1e: 0cdb lsrs r3, r3, #19
  14770. 8005e20: 04db lsls r3, r3, #19
  14771. 8005e22: 6113 str r3, [r2, #16]
  14772. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_PKTCNT);
  14773. 8005e24: 69bb ldr r3, [r7, #24]
  14774. 8005e26: 015a lsls r2, r3, #5
  14775. 8005e28: 69fb ldr r3, [r7, #28]
  14776. 8005e2a: 4413 add r3, r2
  14777. 8005e2c: f503 6310 add.w r3, r3, #2304 ; 0x900
  14778. 8005e30: 691b ldr r3, [r3, #16]
  14779. 8005e32: 69ba ldr r2, [r7, #24]
  14780. 8005e34: 0151 lsls r1, r2, #5
  14781. 8005e36: 69fa ldr r2, [r7, #28]
  14782. 8005e38: 440a add r2, r1
  14783. 8005e3a: f502 6210 add.w r2, r2, #2304 ; 0x900
  14784. 8005e3e: f023 53ff bic.w r3, r3, #534773760 ; 0x1fe00000
  14785. 8005e42: f423 13c0 bic.w r3, r3, #1572864 ; 0x180000
  14786. 8005e46: 6113 str r3, [r2, #16]
  14787. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT &
  14788. 8005e48: 69bb ldr r3, [r7, #24]
  14789. 8005e4a: 015a lsls r2, r3, #5
  14790. 8005e4c: 69fb ldr r3, [r7, #28]
  14791. 8005e4e: 4413 add r3, r2
  14792. 8005e50: f503 6310 add.w r3, r3, #2304 ; 0x900
  14793. 8005e54: 691a ldr r2, [r3, #16]
  14794. (((ep->xfer_len + ep->maxpacket - 1U) / ep->maxpacket) << 19));
  14795. 8005e56: 68bb ldr r3, [r7, #8]
  14796. 8005e58: 6959 ldr r1, [r3, #20]
  14797. 8005e5a: 68bb ldr r3, [r7, #8]
  14798. 8005e5c: 689b ldr r3, [r3, #8]
  14799. 8005e5e: 440b add r3, r1
  14800. 8005e60: 1e59 subs r1, r3, #1
  14801. 8005e62: 68bb ldr r3, [r7, #8]
  14802. 8005e64: 689b ldr r3, [r3, #8]
  14803. 8005e66: fbb1 f3f3 udiv r3, r1, r3
  14804. 8005e6a: 04d9 lsls r1, r3, #19
  14805. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT &
  14806. 8005e6c: 4b9d ldr r3, [pc, #628] ; (80060e4 <USB_EPStartXfer+0x370>)
  14807. 8005e6e: 400b ands r3, r1
  14808. 8005e70: 69b9 ldr r1, [r7, #24]
  14809. 8005e72: 0148 lsls r0, r1, #5
  14810. 8005e74: 69f9 ldr r1, [r7, #28]
  14811. 8005e76: 4401 add r1, r0
  14812. 8005e78: f501 6110 add.w r1, r1, #2304 ; 0x900
  14813. 8005e7c: 4313 orrs r3, r2
  14814. 8005e7e: 610b str r3, [r1, #16]
  14815. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_XFRSIZ & ep->xfer_len);
  14816. 8005e80: 69bb ldr r3, [r7, #24]
  14817. 8005e82: 015a lsls r2, r3, #5
  14818. 8005e84: 69fb ldr r3, [r7, #28]
  14819. 8005e86: 4413 add r3, r2
  14820. 8005e88: f503 6310 add.w r3, r3, #2304 ; 0x900
  14821. 8005e8c: 691a ldr r2, [r3, #16]
  14822. 8005e8e: 68bb ldr r3, [r7, #8]
  14823. 8005e90: 695b ldr r3, [r3, #20]
  14824. 8005e92: f3c3 0312 ubfx r3, r3, #0, #19
  14825. 8005e96: 69b9 ldr r1, [r7, #24]
  14826. 8005e98: 0148 lsls r0, r1, #5
  14827. 8005e9a: 69f9 ldr r1, [r7, #28]
  14828. 8005e9c: 4401 add r1, r0
  14829. 8005e9e: f501 6110 add.w r1, r1, #2304 ; 0x900
  14830. 8005ea2: 4313 orrs r3, r2
  14831. 8005ea4: 610b str r3, [r1, #16]
  14832. if (ep->type == EP_TYPE_ISOC)
  14833. 8005ea6: 68bb ldr r3, [r7, #8]
  14834. 8005ea8: 78db ldrb r3, [r3, #3]
  14835. 8005eaa: 2b01 cmp r3, #1
  14836. 8005eac: d11f bne.n 8005eee <USB_EPStartXfer+0x17a>
  14837. {
  14838. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_MULCNT);
  14839. 8005eae: 69bb ldr r3, [r7, #24]
  14840. 8005eb0: 015a lsls r2, r3, #5
  14841. 8005eb2: 69fb ldr r3, [r7, #28]
  14842. 8005eb4: 4413 add r3, r2
  14843. 8005eb6: f503 6310 add.w r3, r3, #2304 ; 0x900
  14844. 8005eba: 691b ldr r3, [r3, #16]
  14845. 8005ebc: 69ba ldr r2, [r7, #24]
  14846. 8005ebe: 0151 lsls r1, r2, #5
  14847. 8005ec0: 69fa ldr r2, [r7, #28]
  14848. 8005ec2: 440a add r2, r1
  14849. 8005ec4: f502 6210 add.w r2, r2, #2304 ; 0x900
  14850. 8005ec8: f023 43c0 bic.w r3, r3, #1610612736 ; 0x60000000
  14851. 8005ecc: 6113 str r3, [r2, #16]
  14852. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_MULCNT & (1U << 29));
  14853. 8005ece: 69bb ldr r3, [r7, #24]
  14854. 8005ed0: 015a lsls r2, r3, #5
  14855. 8005ed2: 69fb ldr r3, [r7, #28]
  14856. 8005ed4: 4413 add r3, r2
  14857. 8005ed6: f503 6310 add.w r3, r3, #2304 ; 0x900
  14858. 8005eda: 691b ldr r3, [r3, #16]
  14859. 8005edc: 69ba ldr r2, [r7, #24]
  14860. 8005ede: 0151 lsls r1, r2, #5
  14861. 8005ee0: 69fa ldr r2, [r7, #28]
  14862. 8005ee2: 440a add r2, r1
  14863. 8005ee4: f502 6210 add.w r2, r2, #2304 ; 0x900
  14864. 8005ee8: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
  14865. 8005eec: 6113 str r3, [r2, #16]
  14866. }
  14867. }
  14868. if (dma == 1U)
  14869. 8005eee: 79fb ldrb r3, [r7, #7]
  14870. 8005ef0: 2b01 cmp r3, #1
  14871. 8005ef2: d14b bne.n 8005f8c <USB_EPStartXfer+0x218>
  14872. {
  14873. if ((uint32_t)ep->dma_addr != 0U)
  14874. 8005ef4: 68bb ldr r3, [r7, #8]
  14875. 8005ef6: 691b ldr r3, [r3, #16]
  14876. 8005ef8: 2b00 cmp r3, #0
  14877. 8005efa: d009 beq.n 8005f10 <USB_EPStartXfer+0x19c>
  14878. {
  14879. USBx_INEP(epnum)->DIEPDMA = (uint32_t)(ep->dma_addr);
  14880. 8005efc: 69bb ldr r3, [r7, #24]
  14881. 8005efe: 015a lsls r2, r3, #5
  14882. 8005f00: 69fb ldr r3, [r7, #28]
  14883. 8005f02: 4413 add r3, r2
  14884. 8005f04: f503 6310 add.w r3, r3, #2304 ; 0x900
  14885. 8005f08: 461a mov r2, r3
  14886. 8005f0a: 68bb ldr r3, [r7, #8]
  14887. 8005f0c: 691b ldr r3, [r3, #16]
  14888. 8005f0e: 6153 str r3, [r2, #20]
  14889. }
  14890. if (ep->type == EP_TYPE_ISOC)
  14891. 8005f10: 68bb ldr r3, [r7, #8]
  14892. 8005f12: 78db ldrb r3, [r3, #3]
  14893. 8005f14: 2b01 cmp r3, #1
  14894. 8005f16: d128 bne.n 8005f6a <USB_EPStartXfer+0x1f6>
  14895. {
  14896. if ((USBx_DEVICE->DSTS & (1U << 8)) == 0U)
  14897. 8005f18: 69fb ldr r3, [r7, #28]
  14898. 8005f1a: f503 6300 add.w r3, r3, #2048 ; 0x800
  14899. 8005f1e: 689b ldr r3, [r3, #8]
  14900. 8005f20: f403 7380 and.w r3, r3, #256 ; 0x100
  14901. 8005f24: 2b00 cmp r3, #0
  14902. 8005f26: d110 bne.n 8005f4a <USB_EPStartXfer+0x1d6>
  14903. {
  14904. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SODDFRM;
  14905. 8005f28: 69bb ldr r3, [r7, #24]
  14906. 8005f2a: 015a lsls r2, r3, #5
  14907. 8005f2c: 69fb ldr r3, [r7, #28]
  14908. 8005f2e: 4413 add r3, r2
  14909. 8005f30: f503 6310 add.w r3, r3, #2304 ; 0x900
  14910. 8005f34: 681b ldr r3, [r3, #0]
  14911. 8005f36: 69ba ldr r2, [r7, #24]
  14912. 8005f38: 0151 lsls r1, r2, #5
  14913. 8005f3a: 69fa ldr r2, [r7, #28]
  14914. 8005f3c: 440a add r2, r1
  14915. 8005f3e: f502 6210 add.w r2, r2, #2304 ; 0x900
  14916. 8005f42: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
  14917. 8005f46: 6013 str r3, [r2, #0]
  14918. 8005f48: e00f b.n 8005f6a <USB_EPStartXfer+0x1f6>
  14919. }
  14920. else
  14921. {
  14922. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SD0PID_SEVNFRM;
  14923. 8005f4a: 69bb ldr r3, [r7, #24]
  14924. 8005f4c: 015a lsls r2, r3, #5
  14925. 8005f4e: 69fb ldr r3, [r7, #28]
  14926. 8005f50: 4413 add r3, r2
  14927. 8005f52: f503 6310 add.w r3, r3, #2304 ; 0x900
  14928. 8005f56: 681b ldr r3, [r3, #0]
  14929. 8005f58: 69ba ldr r2, [r7, #24]
  14930. 8005f5a: 0151 lsls r1, r2, #5
  14931. 8005f5c: 69fa ldr r2, [r7, #28]
  14932. 8005f5e: 440a add r2, r1
  14933. 8005f60: f502 6210 add.w r2, r2, #2304 ; 0x900
  14934. 8005f64: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  14935. 8005f68: 6013 str r3, [r2, #0]
  14936. }
  14937. }
  14938. /* EP enable, IN data in FIFO */
  14939. USBx_INEP(epnum)->DIEPCTL |= (USB_OTG_DIEPCTL_CNAK | USB_OTG_DIEPCTL_EPENA);
  14940. 8005f6a: 69bb ldr r3, [r7, #24]
  14941. 8005f6c: 015a lsls r2, r3, #5
  14942. 8005f6e: 69fb ldr r3, [r7, #28]
  14943. 8005f70: 4413 add r3, r2
  14944. 8005f72: f503 6310 add.w r3, r3, #2304 ; 0x900
  14945. 8005f76: 681b ldr r3, [r3, #0]
  14946. 8005f78: 69ba ldr r2, [r7, #24]
  14947. 8005f7a: 0151 lsls r1, r2, #5
  14948. 8005f7c: 69fa ldr r2, [r7, #28]
  14949. 8005f7e: 440a add r2, r1
  14950. 8005f80: f502 6210 add.w r2, r2, #2304 ; 0x900
  14951. 8005f84: f043 4304 orr.w r3, r3, #2214592512 ; 0x84000000
  14952. 8005f88: 6013 str r3, [r2, #0]
  14953. 8005f8a: e12f b.n 80061ec <USB_EPStartXfer+0x478>
  14954. }
  14955. else
  14956. {
  14957. /* EP enable, IN data in FIFO */
  14958. USBx_INEP(epnum)->DIEPCTL |= (USB_OTG_DIEPCTL_CNAK | USB_OTG_DIEPCTL_EPENA);
  14959. 8005f8c: 69bb ldr r3, [r7, #24]
  14960. 8005f8e: 015a lsls r2, r3, #5
  14961. 8005f90: 69fb ldr r3, [r7, #28]
  14962. 8005f92: 4413 add r3, r2
  14963. 8005f94: f503 6310 add.w r3, r3, #2304 ; 0x900
  14964. 8005f98: 681b ldr r3, [r3, #0]
  14965. 8005f9a: 69ba ldr r2, [r7, #24]
  14966. 8005f9c: 0151 lsls r1, r2, #5
  14967. 8005f9e: 69fa ldr r2, [r7, #28]
  14968. 8005fa0: 440a add r2, r1
  14969. 8005fa2: f502 6210 add.w r2, r2, #2304 ; 0x900
  14970. 8005fa6: f043 4304 orr.w r3, r3, #2214592512 ; 0x84000000
  14971. 8005faa: 6013 str r3, [r2, #0]
  14972. if (ep->type != EP_TYPE_ISOC)
  14973. 8005fac: 68bb ldr r3, [r7, #8]
  14974. 8005fae: 78db ldrb r3, [r3, #3]
  14975. 8005fb0: 2b01 cmp r3, #1
  14976. 8005fb2: d015 beq.n 8005fe0 <USB_EPStartXfer+0x26c>
  14977. {
  14978. /* Enable the Tx FIFO Empty Interrupt for this EP */
  14979. if (ep->xfer_len > 0U)
  14980. 8005fb4: 68bb ldr r3, [r7, #8]
  14981. 8005fb6: 695b ldr r3, [r3, #20]
  14982. 8005fb8: 2b00 cmp r3, #0
  14983. 8005fba: f000 8117 beq.w 80061ec <USB_EPStartXfer+0x478>
  14984. {
  14985. USBx_DEVICE->DIEPEMPMSK |= 1UL << (ep->num & EP_ADDR_MSK);
  14986. 8005fbe: 69fb ldr r3, [r7, #28]
  14987. 8005fc0: f503 6300 add.w r3, r3, #2048 ; 0x800
  14988. 8005fc4: 6b5a ldr r2, [r3, #52] ; 0x34
  14989. 8005fc6: 68bb ldr r3, [r7, #8]
  14990. 8005fc8: 781b ldrb r3, [r3, #0]
  14991. 8005fca: f003 030f and.w r3, r3, #15
  14992. 8005fce: 2101 movs r1, #1
  14993. 8005fd0: fa01 f303 lsl.w r3, r1, r3
  14994. 8005fd4: 69f9 ldr r1, [r7, #28]
  14995. 8005fd6: f501 6100 add.w r1, r1, #2048 ; 0x800
  14996. 8005fda: 4313 orrs r3, r2
  14997. 8005fdc: 634b str r3, [r1, #52] ; 0x34
  14998. 8005fde: e105 b.n 80061ec <USB_EPStartXfer+0x478>
  14999. }
  15000. }
  15001. else
  15002. {
  15003. if ((USBx_DEVICE->DSTS & (1U << 8)) == 0U)
  15004. 8005fe0: 69fb ldr r3, [r7, #28]
  15005. 8005fe2: f503 6300 add.w r3, r3, #2048 ; 0x800
  15006. 8005fe6: 689b ldr r3, [r3, #8]
  15007. 8005fe8: f403 7380 and.w r3, r3, #256 ; 0x100
  15008. 8005fec: 2b00 cmp r3, #0
  15009. 8005fee: d110 bne.n 8006012 <USB_EPStartXfer+0x29e>
  15010. {
  15011. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SODDFRM;
  15012. 8005ff0: 69bb ldr r3, [r7, #24]
  15013. 8005ff2: 015a lsls r2, r3, #5
  15014. 8005ff4: 69fb ldr r3, [r7, #28]
  15015. 8005ff6: 4413 add r3, r2
  15016. 8005ff8: f503 6310 add.w r3, r3, #2304 ; 0x900
  15017. 8005ffc: 681b ldr r3, [r3, #0]
  15018. 8005ffe: 69ba ldr r2, [r7, #24]
  15019. 8006000: 0151 lsls r1, r2, #5
  15020. 8006002: 69fa ldr r2, [r7, #28]
  15021. 8006004: 440a add r2, r1
  15022. 8006006: f502 6210 add.w r2, r2, #2304 ; 0x900
  15023. 800600a: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
  15024. 800600e: 6013 str r3, [r2, #0]
  15025. 8006010: e00f b.n 8006032 <USB_EPStartXfer+0x2be>
  15026. }
  15027. else
  15028. {
  15029. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SD0PID_SEVNFRM;
  15030. 8006012: 69bb ldr r3, [r7, #24]
  15031. 8006014: 015a lsls r2, r3, #5
  15032. 8006016: 69fb ldr r3, [r7, #28]
  15033. 8006018: 4413 add r3, r2
  15034. 800601a: f503 6310 add.w r3, r3, #2304 ; 0x900
  15035. 800601e: 681b ldr r3, [r3, #0]
  15036. 8006020: 69ba ldr r2, [r7, #24]
  15037. 8006022: 0151 lsls r1, r2, #5
  15038. 8006024: 69fa ldr r2, [r7, #28]
  15039. 8006026: 440a add r2, r1
  15040. 8006028: f502 6210 add.w r2, r2, #2304 ; 0x900
  15041. 800602c: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  15042. 8006030: 6013 str r3, [r2, #0]
  15043. }
  15044. (void)USB_WritePacket(USBx, ep->xfer_buff, ep->num, (uint16_t)ep->xfer_len, dma);
  15045. 8006032: 68bb ldr r3, [r7, #8]
  15046. 8006034: 68d9 ldr r1, [r3, #12]
  15047. 8006036: 68bb ldr r3, [r7, #8]
  15048. 8006038: 781a ldrb r2, [r3, #0]
  15049. 800603a: 68bb ldr r3, [r7, #8]
  15050. 800603c: 695b ldr r3, [r3, #20]
  15051. 800603e: b298 uxth r0, r3
  15052. 8006040: 79fb ldrb r3, [r7, #7]
  15053. 8006042: 9300 str r3, [sp, #0]
  15054. 8006044: 4603 mov r3, r0
  15055. 8006046: 68f8 ldr r0, [r7, #12]
  15056. 8006048: f000 fa2b bl 80064a2 <USB_WritePacket>
  15057. 800604c: e0ce b.n 80061ec <USB_EPStartXfer+0x478>
  15058. {
  15059. /* Program the transfer size and packet count as follows:
  15060. * pktcnt = N
  15061. * xfersize = N * maxpacket
  15062. */
  15063. USBx_OUTEP(epnum)->DOEPTSIZ &= ~(USB_OTG_DOEPTSIZ_XFRSIZ);
  15064. 800604e: 69bb ldr r3, [r7, #24]
  15065. 8006050: 015a lsls r2, r3, #5
  15066. 8006052: 69fb ldr r3, [r7, #28]
  15067. 8006054: 4413 add r3, r2
  15068. 8006056: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15069. 800605a: 691b ldr r3, [r3, #16]
  15070. 800605c: 69ba ldr r2, [r7, #24]
  15071. 800605e: 0151 lsls r1, r2, #5
  15072. 8006060: 69fa ldr r2, [r7, #28]
  15073. 8006062: 440a add r2, r1
  15074. 8006064: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15075. 8006068: 0cdb lsrs r3, r3, #19
  15076. 800606a: 04db lsls r3, r3, #19
  15077. 800606c: 6113 str r3, [r2, #16]
  15078. USBx_OUTEP(epnum)->DOEPTSIZ &= ~(USB_OTG_DOEPTSIZ_PKTCNT);
  15079. 800606e: 69bb ldr r3, [r7, #24]
  15080. 8006070: 015a lsls r2, r3, #5
  15081. 8006072: 69fb ldr r3, [r7, #28]
  15082. 8006074: 4413 add r3, r2
  15083. 8006076: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15084. 800607a: 691b ldr r3, [r3, #16]
  15085. 800607c: 69ba ldr r2, [r7, #24]
  15086. 800607e: 0151 lsls r1, r2, #5
  15087. 8006080: 69fa ldr r2, [r7, #28]
  15088. 8006082: 440a add r2, r1
  15089. 8006084: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15090. 8006088: f023 53ff bic.w r3, r3, #534773760 ; 0x1fe00000
  15091. 800608c: f423 13c0 bic.w r3, r3, #1572864 ; 0x180000
  15092. 8006090: 6113 str r3, [r2, #16]
  15093. if (ep->xfer_len == 0U)
  15094. 8006092: 68bb ldr r3, [r7, #8]
  15095. 8006094: 695b ldr r3, [r3, #20]
  15096. 8006096: 2b00 cmp r3, #0
  15097. 8006098: d126 bne.n 80060e8 <USB_EPStartXfer+0x374>
  15098. {
  15099. USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_XFRSIZ & ep->maxpacket);
  15100. 800609a: 69bb ldr r3, [r7, #24]
  15101. 800609c: 015a lsls r2, r3, #5
  15102. 800609e: 69fb ldr r3, [r7, #28]
  15103. 80060a0: 4413 add r3, r2
  15104. 80060a2: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15105. 80060a6: 691a ldr r2, [r3, #16]
  15106. 80060a8: 68bb ldr r3, [r7, #8]
  15107. 80060aa: 689b ldr r3, [r3, #8]
  15108. 80060ac: f3c3 0312 ubfx r3, r3, #0, #19
  15109. 80060b0: 69b9 ldr r1, [r7, #24]
  15110. 80060b2: 0148 lsls r0, r1, #5
  15111. 80060b4: 69f9 ldr r1, [r7, #28]
  15112. 80060b6: 4401 add r1, r0
  15113. 80060b8: f501 6130 add.w r1, r1, #2816 ; 0xb00
  15114. 80060bc: 4313 orrs r3, r2
  15115. 80060be: 610b str r3, [r1, #16]
  15116. USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1U << 19));
  15117. 80060c0: 69bb ldr r3, [r7, #24]
  15118. 80060c2: 015a lsls r2, r3, #5
  15119. 80060c4: 69fb ldr r3, [r7, #28]
  15120. 80060c6: 4413 add r3, r2
  15121. 80060c8: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15122. 80060cc: 691b ldr r3, [r3, #16]
  15123. 80060ce: 69ba ldr r2, [r7, #24]
  15124. 80060d0: 0151 lsls r1, r2, #5
  15125. 80060d2: 69fa ldr r2, [r7, #28]
  15126. 80060d4: 440a add r2, r1
  15127. 80060d6: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15128. 80060da: f443 2300 orr.w r3, r3, #524288 ; 0x80000
  15129. 80060de: 6113 str r3, [r2, #16]
  15130. 80060e0: e036 b.n 8006150 <USB_EPStartXfer+0x3dc>
  15131. 80060e2: bf00 nop
  15132. 80060e4: 1ff80000 .word 0x1ff80000
  15133. }
  15134. else
  15135. {
  15136. pktcnt = (uint16_t)((ep->xfer_len + ep->maxpacket - 1U) / ep->maxpacket);
  15137. 80060e8: 68bb ldr r3, [r7, #8]
  15138. 80060ea: 695a ldr r2, [r3, #20]
  15139. 80060ec: 68bb ldr r3, [r7, #8]
  15140. 80060ee: 689b ldr r3, [r3, #8]
  15141. 80060f0: 4413 add r3, r2
  15142. 80060f2: 1e5a subs r2, r3, #1
  15143. 80060f4: 68bb ldr r3, [r7, #8]
  15144. 80060f6: 689b ldr r3, [r3, #8]
  15145. 80060f8: fbb2 f3f3 udiv r3, r2, r3
  15146. 80060fc: 82fb strh r3, [r7, #22]
  15147. USBx_OUTEP(epnum)->DOEPTSIZ |= USB_OTG_DOEPTSIZ_PKTCNT & ((uint32_t)pktcnt << 19);
  15148. 80060fe: 69bb ldr r3, [r7, #24]
  15149. 8006100: 015a lsls r2, r3, #5
  15150. 8006102: 69fb ldr r3, [r7, #28]
  15151. 8006104: 4413 add r3, r2
  15152. 8006106: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15153. 800610a: 691a ldr r2, [r3, #16]
  15154. 800610c: 8afb ldrh r3, [r7, #22]
  15155. 800610e: 04d9 lsls r1, r3, #19
  15156. 8006110: 4b39 ldr r3, [pc, #228] ; (80061f8 <USB_EPStartXfer+0x484>)
  15157. 8006112: 400b ands r3, r1
  15158. 8006114: 69b9 ldr r1, [r7, #24]
  15159. 8006116: 0148 lsls r0, r1, #5
  15160. 8006118: 69f9 ldr r1, [r7, #28]
  15161. 800611a: 4401 add r1, r0
  15162. 800611c: f501 6130 add.w r1, r1, #2816 ; 0xb00
  15163. 8006120: 4313 orrs r3, r2
  15164. 8006122: 610b str r3, [r1, #16]
  15165. USBx_OUTEP(epnum)->DOEPTSIZ |= USB_OTG_DOEPTSIZ_XFRSIZ & (ep->maxpacket * pktcnt);
  15166. 8006124: 69bb ldr r3, [r7, #24]
  15167. 8006126: 015a lsls r2, r3, #5
  15168. 8006128: 69fb ldr r3, [r7, #28]
  15169. 800612a: 4413 add r3, r2
  15170. 800612c: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15171. 8006130: 691a ldr r2, [r3, #16]
  15172. 8006132: 68bb ldr r3, [r7, #8]
  15173. 8006134: 689b ldr r3, [r3, #8]
  15174. 8006136: 8af9 ldrh r1, [r7, #22]
  15175. 8006138: fb01 f303 mul.w r3, r1, r3
  15176. 800613c: f3c3 0312 ubfx r3, r3, #0, #19
  15177. 8006140: 69b9 ldr r1, [r7, #24]
  15178. 8006142: 0148 lsls r0, r1, #5
  15179. 8006144: 69f9 ldr r1, [r7, #28]
  15180. 8006146: 4401 add r1, r0
  15181. 8006148: f501 6130 add.w r1, r1, #2816 ; 0xb00
  15182. 800614c: 4313 orrs r3, r2
  15183. 800614e: 610b str r3, [r1, #16]
  15184. }
  15185. if (dma == 1U)
  15186. 8006150: 79fb ldrb r3, [r7, #7]
  15187. 8006152: 2b01 cmp r3, #1
  15188. 8006154: d10d bne.n 8006172 <USB_EPStartXfer+0x3fe>
  15189. {
  15190. if ((uint32_t)ep->xfer_buff != 0U)
  15191. 8006156: 68bb ldr r3, [r7, #8]
  15192. 8006158: 68db ldr r3, [r3, #12]
  15193. 800615a: 2b00 cmp r3, #0
  15194. 800615c: d009 beq.n 8006172 <USB_EPStartXfer+0x3fe>
  15195. {
  15196. USBx_OUTEP(epnum)->DOEPDMA = (uint32_t)(ep->xfer_buff);
  15197. 800615e: 68bb ldr r3, [r7, #8]
  15198. 8006160: 68d9 ldr r1, [r3, #12]
  15199. 8006162: 69bb ldr r3, [r7, #24]
  15200. 8006164: 015a lsls r2, r3, #5
  15201. 8006166: 69fb ldr r3, [r7, #28]
  15202. 8006168: 4413 add r3, r2
  15203. 800616a: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15204. 800616e: 460a mov r2, r1
  15205. 8006170: 615a str r2, [r3, #20]
  15206. }
  15207. }
  15208. if (ep->type == EP_TYPE_ISOC)
  15209. 8006172: 68bb ldr r3, [r7, #8]
  15210. 8006174: 78db ldrb r3, [r3, #3]
  15211. 8006176: 2b01 cmp r3, #1
  15212. 8006178: d128 bne.n 80061cc <USB_EPStartXfer+0x458>
  15213. {
  15214. if ((USBx_DEVICE->DSTS & (1U << 8)) == 0U)
  15215. 800617a: 69fb ldr r3, [r7, #28]
  15216. 800617c: f503 6300 add.w r3, r3, #2048 ; 0x800
  15217. 8006180: 689b ldr r3, [r3, #8]
  15218. 8006182: f403 7380 and.w r3, r3, #256 ; 0x100
  15219. 8006186: 2b00 cmp r3, #0
  15220. 8006188: d110 bne.n 80061ac <USB_EPStartXfer+0x438>
  15221. {
  15222. USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_SODDFRM;
  15223. 800618a: 69bb ldr r3, [r7, #24]
  15224. 800618c: 015a lsls r2, r3, #5
  15225. 800618e: 69fb ldr r3, [r7, #28]
  15226. 8006190: 4413 add r3, r2
  15227. 8006192: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15228. 8006196: 681b ldr r3, [r3, #0]
  15229. 8006198: 69ba ldr r2, [r7, #24]
  15230. 800619a: 0151 lsls r1, r2, #5
  15231. 800619c: 69fa ldr r2, [r7, #28]
  15232. 800619e: 440a add r2, r1
  15233. 80061a0: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15234. 80061a4: f043 5300 orr.w r3, r3, #536870912 ; 0x20000000
  15235. 80061a8: 6013 str r3, [r2, #0]
  15236. 80061aa: e00f b.n 80061cc <USB_EPStartXfer+0x458>
  15237. }
  15238. else
  15239. {
  15240. USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_SD0PID_SEVNFRM;
  15241. 80061ac: 69bb ldr r3, [r7, #24]
  15242. 80061ae: 015a lsls r2, r3, #5
  15243. 80061b0: 69fb ldr r3, [r7, #28]
  15244. 80061b2: 4413 add r3, r2
  15245. 80061b4: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15246. 80061b8: 681b ldr r3, [r3, #0]
  15247. 80061ba: 69ba ldr r2, [r7, #24]
  15248. 80061bc: 0151 lsls r1, r2, #5
  15249. 80061be: 69fa ldr r2, [r7, #28]
  15250. 80061c0: 440a add r2, r1
  15251. 80061c2: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15252. 80061c6: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  15253. 80061ca: 6013 str r3, [r2, #0]
  15254. }
  15255. }
  15256. /* EP enable */
  15257. USBx_OUTEP(epnum)->DOEPCTL |= (USB_OTG_DOEPCTL_CNAK | USB_OTG_DOEPCTL_EPENA);
  15258. 80061cc: 69bb ldr r3, [r7, #24]
  15259. 80061ce: 015a lsls r2, r3, #5
  15260. 80061d0: 69fb ldr r3, [r7, #28]
  15261. 80061d2: 4413 add r3, r2
  15262. 80061d4: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15263. 80061d8: 681b ldr r3, [r3, #0]
  15264. 80061da: 69ba ldr r2, [r7, #24]
  15265. 80061dc: 0151 lsls r1, r2, #5
  15266. 80061de: 69fa ldr r2, [r7, #28]
  15267. 80061e0: 440a add r2, r1
  15268. 80061e2: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15269. 80061e6: f043 4304 orr.w r3, r3, #2214592512 ; 0x84000000
  15270. 80061ea: 6013 str r3, [r2, #0]
  15271. }
  15272. return HAL_OK;
  15273. 80061ec: 2300 movs r3, #0
  15274. }
  15275. 80061ee: 4618 mov r0, r3
  15276. 80061f0: 3720 adds r7, #32
  15277. 80061f2: 46bd mov sp, r7
  15278. 80061f4: bd80 pop {r7, pc}
  15279. 80061f6: bf00 nop
  15280. 80061f8: 1ff80000 .word 0x1ff80000
  15281. 080061fc <USB_EP0StartXfer>:
  15282. * 0 : DMA feature not used
  15283. * 1 : DMA feature used
  15284. * @retval HAL status
  15285. */
  15286. HAL_StatusTypeDef USB_EP0StartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep, uint8_t dma)
  15287. {
  15288. 80061fc: b480 push {r7}
  15289. 80061fe: b087 sub sp, #28
  15290. 8006200: af00 add r7, sp, #0
  15291. 8006202: 60f8 str r0, [r7, #12]
  15292. 8006204: 60b9 str r1, [r7, #8]
  15293. 8006206: 4613 mov r3, r2
  15294. 8006208: 71fb strb r3, [r7, #7]
  15295. uint32_t USBx_BASE = (uint32_t)USBx;
  15296. 800620a: 68fb ldr r3, [r7, #12]
  15297. 800620c: 617b str r3, [r7, #20]
  15298. uint32_t epnum = (uint32_t)ep->num;
  15299. 800620e: 68bb ldr r3, [r7, #8]
  15300. 8006210: 781b ldrb r3, [r3, #0]
  15301. 8006212: 613b str r3, [r7, #16]
  15302. /* IN endpoint */
  15303. if (ep->is_in == 1U)
  15304. 8006214: 68bb ldr r3, [r7, #8]
  15305. 8006216: 785b ldrb r3, [r3, #1]
  15306. 8006218: 2b01 cmp r3, #1
  15307. 800621a: f040 80cd bne.w 80063b8 <USB_EP0StartXfer+0x1bc>
  15308. {
  15309. /* Zero Length Packet? */
  15310. if (ep->xfer_len == 0U)
  15311. 800621e: 68bb ldr r3, [r7, #8]
  15312. 8006220: 695b ldr r3, [r3, #20]
  15313. 8006222: 2b00 cmp r3, #0
  15314. 8006224: d132 bne.n 800628c <USB_EP0StartXfer+0x90>
  15315. {
  15316. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_PKTCNT);
  15317. 8006226: 693b ldr r3, [r7, #16]
  15318. 8006228: 015a lsls r2, r3, #5
  15319. 800622a: 697b ldr r3, [r7, #20]
  15320. 800622c: 4413 add r3, r2
  15321. 800622e: f503 6310 add.w r3, r3, #2304 ; 0x900
  15322. 8006232: 691b ldr r3, [r3, #16]
  15323. 8006234: 693a ldr r2, [r7, #16]
  15324. 8006236: 0151 lsls r1, r2, #5
  15325. 8006238: 697a ldr r2, [r7, #20]
  15326. 800623a: 440a add r2, r1
  15327. 800623c: f502 6210 add.w r2, r2, #2304 ; 0x900
  15328. 8006240: f023 53ff bic.w r3, r3, #534773760 ; 0x1fe00000
  15329. 8006244: f423 13c0 bic.w r3, r3, #1572864 ; 0x180000
  15330. 8006248: 6113 str r3, [r2, #16]
  15331. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (1U << 19));
  15332. 800624a: 693b ldr r3, [r7, #16]
  15333. 800624c: 015a lsls r2, r3, #5
  15334. 800624e: 697b ldr r3, [r7, #20]
  15335. 8006250: 4413 add r3, r2
  15336. 8006252: f503 6310 add.w r3, r3, #2304 ; 0x900
  15337. 8006256: 691b ldr r3, [r3, #16]
  15338. 8006258: 693a ldr r2, [r7, #16]
  15339. 800625a: 0151 lsls r1, r2, #5
  15340. 800625c: 697a ldr r2, [r7, #20]
  15341. 800625e: 440a add r2, r1
  15342. 8006260: f502 6210 add.w r2, r2, #2304 ; 0x900
  15343. 8006264: f443 2300 orr.w r3, r3, #524288 ; 0x80000
  15344. 8006268: 6113 str r3, [r2, #16]
  15345. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_XFRSIZ);
  15346. 800626a: 693b ldr r3, [r7, #16]
  15347. 800626c: 015a lsls r2, r3, #5
  15348. 800626e: 697b ldr r3, [r7, #20]
  15349. 8006270: 4413 add r3, r2
  15350. 8006272: f503 6310 add.w r3, r3, #2304 ; 0x900
  15351. 8006276: 691b ldr r3, [r3, #16]
  15352. 8006278: 693a ldr r2, [r7, #16]
  15353. 800627a: 0151 lsls r1, r2, #5
  15354. 800627c: 697a ldr r2, [r7, #20]
  15355. 800627e: 440a add r2, r1
  15356. 8006280: f502 6210 add.w r2, r2, #2304 ; 0x900
  15357. 8006284: 0cdb lsrs r3, r3, #19
  15358. 8006286: 04db lsls r3, r3, #19
  15359. 8006288: 6113 str r3, [r2, #16]
  15360. 800628a: e04e b.n 800632a <USB_EP0StartXfer+0x12e>
  15361. /* Program the transfer size and packet count
  15362. * as follows: xfersize = N * maxpacket +
  15363. * short_packet pktcnt = N + (short_packet
  15364. * exist ? 1 : 0)
  15365. */
  15366. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_XFRSIZ);
  15367. 800628c: 693b ldr r3, [r7, #16]
  15368. 800628e: 015a lsls r2, r3, #5
  15369. 8006290: 697b ldr r3, [r7, #20]
  15370. 8006292: 4413 add r3, r2
  15371. 8006294: f503 6310 add.w r3, r3, #2304 ; 0x900
  15372. 8006298: 691b ldr r3, [r3, #16]
  15373. 800629a: 693a ldr r2, [r7, #16]
  15374. 800629c: 0151 lsls r1, r2, #5
  15375. 800629e: 697a ldr r2, [r7, #20]
  15376. 80062a0: 440a add r2, r1
  15377. 80062a2: f502 6210 add.w r2, r2, #2304 ; 0x900
  15378. 80062a6: 0cdb lsrs r3, r3, #19
  15379. 80062a8: 04db lsls r3, r3, #19
  15380. 80062aa: 6113 str r3, [r2, #16]
  15381. USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_PKTCNT);
  15382. 80062ac: 693b ldr r3, [r7, #16]
  15383. 80062ae: 015a lsls r2, r3, #5
  15384. 80062b0: 697b ldr r3, [r7, #20]
  15385. 80062b2: 4413 add r3, r2
  15386. 80062b4: f503 6310 add.w r3, r3, #2304 ; 0x900
  15387. 80062b8: 691b ldr r3, [r3, #16]
  15388. 80062ba: 693a ldr r2, [r7, #16]
  15389. 80062bc: 0151 lsls r1, r2, #5
  15390. 80062be: 697a ldr r2, [r7, #20]
  15391. 80062c0: 440a add r2, r1
  15392. 80062c2: f502 6210 add.w r2, r2, #2304 ; 0x900
  15393. 80062c6: f023 53ff bic.w r3, r3, #534773760 ; 0x1fe00000
  15394. 80062ca: f423 13c0 bic.w r3, r3, #1572864 ; 0x180000
  15395. 80062ce: 6113 str r3, [r2, #16]
  15396. if (ep->xfer_len > ep->maxpacket)
  15397. 80062d0: 68bb ldr r3, [r7, #8]
  15398. 80062d2: 695a ldr r2, [r3, #20]
  15399. 80062d4: 68bb ldr r3, [r7, #8]
  15400. 80062d6: 689b ldr r3, [r3, #8]
  15401. 80062d8: 429a cmp r2, r3
  15402. 80062da: d903 bls.n 80062e4 <USB_EP0StartXfer+0xe8>
  15403. {
  15404. ep->xfer_len = ep->maxpacket;
  15405. 80062dc: 68bb ldr r3, [r7, #8]
  15406. 80062de: 689a ldr r2, [r3, #8]
  15407. 80062e0: 68bb ldr r3, [r7, #8]
  15408. 80062e2: 615a str r2, [r3, #20]
  15409. }
  15410. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (1U << 19));
  15411. 80062e4: 693b ldr r3, [r7, #16]
  15412. 80062e6: 015a lsls r2, r3, #5
  15413. 80062e8: 697b ldr r3, [r7, #20]
  15414. 80062ea: 4413 add r3, r2
  15415. 80062ec: f503 6310 add.w r3, r3, #2304 ; 0x900
  15416. 80062f0: 691b ldr r3, [r3, #16]
  15417. 80062f2: 693a ldr r2, [r7, #16]
  15418. 80062f4: 0151 lsls r1, r2, #5
  15419. 80062f6: 697a ldr r2, [r7, #20]
  15420. 80062f8: 440a add r2, r1
  15421. 80062fa: f502 6210 add.w r2, r2, #2304 ; 0x900
  15422. 80062fe: f443 2300 orr.w r3, r3, #524288 ; 0x80000
  15423. 8006302: 6113 str r3, [r2, #16]
  15424. USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_XFRSIZ & ep->xfer_len);
  15425. 8006304: 693b ldr r3, [r7, #16]
  15426. 8006306: 015a lsls r2, r3, #5
  15427. 8006308: 697b ldr r3, [r7, #20]
  15428. 800630a: 4413 add r3, r2
  15429. 800630c: f503 6310 add.w r3, r3, #2304 ; 0x900
  15430. 8006310: 691a ldr r2, [r3, #16]
  15431. 8006312: 68bb ldr r3, [r7, #8]
  15432. 8006314: 695b ldr r3, [r3, #20]
  15433. 8006316: f3c3 0312 ubfx r3, r3, #0, #19
  15434. 800631a: 6939 ldr r1, [r7, #16]
  15435. 800631c: 0148 lsls r0, r1, #5
  15436. 800631e: 6979 ldr r1, [r7, #20]
  15437. 8006320: 4401 add r1, r0
  15438. 8006322: f501 6110 add.w r1, r1, #2304 ; 0x900
  15439. 8006326: 4313 orrs r3, r2
  15440. 8006328: 610b str r3, [r1, #16]
  15441. }
  15442. if (dma == 1U)
  15443. 800632a: 79fb ldrb r3, [r7, #7]
  15444. 800632c: 2b01 cmp r3, #1
  15445. 800632e: d11e bne.n 800636e <USB_EP0StartXfer+0x172>
  15446. {
  15447. if ((uint32_t)ep->dma_addr != 0U)
  15448. 8006330: 68bb ldr r3, [r7, #8]
  15449. 8006332: 691b ldr r3, [r3, #16]
  15450. 8006334: 2b00 cmp r3, #0
  15451. 8006336: d009 beq.n 800634c <USB_EP0StartXfer+0x150>
  15452. {
  15453. USBx_INEP(epnum)->DIEPDMA = (uint32_t)(ep->dma_addr);
  15454. 8006338: 693b ldr r3, [r7, #16]
  15455. 800633a: 015a lsls r2, r3, #5
  15456. 800633c: 697b ldr r3, [r7, #20]
  15457. 800633e: 4413 add r3, r2
  15458. 8006340: f503 6310 add.w r3, r3, #2304 ; 0x900
  15459. 8006344: 461a mov r2, r3
  15460. 8006346: 68bb ldr r3, [r7, #8]
  15461. 8006348: 691b ldr r3, [r3, #16]
  15462. 800634a: 6153 str r3, [r2, #20]
  15463. }
  15464. /* EP enable, IN data in FIFO */
  15465. USBx_INEP(epnum)->DIEPCTL |= (USB_OTG_DIEPCTL_CNAK | USB_OTG_DIEPCTL_EPENA);
  15466. 800634c: 693b ldr r3, [r7, #16]
  15467. 800634e: 015a lsls r2, r3, #5
  15468. 8006350: 697b ldr r3, [r7, #20]
  15469. 8006352: 4413 add r3, r2
  15470. 8006354: f503 6310 add.w r3, r3, #2304 ; 0x900
  15471. 8006358: 681b ldr r3, [r3, #0]
  15472. 800635a: 693a ldr r2, [r7, #16]
  15473. 800635c: 0151 lsls r1, r2, #5
  15474. 800635e: 697a ldr r2, [r7, #20]
  15475. 8006360: 440a add r2, r1
  15476. 8006362: f502 6210 add.w r2, r2, #2304 ; 0x900
  15477. 8006366: f043 4304 orr.w r3, r3, #2214592512 ; 0x84000000
  15478. 800636a: 6013 str r3, [r2, #0]
  15479. 800636c: e092 b.n 8006494 <USB_EP0StartXfer+0x298>
  15480. }
  15481. else
  15482. {
  15483. /* EP enable, IN data in FIFO */
  15484. USBx_INEP(epnum)->DIEPCTL |= (USB_OTG_DIEPCTL_CNAK | USB_OTG_DIEPCTL_EPENA);
  15485. 800636e: 693b ldr r3, [r7, #16]
  15486. 8006370: 015a lsls r2, r3, #5
  15487. 8006372: 697b ldr r3, [r7, #20]
  15488. 8006374: 4413 add r3, r2
  15489. 8006376: f503 6310 add.w r3, r3, #2304 ; 0x900
  15490. 800637a: 681b ldr r3, [r3, #0]
  15491. 800637c: 693a ldr r2, [r7, #16]
  15492. 800637e: 0151 lsls r1, r2, #5
  15493. 8006380: 697a ldr r2, [r7, #20]
  15494. 8006382: 440a add r2, r1
  15495. 8006384: f502 6210 add.w r2, r2, #2304 ; 0x900
  15496. 8006388: f043 4304 orr.w r3, r3, #2214592512 ; 0x84000000
  15497. 800638c: 6013 str r3, [r2, #0]
  15498. /* Enable the Tx FIFO Empty Interrupt for this EP */
  15499. if (ep->xfer_len > 0U)
  15500. 800638e: 68bb ldr r3, [r7, #8]
  15501. 8006390: 695b ldr r3, [r3, #20]
  15502. 8006392: 2b00 cmp r3, #0
  15503. 8006394: d07e beq.n 8006494 <USB_EP0StartXfer+0x298>
  15504. {
  15505. USBx_DEVICE->DIEPEMPMSK |= 1UL << (ep->num & EP_ADDR_MSK);
  15506. 8006396: 697b ldr r3, [r7, #20]
  15507. 8006398: f503 6300 add.w r3, r3, #2048 ; 0x800
  15508. 800639c: 6b5a ldr r2, [r3, #52] ; 0x34
  15509. 800639e: 68bb ldr r3, [r7, #8]
  15510. 80063a0: 781b ldrb r3, [r3, #0]
  15511. 80063a2: f003 030f and.w r3, r3, #15
  15512. 80063a6: 2101 movs r1, #1
  15513. 80063a8: fa01 f303 lsl.w r3, r1, r3
  15514. 80063ac: 6979 ldr r1, [r7, #20]
  15515. 80063ae: f501 6100 add.w r1, r1, #2048 ; 0x800
  15516. 80063b2: 4313 orrs r3, r2
  15517. 80063b4: 634b str r3, [r1, #52] ; 0x34
  15518. 80063b6: e06d b.n 8006494 <USB_EP0StartXfer+0x298>
  15519. {
  15520. /* Program the transfer size and packet count as follows:
  15521. * pktcnt = N
  15522. * xfersize = N * maxpacket
  15523. */
  15524. USBx_OUTEP(epnum)->DOEPTSIZ &= ~(USB_OTG_DOEPTSIZ_XFRSIZ);
  15525. 80063b8: 693b ldr r3, [r7, #16]
  15526. 80063ba: 015a lsls r2, r3, #5
  15527. 80063bc: 697b ldr r3, [r7, #20]
  15528. 80063be: 4413 add r3, r2
  15529. 80063c0: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15530. 80063c4: 691b ldr r3, [r3, #16]
  15531. 80063c6: 693a ldr r2, [r7, #16]
  15532. 80063c8: 0151 lsls r1, r2, #5
  15533. 80063ca: 697a ldr r2, [r7, #20]
  15534. 80063cc: 440a add r2, r1
  15535. 80063ce: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15536. 80063d2: 0cdb lsrs r3, r3, #19
  15537. 80063d4: 04db lsls r3, r3, #19
  15538. 80063d6: 6113 str r3, [r2, #16]
  15539. USBx_OUTEP(epnum)->DOEPTSIZ &= ~(USB_OTG_DOEPTSIZ_PKTCNT);
  15540. 80063d8: 693b ldr r3, [r7, #16]
  15541. 80063da: 015a lsls r2, r3, #5
  15542. 80063dc: 697b ldr r3, [r7, #20]
  15543. 80063de: 4413 add r3, r2
  15544. 80063e0: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15545. 80063e4: 691b ldr r3, [r3, #16]
  15546. 80063e6: 693a ldr r2, [r7, #16]
  15547. 80063e8: 0151 lsls r1, r2, #5
  15548. 80063ea: 697a ldr r2, [r7, #20]
  15549. 80063ec: 440a add r2, r1
  15550. 80063ee: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15551. 80063f2: f023 53ff bic.w r3, r3, #534773760 ; 0x1fe00000
  15552. 80063f6: f423 13c0 bic.w r3, r3, #1572864 ; 0x180000
  15553. 80063fa: 6113 str r3, [r2, #16]
  15554. if (ep->xfer_len > 0U)
  15555. 80063fc: 68bb ldr r3, [r7, #8]
  15556. 80063fe: 695b ldr r3, [r3, #20]
  15557. 8006400: 2b00 cmp r3, #0
  15558. 8006402: d003 beq.n 800640c <USB_EP0StartXfer+0x210>
  15559. {
  15560. ep->xfer_len = ep->maxpacket;
  15561. 8006404: 68bb ldr r3, [r7, #8]
  15562. 8006406: 689a ldr r2, [r3, #8]
  15563. 8006408: 68bb ldr r3, [r7, #8]
  15564. 800640a: 615a str r2, [r3, #20]
  15565. }
  15566. USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1U << 19));
  15567. 800640c: 693b ldr r3, [r7, #16]
  15568. 800640e: 015a lsls r2, r3, #5
  15569. 8006410: 697b ldr r3, [r7, #20]
  15570. 8006412: 4413 add r3, r2
  15571. 8006414: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15572. 8006418: 691b ldr r3, [r3, #16]
  15573. 800641a: 693a ldr r2, [r7, #16]
  15574. 800641c: 0151 lsls r1, r2, #5
  15575. 800641e: 697a ldr r2, [r7, #20]
  15576. 8006420: 440a add r2, r1
  15577. 8006422: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15578. 8006426: f443 2300 orr.w r3, r3, #524288 ; 0x80000
  15579. 800642a: 6113 str r3, [r2, #16]
  15580. USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_XFRSIZ & (ep->maxpacket));
  15581. 800642c: 693b ldr r3, [r7, #16]
  15582. 800642e: 015a lsls r2, r3, #5
  15583. 8006430: 697b ldr r3, [r7, #20]
  15584. 8006432: 4413 add r3, r2
  15585. 8006434: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15586. 8006438: 691a ldr r2, [r3, #16]
  15587. 800643a: 68bb ldr r3, [r7, #8]
  15588. 800643c: 689b ldr r3, [r3, #8]
  15589. 800643e: f3c3 0312 ubfx r3, r3, #0, #19
  15590. 8006442: 6939 ldr r1, [r7, #16]
  15591. 8006444: 0148 lsls r0, r1, #5
  15592. 8006446: 6979 ldr r1, [r7, #20]
  15593. 8006448: 4401 add r1, r0
  15594. 800644a: f501 6130 add.w r1, r1, #2816 ; 0xb00
  15595. 800644e: 4313 orrs r3, r2
  15596. 8006450: 610b str r3, [r1, #16]
  15597. if (dma == 1U)
  15598. 8006452: 79fb ldrb r3, [r7, #7]
  15599. 8006454: 2b01 cmp r3, #1
  15600. 8006456: d10d bne.n 8006474 <USB_EP0StartXfer+0x278>
  15601. {
  15602. if ((uint32_t)ep->xfer_buff != 0U)
  15603. 8006458: 68bb ldr r3, [r7, #8]
  15604. 800645a: 68db ldr r3, [r3, #12]
  15605. 800645c: 2b00 cmp r3, #0
  15606. 800645e: d009 beq.n 8006474 <USB_EP0StartXfer+0x278>
  15607. {
  15608. USBx_OUTEP(epnum)->DOEPDMA = (uint32_t)(ep->xfer_buff);
  15609. 8006460: 68bb ldr r3, [r7, #8]
  15610. 8006462: 68d9 ldr r1, [r3, #12]
  15611. 8006464: 693b ldr r3, [r7, #16]
  15612. 8006466: 015a lsls r2, r3, #5
  15613. 8006468: 697b ldr r3, [r7, #20]
  15614. 800646a: 4413 add r3, r2
  15615. 800646c: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15616. 8006470: 460a mov r2, r1
  15617. 8006472: 615a str r2, [r3, #20]
  15618. }
  15619. }
  15620. /* EP enable */
  15621. USBx_OUTEP(epnum)->DOEPCTL |= (USB_OTG_DOEPCTL_CNAK | USB_OTG_DOEPCTL_EPENA);
  15622. 8006474: 693b ldr r3, [r7, #16]
  15623. 8006476: 015a lsls r2, r3, #5
  15624. 8006478: 697b ldr r3, [r7, #20]
  15625. 800647a: 4413 add r3, r2
  15626. 800647c: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15627. 8006480: 681b ldr r3, [r3, #0]
  15628. 8006482: 693a ldr r2, [r7, #16]
  15629. 8006484: 0151 lsls r1, r2, #5
  15630. 8006486: 697a ldr r2, [r7, #20]
  15631. 8006488: 440a add r2, r1
  15632. 800648a: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15633. 800648e: f043 4304 orr.w r3, r3, #2214592512 ; 0x84000000
  15634. 8006492: 6013 str r3, [r2, #0]
  15635. }
  15636. return HAL_OK;
  15637. 8006494: 2300 movs r3, #0
  15638. }
  15639. 8006496: 4618 mov r0, r3
  15640. 8006498: 371c adds r7, #28
  15641. 800649a: 46bd mov sp, r7
  15642. 800649c: f85d 7b04 ldr.w r7, [sp], #4
  15643. 80064a0: 4770 bx lr
  15644. 080064a2 <USB_WritePacket>:
  15645. * 1 : DMA feature used
  15646. * @retval HAL status
  15647. */
  15648. HAL_StatusTypeDef USB_WritePacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *src,
  15649. uint8_t ch_ep_num, uint16_t len, uint8_t dma)
  15650. {
  15651. 80064a2: b480 push {r7}
  15652. 80064a4: b089 sub sp, #36 ; 0x24
  15653. 80064a6: af00 add r7, sp, #0
  15654. 80064a8: 60f8 str r0, [r7, #12]
  15655. 80064aa: 60b9 str r1, [r7, #8]
  15656. 80064ac: 4611 mov r1, r2
  15657. 80064ae: 461a mov r2, r3
  15658. 80064b0: 460b mov r3, r1
  15659. 80064b2: 71fb strb r3, [r7, #7]
  15660. 80064b4: 4613 mov r3, r2
  15661. 80064b6: 80bb strh r3, [r7, #4]
  15662. uint32_t USBx_BASE = (uint32_t)USBx;
  15663. 80064b8: 68fb ldr r3, [r7, #12]
  15664. 80064ba: 617b str r3, [r7, #20]
  15665. uint8_t *pSrc = src;
  15666. 80064bc: 68bb ldr r3, [r7, #8]
  15667. 80064be: 61fb str r3, [r7, #28]
  15668. uint32_t count32b;
  15669. uint32_t i;
  15670. if (dma == 0U)
  15671. 80064c0: f897 3028 ldrb.w r3, [r7, #40] ; 0x28
  15672. 80064c4: 2b00 cmp r3, #0
  15673. 80064c6: d123 bne.n 8006510 <USB_WritePacket+0x6e>
  15674. {
  15675. count32b = ((uint32_t)len + 3U) / 4U;
  15676. 80064c8: 88bb ldrh r3, [r7, #4]
  15677. 80064ca: 3303 adds r3, #3
  15678. 80064cc: 089b lsrs r3, r3, #2
  15679. 80064ce: 613b str r3, [r7, #16]
  15680. for (i = 0U; i < count32b; i++)
  15681. 80064d0: 2300 movs r3, #0
  15682. 80064d2: 61bb str r3, [r7, #24]
  15683. 80064d4: e018 b.n 8006508 <USB_WritePacket+0x66>
  15684. {
  15685. USBx_DFIFO((uint32_t)ch_ep_num) = __UNALIGNED_UINT32_READ(pSrc);
  15686. 80064d6: 79fb ldrb r3, [r7, #7]
  15687. 80064d8: 031a lsls r2, r3, #12
  15688. 80064da: 697b ldr r3, [r7, #20]
  15689. 80064dc: 4413 add r3, r2
  15690. 80064de: f503 5380 add.w r3, r3, #4096 ; 0x1000
  15691. 80064e2: 461a mov r2, r3
  15692. 80064e4: 69fb ldr r3, [r7, #28]
  15693. 80064e6: 681b ldr r3, [r3, #0]
  15694. 80064e8: 6013 str r3, [r2, #0]
  15695. pSrc++;
  15696. 80064ea: 69fb ldr r3, [r7, #28]
  15697. 80064ec: 3301 adds r3, #1
  15698. 80064ee: 61fb str r3, [r7, #28]
  15699. pSrc++;
  15700. 80064f0: 69fb ldr r3, [r7, #28]
  15701. 80064f2: 3301 adds r3, #1
  15702. 80064f4: 61fb str r3, [r7, #28]
  15703. pSrc++;
  15704. 80064f6: 69fb ldr r3, [r7, #28]
  15705. 80064f8: 3301 adds r3, #1
  15706. 80064fa: 61fb str r3, [r7, #28]
  15707. pSrc++;
  15708. 80064fc: 69fb ldr r3, [r7, #28]
  15709. 80064fe: 3301 adds r3, #1
  15710. 8006500: 61fb str r3, [r7, #28]
  15711. for (i = 0U; i < count32b; i++)
  15712. 8006502: 69bb ldr r3, [r7, #24]
  15713. 8006504: 3301 adds r3, #1
  15714. 8006506: 61bb str r3, [r7, #24]
  15715. 8006508: 69ba ldr r2, [r7, #24]
  15716. 800650a: 693b ldr r3, [r7, #16]
  15717. 800650c: 429a cmp r2, r3
  15718. 800650e: d3e2 bcc.n 80064d6 <USB_WritePacket+0x34>
  15719. }
  15720. }
  15721. return HAL_OK;
  15722. 8006510: 2300 movs r3, #0
  15723. }
  15724. 8006512: 4618 mov r0, r3
  15725. 8006514: 3724 adds r7, #36 ; 0x24
  15726. 8006516: 46bd mov sp, r7
  15727. 8006518: f85d 7b04 ldr.w r7, [sp], #4
  15728. 800651c: 4770 bx lr
  15729. 0800651e <USB_ReadPacket>:
  15730. * @param dest source pointer
  15731. * @param len Number of bytes to read
  15732. * @retval pointer to destination buffer
  15733. */
  15734. void *USB_ReadPacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len)
  15735. {
  15736. 800651e: b480 push {r7}
  15737. 8006520: b08b sub sp, #44 ; 0x2c
  15738. 8006522: af00 add r7, sp, #0
  15739. 8006524: 60f8 str r0, [r7, #12]
  15740. 8006526: 60b9 str r1, [r7, #8]
  15741. 8006528: 4613 mov r3, r2
  15742. 800652a: 80fb strh r3, [r7, #6]
  15743. uint32_t USBx_BASE = (uint32_t)USBx;
  15744. 800652c: 68fb ldr r3, [r7, #12]
  15745. 800652e: 61bb str r3, [r7, #24]
  15746. uint8_t *pDest = dest;
  15747. 8006530: 68bb ldr r3, [r7, #8]
  15748. 8006532: 627b str r3, [r7, #36] ; 0x24
  15749. uint32_t pData;
  15750. uint32_t i;
  15751. uint32_t count32b = (uint32_t)len >> 2U;
  15752. 8006534: 88fb ldrh r3, [r7, #6]
  15753. 8006536: 089b lsrs r3, r3, #2
  15754. 8006538: b29b uxth r3, r3
  15755. 800653a: 617b str r3, [r7, #20]
  15756. uint16_t remaining_bytes = len % 4U;
  15757. 800653c: 88fb ldrh r3, [r7, #6]
  15758. 800653e: f003 0303 and.w r3, r3, #3
  15759. 8006542: 83fb strh r3, [r7, #30]
  15760. for (i = 0U; i < count32b; i++)
  15761. 8006544: 2300 movs r3, #0
  15762. 8006546: 623b str r3, [r7, #32]
  15763. 8006548: e014 b.n 8006574 <USB_ReadPacket+0x56>
  15764. {
  15765. __UNALIGNED_UINT32_WRITE(pDest, USBx_DFIFO(0U));
  15766. 800654a: 69bb ldr r3, [r7, #24]
  15767. 800654c: f503 5380 add.w r3, r3, #4096 ; 0x1000
  15768. 8006550: 681a ldr r2, [r3, #0]
  15769. 8006552: 6a7b ldr r3, [r7, #36] ; 0x24
  15770. 8006554: 601a str r2, [r3, #0]
  15771. pDest++;
  15772. 8006556: 6a7b ldr r3, [r7, #36] ; 0x24
  15773. 8006558: 3301 adds r3, #1
  15774. 800655a: 627b str r3, [r7, #36] ; 0x24
  15775. pDest++;
  15776. 800655c: 6a7b ldr r3, [r7, #36] ; 0x24
  15777. 800655e: 3301 adds r3, #1
  15778. 8006560: 627b str r3, [r7, #36] ; 0x24
  15779. pDest++;
  15780. 8006562: 6a7b ldr r3, [r7, #36] ; 0x24
  15781. 8006564: 3301 adds r3, #1
  15782. 8006566: 627b str r3, [r7, #36] ; 0x24
  15783. pDest++;
  15784. 8006568: 6a7b ldr r3, [r7, #36] ; 0x24
  15785. 800656a: 3301 adds r3, #1
  15786. 800656c: 627b str r3, [r7, #36] ; 0x24
  15787. for (i = 0U; i < count32b; i++)
  15788. 800656e: 6a3b ldr r3, [r7, #32]
  15789. 8006570: 3301 adds r3, #1
  15790. 8006572: 623b str r3, [r7, #32]
  15791. 8006574: 6a3a ldr r2, [r7, #32]
  15792. 8006576: 697b ldr r3, [r7, #20]
  15793. 8006578: 429a cmp r2, r3
  15794. 800657a: d3e6 bcc.n 800654a <USB_ReadPacket+0x2c>
  15795. }
  15796. /* When Number of data is not word aligned, read the remaining byte */
  15797. if (remaining_bytes != 0U)
  15798. 800657c: 8bfb ldrh r3, [r7, #30]
  15799. 800657e: 2b00 cmp r3, #0
  15800. 8006580: d01e beq.n 80065c0 <USB_ReadPacket+0xa2>
  15801. {
  15802. i = 0U;
  15803. 8006582: 2300 movs r3, #0
  15804. 8006584: 623b str r3, [r7, #32]
  15805. __UNALIGNED_UINT32_WRITE(&pData, USBx_DFIFO(0U));
  15806. 8006586: 69bb ldr r3, [r7, #24]
  15807. 8006588: f503 5380 add.w r3, r3, #4096 ; 0x1000
  15808. 800658c: 461a mov r2, r3
  15809. 800658e: f107 0310 add.w r3, r7, #16
  15810. 8006592: 6812 ldr r2, [r2, #0]
  15811. 8006594: 601a str r2, [r3, #0]
  15812. do
  15813. {
  15814. *(uint8_t *)pDest = (uint8_t)(pData >> (8U * (uint8_t)(i)));
  15815. 8006596: 693a ldr r2, [r7, #16]
  15816. 8006598: 6a3b ldr r3, [r7, #32]
  15817. 800659a: b2db uxtb r3, r3
  15818. 800659c: 00db lsls r3, r3, #3
  15819. 800659e: fa22 f303 lsr.w r3, r2, r3
  15820. 80065a2: b2da uxtb r2, r3
  15821. 80065a4: 6a7b ldr r3, [r7, #36] ; 0x24
  15822. 80065a6: 701a strb r2, [r3, #0]
  15823. i++;
  15824. 80065a8: 6a3b ldr r3, [r7, #32]
  15825. 80065aa: 3301 adds r3, #1
  15826. 80065ac: 623b str r3, [r7, #32]
  15827. pDest++;
  15828. 80065ae: 6a7b ldr r3, [r7, #36] ; 0x24
  15829. 80065b0: 3301 adds r3, #1
  15830. 80065b2: 627b str r3, [r7, #36] ; 0x24
  15831. remaining_bytes--;
  15832. 80065b4: 8bfb ldrh r3, [r7, #30]
  15833. 80065b6: 3b01 subs r3, #1
  15834. 80065b8: 83fb strh r3, [r7, #30]
  15835. } while (remaining_bytes != 0U);
  15836. 80065ba: 8bfb ldrh r3, [r7, #30]
  15837. 80065bc: 2b00 cmp r3, #0
  15838. 80065be: d1ea bne.n 8006596 <USB_ReadPacket+0x78>
  15839. }
  15840. return ((void *)pDest);
  15841. 80065c0: 6a7b ldr r3, [r7, #36] ; 0x24
  15842. }
  15843. 80065c2: 4618 mov r0, r3
  15844. 80065c4: 372c adds r7, #44 ; 0x2c
  15845. 80065c6: 46bd mov sp, r7
  15846. 80065c8: f85d 7b04 ldr.w r7, [sp], #4
  15847. 80065cc: 4770 bx lr
  15848. 080065ce <USB_EPSetStall>:
  15849. * @param USBx Selected device
  15850. * @param ep pointer to endpoint structure
  15851. * @retval HAL status
  15852. */
  15853. HAL_StatusTypeDef USB_EPSetStall(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep)
  15854. {
  15855. 80065ce: b480 push {r7}
  15856. 80065d0: b085 sub sp, #20
  15857. 80065d2: af00 add r7, sp, #0
  15858. 80065d4: 6078 str r0, [r7, #4]
  15859. 80065d6: 6039 str r1, [r7, #0]
  15860. uint32_t USBx_BASE = (uint32_t)USBx;
  15861. 80065d8: 687b ldr r3, [r7, #4]
  15862. 80065da: 60fb str r3, [r7, #12]
  15863. uint32_t epnum = (uint32_t)ep->num;
  15864. 80065dc: 683b ldr r3, [r7, #0]
  15865. 80065de: 781b ldrb r3, [r3, #0]
  15866. 80065e0: 60bb str r3, [r7, #8]
  15867. if (ep->is_in == 1U)
  15868. 80065e2: 683b ldr r3, [r7, #0]
  15869. 80065e4: 785b ldrb r3, [r3, #1]
  15870. 80065e6: 2b01 cmp r3, #1
  15871. 80065e8: d12c bne.n 8006644 <USB_EPSetStall+0x76>
  15872. {
  15873. if (((USBx_INEP(epnum)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == 0U) && (epnum != 0U))
  15874. 80065ea: 68bb ldr r3, [r7, #8]
  15875. 80065ec: 015a lsls r2, r3, #5
  15876. 80065ee: 68fb ldr r3, [r7, #12]
  15877. 80065f0: 4413 add r3, r2
  15878. 80065f2: f503 6310 add.w r3, r3, #2304 ; 0x900
  15879. 80065f6: 681b ldr r3, [r3, #0]
  15880. 80065f8: 2b00 cmp r3, #0
  15881. 80065fa: db12 blt.n 8006622 <USB_EPSetStall+0x54>
  15882. 80065fc: 68bb ldr r3, [r7, #8]
  15883. 80065fe: 2b00 cmp r3, #0
  15884. 8006600: d00f beq.n 8006622 <USB_EPSetStall+0x54>
  15885. {
  15886. USBx_INEP(epnum)->DIEPCTL &= ~(USB_OTG_DIEPCTL_EPDIS);
  15887. 8006602: 68bb ldr r3, [r7, #8]
  15888. 8006604: 015a lsls r2, r3, #5
  15889. 8006606: 68fb ldr r3, [r7, #12]
  15890. 8006608: 4413 add r3, r2
  15891. 800660a: f503 6310 add.w r3, r3, #2304 ; 0x900
  15892. 800660e: 681b ldr r3, [r3, #0]
  15893. 8006610: 68ba ldr r2, [r7, #8]
  15894. 8006612: 0151 lsls r1, r2, #5
  15895. 8006614: 68fa ldr r2, [r7, #12]
  15896. 8006616: 440a add r2, r1
  15897. 8006618: f502 6210 add.w r2, r2, #2304 ; 0x900
  15898. 800661c: f023 4380 bic.w r3, r3, #1073741824 ; 0x40000000
  15899. 8006620: 6013 str r3, [r2, #0]
  15900. }
  15901. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_STALL;
  15902. 8006622: 68bb ldr r3, [r7, #8]
  15903. 8006624: 015a lsls r2, r3, #5
  15904. 8006626: 68fb ldr r3, [r7, #12]
  15905. 8006628: 4413 add r3, r2
  15906. 800662a: f503 6310 add.w r3, r3, #2304 ; 0x900
  15907. 800662e: 681b ldr r3, [r3, #0]
  15908. 8006630: 68ba ldr r2, [r7, #8]
  15909. 8006632: 0151 lsls r1, r2, #5
  15910. 8006634: 68fa ldr r2, [r7, #12]
  15911. 8006636: 440a add r2, r1
  15912. 8006638: f502 6210 add.w r2, r2, #2304 ; 0x900
  15913. 800663c: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
  15914. 8006640: 6013 str r3, [r2, #0]
  15915. 8006642: e02b b.n 800669c <USB_EPSetStall+0xce>
  15916. }
  15917. else
  15918. {
  15919. if (((USBx_OUTEP(epnum)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == 0U) && (epnum != 0U))
  15920. 8006644: 68bb ldr r3, [r7, #8]
  15921. 8006646: 015a lsls r2, r3, #5
  15922. 8006648: 68fb ldr r3, [r7, #12]
  15923. 800664a: 4413 add r3, r2
  15924. 800664c: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15925. 8006650: 681b ldr r3, [r3, #0]
  15926. 8006652: 2b00 cmp r3, #0
  15927. 8006654: db12 blt.n 800667c <USB_EPSetStall+0xae>
  15928. 8006656: 68bb ldr r3, [r7, #8]
  15929. 8006658: 2b00 cmp r3, #0
  15930. 800665a: d00f beq.n 800667c <USB_EPSetStall+0xae>
  15931. {
  15932. USBx_OUTEP(epnum)->DOEPCTL &= ~(USB_OTG_DOEPCTL_EPDIS);
  15933. 800665c: 68bb ldr r3, [r7, #8]
  15934. 800665e: 015a lsls r2, r3, #5
  15935. 8006660: 68fb ldr r3, [r7, #12]
  15936. 8006662: 4413 add r3, r2
  15937. 8006664: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15938. 8006668: 681b ldr r3, [r3, #0]
  15939. 800666a: 68ba ldr r2, [r7, #8]
  15940. 800666c: 0151 lsls r1, r2, #5
  15941. 800666e: 68fa ldr r2, [r7, #12]
  15942. 8006670: 440a add r2, r1
  15943. 8006672: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15944. 8006676: f023 4380 bic.w r3, r3, #1073741824 ; 0x40000000
  15945. 800667a: 6013 str r3, [r2, #0]
  15946. }
  15947. USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_STALL;
  15948. 800667c: 68bb ldr r3, [r7, #8]
  15949. 800667e: 015a lsls r2, r3, #5
  15950. 8006680: 68fb ldr r3, [r7, #12]
  15951. 8006682: 4413 add r3, r2
  15952. 8006684: f503 6330 add.w r3, r3, #2816 ; 0xb00
  15953. 8006688: 681b ldr r3, [r3, #0]
  15954. 800668a: 68ba ldr r2, [r7, #8]
  15955. 800668c: 0151 lsls r1, r2, #5
  15956. 800668e: 68fa ldr r2, [r7, #12]
  15957. 8006690: 440a add r2, r1
  15958. 8006692: f502 6230 add.w r2, r2, #2816 ; 0xb00
  15959. 8006696: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
  15960. 800669a: 6013 str r3, [r2, #0]
  15961. }
  15962. return HAL_OK;
  15963. 800669c: 2300 movs r3, #0
  15964. }
  15965. 800669e: 4618 mov r0, r3
  15966. 80066a0: 3714 adds r7, #20
  15967. 80066a2: 46bd mov sp, r7
  15968. 80066a4: f85d 7b04 ldr.w r7, [sp], #4
  15969. 80066a8: 4770 bx lr
  15970. 080066aa <USB_EPClearStall>:
  15971. * @param USBx Selected device
  15972. * @param ep pointer to endpoint structure
  15973. * @retval HAL status
  15974. */
  15975. HAL_StatusTypeDef USB_EPClearStall(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep)
  15976. {
  15977. 80066aa: b480 push {r7}
  15978. 80066ac: b085 sub sp, #20
  15979. 80066ae: af00 add r7, sp, #0
  15980. 80066b0: 6078 str r0, [r7, #4]
  15981. 80066b2: 6039 str r1, [r7, #0]
  15982. uint32_t USBx_BASE = (uint32_t)USBx;
  15983. 80066b4: 687b ldr r3, [r7, #4]
  15984. 80066b6: 60fb str r3, [r7, #12]
  15985. uint32_t epnum = (uint32_t)ep->num;
  15986. 80066b8: 683b ldr r3, [r7, #0]
  15987. 80066ba: 781b ldrb r3, [r3, #0]
  15988. 80066bc: 60bb str r3, [r7, #8]
  15989. if (ep->is_in == 1U)
  15990. 80066be: 683b ldr r3, [r7, #0]
  15991. 80066c0: 785b ldrb r3, [r3, #1]
  15992. 80066c2: 2b01 cmp r3, #1
  15993. 80066c4: d128 bne.n 8006718 <USB_EPClearStall+0x6e>
  15994. {
  15995. USBx_INEP(epnum)->DIEPCTL &= ~USB_OTG_DIEPCTL_STALL;
  15996. 80066c6: 68bb ldr r3, [r7, #8]
  15997. 80066c8: 015a lsls r2, r3, #5
  15998. 80066ca: 68fb ldr r3, [r7, #12]
  15999. 80066cc: 4413 add r3, r2
  16000. 80066ce: f503 6310 add.w r3, r3, #2304 ; 0x900
  16001. 80066d2: 681b ldr r3, [r3, #0]
  16002. 80066d4: 68ba ldr r2, [r7, #8]
  16003. 80066d6: 0151 lsls r1, r2, #5
  16004. 80066d8: 68fa ldr r2, [r7, #12]
  16005. 80066da: 440a add r2, r1
  16006. 80066dc: f502 6210 add.w r2, r2, #2304 ; 0x900
  16007. 80066e0: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
  16008. 80066e4: 6013 str r3, [r2, #0]
  16009. if ((ep->type == EP_TYPE_INTR) || (ep->type == EP_TYPE_BULK))
  16010. 80066e6: 683b ldr r3, [r7, #0]
  16011. 80066e8: 78db ldrb r3, [r3, #3]
  16012. 80066ea: 2b03 cmp r3, #3
  16013. 80066ec: d003 beq.n 80066f6 <USB_EPClearStall+0x4c>
  16014. 80066ee: 683b ldr r3, [r7, #0]
  16015. 80066f0: 78db ldrb r3, [r3, #3]
  16016. 80066f2: 2b02 cmp r3, #2
  16017. 80066f4: d138 bne.n 8006768 <USB_EPClearStall+0xbe>
  16018. {
  16019. USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SD0PID_SEVNFRM; /* DATA0 */
  16020. 80066f6: 68bb ldr r3, [r7, #8]
  16021. 80066f8: 015a lsls r2, r3, #5
  16022. 80066fa: 68fb ldr r3, [r7, #12]
  16023. 80066fc: 4413 add r3, r2
  16024. 80066fe: f503 6310 add.w r3, r3, #2304 ; 0x900
  16025. 8006702: 681b ldr r3, [r3, #0]
  16026. 8006704: 68ba ldr r2, [r7, #8]
  16027. 8006706: 0151 lsls r1, r2, #5
  16028. 8006708: 68fa ldr r2, [r7, #12]
  16029. 800670a: 440a add r2, r1
  16030. 800670c: f502 6210 add.w r2, r2, #2304 ; 0x900
  16031. 8006710: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  16032. 8006714: 6013 str r3, [r2, #0]
  16033. 8006716: e027 b.n 8006768 <USB_EPClearStall+0xbe>
  16034. }
  16035. }
  16036. else
  16037. {
  16038. USBx_OUTEP(epnum)->DOEPCTL &= ~USB_OTG_DOEPCTL_STALL;
  16039. 8006718: 68bb ldr r3, [r7, #8]
  16040. 800671a: 015a lsls r2, r3, #5
  16041. 800671c: 68fb ldr r3, [r7, #12]
  16042. 800671e: 4413 add r3, r2
  16043. 8006720: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16044. 8006724: 681b ldr r3, [r3, #0]
  16045. 8006726: 68ba ldr r2, [r7, #8]
  16046. 8006728: 0151 lsls r1, r2, #5
  16047. 800672a: 68fa ldr r2, [r7, #12]
  16048. 800672c: 440a add r2, r1
  16049. 800672e: f502 6230 add.w r2, r2, #2816 ; 0xb00
  16050. 8006732: f423 1300 bic.w r3, r3, #2097152 ; 0x200000
  16051. 8006736: 6013 str r3, [r2, #0]
  16052. if ((ep->type == EP_TYPE_INTR) || (ep->type == EP_TYPE_BULK))
  16053. 8006738: 683b ldr r3, [r7, #0]
  16054. 800673a: 78db ldrb r3, [r3, #3]
  16055. 800673c: 2b03 cmp r3, #3
  16056. 800673e: d003 beq.n 8006748 <USB_EPClearStall+0x9e>
  16057. 8006740: 683b ldr r3, [r7, #0]
  16058. 8006742: 78db ldrb r3, [r3, #3]
  16059. 8006744: 2b02 cmp r3, #2
  16060. 8006746: d10f bne.n 8006768 <USB_EPClearStall+0xbe>
  16061. {
  16062. USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_SD0PID_SEVNFRM; /* DATA0 */
  16063. 8006748: 68bb ldr r3, [r7, #8]
  16064. 800674a: 015a lsls r2, r3, #5
  16065. 800674c: 68fb ldr r3, [r7, #12]
  16066. 800674e: 4413 add r3, r2
  16067. 8006750: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16068. 8006754: 681b ldr r3, [r3, #0]
  16069. 8006756: 68ba ldr r2, [r7, #8]
  16070. 8006758: 0151 lsls r1, r2, #5
  16071. 800675a: 68fa ldr r2, [r7, #12]
  16072. 800675c: 440a add r2, r1
  16073. 800675e: f502 6230 add.w r2, r2, #2816 ; 0xb00
  16074. 8006762: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
  16075. 8006766: 6013 str r3, [r2, #0]
  16076. }
  16077. }
  16078. return HAL_OK;
  16079. 8006768: 2300 movs r3, #0
  16080. }
  16081. 800676a: 4618 mov r0, r3
  16082. 800676c: 3714 adds r7, #20
  16083. 800676e: 46bd mov sp, r7
  16084. 8006770: f85d 7b04 ldr.w r7, [sp], #4
  16085. 8006774: 4770 bx lr
  16086. 08006776 <USB_SetDevAddress>:
  16087. * @param address new device address to be assigned
  16088. * This parameter can be a value from 0 to 255
  16089. * @retval HAL status
  16090. */
  16091. HAL_StatusTypeDef USB_SetDevAddress(USB_OTG_GlobalTypeDef *USBx, uint8_t address)
  16092. {
  16093. 8006776: b480 push {r7}
  16094. 8006778: b085 sub sp, #20
  16095. 800677a: af00 add r7, sp, #0
  16096. 800677c: 6078 str r0, [r7, #4]
  16097. 800677e: 460b mov r3, r1
  16098. 8006780: 70fb strb r3, [r7, #3]
  16099. uint32_t USBx_BASE = (uint32_t)USBx;
  16100. 8006782: 687b ldr r3, [r7, #4]
  16101. 8006784: 60fb str r3, [r7, #12]
  16102. USBx_DEVICE->DCFG &= ~(USB_OTG_DCFG_DAD);
  16103. 8006786: 68fb ldr r3, [r7, #12]
  16104. 8006788: f503 6300 add.w r3, r3, #2048 ; 0x800
  16105. 800678c: 681b ldr r3, [r3, #0]
  16106. 800678e: 68fa ldr r2, [r7, #12]
  16107. 8006790: f502 6200 add.w r2, r2, #2048 ; 0x800
  16108. 8006794: f423 63fe bic.w r3, r3, #2032 ; 0x7f0
  16109. 8006798: 6013 str r3, [r2, #0]
  16110. USBx_DEVICE->DCFG |= ((uint32_t)address << 4) & USB_OTG_DCFG_DAD;
  16111. 800679a: 68fb ldr r3, [r7, #12]
  16112. 800679c: f503 6300 add.w r3, r3, #2048 ; 0x800
  16113. 80067a0: 681a ldr r2, [r3, #0]
  16114. 80067a2: 78fb ldrb r3, [r7, #3]
  16115. 80067a4: 011b lsls r3, r3, #4
  16116. 80067a6: f403 63fe and.w r3, r3, #2032 ; 0x7f0
  16117. 80067aa: 68f9 ldr r1, [r7, #12]
  16118. 80067ac: f501 6100 add.w r1, r1, #2048 ; 0x800
  16119. 80067b0: 4313 orrs r3, r2
  16120. 80067b2: 600b str r3, [r1, #0]
  16121. return HAL_OK;
  16122. 80067b4: 2300 movs r3, #0
  16123. }
  16124. 80067b6: 4618 mov r0, r3
  16125. 80067b8: 3714 adds r7, #20
  16126. 80067ba: 46bd mov sp, r7
  16127. 80067bc: f85d 7b04 ldr.w r7, [sp], #4
  16128. 80067c0: 4770 bx lr
  16129. 080067c2 <USB_DevConnect>:
  16130. * @brief USB_DevConnect : Connect the USB device by enabling Rpu
  16131. * @param USBx Selected device
  16132. * @retval HAL status
  16133. */
  16134. HAL_StatusTypeDef USB_DevConnect(USB_OTG_GlobalTypeDef *USBx)
  16135. {
  16136. 80067c2: b480 push {r7}
  16137. 80067c4: b085 sub sp, #20
  16138. 80067c6: af00 add r7, sp, #0
  16139. 80067c8: 6078 str r0, [r7, #4]
  16140. uint32_t USBx_BASE = (uint32_t)USBx;
  16141. 80067ca: 687b ldr r3, [r7, #4]
  16142. 80067cc: 60fb str r3, [r7, #12]
  16143. /* In case phy is stopped, ensure to ungate and restore the phy CLK */
  16144. USBx_PCGCCTL &= ~(USB_OTG_PCGCCTL_STOPCLK | USB_OTG_PCGCCTL_GATECLK);
  16145. 80067ce: 68fb ldr r3, [r7, #12]
  16146. 80067d0: f503 6360 add.w r3, r3, #3584 ; 0xe00
  16147. 80067d4: 681b ldr r3, [r3, #0]
  16148. 80067d6: 68fa ldr r2, [r7, #12]
  16149. 80067d8: f502 6260 add.w r2, r2, #3584 ; 0xe00
  16150. 80067dc: f023 0303 bic.w r3, r3, #3
  16151. 80067e0: 6013 str r3, [r2, #0]
  16152. USBx_DEVICE->DCTL &= ~USB_OTG_DCTL_SDIS;
  16153. 80067e2: 68fb ldr r3, [r7, #12]
  16154. 80067e4: f503 6300 add.w r3, r3, #2048 ; 0x800
  16155. 80067e8: 685b ldr r3, [r3, #4]
  16156. 80067ea: 68fa ldr r2, [r7, #12]
  16157. 80067ec: f502 6200 add.w r2, r2, #2048 ; 0x800
  16158. 80067f0: f023 0302 bic.w r3, r3, #2
  16159. 80067f4: 6053 str r3, [r2, #4]
  16160. return HAL_OK;
  16161. 80067f6: 2300 movs r3, #0
  16162. }
  16163. 80067f8: 4618 mov r0, r3
  16164. 80067fa: 3714 adds r7, #20
  16165. 80067fc: 46bd mov sp, r7
  16166. 80067fe: f85d 7b04 ldr.w r7, [sp], #4
  16167. 8006802: 4770 bx lr
  16168. 08006804 <USB_DevDisconnect>:
  16169. * @brief USB_DevDisconnect : Disconnect the USB device by disabling Rpu
  16170. * @param USBx Selected device
  16171. * @retval HAL status
  16172. */
  16173. HAL_StatusTypeDef USB_DevDisconnect(USB_OTG_GlobalTypeDef *USBx)
  16174. {
  16175. 8006804: b480 push {r7}
  16176. 8006806: b085 sub sp, #20
  16177. 8006808: af00 add r7, sp, #0
  16178. 800680a: 6078 str r0, [r7, #4]
  16179. uint32_t USBx_BASE = (uint32_t)USBx;
  16180. 800680c: 687b ldr r3, [r7, #4]
  16181. 800680e: 60fb str r3, [r7, #12]
  16182. /* In case phy is stopped, ensure to ungate and restore the phy CLK */
  16183. USBx_PCGCCTL &= ~(USB_OTG_PCGCCTL_STOPCLK | USB_OTG_PCGCCTL_GATECLK);
  16184. 8006810: 68fb ldr r3, [r7, #12]
  16185. 8006812: f503 6360 add.w r3, r3, #3584 ; 0xe00
  16186. 8006816: 681b ldr r3, [r3, #0]
  16187. 8006818: 68fa ldr r2, [r7, #12]
  16188. 800681a: f502 6260 add.w r2, r2, #3584 ; 0xe00
  16189. 800681e: f023 0303 bic.w r3, r3, #3
  16190. 8006822: 6013 str r3, [r2, #0]
  16191. USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS;
  16192. 8006824: 68fb ldr r3, [r7, #12]
  16193. 8006826: f503 6300 add.w r3, r3, #2048 ; 0x800
  16194. 800682a: 685b ldr r3, [r3, #4]
  16195. 800682c: 68fa ldr r2, [r7, #12]
  16196. 800682e: f502 6200 add.w r2, r2, #2048 ; 0x800
  16197. 8006832: f043 0302 orr.w r3, r3, #2
  16198. 8006836: 6053 str r3, [r2, #4]
  16199. return HAL_OK;
  16200. 8006838: 2300 movs r3, #0
  16201. }
  16202. 800683a: 4618 mov r0, r3
  16203. 800683c: 3714 adds r7, #20
  16204. 800683e: 46bd mov sp, r7
  16205. 8006840: f85d 7b04 ldr.w r7, [sp], #4
  16206. 8006844: 4770 bx lr
  16207. 08006846 <USB_ReadInterrupts>:
  16208. * @brief USB_ReadInterrupts: return the global USB interrupt status
  16209. * @param USBx Selected device
  16210. * @retval HAL status
  16211. */
  16212. uint32_t USB_ReadInterrupts(USB_OTG_GlobalTypeDef *USBx)
  16213. {
  16214. 8006846: b480 push {r7}
  16215. 8006848: b085 sub sp, #20
  16216. 800684a: af00 add r7, sp, #0
  16217. 800684c: 6078 str r0, [r7, #4]
  16218. uint32_t tmpreg;
  16219. tmpreg = USBx->GINTSTS;
  16220. 800684e: 687b ldr r3, [r7, #4]
  16221. 8006850: 695b ldr r3, [r3, #20]
  16222. 8006852: 60fb str r3, [r7, #12]
  16223. tmpreg &= USBx->GINTMSK;
  16224. 8006854: 687b ldr r3, [r7, #4]
  16225. 8006856: 699b ldr r3, [r3, #24]
  16226. 8006858: 68fa ldr r2, [r7, #12]
  16227. 800685a: 4013 ands r3, r2
  16228. 800685c: 60fb str r3, [r7, #12]
  16229. return tmpreg;
  16230. 800685e: 68fb ldr r3, [r7, #12]
  16231. }
  16232. 8006860: 4618 mov r0, r3
  16233. 8006862: 3714 adds r7, #20
  16234. 8006864: 46bd mov sp, r7
  16235. 8006866: f85d 7b04 ldr.w r7, [sp], #4
  16236. 800686a: 4770 bx lr
  16237. 0800686c <USB_ReadDevAllOutEpInterrupt>:
  16238. * @brief USB_ReadDevAllOutEpInterrupt: return the USB device OUT endpoints interrupt status
  16239. * @param USBx Selected device
  16240. * @retval HAL status
  16241. */
  16242. uint32_t USB_ReadDevAllOutEpInterrupt(USB_OTG_GlobalTypeDef *USBx)
  16243. {
  16244. 800686c: b480 push {r7}
  16245. 800686e: b085 sub sp, #20
  16246. 8006870: af00 add r7, sp, #0
  16247. 8006872: 6078 str r0, [r7, #4]
  16248. uint32_t USBx_BASE = (uint32_t)USBx;
  16249. 8006874: 687b ldr r3, [r7, #4]
  16250. 8006876: 60fb str r3, [r7, #12]
  16251. uint32_t tmpreg;
  16252. tmpreg = USBx_DEVICE->DAINT;
  16253. 8006878: 68fb ldr r3, [r7, #12]
  16254. 800687a: f503 6300 add.w r3, r3, #2048 ; 0x800
  16255. 800687e: 699b ldr r3, [r3, #24]
  16256. 8006880: 60bb str r3, [r7, #8]
  16257. tmpreg &= USBx_DEVICE->DAINTMSK;
  16258. 8006882: 68fb ldr r3, [r7, #12]
  16259. 8006884: f503 6300 add.w r3, r3, #2048 ; 0x800
  16260. 8006888: 69db ldr r3, [r3, #28]
  16261. 800688a: 68ba ldr r2, [r7, #8]
  16262. 800688c: 4013 ands r3, r2
  16263. 800688e: 60bb str r3, [r7, #8]
  16264. return ((tmpreg & 0xffff0000U) >> 16);
  16265. 8006890: 68bb ldr r3, [r7, #8]
  16266. 8006892: 0c1b lsrs r3, r3, #16
  16267. }
  16268. 8006894: 4618 mov r0, r3
  16269. 8006896: 3714 adds r7, #20
  16270. 8006898: 46bd mov sp, r7
  16271. 800689a: f85d 7b04 ldr.w r7, [sp], #4
  16272. 800689e: 4770 bx lr
  16273. 080068a0 <USB_ReadDevAllInEpInterrupt>:
  16274. * @brief USB_ReadDevAllInEpInterrupt: return the USB device IN endpoints interrupt status
  16275. * @param USBx Selected device
  16276. * @retval HAL status
  16277. */
  16278. uint32_t USB_ReadDevAllInEpInterrupt(USB_OTG_GlobalTypeDef *USBx)
  16279. {
  16280. 80068a0: b480 push {r7}
  16281. 80068a2: b085 sub sp, #20
  16282. 80068a4: af00 add r7, sp, #0
  16283. 80068a6: 6078 str r0, [r7, #4]
  16284. uint32_t USBx_BASE = (uint32_t)USBx;
  16285. 80068a8: 687b ldr r3, [r7, #4]
  16286. 80068aa: 60fb str r3, [r7, #12]
  16287. uint32_t tmpreg;
  16288. tmpreg = USBx_DEVICE->DAINT;
  16289. 80068ac: 68fb ldr r3, [r7, #12]
  16290. 80068ae: f503 6300 add.w r3, r3, #2048 ; 0x800
  16291. 80068b2: 699b ldr r3, [r3, #24]
  16292. 80068b4: 60bb str r3, [r7, #8]
  16293. tmpreg &= USBx_DEVICE->DAINTMSK;
  16294. 80068b6: 68fb ldr r3, [r7, #12]
  16295. 80068b8: f503 6300 add.w r3, r3, #2048 ; 0x800
  16296. 80068bc: 69db ldr r3, [r3, #28]
  16297. 80068be: 68ba ldr r2, [r7, #8]
  16298. 80068c0: 4013 ands r3, r2
  16299. 80068c2: 60bb str r3, [r7, #8]
  16300. return ((tmpreg & 0xFFFFU));
  16301. 80068c4: 68bb ldr r3, [r7, #8]
  16302. 80068c6: b29b uxth r3, r3
  16303. }
  16304. 80068c8: 4618 mov r0, r3
  16305. 80068ca: 3714 adds r7, #20
  16306. 80068cc: 46bd mov sp, r7
  16307. 80068ce: f85d 7b04 ldr.w r7, [sp], #4
  16308. 80068d2: 4770 bx lr
  16309. 080068d4 <USB_ReadDevOutEPInterrupt>:
  16310. * @param epnum endpoint number
  16311. * This parameter can be a value from 0 to 15
  16312. * @retval Device OUT EP Interrupt register
  16313. */
  16314. uint32_t USB_ReadDevOutEPInterrupt(USB_OTG_GlobalTypeDef *USBx, uint8_t epnum)
  16315. {
  16316. 80068d4: b480 push {r7}
  16317. 80068d6: b085 sub sp, #20
  16318. 80068d8: af00 add r7, sp, #0
  16319. 80068da: 6078 str r0, [r7, #4]
  16320. 80068dc: 460b mov r3, r1
  16321. 80068de: 70fb strb r3, [r7, #3]
  16322. uint32_t USBx_BASE = (uint32_t)USBx;
  16323. 80068e0: 687b ldr r3, [r7, #4]
  16324. 80068e2: 60fb str r3, [r7, #12]
  16325. uint32_t tmpreg;
  16326. tmpreg = USBx_OUTEP((uint32_t)epnum)->DOEPINT;
  16327. 80068e4: 78fb ldrb r3, [r7, #3]
  16328. 80068e6: 015a lsls r2, r3, #5
  16329. 80068e8: 68fb ldr r3, [r7, #12]
  16330. 80068ea: 4413 add r3, r2
  16331. 80068ec: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16332. 80068f0: 689b ldr r3, [r3, #8]
  16333. 80068f2: 60bb str r3, [r7, #8]
  16334. tmpreg &= USBx_DEVICE->DOEPMSK;
  16335. 80068f4: 68fb ldr r3, [r7, #12]
  16336. 80068f6: f503 6300 add.w r3, r3, #2048 ; 0x800
  16337. 80068fa: 695b ldr r3, [r3, #20]
  16338. 80068fc: 68ba ldr r2, [r7, #8]
  16339. 80068fe: 4013 ands r3, r2
  16340. 8006900: 60bb str r3, [r7, #8]
  16341. return tmpreg;
  16342. 8006902: 68bb ldr r3, [r7, #8]
  16343. }
  16344. 8006904: 4618 mov r0, r3
  16345. 8006906: 3714 adds r7, #20
  16346. 8006908: 46bd mov sp, r7
  16347. 800690a: f85d 7b04 ldr.w r7, [sp], #4
  16348. 800690e: 4770 bx lr
  16349. 08006910 <USB_ReadDevInEPInterrupt>:
  16350. * @param epnum endpoint number
  16351. * This parameter can be a value from 0 to 15
  16352. * @retval Device IN EP Interrupt register
  16353. */
  16354. uint32_t USB_ReadDevInEPInterrupt(USB_OTG_GlobalTypeDef *USBx, uint8_t epnum)
  16355. {
  16356. 8006910: b480 push {r7}
  16357. 8006912: b087 sub sp, #28
  16358. 8006914: af00 add r7, sp, #0
  16359. 8006916: 6078 str r0, [r7, #4]
  16360. 8006918: 460b mov r3, r1
  16361. 800691a: 70fb strb r3, [r7, #3]
  16362. uint32_t USBx_BASE = (uint32_t)USBx;
  16363. 800691c: 687b ldr r3, [r7, #4]
  16364. 800691e: 617b str r3, [r7, #20]
  16365. uint32_t tmpreg;
  16366. uint32_t msk;
  16367. uint32_t emp;
  16368. msk = USBx_DEVICE->DIEPMSK;
  16369. 8006920: 697b ldr r3, [r7, #20]
  16370. 8006922: f503 6300 add.w r3, r3, #2048 ; 0x800
  16371. 8006926: 691b ldr r3, [r3, #16]
  16372. 8006928: 613b str r3, [r7, #16]
  16373. emp = USBx_DEVICE->DIEPEMPMSK;
  16374. 800692a: 697b ldr r3, [r7, #20]
  16375. 800692c: f503 6300 add.w r3, r3, #2048 ; 0x800
  16376. 8006930: 6b5b ldr r3, [r3, #52] ; 0x34
  16377. 8006932: 60fb str r3, [r7, #12]
  16378. msk |= ((emp >> (epnum & EP_ADDR_MSK)) & 0x1U) << 7;
  16379. 8006934: 78fb ldrb r3, [r7, #3]
  16380. 8006936: f003 030f and.w r3, r3, #15
  16381. 800693a: 68fa ldr r2, [r7, #12]
  16382. 800693c: fa22 f303 lsr.w r3, r2, r3
  16383. 8006940: 01db lsls r3, r3, #7
  16384. 8006942: b2db uxtb r3, r3
  16385. 8006944: 693a ldr r2, [r7, #16]
  16386. 8006946: 4313 orrs r3, r2
  16387. 8006948: 613b str r3, [r7, #16]
  16388. tmpreg = USBx_INEP((uint32_t)epnum)->DIEPINT & msk;
  16389. 800694a: 78fb ldrb r3, [r7, #3]
  16390. 800694c: 015a lsls r2, r3, #5
  16391. 800694e: 697b ldr r3, [r7, #20]
  16392. 8006950: 4413 add r3, r2
  16393. 8006952: f503 6310 add.w r3, r3, #2304 ; 0x900
  16394. 8006956: 689b ldr r3, [r3, #8]
  16395. 8006958: 693a ldr r2, [r7, #16]
  16396. 800695a: 4013 ands r3, r2
  16397. 800695c: 60bb str r3, [r7, #8]
  16398. return tmpreg;
  16399. 800695e: 68bb ldr r3, [r7, #8]
  16400. }
  16401. 8006960: 4618 mov r0, r3
  16402. 8006962: 371c adds r7, #28
  16403. 8006964: 46bd mov sp, r7
  16404. 8006966: f85d 7b04 ldr.w r7, [sp], #4
  16405. 800696a: 4770 bx lr
  16406. 0800696c <USB_GetMode>:
  16407. * This parameter can be one of these values:
  16408. * 0 : Host
  16409. * 1 : Device
  16410. */
  16411. uint32_t USB_GetMode(USB_OTG_GlobalTypeDef *USBx)
  16412. {
  16413. 800696c: b480 push {r7}
  16414. 800696e: b083 sub sp, #12
  16415. 8006970: af00 add r7, sp, #0
  16416. 8006972: 6078 str r0, [r7, #4]
  16417. return ((USBx->GINTSTS) & 0x1U);
  16418. 8006974: 687b ldr r3, [r7, #4]
  16419. 8006976: 695b ldr r3, [r3, #20]
  16420. 8006978: f003 0301 and.w r3, r3, #1
  16421. }
  16422. 800697c: 4618 mov r0, r3
  16423. 800697e: 370c adds r7, #12
  16424. 8006980: 46bd mov sp, r7
  16425. 8006982: f85d 7b04 ldr.w r7, [sp], #4
  16426. 8006986: 4770 bx lr
  16427. 08006988 <USB_ActivateSetup>:
  16428. * @brief Activate EP0 for Setup transactions
  16429. * @param USBx Selected device
  16430. * @retval HAL status
  16431. */
  16432. HAL_StatusTypeDef USB_ActivateSetup(USB_OTG_GlobalTypeDef *USBx)
  16433. {
  16434. 8006988: b480 push {r7}
  16435. 800698a: b085 sub sp, #20
  16436. 800698c: af00 add r7, sp, #0
  16437. 800698e: 6078 str r0, [r7, #4]
  16438. uint32_t USBx_BASE = (uint32_t)USBx;
  16439. 8006990: 687b ldr r3, [r7, #4]
  16440. 8006992: 60fb str r3, [r7, #12]
  16441. /* Set the MPS of the IN EP0 to 64 bytes */
  16442. USBx_INEP(0U)->DIEPCTL &= ~USB_OTG_DIEPCTL_MPSIZ;
  16443. 8006994: 68fb ldr r3, [r7, #12]
  16444. 8006996: f503 6310 add.w r3, r3, #2304 ; 0x900
  16445. 800699a: 681b ldr r3, [r3, #0]
  16446. 800699c: 68fa ldr r2, [r7, #12]
  16447. 800699e: f502 6210 add.w r2, r2, #2304 ; 0x900
  16448. 80069a2: f423 63ff bic.w r3, r3, #2040 ; 0x7f8
  16449. 80069a6: f023 0307 bic.w r3, r3, #7
  16450. 80069aa: 6013 str r3, [r2, #0]
  16451. USBx_DEVICE->DCTL |= USB_OTG_DCTL_CGINAK;
  16452. 80069ac: 68fb ldr r3, [r7, #12]
  16453. 80069ae: f503 6300 add.w r3, r3, #2048 ; 0x800
  16454. 80069b2: 685b ldr r3, [r3, #4]
  16455. 80069b4: 68fa ldr r2, [r7, #12]
  16456. 80069b6: f502 6200 add.w r2, r2, #2048 ; 0x800
  16457. 80069ba: f443 7380 orr.w r3, r3, #256 ; 0x100
  16458. 80069be: 6053 str r3, [r2, #4]
  16459. return HAL_OK;
  16460. 80069c0: 2300 movs r3, #0
  16461. }
  16462. 80069c2: 4618 mov r0, r3
  16463. 80069c4: 3714 adds r7, #20
  16464. 80069c6: 46bd mov sp, r7
  16465. 80069c8: f85d 7b04 ldr.w r7, [sp], #4
  16466. 80069cc: 4770 bx lr
  16467. ...
  16468. 080069d0 <USB_EP0_OutStart>:
  16469. * 1 : DMA feature used
  16470. * @param psetup pointer to setup packet
  16471. * @retval HAL status
  16472. */
  16473. HAL_StatusTypeDef USB_EP0_OutStart(USB_OTG_GlobalTypeDef *USBx, uint8_t dma, uint8_t *psetup)
  16474. {
  16475. 80069d0: b480 push {r7}
  16476. 80069d2: b087 sub sp, #28
  16477. 80069d4: af00 add r7, sp, #0
  16478. 80069d6: 60f8 str r0, [r7, #12]
  16479. 80069d8: 460b mov r3, r1
  16480. 80069da: 607a str r2, [r7, #4]
  16481. 80069dc: 72fb strb r3, [r7, #11]
  16482. uint32_t USBx_BASE = (uint32_t)USBx;
  16483. 80069de: 68fb ldr r3, [r7, #12]
  16484. 80069e0: 617b str r3, [r7, #20]
  16485. uint32_t gSNPSiD = *(__IO uint32_t *)(&USBx->CID + 0x1U);
  16486. 80069e2: 68fb ldr r3, [r7, #12]
  16487. 80069e4: 333c adds r3, #60 ; 0x3c
  16488. 80069e6: 3304 adds r3, #4
  16489. 80069e8: 681b ldr r3, [r3, #0]
  16490. 80069ea: 613b str r3, [r7, #16]
  16491. if (gSNPSiD > USB_OTG_CORE_ID_300A)
  16492. 80069ec: 693b ldr r3, [r7, #16]
  16493. 80069ee: 4a26 ldr r2, [pc, #152] ; (8006a88 <USB_EP0_OutStart+0xb8>)
  16494. 80069f0: 4293 cmp r3, r2
  16495. 80069f2: d90a bls.n 8006a0a <USB_EP0_OutStart+0x3a>
  16496. {
  16497. if ((USBx_OUTEP(0U)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA)
  16498. 80069f4: 697b ldr r3, [r7, #20]
  16499. 80069f6: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16500. 80069fa: 681b ldr r3, [r3, #0]
  16501. 80069fc: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
  16502. 8006a00: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000
  16503. 8006a04: d101 bne.n 8006a0a <USB_EP0_OutStart+0x3a>
  16504. {
  16505. return HAL_OK;
  16506. 8006a06: 2300 movs r3, #0
  16507. 8006a08: e037 b.n 8006a7a <USB_EP0_OutStart+0xaa>
  16508. }
  16509. }
  16510. USBx_OUTEP(0U)->DOEPTSIZ = 0U;
  16511. 8006a0a: 697b ldr r3, [r7, #20]
  16512. 8006a0c: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16513. 8006a10: 461a mov r2, r3
  16514. 8006a12: 2300 movs r3, #0
  16515. 8006a14: 6113 str r3, [r2, #16]
  16516. USBx_OUTEP(0U)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1U << 19));
  16517. 8006a16: 697b ldr r3, [r7, #20]
  16518. 8006a18: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16519. 8006a1c: 691b ldr r3, [r3, #16]
  16520. 8006a1e: 697a ldr r2, [r7, #20]
  16521. 8006a20: f502 6230 add.w r2, r2, #2816 ; 0xb00
  16522. 8006a24: f443 2300 orr.w r3, r3, #524288 ; 0x80000
  16523. 8006a28: 6113 str r3, [r2, #16]
  16524. USBx_OUTEP(0U)->DOEPTSIZ |= (3U * 8U);
  16525. 8006a2a: 697b ldr r3, [r7, #20]
  16526. 8006a2c: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16527. 8006a30: 691b ldr r3, [r3, #16]
  16528. 8006a32: 697a ldr r2, [r7, #20]
  16529. 8006a34: f502 6230 add.w r2, r2, #2816 ; 0xb00
  16530. 8006a38: f043 0318 orr.w r3, r3, #24
  16531. 8006a3c: 6113 str r3, [r2, #16]
  16532. USBx_OUTEP(0U)->DOEPTSIZ |= USB_OTG_DOEPTSIZ_STUPCNT;
  16533. 8006a3e: 697b ldr r3, [r7, #20]
  16534. 8006a40: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16535. 8006a44: 691b ldr r3, [r3, #16]
  16536. 8006a46: 697a ldr r2, [r7, #20]
  16537. 8006a48: f502 6230 add.w r2, r2, #2816 ; 0xb00
  16538. 8006a4c: f043 43c0 orr.w r3, r3, #1610612736 ; 0x60000000
  16539. 8006a50: 6113 str r3, [r2, #16]
  16540. if (dma == 1U)
  16541. 8006a52: 7afb ldrb r3, [r7, #11]
  16542. 8006a54: 2b01 cmp r3, #1
  16543. 8006a56: d10f bne.n 8006a78 <USB_EP0_OutStart+0xa8>
  16544. {
  16545. USBx_OUTEP(0U)->DOEPDMA = (uint32_t)psetup;
  16546. 8006a58: 697b ldr r3, [r7, #20]
  16547. 8006a5a: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16548. 8006a5e: 461a mov r2, r3
  16549. 8006a60: 687b ldr r3, [r7, #4]
  16550. 8006a62: 6153 str r3, [r2, #20]
  16551. /* EP enable */
  16552. USBx_OUTEP(0U)->DOEPCTL |= USB_OTG_DOEPCTL_EPENA | USB_OTG_DOEPCTL_USBAEP;
  16553. 8006a64: 697b ldr r3, [r7, #20]
  16554. 8006a66: f503 6330 add.w r3, r3, #2816 ; 0xb00
  16555. 8006a6a: 681b ldr r3, [r3, #0]
  16556. 8006a6c: 697a ldr r2, [r7, #20]
  16557. 8006a6e: f502 6230 add.w r2, r2, #2816 ; 0xb00
  16558. 8006a72: f043 2380 orr.w r3, r3, #2147516416 ; 0x80008000
  16559. 8006a76: 6013 str r3, [r2, #0]
  16560. }
  16561. return HAL_OK;
  16562. 8006a78: 2300 movs r3, #0
  16563. }
  16564. 8006a7a: 4618 mov r0, r3
  16565. 8006a7c: 371c adds r7, #28
  16566. 8006a7e: 46bd mov sp, r7
  16567. 8006a80: f85d 7b04 ldr.w r7, [sp], #4
  16568. 8006a84: 4770 bx lr
  16569. 8006a86: bf00 nop
  16570. 8006a88: 4f54300a .word 0x4f54300a
  16571. 08006a8c <USB_CoreReset>:
  16572. * @brief Reset the USB Core (needed after USB clock settings change)
  16573. * @param USBx Selected device
  16574. * @retval HAL status
  16575. */
  16576. static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx)
  16577. {
  16578. 8006a8c: b480 push {r7}
  16579. 8006a8e: b085 sub sp, #20
  16580. 8006a90: af00 add r7, sp, #0
  16581. 8006a92: 6078 str r0, [r7, #4]
  16582. __IO uint32_t count = 0U;
  16583. 8006a94: 2300 movs r3, #0
  16584. 8006a96: 60fb str r3, [r7, #12]
  16585. /* Wait for AHB master IDLE state. */
  16586. do
  16587. {
  16588. if (++count > 200000U)
  16589. 8006a98: 68fb ldr r3, [r7, #12]
  16590. 8006a9a: 3301 adds r3, #1
  16591. 8006a9c: 60fb str r3, [r7, #12]
  16592. 8006a9e: 4a13 ldr r2, [pc, #76] ; (8006aec <USB_CoreReset+0x60>)
  16593. 8006aa0: 4293 cmp r3, r2
  16594. 8006aa2: d901 bls.n 8006aa8 <USB_CoreReset+0x1c>
  16595. {
  16596. return HAL_TIMEOUT;
  16597. 8006aa4: 2303 movs r3, #3
  16598. 8006aa6: e01a b.n 8006ade <USB_CoreReset+0x52>
  16599. }
  16600. } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U);
  16601. 8006aa8: 687b ldr r3, [r7, #4]
  16602. 8006aaa: 691b ldr r3, [r3, #16]
  16603. 8006aac: 2b00 cmp r3, #0
  16604. 8006aae: daf3 bge.n 8006a98 <USB_CoreReset+0xc>
  16605. /* Core Soft Reset */
  16606. count = 0U;
  16607. 8006ab0: 2300 movs r3, #0
  16608. 8006ab2: 60fb str r3, [r7, #12]
  16609. USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;
  16610. 8006ab4: 687b ldr r3, [r7, #4]
  16611. 8006ab6: 691b ldr r3, [r3, #16]
  16612. 8006ab8: f043 0201 orr.w r2, r3, #1
  16613. 8006abc: 687b ldr r3, [r7, #4]
  16614. 8006abe: 611a str r2, [r3, #16]
  16615. do
  16616. {
  16617. if (++count > 200000U)
  16618. 8006ac0: 68fb ldr r3, [r7, #12]
  16619. 8006ac2: 3301 adds r3, #1
  16620. 8006ac4: 60fb str r3, [r7, #12]
  16621. 8006ac6: 4a09 ldr r2, [pc, #36] ; (8006aec <USB_CoreReset+0x60>)
  16622. 8006ac8: 4293 cmp r3, r2
  16623. 8006aca: d901 bls.n 8006ad0 <USB_CoreReset+0x44>
  16624. {
  16625. return HAL_TIMEOUT;
  16626. 8006acc: 2303 movs r3, #3
  16627. 8006ace: e006 b.n 8006ade <USB_CoreReset+0x52>
  16628. }
  16629. } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);
  16630. 8006ad0: 687b ldr r3, [r7, #4]
  16631. 8006ad2: 691b ldr r3, [r3, #16]
  16632. 8006ad4: f003 0301 and.w r3, r3, #1
  16633. 8006ad8: 2b01 cmp r3, #1
  16634. 8006ada: d0f1 beq.n 8006ac0 <USB_CoreReset+0x34>
  16635. return HAL_OK;
  16636. 8006adc: 2300 movs r3, #0
  16637. }
  16638. 8006ade: 4618 mov r0, r3
  16639. 8006ae0: 3714 adds r7, #20
  16640. 8006ae2: 46bd mov sp, r7
  16641. 8006ae4: f85d 7b04 ldr.w r7, [sp], #4
  16642. 8006ae8: 4770 bx lr
  16643. 8006aea: bf00 nop
  16644. 8006aec: 00030d40 .word 0x00030d40
  16645. 08006af0 <USBD_CDC_Init>:
  16646. * @param pdev: device instance
  16647. * @param cfgidx: Configuration index
  16648. * @retval status
  16649. */
  16650. static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
  16651. {
  16652. 8006af0: b580 push {r7, lr}
  16653. 8006af2: b084 sub sp, #16
  16654. 8006af4: af00 add r7, sp, #0
  16655. 8006af6: 6078 str r0, [r7, #4]
  16656. 8006af8: 460b mov r3, r1
  16657. 8006afa: 70fb strb r3, [r7, #3]
  16658. UNUSED(cfgidx);
  16659. USBD_CDC_HandleTypeDef *hcdc;
  16660. hcdc = USBD_malloc(sizeof(USBD_CDC_HandleTypeDef));
  16661. 8006afc: f44f 7007 mov.w r0, #540 ; 0x21c
  16662. 8006b00: f002 f9b2 bl 8008e68 <USBD_static_malloc>
  16663. 8006b04: 60f8 str r0, [r7, #12]
  16664. if (hcdc == NULL)
  16665. 8006b06: 68fb ldr r3, [r7, #12]
  16666. 8006b08: 2b00 cmp r3, #0
  16667. 8006b0a: d105 bne.n 8006b18 <USBD_CDC_Init+0x28>
  16668. {
  16669. pdev->pClassData = NULL;
  16670. 8006b0c: 687b ldr r3, [r7, #4]
  16671. 8006b0e: 2200 movs r2, #0
  16672. 8006b10: f8c3 22bc str.w r2, [r3, #700] ; 0x2bc
  16673. return (uint8_t)USBD_EMEM;
  16674. 8006b14: 2302 movs r3, #2
  16675. 8006b16: e066 b.n 8006be6 <USBD_CDC_Init+0xf6>
  16676. }
  16677. pdev->pClassData = (void *)hcdc;
  16678. 8006b18: 687b ldr r3, [r7, #4]
  16679. 8006b1a: 68fa ldr r2, [r7, #12]
  16680. 8006b1c: f8c3 22bc str.w r2, [r3, #700] ; 0x2bc
  16681. if (pdev->dev_speed == USBD_SPEED_HIGH)
  16682. 8006b20: 687b ldr r3, [r7, #4]
  16683. 8006b22: 7c1b ldrb r3, [r3, #16]
  16684. 8006b24: 2b00 cmp r3, #0
  16685. 8006b26: d119 bne.n 8006b5c <USBD_CDC_Init+0x6c>
  16686. {
  16687. /* Open EP IN */
  16688. (void)USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
  16689. 8006b28: f44f 7300 mov.w r3, #512 ; 0x200
  16690. 8006b2c: 2202 movs r2, #2
  16691. 8006b2e: 2181 movs r1, #129 ; 0x81
  16692. 8006b30: 6878 ldr r0, [r7, #4]
  16693. 8006b32: f002 f828 bl 8008b86 <USBD_LL_OpenEP>
  16694. CDC_DATA_HS_IN_PACKET_SIZE);
  16695. pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
  16696. 8006b36: 687b ldr r3, [r7, #4]
  16697. 8006b38: 2201 movs r2, #1
  16698. 8006b3a: 871a strh r2, [r3, #56] ; 0x38
  16699. /* Open EP OUT */
  16700. (void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
  16701. 8006b3c: f44f 7300 mov.w r3, #512 ; 0x200
  16702. 8006b40: 2202 movs r2, #2
  16703. 8006b42: 2101 movs r1, #1
  16704. 8006b44: 6878 ldr r0, [r7, #4]
  16705. 8006b46: f002 f81e bl 8008b86 <USBD_LL_OpenEP>
  16706. CDC_DATA_HS_OUT_PACKET_SIZE);
  16707. pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
  16708. 8006b4a: 687b ldr r3, [r7, #4]
  16709. 8006b4c: 2201 movs r2, #1
  16710. 8006b4e: f8a3 2178 strh.w r2, [r3, #376] ; 0x178
  16711. /* Set bInterval for CDC CMD Endpoint */
  16712. pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_HS_BINTERVAL;
  16713. 8006b52: 687b ldr r3, [r7, #4]
  16714. 8006b54: 2210 movs r2, #16
  16715. 8006b56: f8a3 204e strh.w r2, [r3, #78] ; 0x4e
  16716. 8006b5a: e016 b.n 8006b8a <USBD_CDC_Init+0x9a>
  16717. }
  16718. else
  16719. {
  16720. /* Open EP IN */
  16721. (void)USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
  16722. 8006b5c: 2340 movs r3, #64 ; 0x40
  16723. 8006b5e: 2202 movs r2, #2
  16724. 8006b60: 2181 movs r1, #129 ; 0x81
  16725. 8006b62: 6878 ldr r0, [r7, #4]
  16726. 8006b64: f002 f80f bl 8008b86 <USBD_LL_OpenEP>
  16727. CDC_DATA_FS_IN_PACKET_SIZE);
  16728. pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
  16729. 8006b68: 687b ldr r3, [r7, #4]
  16730. 8006b6a: 2201 movs r2, #1
  16731. 8006b6c: 871a strh r2, [r3, #56] ; 0x38
  16732. /* Open EP OUT */
  16733. (void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
  16734. 8006b6e: 2340 movs r3, #64 ; 0x40
  16735. 8006b70: 2202 movs r2, #2
  16736. 8006b72: 2101 movs r1, #1
  16737. 8006b74: 6878 ldr r0, [r7, #4]
  16738. 8006b76: f002 f806 bl 8008b86 <USBD_LL_OpenEP>
  16739. CDC_DATA_FS_OUT_PACKET_SIZE);
  16740. pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
  16741. 8006b7a: 687b ldr r3, [r7, #4]
  16742. 8006b7c: 2201 movs r2, #1
  16743. 8006b7e: f8a3 2178 strh.w r2, [r3, #376] ; 0x178
  16744. /* Set bInterval for CMD Endpoint */
  16745. pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_FS_BINTERVAL;
  16746. 8006b82: 687b ldr r3, [r7, #4]
  16747. 8006b84: 2210 movs r2, #16
  16748. 8006b86: f8a3 204e strh.w r2, [r3, #78] ; 0x4e
  16749. }
  16750. /* Open Command IN EP */
  16751. (void)USBD_LL_OpenEP(pdev, CDC_CMD_EP, USBD_EP_TYPE_INTR, CDC_CMD_PACKET_SIZE);
  16752. 8006b8a: 2308 movs r3, #8
  16753. 8006b8c: 2203 movs r2, #3
  16754. 8006b8e: 2182 movs r1, #130 ; 0x82
  16755. 8006b90: 6878 ldr r0, [r7, #4]
  16756. 8006b92: f001 fff8 bl 8008b86 <USBD_LL_OpenEP>
  16757. pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 1U;
  16758. 8006b96: 687b ldr r3, [r7, #4]
  16759. 8006b98: 2201 movs r2, #1
  16760. 8006b9a: f8a3 204c strh.w r2, [r3, #76] ; 0x4c
  16761. /* Init physical Interface components */
  16762. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Init();
  16763. 8006b9e: 687b ldr r3, [r7, #4]
  16764. 8006ba0: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  16765. 8006ba4: 681b ldr r3, [r3, #0]
  16766. 8006ba6: 4798 blx r3
  16767. /* Init Xfer states */
  16768. hcdc->TxState = 0U;
  16769. 8006ba8: 68fb ldr r3, [r7, #12]
  16770. 8006baa: 2200 movs r2, #0
  16771. 8006bac: f8c3 2214 str.w r2, [r3, #532] ; 0x214
  16772. hcdc->RxState = 0U;
  16773. 8006bb0: 68fb ldr r3, [r7, #12]
  16774. 8006bb2: 2200 movs r2, #0
  16775. 8006bb4: f8c3 2218 str.w r2, [r3, #536] ; 0x218
  16776. if (pdev->dev_speed == USBD_SPEED_HIGH)
  16777. 8006bb8: 687b ldr r3, [r7, #4]
  16778. 8006bba: 7c1b ldrb r3, [r3, #16]
  16779. 8006bbc: 2b00 cmp r3, #0
  16780. 8006bbe: d109 bne.n 8006bd4 <USBD_CDC_Init+0xe4>
  16781. {
  16782. /* Prepare Out endpoint to receive next packet */
  16783. (void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
  16784. 8006bc0: 68fb ldr r3, [r7, #12]
  16785. 8006bc2: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
  16786. 8006bc6: f44f 7300 mov.w r3, #512 ; 0x200
  16787. 8006bca: 2101 movs r1, #1
  16788. 8006bcc: 6878 ldr r0, [r7, #4]
  16789. 8006bce: f002 f8c9 bl 8008d64 <USBD_LL_PrepareReceive>
  16790. 8006bd2: e007 b.n 8006be4 <USBD_CDC_Init+0xf4>
  16791. CDC_DATA_HS_OUT_PACKET_SIZE);
  16792. }
  16793. else
  16794. {
  16795. /* Prepare Out endpoint to receive next packet */
  16796. (void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
  16797. 8006bd4: 68fb ldr r3, [r7, #12]
  16798. 8006bd6: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
  16799. 8006bda: 2340 movs r3, #64 ; 0x40
  16800. 8006bdc: 2101 movs r1, #1
  16801. 8006bde: 6878 ldr r0, [r7, #4]
  16802. 8006be0: f002 f8c0 bl 8008d64 <USBD_LL_PrepareReceive>
  16803. CDC_DATA_FS_OUT_PACKET_SIZE);
  16804. }
  16805. return (uint8_t)USBD_OK;
  16806. 8006be4: 2300 movs r3, #0
  16807. }
  16808. 8006be6: 4618 mov r0, r3
  16809. 8006be8: 3710 adds r7, #16
  16810. 8006bea: 46bd mov sp, r7
  16811. 8006bec: bd80 pop {r7, pc}
  16812. 08006bee <USBD_CDC_DeInit>:
  16813. * @param pdev: device instance
  16814. * @param cfgidx: Configuration index
  16815. * @retval status
  16816. */
  16817. static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
  16818. {
  16819. 8006bee: b580 push {r7, lr}
  16820. 8006bf0: b082 sub sp, #8
  16821. 8006bf2: af00 add r7, sp, #0
  16822. 8006bf4: 6078 str r0, [r7, #4]
  16823. 8006bf6: 460b mov r3, r1
  16824. 8006bf8: 70fb strb r3, [r7, #3]
  16825. UNUSED(cfgidx);
  16826. /* Close EP IN */
  16827. (void)USBD_LL_CloseEP(pdev, CDC_IN_EP);
  16828. 8006bfa: 2181 movs r1, #129 ; 0x81
  16829. 8006bfc: 6878 ldr r0, [r7, #4]
  16830. 8006bfe: f001 ffe8 bl 8008bd2 <USBD_LL_CloseEP>
  16831. pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 0U;
  16832. 8006c02: 687b ldr r3, [r7, #4]
  16833. 8006c04: 2200 movs r2, #0
  16834. 8006c06: 871a strh r2, [r3, #56] ; 0x38
  16835. /* Close EP OUT */
  16836. (void)USBD_LL_CloseEP(pdev, CDC_OUT_EP);
  16837. 8006c08: 2101 movs r1, #1
  16838. 8006c0a: 6878 ldr r0, [r7, #4]
  16839. 8006c0c: f001 ffe1 bl 8008bd2 <USBD_LL_CloseEP>
  16840. pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 0U;
  16841. 8006c10: 687b ldr r3, [r7, #4]
  16842. 8006c12: 2200 movs r2, #0
  16843. 8006c14: f8a3 2178 strh.w r2, [r3, #376] ; 0x178
  16844. /* Close Command IN EP */
  16845. (void)USBD_LL_CloseEP(pdev, CDC_CMD_EP);
  16846. 8006c18: 2182 movs r1, #130 ; 0x82
  16847. 8006c1a: 6878 ldr r0, [r7, #4]
  16848. 8006c1c: f001 ffd9 bl 8008bd2 <USBD_LL_CloseEP>
  16849. pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 0U;
  16850. 8006c20: 687b ldr r3, [r7, #4]
  16851. 8006c22: 2200 movs r2, #0
  16852. 8006c24: f8a3 204c strh.w r2, [r3, #76] ; 0x4c
  16853. pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = 0U;
  16854. 8006c28: 687b ldr r3, [r7, #4]
  16855. 8006c2a: 2200 movs r2, #0
  16856. 8006c2c: f8a3 204e strh.w r2, [r3, #78] ; 0x4e
  16857. /* DeInit physical Interface components */
  16858. if (pdev->pClassData != NULL)
  16859. 8006c30: 687b ldr r3, [r7, #4]
  16860. 8006c32: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  16861. 8006c36: 2b00 cmp r3, #0
  16862. 8006c38: d00e beq.n 8006c58 <USBD_CDC_DeInit+0x6a>
  16863. {
  16864. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->DeInit();
  16865. 8006c3a: 687b ldr r3, [r7, #4]
  16866. 8006c3c: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  16867. 8006c40: 685b ldr r3, [r3, #4]
  16868. 8006c42: 4798 blx r3
  16869. (void)USBD_free(pdev->pClassData);
  16870. 8006c44: 687b ldr r3, [r7, #4]
  16871. 8006c46: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  16872. 8006c4a: 4618 mov r0, r3
  16873. 8006c4c: f002 f91a bl 8008e84 <USBD_static_free>
  16874. pdev->pClassData = NULL;
  16875. 8006c50: 687b ldr r3, [r7, #4]
  16876. 8006c52: 2200 movs r2, #0
  16877. 8006c54: f8c3 22bc str.w r2, [r3, #700] ; 0x2bc
  16878. }
  16879. return (uint8_t)USBD_OK;
  16880. 8006c58: 2300 movs r3, #0
  16881. }
  16882. 8006c5a: 4618 mov r0, r3
  16883. 8006c5c: 3708 adds r7, #8
  16884. 8006c5e: 46bd mov sp, r7
  16885. 8006c60: bd80 pop {r7, pc}
  16886. ...
  16887. 08006c64 <USBD_CDC_Setup>:
  16888. * @param req: usb requests
  16889. * @retval status
  16890. */
  16891. static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev,
  16892. USBD_SetupReqTypedef *req)
  16893. {
  16894. 8006c64: b580 push {r7, lr}
  16895. 8006c66: b086 sub sp, #24
  16896. 8006c68: af00 add r7, sp, #0
  16897. 8006c6a: 6078 str r0, [r7, #4]
  16898. 8006c6c: 6039 str r1, [r7, #0]
  16899. USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
  16900. 8006c6e: 687b ldr r3, [r7, #4]
  16901. 8006c70: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  16902. 8006c74: 613b str r3, [r7, #16]
  16903. uint16_t len;
  16904. uint8_t ifalt = 0U;
  16905. 8006c76: 2300 movs r3, #0
  16906. 8006c78: 737b strb r3, [r7, #13]
  16907. uint16_t status_info = 0U;
  16908. 8006c7a: 2300 movs r3, #0
  16909. 8006c7c: 817b strh r3, [r7, #10]
  16910. USBD_StatusTypeDef ret = USBD_OK;
  16911. 8006c7e: 2300 movs r3, #0
  16912. 8006c80: 75fb strb r3, [r7, #23]
  16913. if (hcdc == NULL)
  16914. 8006c82: 693b ldr r3, [r7, #16]
  16915. 8006c84: 2b00 cmp r3, #0
  16916. 8006c86: d101 bne.n 8006c8c <USBD_CDC_Setup+0x28>
  16917. {
  16918. return (uint8_t)USBD_FAIL;
  16919. 8006c88: 2303 movs r3, #3
  16920. 8006c8a: e0af b.n 8006dec <USBD_CDC_Setup+0x188>
  16921. }
  16922. switch (req->bmRequest & USB_REQ_TYPE_MASK)
  16923. 8006c8c: 683b ldr r3, [r7, #0]
  16924. 8006c8e: 781b ldrb r3, [r3, #0]
  16925. 8006c90: f003 0360 and.w r3, r3, #96 ; 0x60
  16926. 8006c94: 2b00 cmp r3, #0
  16927. 8006c96: d03f beq.n 8006d18 <USBD_CDC_Setup+0xb4>
  16928. 8006c98: 2b20 cmp r3, #32
  16929. 8006c9a: f040 809f bne.w 8006ddc <USBD_CDC_Setup+0x178>
  16930. {
  16931. case USB_REQ_TYPE_CLASS:
  16932. if (req->wLength != 0U)
  16933. 8006c9e: 683b ldr r3, [r7, #0]
  16934. 8006ca0: 88db ldrh r3, [r3, #6]
  16935. 8006ca2: 2b00 cmp r3, #0
  16936. 8006ca4: d02e beq.n 8006d04 <USBD_CDC_Setup+0xa0>
  16937. {
  16938. if ((req->bmRequest & 0x80U) != 0U)
  16939. 8006ca6: 683b ldr r3, [r7, #0]
  16940. 8006ca8: 781b ldrb r3, [r3, #0]
  16941. 8006caa: b25b sxtb r3, r3
  16942. 8006cac: 2b00 cmp r3, #0
  16943. 8006cae: da16 bge.n 8006cde <USBD_CDC_Setup+0x7a>
  16944. {
  16945. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
  16946. 8006cb0: 687b ldr r3, [r7, #4]
  16947. 8006cb2: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  16948. 8006cb6: 689b ldr r3, [r3, #8]
  16949. 8006cb8: 683a ldr r2, [r7, #0]
  16950. 8006cba: 7850 ldrb r0, [r2, #1]
  16951. (uint8_t *)hcdc->data,
  16952. 8006cbc: 6939 ldr r1, [r7, #16]
  16953. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
  16954. 8006cbe: 683a ldr r2, [r7, #0]
  16955. 8006cc0: 88d2 ldrh r2, [r2, #6]
  16956. 8006cc2: 4798 blx r3
  16957. req->wLength);
  16958. len = MIN(CDC_REQ_MAX_DATA_SIZE, req->wLength);
  16959. 8006cc4: 683b ldr r3, [r7, #0]
  16960. 8006cc6: 88db ldrh r3, [r3, #6]
  16961. 8006cc8: 2b07 cmp r3, #7
  16962. 8006cca: bf28 it cs
  16963. 8006ccc: 2307 movcs r3, #7
  16964. 8006cce: 81fb strh r3, [r7, #14]
  16965. (void)USBD_CtlSendData(pdev, (uint8_t *)hcdc->data, len);
  16966. 8006cd0: 693b ldr r3, [r7, #16]
  16967. 8006cd2: 89fa ldrh r2, [r7, #14]
  16968. 8006cd4: 4619 mov r1, r3
  16969. 8006cd6: 6878 ldr r0, [r7, #4]
  16970. 8006cd8: f001 fb13 bl 8008302 <USBD_CtlSendData>
  16971. else
  16972. {
  16973. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
  16974. (uint8_t *)req, 0U);
  16975. }
  16976. break;
  16977. 8006cdc: e085 b.n 8006dea <USBD_CDC_Setup+0x186>
  16978. hcdc->CmdOpCode = req->bRequest;
  16979. 8006cde: 683b ldr r3, [r7, #0]
  16980. 8006ce0: 785a ldrb r2, [r3, #1]
  16981. 8006ce2: 693b ldr r3, [r7, #16]
  16982. 8006ce4: f883 2200 strb.w r2, [r3, #512] ; 0x200
  16983. hcdc->CmdLength = (uint8_t)req->wLength;
  16984. 8006ce8: 683b ldr r3, [r7, #0]
  16985. 8006cea: 88db ldrh r3, [r3, #6]
  16986. 8006cec: b2da uxtb r2, r3
  16987. 8006cee: 693b ldr r3, [r7, #16]
  16988. 8006cf0: f883 2201 strb.w r2, [r3, #513] ; 0x201
  16989. (void)USBD_CtlPrepareRx(pdev, (uint8_t *)hcdc->data, req->wLength);
  16990. 8006cf4: 6939 ldr r1, [r7, #16]
  16991. 8006cf6: 683b ldr r3, [r7, #0]
  16992. 8006cf8: 88db ldrh r3, [r3, #6]
  16993. 8006cfa: 461a mov r2, r3
  16994. 8006cfc: 6878 ldr r0, [r7, #4]
  16995. 8006cfe: f001 fb2c bl 800835a <USBD_CtlPrepareRx>
  16996. break;
  16997. 8006d02: e072 b.n 8006dea <USBD_CDC_Setup+0x186>
  16998. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
  16999. 8006d04: 687b ldr r3, [r7, #4]
  17000. 8006d06: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  17001. 8006d0a: 689b ldr r3, [r3, #8]
  17002. 8006d0c: 683a ldr r2, [r7, #0]
  17003. 8006d0e: 7850 ldrb r0, [r2, #1]
  17004. 8006d10: 2200 movs r2, #0
  17005. 8006d12: 6839 ldr r1, [r7, #0]
  17006. 8006d14: 4798 blx r3
  17007. break;
  17008. 8006d16: e068 b.n 8006dea <USBD_CDC_Setup+0x186>
  17009. case USB_REQ_TYPE_STANDARD:
  17010. switch (req->bRequest)
  17011. 8006d18: 683b ldr r3, [r7, #0]
  17012. 8006d1a: 785b ldrb r3, [r3, #1]
  17013. 8006d1c: 2b0b cmp r3, #11
  17014. 8006d1e: d852 bhi.n 8006dc6 <USBD_CDC_Setup+0x162>
  17015. 8006d20: a201 add r2, pc, #4 ; (adr r2, 8006d28 <USBD_CDC_Setup+0xc4>)
  17016. 8006d22: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  17017. 8006d26: bf00 nop
  17018. 8006d28: 08006d59 .word 0x08006d59
  17019. 8006d2c: 08006dd5 .word 0x08006dd5
  17020. 8006d30: 08006dc7 .word 0x08006dc7
  17021. 8006d34: 08006dc7 .word 0x08006dc7
  17022. 8006d38: 08006dc7 .word 0x08006dc7
  17023. 8006d3c: 08006dc7 .word 0x08006dc7
  17024. 8006d40: 08006dc7 .word 0x08006dc7
  17025. 8006d44: 08006dc7 .word 0x08006dc7
  17026. 8006d48: 08006dc7 .word 0x08006dc7
  17027. 8006d4c: 08006dc7 .word 0x08006dc7
  17028. 8006d50: 08006d83 .word 0x08006d83
  17029. 8006d54: 08006dad .word 0x08006dad
  17030. {
  17031. case USB_REQ_GET_STATUS:
  17032. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  17033. 8006d58: 687b ldr r3, [r7, #4]
  17034. 8006d5a: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  17035. 8006d5e: b2db uxtb r3, r3
  17036. 8006d60: 2b03 cmp r3, #3
  17037. 8006d62: d107 bne.n 8006d74 <USBD_CDC_Setup+0x110>
  17038. {
  17039. (void)USBD_CtlSendData(pdev, (uint8_t *)&status_info, 2U);
  17040. 8006d64: f107 030a add.w r3, r7, #10
  17041. 8006d68: 2202 movs r2, #2
  17042. 8006d6a: 4619 mov r1, r3
  17043. 8006d6c: 6878 ldr r0, [r7, #4]
  17044. 8006d6e: f001 fac8 bl 8008302 <USBD_CtlSendData>
  17045. else
  17046. {
  17047. USBD_CtlError(pdev, req);
  17048. ret = USBD_FAIL;
  17049. }
  17050. break;
  17051. 8006d72: e032 b.n 8006dda <USBD_CDC_Setup+0x176>
  17052. USBD_CtlError(pdev, req);
  17053. 8006d74: 6839 ldr r1, [r7, #0]
  17054. 8006d76: 6878 ldr r0, [r7, #4]
  17055. 8006d78: f001 fa52 bl 8008220 <USBD_CtlError>
  17056. ret = USBD_FAIL;
  17057. 8006d7c: 2303 movs r3, #3
  17058. 8006d7e: 75fb strb r3, [r7, #23]
  17059. break;
  17060. 8006d80: e02b b.n 8006dda <USBD_CDC_Setup+0x176>
  17061. case USB_REQ_GET_INTERFACE:
  17062. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  17063. 8006d82: 687b ldr r3, [r7, #4]
  17064. 8006d84: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  17065. 8006d88: b2db uxtb r3, r3
  17066. 8006d8a: 2b03 cmp r3, #3
  17067. 8006d8c: d107 bne.n 8006d9e <USBD_CDC_Setup+0x13a>
  17068. {
  17069. (void)USBD_CtlSendData(pdev, &ifalt, 1U);
  17070. 8006d8e: f107 030d add.w r3, r7, #13
  17071. 8006d92: 2201 movs r2, #1
  17072. 8006d94: 4619 mov r1, r3
  17073. 8006d96: 6878 ldr r0, [r7, #4]
  17074. 8006d98: f001 fab3 bl 8008302 <USBD_CtlSendData>
  17075. else
  17076. {
  17077. USBD_CtlError(pdev, req);
  17078. ret = USBD_FAIL;
  17079. }
  17080. break;
  17081. 8006d9c: e01d b.n 8006dda <USBD_CDC_Setup+0x176>
  17082. USBD_CtlError(pdev, req);
  17083. 8006d9e: 6839 ldr r1, [r7, #0]
  17084. 8006da0: 6878 ldr r0, [r7, #4]
  17085. 8006da2: f001 fa3d bl 8008220 <USBD_CtlError>
  17086. ret = USBD_FAIL;
  17087. 8006da6: 2303 movs r3, #3
  17088. 8006da8: 75fb strb r3, [r7, #23]
  17089. break;
  17090. 8006daa: e016 b.n 8006dda <USBD_CDC_Setup+0x176>
  17091. case USB_REQ_SET_INTERFACE:
  17092. if (pdev->dev_state != USBD_STATE_CONFIGURED)
  17093. 8006dac: 687b ldr r3, [r7, #4]
  17094. 8006dae: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  17095. 8006db2: b2db uxtb r3, r3
  17096. 8006db4: 2b03 cmp r3, #3
  17097. 8006db6: d00f beq.n 8006dd8 <USBD_CDC_Setup+0x174>
  17098. {
  17099. USBD_CtlError(pdev, req);
  17100. 8006db8: 6839 ldr r1, [r7, #0]
  17101. 8006dba: 6878 ldr r0, [r7, #4]
  17102. 8006dbc: f001 fa30 bl 8008220 <USBD_CtlError>
  17103. ret = USBD_FAIL;
  17104. 8006dc0: 2303 movs r3, #3
  17105. 8006dc2: 75fb strb r3, [r7, #23]
  17106. }
  17107. break;
  17108. 8006dc4: e008 b.n 8006dd8 <USBD_CDC_Setup+0x174>
  17109. case USB_REQ_CLEAR_FEATURE:
  17110. break;
  17111. default:
  17112. USBD_CtlError(pdev, req);
  17113. 8006dc6: 6839 ldr r1, [r7, #0]
  17114. 8006dc8: 6878 ldr r0, [r7, #4]
  17115. 8006dca: f001 fa29 bl 8008220 <USBD_CtlError>
  17116. ret = USBD_FAIL;
  17117. 8006dce: 2303 movs r3, #3
  17118. 8006dd0: 75fb strb r3, [r7, #23]
  17119. break;
  17120. 8006dd2: e002 b.n 8006dda <USBD_CDC_Setup+0x176>
  17121. break;
  17122. 8006dd4: bf00 nop
  17123. 8006dd6: e008 b.n 8006dea <USBD_CDC_Setup+0x186>
  17124. break;
  17125. 8006dd8: bf00 nop
  17126. }
  17127. break;
  17128. 8006dda: e006 b.n 8006dea <USBD_CDC_Setup+0x186>
  17129. default:
  17130. USBD_CtlError(pdev, req);
  17131. 8006ddc: 6839 ldr r1, [r7, #0]
  17132. 8006dde: 6878 ldr r0, [r7, #4]
  17133. 8006de0: f001 fa1e bl 8008220 <USBD_CtlError>
  17134. ret = USBD_FAIL;
  17135. 8006de4: 2303 movs r3, #3
  17136. 8006de6: 75fb strb r3, [r7, #23]
  17137. break;
  17138. 8006de8: bf00 nop
  17139. }
  17140. return (uint8_t)ret;
  17141. 8006dea: 7dfb ldrb r3, [r7, #23]
  17142. }
  17143. 8006dec: 4618 mov r0, r3
  17144. 8006dee: 3718 adds r7, #24
  17145. 8006df0: 46bd mov sp, r7
  17146. 8006df2: bd80 pop {r7, pc}
  17147. 08006df4 <USBD_CDC_DataIn>:
  17148. * @param pdev: device instance
  17149. * @param epnum: endpoint number
  17150. * @retval status
  17151. */
  17152. static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum)
  17153. {
  17154. 8006df4: b580 push {r7, lr}
  17155. 8006df6: b084 sub sp, #16
  17156. 8006df8: af00 add r7, sp, #0
  17157. 8006dfa: 6078 str r0, [r7, #4]
  17158. 8006dfc: 460b mov r3, r1
  17159. 8006dfe: 70fb strb r3, [r7, #3]
  17160. USBD_CDC_HandleTypeDef *hcdc;
  17161. PCD_HandleTypeDef *hpcd = pdev->pData;
  17162. 8006e00: 687b ldr r3, [r7, #4]
  17163. 8006e02: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  17164. 8006e06: 60fb str r3, [r7, #12]
  17165. if (pdev->pClassData == NULL)
  17166. 8006e08: 687b ldr r3, [r7, #4]
  17167. 8006e0a: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17168. 8006e0e: 2b00 cmp r3, #0
  17169. 8006e10: d101 bne.n 8006e16 <USBD_CDC_DataIn+0x22>
  17170. {
  17171. return (uint8_t)USBD_FAIL;
  17172. 8006e12: 2303 movs r3, #3
  17173. 8006e14: e04f b.n 8006eb6 <USBD_CDC_DataIn+0xc2>
  17174. }
  17175. hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
  17176. 8006e16: 687b ldr r3, [r7, #4]
  17177. 8006e18: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17178. 8006e1c: 60bb str r3, [r7, #8]
  17179. if ((pdev->ep_in[epnum].total_length > 0U) &&
  17180. 8006e1e: 78fa ldrb r2, [r7, #3]
  17181. 8006e20: 6879 ldr r1, [r7, #4]
  17182. 8006e22: 4613 mov r3, r2
  17183. 8006e24: 009b lsls r3, r3, #2
  17184. 8006e26: 4413 add r3, r2
  17185. 8006e28: 009b lsls r3, r3, #2
  17186. 8006e2a: 440b add r3, r1
  17187. 8006e2c: 3318 adds r3, #24
  17188. 8006e2e: 681b ldr r3, [r3, #0]
  17189. 8006e30: 2b00 cmp r3, #0
  17190. 8006e32: d029 beq.n 8006e88 <USBD_CDC_DataIn+0x94>
  17191. ((pdev->ep_in[epnum].total_length % hpcd->IN_ep[epnum].maxpacket) == 0U))
  17192. 8006e34: 78fa ldrb r2, [r7, #3]
  17193. 8006e36: 6879 ldr r1, [r7, #4]
  17194. 8006e38: 4613 mov r3, r2
  17195. 8006e3a: 009b lsls r3, r3, #2
  17196. 8006e3c: 4413 add r3, r2
  17197. 8006e3e: 009b lsls r3, r3, #2
  17198. 8006e40: 440b add r3, r1
  17199. 8006e42: 3318 adds r3, #24
  17200. 8006e44: 681a ldr r2, [r3, #0]
  17201. 8006e46: 78f9 ldrb r1, [r7, #3]
  17202. 8006e48: 68f8 ldr r0, [r7, #12]
  17203. 8006e4a: 460b mov r3, r1
  17204. 8006e4c: 00db lsls r3, r3, #3
  17205. 8006e4e: 1a5b subs r3, r3, r1
  17206. 8006e50: 009b lsls r3, r3, #2
  17207. 8006e52: 4403 add r3, r0
  17208. 8006e54: 3344 adds r3, #68 ; 0x44
  17209. 8006e56: 681b ldr r3, [r3, #0]
  17210. 8006e58: fbb2 f1f3 udiv r1, r2, r3
  17211. 8006e5c: fb03 f301 mul.w r3, r3, r1
  17212. 8006e60: 1ad3 subs r3, r2, r3
  17213. if ((pdev->ep_in[epnum].total_length > 0U) &&
  17214. 8006e62: 2b00 cmp r3, #0
  17215. 8006e64: d110 bne.n 8006e88 <USBD_CDC_DataIn+0x94>
  17216. {
  17217. /* Update the packet total length */
  17218. pdev->ep_in[epnum].total_length = 0U;
  17219. 8006e66: 78fa ldrb r2, [r7, #3]
  17220. 8006e68: 6879 ldr r1, [r7, #4]
  17221. 8006e6a: 4613 mov r3, r2
  17222. 8006e6c: 009b lsls r3, r3, #2
  17223. 8006e6e: 4413 add r3, r2
  17224. 8006e70: 009b lsls r3, r3, #2
  17225. 8006e72: 440b add r3, r1
  17226. 8006e74: 3318 adds r3, #24
  17227. 8006e76: 2200 movs r2, #0
  17228. 8006e78: 601a str r2, [r3, #0]
  17229. /* Send ZLP */
  17230. (void)USBD_LL_Transmit(pdev, epnum, NULL, 0U);
  17231. 8006e7a: 78f9 ldrb r1, [r7, #3]
  17232. 8006e7c: 2300 movs r3, #0
  17233. 8006e7e: 2200 movs r2, #0
  17234. 8006e80: 6878 ldr r0, [r7, #4]
  17235. 8006e82: f001 ff4e bl 8008d22 <USBD_LL_Transmit>
  17236. 8006e86: e015 b.n 8006eb4 <USBD_CDC_DataIn+0xc0>
  17237. }
  17238. else
  17239. {
  17240. hcdc->TxState = 0U;
  17241. 8006e88: 68bb ldr r3, [r7, #8]
  17242. 8006e8a: 2200 movs r2, #0
  17243. 8006e8c: f8c3 2214 str.w r2, [r3, #532] ; 0x214
  17244. if (((USBD_CDC_ItfTypeDef *)pdev->pUserData)->TransmitCplt != NULL)
  17245. 8006e90: 687b ldr r3, [r7, #4]
  17246. 8006e92: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  17247. 8006e96: 691b ldr r3, [r3, #16]
  17248. 8006e98: 2b00 cmp r3, #0
  17249. 8006e9a: d00b beq.n 8006eb4 <USBD_CDC_DataIn+0xc0>
  17250. {
  17251. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
  17252. 8006e9c: 687b ldr r3, [r7, #4]
  17253. 8006e9e: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  17254. 8006ea2: 691b ldr r3, [r3, #16]
  17255. 8006ea4: 68ba ldr r2, [r7, #8]
  17256. 8006ea6: f8d2 0208 ldr.w r0, [r2, #520] ; 0x208
  17257. 8006eaa: 68ba ldr r2, [r7, #8]
  17258. 8006eac: f502 7104 add.w r1, r2, #528 ; 0x210
  17259. 8006eb0: 78fa ldrb r2, [r7, #3]
  17260. 8006eb2: 4798 blx r3
  17261. }
  17262. }
  17263. return (uint8_t)USBD_OK;
  17264. 8006eb4: 2300 movs r3, #0
  17265. }
  17266. 8006eb6: 4618 mov r0, r3
  17267. 8006eb8: 3710 adds r7, #16
  17268. 8006eba: 46bd mov sp, r7
  17269. 8006ebc: bd80 pop {r7, pc}
  17270. 08006ebe <USBD_CDC_DataOut>:
  17271. * @param pdev: device instance
  17272. * @param epnum: endpoint number
  17273. * @retval status
  17274. */
  17275. static uint8_t USBD_CDC_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum)
  17276. {
  17277. 8006ebe: b580 push {r7, lr}
  17278. 8006ec0: b084 sub sp, #16
  17279. 8006ec2: af00 add r7, sp, #0
  17280. 8006ec4: 6078 str r0, [r7, #4]
  17281. 8006ec6: 460b mov r3, r1
  17282. 8006ec8: 70fb strb r3, [r7, #3]
  17283. USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
  17284. 8006eca: 687b ldr r3, [r7, #4]
  17285. 8006ecc: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17286. 8006ed0: 60fb str r3, [r7, #12]
  17287. if (pdev->pClassData == NULL)
  17288. 8006ed2: 687b ldr r3, [r7, #4]
  17289. 8006ed4: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17290. 8006ed8: 2b00 cmp r3, #0
  17291. 8006eda: d101 bne.n 8006ee0 <USBD_CDC_DataOut+0x22>
  17292. {
  17293. return (uint8_t)USBD_FAIL;
  17294. 8006edc: 2303 movs r3, #3
  17295. 8006ede: e015 b.n 8006f0c <USBD_CDC_DataOut+0x4e>
  17296. }
  17297. /* Get the received data length */
  17298. hcdc->RxLength = USBD_LL_GetRxDataSize(pdev, epnum);
  17299. 8006ee0: 78fb ldrb r3, [r7, #3]
  17300. 8006ee2: 4619 mov r1, r3
  17301. 8006ee4: 6878 ldr r0, [r7, #4]
  17302. 8006ee6: f001 ff5e bl 8008da6 <USBD_LL_GetRxDataSize>
  17303. 8006eea: 4602 mov r2, r0
  17304. 8006eec: 68fb ldr r3, [r7, #12]
  17305. 8006eee: f8c3 220c str.w r2, [r3, #524] ; 0x20c
  17306. /* USB data will be immediately processed, this allow next USB traffic being
  17307. NAKed till the end of the application Xfer */
  17308. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Receive(hcdc->RxBuffer, &hcdc->RxLength);
  17309. 8006ef2: 687b ldr r3, [r7, #4]
  17310. 8006ef4: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  17311. 8006ef8: 68db ldr r3, [r3, #12]
  17312. 8006efa: 68fa ldr r2, [r7, #12]
  17313. 8006efc: f8d2 0204 ldr.w r0, [r2, #516] ; 0x204
  17314. 8006f00: 68fa ldr r2, [r7, #12]
  17315. 8006f02: f502 7203 add.w r2, r2, #524 ; 0x20c
  17316. 8006f06: 4611 mov r1, r2
  17317. 8006f08: 4798 blx r3
  17318. return (uint8_t)USBD_OK;
  17319. 8006f0a: 2300 movs r3, #0
  17320. }
  17321. 8006f0c: 4618 mov r0, r3
  17322. 8006f0e: 3710 adds r7, #16
  17323. 8006f10: 46bd mov sp, r7
  17324. 8006f12: bd80 pop {r7, pc}
  17325. 08006f14 <USBD_CDC_EP0_RxReady>:
  17326. * Handle EP0 Rx Ready event
  17327. * @param pdev: device instance
  17328. * @retval status
  17329. */
  17330. static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev)
  17331. {
  17332. 8006f14: b580 push {r7, lr}
  17333. 8006f16: b084 sub sp, #16
  17334. 8006f18: af00 add r7, sp, #0
  17335. 8006f1a: 6078 str r0, [r7, #4]
  17336. USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
  17337. 8006f1c: 687b ldr r3, [r7, #4]
  17338. 8006f1e: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17339. 8006f22: 60fb str r3, [r7, #12]
  17340. if (hcdc == NULL)
  17341. 8006f24: 68fb ldr r3, [r7, #12]
  17342. 8006f26: 2b00 cmp r3, #0
  17343. 8006f28: d101 bne.n 8006f2e <USBD_CDC_EP0_RxReady+0x1a>
  17344. {
  17345. return (uint8_t)USBD_FAIL;
  17346. 8006f2a: 2303 movs r3, #3
  17347. 8006f2c: e01b b.n 8006f66 <USBD_CDC_EP0_RxReady+0x52>
  17348. }
  17349. if ((pdev->pUserData != NULL) && (hcdc->CmdOpCode != 0xFFU))
  17350. 8006f2e: 687b ldr r3, [r7, #4]
  17351. 8006f30: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  17352. 8006f34: 2b00 cmp r3, #0
  17353. 8006f36: d015 beq.n 8006f64 <USBD_CDC_EP0_RxReady+0x50>
  17354. 8006f38: 68fb ldr r3, [r7, #12]
  17355. 8006f3a: f893 3200 ldrb.w r3, [r3, #512] ; 0x200
  17356. 8006f3e: 2bff cmp r3, #255 ; 0xff
  17357. 8006f40: d010 beq.n 8006f64 <USBD_CDC_EP0_RxReady+0x50>
  17358. {
  17359. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode,
  17360. 8006f42: 687b ldr r3, [r7, #4]
  17361. 8006f44: f8d3 32c0 ldr.w r3, [r3, #704] ; 0x2c0
  17362. 8006f48: 689b ldr r3, [r3, #8]
  17363. 8006f4a: 68fa ldr r2, [r7, #12]
  17364. 8006f4c: f892 0200 ldrb.w r0, [r2, #512] ; 0x200
  17365. (uint8_t *)hcdc->data,
  17366. 8006f50: 68f9 ldr r1, [r7, #12]
  17367. (uint16_t)hcdc->CmdLength);
  17368. 8006f52: 68fa ldr r2, [r7, #12]
  17369. 8006f54: f892 2201 ldrb.w r2, [r2, #513] ; 0x201
  17370. ((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode,
  17371. 8006f58: b292 uxth r2, r2
  17372. 8006f5a: 4798 blx r3
  17373. hcdc->CmdOpCode = 0xFFU;
  17374. 8006f5c: 68fb ldr r3, [r7, #12]
  17375. 8006f5e: 22ff movs r2, #255 ; 0xff
  17376. 8006f60: f883 2200 strb.w r2, [r3, #512] ; 0x200
  17377. }
  17378. return (uint8_t)USBD_OK;
  17379. 8006f64: 2300 movs r3, #0
  17380. }
  17381. 8006f66: 4618 mov r0, r3
  17382. 8006f68: 3710 adds r7, #16
  17383. 8006f6a: 46bd mov sp, r7
  17384. 8006f6c: bd80 pop {r7, pc}
  17385. ...
  17386. 08006f70 <USBD_CDC_GetFSCfgDesc>:
  17387. * @param speed : current device speed
  17388. * @param length : pointer data length
  17389. * @retval pointer to descriptor buffer
  17390. */
  17391. static uint8_t *USBD_CDC_GetFSCfgDesc(uint16_t *length)
  17392. {
  17393. 8006f70: b480 push {r7}
  17394. 8006f72: b083 sub sp, #12
  17395. 8006f74: af00 add r7, sp, #0
  17396. 8006f76: 6078 str r0, [r7, #4]
  17397. *length = (uint16_t)sizeof(USBD_CDC_CfgFSDesc);
  17398. 8006f78: 687b ldr r3, [r7, #4]
  17399. 8006f7a: 2243 movs r2, #67 ; 0x43
  17400. 8006f7c: 801a strh r2, [r3, #0]
  17401. return USBD_CDC_CfgFSDesc;
  17402. 8006f7e: 4b03 ldr r3, [pc, #12] ; (8006f8c <USBD_CDC_GetFSCfgDesc+0x1c>)
  17403. }
  17404. 8006f80: 4618 mov r0, r3
  17405. 8006f82: 370c adds r7, #12
  17406. 8006f84: 46bd mov sp, r7
  17407. 8006f86: f85d 7b04 ldr.w r7, [sp], #4
  17408. 8006f8a: 4770 bx lr
  17409. 8006f8c: 20000094 .word 0x20000094
  17410. 08006f90 <USBD_CDC_GetHSCfgDesc>:
  17411. * @param speed : current device speed
  17412. * @param length : pointer data length
  17413. * @retval pointer to descriptor buffer
  17414. */
  17415. static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length)
  17416. {
  17417. 8006f90: b480 push {r7}
  17418. 8006f92: b083 sub sp, #12
  17419. 8006f94: af00 add r7, sp, #0
  17420. 8006f96: 6078 str r0, [r7, #4]
  17421. *length = (uint16_t)sizeof(USBD_CDC_CfgHSDesc);
  17422. 8006f98: 687b ldr r3, [r7, #4]
  17423. 8006f9a: 2243 movs r2, #67 ; 0x43
  17424. 8006f9c: 801a strh r2, [r3, #0]
  17425. return USBD_CDC_CfgHSDesc;
  17426. 8006f9e: 4b03 ldr r3, [pc, #12] ; (8006fac <USBD_CDC_GetHSCfgDesc+0x1c>)
  17427. }
  17428. 8006fa0: 4618 mov r0, r3
  17429. 8006fa2: 370c adds r7, #12
  17430. 8006fa4: 46bd mov sp, r7
  17431. 8006fa6: f85d 7b04 ldr.w r7, [sp], #4
  17432. 8006faa: 4770 bx lr
  17433. 8006fac: 20000050 .word 0x20000050
  17434. 08006fb0 <USBD_CDC_GetOtherSpeedCfgDesc>:
  17435. * @param speed : current device speed
  17436. * @param length : pointer data length
  17437. * @retval pointer to descriptor buffer
  17438. */
  17439. static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length)
  17440. {
  17441. 8006fb0: b480 push {r7}
  17442. 8006fb2: b083 sub sp, #12
  17443. 8006fb4: af00 add r7, sp, #0
  17444. 8006fb6: 6078 str r0, [r7, #4]
  17445. *length = (uint16_t)sizeof(USBD_CDC_OtherSpeedCfgDesc);
  17446. 8006fb8: 687b ldr r3, [r7, #4]
  17447. 8006fba: 2243 movs r2, #67 ; 0x43
  17448. 8006fbc: 801a strh r2, [r3, #0]
  17449. return USBD_CDC_OtherSpeedCfgDesc;
  17450. 8006fbe: 4b03 ldr r3, [pc, #12] ; (8006fcc <USBD_CDC_GetOtherSpeedCfgDesc+0x1c>)
  17451. }
  17452. 8006fc0: 4618 mov r0, r3
  17453. 8006fc2: 370c adds r7, #12
  17454. 8006fc4: 46bd mov sp, r7
  17455. 8006fc6: f85d 7b04 ldr.w r7, [sp], #4
  17456. 8006fca: 4770 bx lr
  17457. 8006fcc: 200000d8 .word 0x200000d8
  17458. 08006fd0 <USBD_CDC_GetDeviceQualifierDescriptor>:
  17459. * return Device Qualifier descriptor
  17460. * @param length : pointer data length
  17461. * @retval pointer to descriptor buffer
  17462. */
  17463. uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length)
  17464. {
  17465. 8006fd0: b480 push {r7}
  17466. 8006fd2: b083 sub sp, #12
  17467. 8006fd4: af00 add r7, sp, #0
  17468. 8006fd6: 6078 str r0, [r7, #4]
  17469. *length = (uint16_t)sizeof(USBD_CDC_DeviceQualifierDesc);
  17470. 8006fd8: 687b ldr r3, [r7, #4]
  17471. 8006fda: 220a movs r2, #10
  17472. 8006fdc: 801a strh r2, [r3, #0]
  17473. return USBD_CDC_DeviceQualifierDesc;
  17474. 8006fde: 4b03 ldr r3, [pc, #12] ; (8006fec <USBD_CDC_GetDeviceQualifierDescriptor+0x1c>)
  17475. }
  17476. 8006fe0: 4618 mov r0, r3
  17477. 8006fe2: 370c adds r7, #12
  17478. 8006fe4: 46bd mov sp, r7
  17479. 8006fe6: f85d 7b04 ldr.w r7, [sp], #4
  17480. 8006fea: 4770 bx lr
  17481. 8006fec: 2000000c .word 0x2000000c
  17482. 08006ff0 <USBD_CDC_RegisterInterface>:
  17483. * @param fops: CD Interface callback
  17484. * @retval status
  17485. */
  17486. uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev,
  17487. USBD_CDC_ItfTypeDef *fops)
  17488. {
  17489. 8006ff0: b480 push {r7}
  17490. 8006ff2: b083 sub sp, #12
  17491. 8006ff4: af00 add r7, sp, #0
  17492. 8006ff6: 6078 str r0, [r7, #4]
  17493. 8006ff8: 6039 str r1, [r7, #0]
  17494. if (fops == NULL)
  17495. 8006ffa: 683b ldr r3, [r7, #0]
  17496. 8006ffc: 2b00 cmp r3, #0
  17497. 8006ffe: d101 bne.n 8007004 <USBD_CDC_RegisterInterface+0x14>
  17498. {
  17499. return (uint8_t)USBD_FAIL;
  17500. 8007000: 2303 movs r3, #3
  17501. 8007002: e004 b.n 800700e <USBD_CDC_RegisterInterface+0x1e>
  17502. }
  17503. pdev->pUserData = fops;
  17504. 8007004: 687b ldr r3, [r7, #4]
  17505. 8007006: 683a ldr r2, [r7, #0]
  17506. 8007008: f8c3 22c0 str.w r2, [r3, #704] ; 0x2c0
  17507. return (uint8_t)USBD_OK;
  17508. 800700c: 2300 movs r3, #0
  17509. }
  17510. 800700e: 4618 mov r0, r3
  17511. 8007010: 370c adds r7, #12
  17512. 8007012: 46bd mov sp, r7
  17513. 8007014: f85d 7b04 ldr.w r7, [sp], #4
  17514. 8007018: 4770 bx lr
  17515. 0800701a <USBD_CDC_SetTxBuffer>:
  17516. * @param pbuff: Tx Buffer
  17517. * @retval status
  17518. */
  17519. uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev,
  17520. uint8_t *pbuff, uint32_t length)
  17521. {
  17522. 800701a: b480 push {r7}
  17523. 800701c: b087 sub sp, #28
  17524. 800701e: af00 add r7, sp, #0
  17525. 8007020: 60f8 str r0, [r7, #12]
  17526. 8007022: 60b9 str r1, [r7, #8]
  17527. 8007024: 607a str r2, [r7, #4]
  17528. USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
  17529. 8007026: 68fb ldr r3, [r7, #12]
  17530. 8007028: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17531. 800702c: 617b str r3, [r7, #20]
  17532. if (hcdc == NULL)
  17533. 800702e: 697b ldr r3, [r7, #20]
  17534. 8007030: 2b00 cmp r3, #0
  17535. 8007032: d101 bne.n 8007038 <USBD_CDC_SetTxBuffer+0x1e>
  17536. {
  17537. return (uint8_t)USBD_FAIL;
  17538. 8007034: 2303 movs r3, #3
  17539. 8007036: e008 b.n 800704a <USBD_CDC_SetTxBuffer+0x30>
  17540. }
  17541. hcdc->TxBuffer = pbuff;
  17542. 8007038: 697b ldr r3, [r7, #20]
  17543. 800703a: 68ba ldr r2, [r7, #8]
  17544. 800703c: f8c3 2208 str.w r2, [r3, #520] ; 0x208
  17545. hcdc->TxLength = length;
  17546. 8007040: 697b ldr r3, [r7, #20]
  17547. 8007042: 687a ldr r2, [r7, #4]
  17548. 8007044: f8c3 2210 str.w r2, [r3, #528] ; 0x210
  17549. return (uint8_t)USBD_OK;
  17550. 8007048: 2300 movs r3, #0
  17551. }
  17552. 800704a: 4618 mov r0, r3
  17553. 800704c: 371c adds r7, #28
  17554. 800704e: 46bd mov sp, r7
  17555. 8007050: f85d 7b04 ldr.w r7, [sp], #4
  17556. 8007054: 4770 bx lr
  17557. 08007056 <USBD_CDC_SetRxBuffer>:
  17558. * @param pdev: device instance
  17559. * @param pbuff: Rx Buffer
  17560. * @retval status
  17561. */
  17562. uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff)
  17563. {
  17564. 8007056: b480 push {r7}
  17565. 8007058: b085 sub sp, #20
  17566. 800705a: af00 add r7, sp, #0
  17567. 800705c: 6078 str r0, [r7, #4]
  17568. 800705e: 6039 str r1, [r7, #0]
  17569. USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
  17570. 8007060: 687b ldr r3, [r7, #4]
  17571. 8007062: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17572. 8007066: 60fb str r3, [r7, #12]
  17573. if (hcdc == NULL)
  17574. 8007068: 68fb ldr r3, [r7, #12]
  17575. 800706a: 2b00 cmp r3, #0
  17576. 800706c: d101 bne.n 8007072 <USBD_CDC_SetRxBuffer+0x1c>
  17577. {
  17578. return (uint8_t)USBD_FAIL;
  17579. 800706e: 2303 movs r3, #3
  17580. 8007070: e004 b.n 800707c <USBD_CDC_SetRxBuffer+0x26>
  17581. }
  17582. hcdc->RxBuffer = pbuff;
  17583. 8007072: 68fb ldr r3, [r7, #12]
  17584. 8007074: 683a ldr r2, [r7, #0]
  17585. 8007076: f8c3 2204 str.w r2, [r3, #516] ; 0x204
  17586. return (uint8_t)USBD_OK;
  17587. 800707a: 2300 movs r3, #0
  17588. }
  17589. 800707c: 4618 mov r0, r3
  17590. 800707e: 3714 adds r7, #20
  17591. 8007080: 46bd mov sp, r7
  17592. 8007082: f85d 7b04 ldr.w r7, [sp], #4
  17593. 8007086: 4770 bx lr
  17594. 08007088 <USBD_CDC_ReceivePacket>:
  17595. * prepare OUT Endpoint for reception
  17596. * @param pdev: device instance
  17597. * @retval status
  17598. */
  17599. uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev)
  17600. {
  17601. 8007088: b580 push {r7, lr}
  17602. 800708a: b084 sub sp, #16
  17603. 800708c: af00 add r7, sp, #0
  17604. 800708e: 6078 str r0, [r7, #4]
  17605. USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
  17606. 8007090: 687b ldr r3, [r7, #4]
  17607. 8007092: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17608. 8007096: 60fb str r3, [r7, #12]
  17609. if (pdev->pClassData == NULL)
  17610. 8007098: 687b ldr r3, [r7, #4]
  17611. 800709a: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  17612. 800709e: 2b00 cmp r3, #0
  17613. 80070a0: d101 bne.n 80070a6 <USBD_CDC_ReceivePacket+0x1e>
  17614. {
  17615. return (uint8_t)USBD_FAIL;
  17616. 80070a2: 2303 movs r3, #3
  17617. 80070a4: e016 b.n 80070d4 <USBD_CDC_ReceivePacket+0x4c>
  17618. }
  17619. if (pdev->dev_speed == USBD_SPEED_HIGH)
  17620. 80070a6: 687b ldr r3, [r7, #4]
  17621. 80070a8: 7c1b ldrb r3, [r3, #16]
  17622. 80070aa: 2b00 cmp r3, #0
  17623. 80070ac: d109 bne.n 80070c2 <USBD_CDC_ReceivePacket+0x3a>
  17624. {
  17625. /* Prepare Out endpoint to receive next packet */
  17626. (void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
  17627. 80070ae: 68fb ldr r3, [r7, #12]
  17628. 80070b0: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
  17629. 80070b4: f44f 7300 mov.w r3, #512 ; 0x200
  17630. 80070b8: 2101 movs r1, #1
  17631. 80070ba: 6878 ldr r0, [r7, #4]
  17632. 80070bc: f001 fe52 bl 8008d64 <USBD_LL_PrepareReceive>
  17633. 80070c0: e007 b.n 80070d2 <USBD_CDC_ReceivePacket+0x4a>
  17634. CDC_DATA_HS_OUT_PACKET_SIZE);
  17635. }
  17636. else
  17637. {
  17638. /* Prepare Out endpoint to receive next packet */
  17639. (void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
  17640. 80070c2: 68fb ldr r3, [r7, #12]
  17641. 80070c4: f8d3 2204 ldr.w r2, [r3, #516] ; 0x204
  17642. 80070c8: 2340 movs r3, #64 ; 0x40
  17643. 80070ca: 2101 movs r1, #1
  17644. 80070cc: 6878 ldr r0, [r7, #4]
  17645. 80070ce: f001 fe49 bl 8008d64 <USBD_LL_PrepareReceive>
  17646. CDC_DATA_FS_OUT_PACKET_SIZE);
  17647. }
  17648. return (uint8_t)USBD_OK;
  17649. 80070d2: 2300 movs r3, #0
  17650. }
  17651. 80070d4: 4618 mov r0, r3
  17652. 80070d6: 3710 adds r7, #16
  17653. 80070d8: 46bd mov sp, r7
  17654. 80070da: bd80 pop {r7, pc}
  17655. 080070dc <USBD_Init>:
  17656. * @param id: Low level core index
  17657. * @retval None
  17658. */
  17659. USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev,
  17660. USBD_DescriptorsTypeDef *pdesc, uint8_t id)
  17661. {
  17662. 80070dc: b580 push {r7, lr}
  17663. 80070de: b086 sub sp, #24
  17664. 80070e0: af00 add r7, sp, #0
  17665. 80070e2: 60f8 str r0, [r7, #12]
  17666. 80070e4: 60b9 str r1, [r7, #8]
  17667. 80070e6: 4613 mov r3, r2
  17668. 80070e8: 71fb strb r3, [r7, #7]
  17669. USBD_StatusTypeDef ret;
  17670. /* Check whether the USB Host handle is valid */
  17671. if (pdev == NULL)
  17672. 80070ea: 68fb ldr r3, [r7, #12]
  17673. 80070ec: 2b00 cmp r3, #0
  17674. 80070ee: d101 bne.n 80070f4 <USBD_Init+0x18>
  17675. {
  17676. #if (USBD_DEBUG_LEVEL > 1U)
  17677. USBD_ErrLog("Invalid Device handle");
  17678. #endif
  17679. return USBD_FAIL;
  17680. 80070f0: 2303 movs r3, #3
  17681. 80070f2: e01f b.n 8007134 <USBD_Init+0x58>
  17682. }
  17683. /* Unlink previous class resources */
  17684. pdev->pClass = NULL;
  17685. 80070f4: 68fb ldr r3, [r7, #12]
  17686. 80070f6: 2200 movs r2, #0
  17687. 80070f8: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8
  17688. pdev->pUserData = NULL;
  17689. 80070fc: 68fb ldr r3, [r7, #12]
  17690. 80070fe: 2200 movs r2, #0
  17691. 8007100: f8c3 22c0 str.w r2, [r3, #704] ; 0x2c0
  17692. pdev->pConfDesc = NULL;
  17693. 8007104: 68fb ldr r3, [r7, #12]
  17694. 8007106: 2200 movs r2, #0
  17695. 8007108: f8c3 22cc str.w r2, [r3, #716] ; 0x2cc
  17696. /* Assign USBD Descriptors */
  17697. if (pdesc != NULL)
  17698. 800710c: 68bb ldr r3, [r7, #8]
  17699. 800710e: 2b00 cmp r3, #0
  17700. 8007110: d003 beq.n 800711a <USBD_Init+0x3e>
  17701. {
  17702. pdev->pDesc = pdesc;
  17703. 8007112: 68fb ldr r3, [r7, #12]
  17704. 8007114: 68ba ldr r2, [r7, #8]
  17705. 8007116: f8c3 22b4 str.w r2, [r3, #692] ; 0x2b4
  17706. }
  17707. /* Set Device initial State */
  17708. pdev->dev_state = USBD_STATE_DEFAULT;
  17709. 800711a: 68fb ldr r3, [r7, #12]
  17710. 800711c: 2201 movs r2, #1
  17711. 800711e: f883 229c strb.w r2, [r3, #668] ; 0x29c
  17712. pdev->id = id;
  17713. 8007122: 68fb ldr r3, [r7, #12]
  17714. 8007124: 79fa ldrb r2, [r7, #7]
  17715. 8007126: 701a strb r2, [r3, #0]
  17716. /* Initialize low level driver */
  17717. ret = USBD_LL_Init(pdev);
  17718. 8007128: 68f8 ldr r0, [r7, #12]
  17719. 800712a: f001 fcc5 bl 8008ab8 <USBD_LL_Init>
  17720. 800712e: 4603 mov r3, r0
  17721. 8007130: 75fb strb r3, [r7, #23]
  17722. return ret;
  17723. 8007132: 7dfb ldrb r3, [r7, #23]
  17724. }
  17725. 8007134: 4618 mov r0, r3
  17726. 8007136: 3718 adds r7, #24
  17727. 8007138: 46bd mov sp, r7
  17728. 800713a: bd80 pop {r7, pc}
  17729. 0800713c <USBD_RegisterClass>:
  17730. * @param pDevice : Device Handle
  17731. * @param pclass: Class handle
  17732. * @retval USBD Status
  17733. */
  17734. USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass)
  17735. {
  17736. 800713c: b580 push {r7, lr}
  17737. 800713e: b084 sub sp, #16
  17738. 8007140: af00 add r7, sp, #0
  17739. 8007142: 6078 str r0, [r7, #4]
  17740. 8007144: 6039 str r1, [r7, #0]
  17741. uint16_t len = 0U;
  17742. 8007146: 2300 movs r3, #0
  17743. 8007148: 81fb strh r3, [r7, #14]
  17744. if (pclass == NULL)
  17745. 800714a: 683b ldr r3, [r7, #0]
  17746. 800714c: 2b00 cmp r3, #0
  17747. 800714e: d101 bne.n 8007154 <USBD_RegisterClass+0x18>
  17748. {
  17749. #if (USBD_DEBUG_LEVEL > 1U)
  17750. USBD_ErrLog("Invalid Class handle");
  17751. #endif
  17752. return USBD_FAIL;
  17753. 8007150: 2303 movs r3, #3
  17754. 8007152: e016 b.n 8007182 <USBD_RegisterClass+0x46>
  17755. }
  17756. /* link the class to the USB Device handle */
  17757. pdev->pClass = pclass;
  17758. 8007154: 687b ldr r3, [r7, #4]
  17759. 8007156: 683a ldr r2, [r7, #0]
  17760. 8007158: f8c3 22b8 str.w r2, [r3, #696] ; 0x2b8
  17761. if (pdev->pClass->GetHSConfigDescriptor != NULL)
  17762. {
  17763. pdev->pConfDesc = (void *)pdev->pClass->GetHSConfigDescriptor(&len);
  17764. }
  17765. #else /* Default USE_USB_FS */
  17766. if (pdev->pClass->GetFSConfigDescriptor != NULL)
  17767. 800715c: 687b ldr r3, [r7, #4]
  17768. 800715e: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  17769. 8007162: 6adb ldr r3, [r3, #44] ; 0x2c
  17770. 8007164: 2b00 cmp r3, #0
  17771. 8007166: d00b beq.n 8007180 <USBD_RegisterClass+0x44>
  17772. {
  17773. pdev->pConfDesc = (void *)pdev->pClass->GetFSConfigDescriptor(&len);
  17774. 8007168: 687b ldr r3, [r7, #4]
  17775. 800716a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  17776. 800716e: 6adb ldr r3, [r3, #44] ; 0x2c
  17777. 8007170: f107 020e add.w r2, r7, #14
  17778. 8007174: 4610 mov r0, r2
  17779. 8007176: 4798 blx r3
  17780. 8007178: 4602 mov r2, r0
  17781. 800717a: 687b ldr r3, [r7, #4]
  17782. 800717c: f8c3 22cc str.w r2, [r3, #716] ; 0x2cc
  17783. }
  17784. #endif /* USE_USB_FS */
  17785. return USBD_OK;
  17786. 8007180: 2300 movs r3, #0
  17787. }
  17788. 8007182: 4618 mov r0, r3
  17789. 8007184: 3710 adds r7, #16
  17790. 8007186: 46bd mov sp, r7
  17791. 8007188: bd80 pop {r7, pc}
  17792. 0800718a <USBD_Start>:
  17793. * Start the USB Device Core.
  17794. * @param pdev: Device Handle
  17795. * @retval USBD Status
  17796. */
  17797. USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev)
  17798. {
  17799. 800718a: b580 push {r7, lr}
  17800. 800718c: b082 sub sp, #8
  17801. 800718e: af00 add r7, sp, #0
  17802. 8007190: 6078 str r0, [r7, #4]
  17803. /* Start the low level driver */
  17804. return USBD_LL_Start(pdev);
  17805. 8007192: 6878 ldr r0, [r7, #4]
  17806. 8007194: f001 fcdc bl 8008b50 <USBD_LL_Start>
  17807. 8007198: 4603 mov r3, r0
  17808. }
  17809. 800719a: 4618 mov r0, r3
  17810. 800719c: 3708 adds r7, #8
  17811. 800719e: 46bd mov sp, r7
  17812. 80071a0: bd80 pop {r7, pc}
  17813. 080071a2 <USBD_RunTestMode>:
  17814. * Launch test mode process
  17815. * @param pdev: device instance
  17816. * @retval status
  17817. */
  17818. USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev)
  17819. {
  17820. 80071a2: b480 push {r7}
  17821. 80071a4: b083 sub sp, #12
  17822. 80071a6: af00 add r7, sp, #0
  17823. 80071a8: 6078 str r0, [r7, #4]
  17824. /* Prevent unused argument compilation warning */
  17825. UNUSED(pdev);
  17826. return USBD_OK;
  17827. 80071aa: 2300 movs r3, #0
  17828. }
  17829. 80071ac: 4618 mov r0, r3
  17830. 80071ae: 370c adds r7, #12
  17831. 80071b0: 46bd mov sp, r7
  17832. 80071b2: f85d 7b04 ldr.w r7, [sp], #4
  17833. 80071b6: 4770 bx lr
  17834. 080071b8 <USBD_SetClassConfig>:
  17835. * @param cfgidx: configuration index
  17836. * @retval status
  17837. */
  17838. USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
  17839. {
  17840. 80071b8: b580 push {r7, lr}
  17841. 80071ba: b084 sub sp, #16
  17842. 80071bc: af00 add r7, sp, #0
  17843. 80071be: 6078 str r0, [r7, #4]
  17844. 80071c0: 460b mov r3, r1
  17845. 80071c2: 70fb strb r3, [r7, #3]
  17846. USBD_StatusTypeDef ret = USBD_FAIL;
  17847. 80071c4: 2303 movs r3, #3
  17848. 80071c6: 73fb strb r3, [r7, #15]
  17849. if (pdev->pClass != NULL)
  17850. 80071c8: 687b ldr r3, [r7, #4]
  17851. 80071ca: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  17852. 80071ce: 2b00 cmp r3, #0
  17853. 80071d0: d009 beq.n 80071e6 <USBD_SetClassConfig+0x2e>
  17854. {
  17855. /* Set configuration and Start the Class */
  17856. ret = (USBD_StatusTypeDef)pdev->pClass->Init(pdev, cfgidx);
  17857. 80071d2: 687b ldr r3, [r7, #4]
  17858. 80071d4: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  17859. 80071d8: 681b ldr r3, [r3, #0]
  17860. 80071da: 78fa ldrb r2, [r7, #3]
  17861. 80071dc: 4611 mov r1, r2
  17862. 80071de: 6878 ldr r0, [r7, #4]
  17863. 80071e0: 4798 blx r3
  17864. 80071e2: 4603 mov r3, r0
  17865. 80071e4: 73fb strb r3, [r7, #15]
  17866. }
  17867. return ret;
  17868. 80071e6: 7bfb ldrb r3, [r7, #15]
  17869. }
  17870. 80071e8: 4618 mov r0, r3
  17871. 80071ea: 3710 adds r7, #16
  17872. 80071ec: 46bd mov sp, r7
  17873. 80071ee: bd80 pop {r7, pc}
  17874. 080071f0 <USBD_ClrClassConfig>:
  17875. * @param pdev: device instance
  17876. * @param cfgidx: configuration index
  17877. * @retval status: USBD_StatusTypeDef
  17878. */
  17879. USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
  17880. {
  17881. 80071f0: b580 push {r7, lr}
  17882. 80071f2: b082 sub sp, #8
  17883. 80071f4: af00 add r7, sp, #0
  17884. 80071f6: 6078 str r0, [r7, #4]
  17885. 80071f8: 460b mov r3, r1
  17886. 80071fa: 70fb strb r3, [r7, #3]
  17887. /* Clear configuration and De-initialize the Class process */
  17888. if (pdev->pClass != NULL)
  17889. 80071fc: 687b ldr r3, [r7, #4]
  17890. 80071fe: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  17891. 8007202: 2b00 cmp r3, #0
  17892. 8007204: d007 beq.n 8007216 <USBD_ClrClassConfig+0x26>
  17893. {
  17894. pdev->pClass->DeInit(pdev, cfgidx);
  17895. 8007206: 687b ldr r3, [r7, #4]
  17896. 8007208: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  17897. 800720c: 685b ldr r3, [r3, #4]
  17898. 800720e: 78fa ldrb r2, [r7, #3]
  17899. 8007210: 4611 mov r1, r2
  17900. 8007212: 6878 ldr r0, [r7, #4]
  17901. 8007214: 4798 blx r3
  17902. }
  17903. return USBD_OK;
  17904. 8007216: 2300 movs r3, #0
  17905. }
  17906. 8007218: 4618 mov r0, r3
  17907. 800721a: 3708 adds r7, #8
  17908. 800721c: 46bd mov sp, r7
  17909. 800721e: bd80 pop {r7, pc}
  17910. 08007220 <USBD_LL_SetupStage>:
  17911. * Handle the setup stage
  17912. * @param pdev: device instance
  17913. * @retval status
  17914. */
  17915. USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup)
  17916. {
  17917. 8007220: b580 push {r7, lr}
  17918. 8007222: b084 sub sp, #16
  17919. 8007224: af00 add r7, sp, #0
  17920. 8007226: 6078 str r0, [r7, #4]
  17921. 8007228: 6039 str r1, [r7, #0]
  17922. USBD_StatusTypeDef ret;
  17923. USBD_ParseSetupRequest(&pdev->request, psetup);
  17924. 800722a: 687b ldr r3, [r7, #4]
  17925. 800722c: f203 23aa addw r3, r3, #682 ; 0x2aa
  17926. 8007230: 6839 ldr r1, [r7, #0]
  17927. 8007232: 4618 mov r0, r3
  17928. 8007234: f000 ffba bl 80081ac <USBD_ParseSetupRequest>
  17929. pdev->ep0_state = USBD_EP0_SETUP;
  17930. 8007238: 687b ldr r3, [r7, #4]
  17931. 800723a: 2201 movs r2, #1
  17932. 800723c: f8c3 2294 str.w r2, [r3, #660] ; 0x294
  17933. pdev->ep0_data_len = pdev->request.wLength;
  17934. 8007240: 687b ldr r3, [r7, #4]
  17935. 8007242: f8b3 32b0 ldrh.w r3, [r3, #688] ; 0x2b0
  17936. 8007246: 461a mov r2, r3
  17937. 8007248: 687b ldr r3, [r7, #4]
  17938. 800724a: f8c3 2298 str.w r2, [r3, #664] ; 0x298
  17939. switch (pdev->request.bmRequest & 0x1FU)
  17940. 800724e: 687b ldr r3, [r7, #4]
  17941. 8007250: f893 32aa ldrb.w r3, [r3, #682] ; 0x2aa
  17942. 8007254: f003 031f and.w r3, r3, #31
  17943. 8007258: 2b02 cmp r3, #2
  17944. 800725a: d01a beq.n 8007292 <USBD_LL_SetupStage+0x72>
  17945. 800725c: 2b02 cmp r3, #2
  17946. 800725e: d822 bhi.n 80072a6 <USBD_LL_SetupStage+0x86>
  17947. 8007260: 2b00 cmp r3, #0
  17948. 8007262: d002 beq.n 800726a <USBD_LL_SetupStage+0x4a>
  17949. 8007264: 2b01 cmp r3, #1
  17950. 8007266: d00a beq.n 800727e <USBD_LL_SetupStage+0x5e>
  17951. 8007268: e01d b.n 80072a6 <USBD_LL_SetupStage+0x86>
  17952. {
  17953. case USB_REQ_RECIPIENT_DEVICE:
  17954. ret = USBD_StdDevReq(pdev, &pdev->request);
  17955. 800726a: 687b ldr r3, [r7, #4]
  17956. 800726c: f203 23aa addw r3, r3, #682 ; 0x2aa
  17957. 8007270: 4619 mov r1, r3
  17958. 8007272: 6878 ldr r0, [r7, #4]
  17959. 8007274: f000 fa62 bl 800773c <USBD_StdDevReq>
  17960. 8007278: 4603 mov r3, r0
  17961. 800727a: 73fb strb r3, [r7, #15]
  17962. break;
  17963. 800727c: e020 b.n 80072c0 <USBD_LL_SetupStage+0xa0>
  17964. case USB_REQ_RECIPIENT_INTERFACE:
  17965. ret = USBD_StdItfReq(pdev, &pdev->request);
  17966. 800727e: 687b ldr r3, [r7, #4]
  17967. 8007280: f203 23aa addw r3, r3, #682 ; 0x2aa
  17968. 8007284: 4619 mov r1, r3
  17969. 8007286: 6878 ldr r0, [r7, #4]
  17970. 8007288: f000 fac6 bl 8007818 <USBD_StdItfReq>
  17971. 800728c: 4603 mov r3, r0
  17972. 800728e: 73fb strb r3, [r7, #15]
  17973. break;
  17974. 8007290: e016 b.n 80072c0 <USBD_LL_SetupStage+0xa0>
  17975. case USB_REQ_RECIPIENT_ENDPOINT:
  17976. ret = USBD_StdEPReq(pdev, &pdev->request);
  17977. 8007292: 687b ldr r3, [r7, #4]
  17978. 8007294: f203 23aa addw r3, r3, #682 ; 0x2aa
  17979. 8007298: 4619 mov r1, r3
  17980. 800729a: 6878 ldr r0, [r7, #4]
  17981. 800729c: f000 fb05 bl 80078aa <USBD_StdEPReq>
  17982. 80072a0: 4603 mov r3, r0
  17983. 80072a2: 73fb strb r3, [r7, #15]
  17984. break;
  17985. 80072a4: e00c b.n 80072c0 <USBD_LL_SetupStage+0xa0>
  17986. default:
  17987. ret = USBD_LL_StallEP(pdev, (pdev->request.bmRequest & 0x80U));
  17988. 80072a6: 687b ldr r3, [r7, #4]
  17989. 80072a8: f893 32aa ldrb.w r3, [r3, #682] ; 0x2aa
  17990. 80072ac: f023 037f bic.w r3, r3, #127 ; 0x7f
  17991. 80072b0: b2db uxtb r3, r3
  17992. 80072b2: 4619 mov r1, r3
  17993. 80072b4: 6878 ldr r0, [r7, #4]
  17994. 80072b6: f001 fcab bl 8008c10 <USBD_LL_StallEP>
  17995. 80072ba: 4603 mov r3, r0
  17996. 80072bc: 73fb strb r3, [r7, #15]
  17997. break;
  17998. 80072be: bf00 nop
  17999. }
  18000. return ret;
  18001. 80072c0: 7bfb ldrb r3, [r7, #15]
  18002. }
  18003. 80072c2: 4618 mov r0, r3
  18004. 80072c4: 3710 adds r7, #16
  18005. 80072c6: 46bd mov sp, r7
  18006. 80072c8: bd80 pop {r7, pc}
  18007. 080072ca <USBD_LL_DataOutStage>:
  18008. * @param pdata: data pointer
  18009. * @retval status
  18010. */
  18011. USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev,
  18012. uint8_t epnum, uint8_t *pdata)
  18013. {
  18014. 80072ca: b580 push {r7, lr}
  18015. 80072cc: b086 sub sp, #24
  18016. 80072ce: af00 add r7, sp, #0
  18017. 80072d0: 60f8 str r0, [r7, #12]
  18018. 80072d2: 460b mov r3, r1
  18019. 80072d4: 607a str r2, [r7, #4]
  18020. 80072d6: 72fb strb r3, [r7, #11]
  18021. USBD_EndpointTypeDef *pep;
  18022. USBD_StatusTypeDef ret;
  18023. if (epnum == 0U)
  18024. 80072d8: 7afb ldrb r3, [r7, #11]
  18025. 80072da: 2b00 cmp r3, #0
  18026. 80072dc: d138 bne.n 8007350 <USBD_LL_DataOutStage+0x86>
  18027. {
  18028. pep = &pdev->ep_out[0];
  18029. 80072de: 68fb ldr r3, [r7, #12]
  18030. 80072e0: f503 73aa add.w r3, r3, #340 ; 0x154
  18031. 80072e4: 613b str r3, [r7, #16]
  18032. if (pdev->ep0_state == USBD_EP0_DATA_OUT)
  18033. 80072e6: 68fb ldr r3, [r7, #12]
  18034. 80072e8: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294
  18035. 80072ec: 2b03 cmp r3, #3
  18036. 80072ee: d14a bne.n 8007386 <USBD_LL_DataOutStage+0xbc>
  18037. {
  18038. if (pep->rem_length > pep->maxpacket)
  18039. 80072f0: 693b ldr r3, [r7, #16]
  18040. 80072f2: 689a ldr r2, [r3, #8]
  18041. 80072f4: 693b ldr r3, [r7, #16]
  18042. 80072f6: 68db ldr r3, [r3, #12]
  18043. 80072f8: 429a cmp r2, r3
  18044. 80072fa: d913 bls.n 8007324 <USBD_LL_DataOutStage+0x5a>
  18045. {
  18046. pep->rem_length -= pep->maxpacket;
  18047. 80072fc: 693b ldr r3, [r7, #16]
  18048. 80072fe: 689a ldr r2, [r3, #8]
  18049. 8007300: 693b ldr r3, [r7, #16]
  18050. 8007302: 68db ldr r3, [r3, #12]
  18051. 8007304: 1ad2 subs r2, r2, r3
  18052. 8007306: 693b ldr r3, [r7, #16]
  18053. 8007308: 609a str r2, [r3, #8]
  18054. (void)USBD_CtlContinueRx(pdev, pdata, MIN(pep->rem_length, pep->maxpacket));
  18055. 800730a: 693b ldr r3, [r7, #16]
  18056. 800730c: 68da ldr r2, [r3, #12]
  18057. 800730e: 693b ldr r3, [r7, #16]
  18058. 8007310: 689b ldr r3, [r3, #8]
  18059. 8007312: 4293 cmp r3, r2
  18060. 8007314: bf28 it cs
  18061. 8007316: 4613 movcs r3, r2
  18062. 8007318: 461a mov r2, r3
  18063. 800731a: 6879 ldr r1, [r7, #4]
  18064. 800731c: 68f8 ldr r0, [r7, #12]
  18065. 800731e: f001 f839 bl 8008394 <USBD_CtlContinueRx>
  18066. 8007322: e030 b.n 8007386 <USBD_LL_DataOutStage+0xbc>
  18067. }
  18068. else
  18069. {
  18070. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  18071. 8007324: 68fb ldr r3, [r7, #12]
  18072. 8007326: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18073. 800732a: b2db uxtb r3, r3
  18074. 800732c: 2b03 cmp r3, #3
  18075. 800732e: d10b bne.n 8007348 <USBD_LL_DataOutStage+0x7e>
  18076. {
  18077. if (pdev->pClass->EP0_RxReady != NULL)
  18078. 8007330: 68fb ldr r3, [r7, #12]
  18079. 8007332: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18080. 8007336: 691b ldr r3, [r3, #16]
  18081. 8007338: 2b00 cmp r3, #0
  18082. 800733a: d005 beq.n 8007348 <USBD_LL_DataOutStage+0x7e>
  18083. {
  18084. pdev->pClass->EP0_RxReady(pdev);
  18085. 800733c: 68fb ldr r3, [r7, #12]
  18086. 800733e: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18087. 8007342: 691b ldr r3, [r3, #16]
  18088. 8007344: 68f8 ldr r0, [r7, #12]
  18089. 8007346: 4798 blx r3
  18090. }
  18091. }
  18092. (void)USBD_CtlSendStatus(pdev);
  18093. 8007348: 68f8 ldr r0, [r7, #12]
  18094. 800734a: f001 f834 bl 80083b6 <USBD_CtlSendStatus>
  18095. 800734e: e01a b.n 8007386 <USBD_LL_DataOutStage+0xbc>
  18096. #endif
  18097. }
  18098. }
  18099. else
  18100. {
  18101. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  18102. 8007350: 68fb ldr r3, [r7, #12]
  18103. 8007352: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18104. 8007356: b2db uxtb r3, r3
  18105. 8007358: 2b03 cmp r3, #3
  18106. 800735a: d114 bne.n 8007386 <USBD_LL_DataOutStage+0xbc>
  18107. {
  18108. if (pdev->pClass->DataOut != NULL)
  18109. 800735c: 68fb ldr r3, [r7, #12]
  18110. 800735e: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18111. 8007362: 699b ldr r3, [r3, #24]
  18112. 8007364: 2b00 cmp r3, #0
  18113. 8007366: d00e beq.n 8007386 <USBD_LL_DataOutStage+0xbc>
  18114. {
  18115. ret = (USBD_StatusTypeDef)pdev->pClass->DataOut(pdev, epnum);
  18116. 8007368: 68fb ldr r3, [r7, #12]
  18117. 800736a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18118. 800736e: 699b ldr r3, [r3, #24]
  18119. 8007370: 7afa ldrb r2, [r7, #11]
  18120. 8007372: 4611 mov r1, r2
  18121. 8007374: 68f8 ldr r0, [r7, #12]
  18122. 8007376: 4798 blx r3
  18123. 8007378: 4603 mov r3, r0
  18124. 800737a: 75fb strb r3, [r7, #23]
  18125. if (ret != USBD_OK)
  18126. 800737c: 7dfb ldrb r3, [r7, #23]
  18127. 800737e: 2b00 cmp r3, #0
  18128. 8007380: d001 beq.n 8007386 <USBD_LL_DataOutStage+0xbc>
  18129. {
  18130. return ret;
  18131. 8007382: 7dfb ldrb r3, [r7, #23]
  18132. 8007384: e000 b.n 8007388 <USBD_LL_DataOutStage+0xbe>
  18133. }
  18134. }
  18135. }
  18136. }
  18137. return USBD_OK;
  18138. 8007386: 2300 movs r3, #0
  18139. }
  18140. 8007388: 4618 mov r0, r3
  18141. 800738a: 3718 adds r7, #24
  18142. 800738c: 46bd mov sp, r7
  18143. 800738e: bd80 pop {r7, pc}
  18144. 08007390 <USBD_LL_DataInStage>:
  18145. * @param epnum: endpoint index
  18146. * @retval status
  18147. */
  18148. USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev,
  18149. uint8_t epnum, uint8_t *pdata)
  18150. {
  18151. 8007390: b580 push {r7, lr}
  18152. 8007392: b086 sub sp, #24
  18153. 8007394: af00 add r7, sp, #0
  18154. 8007396: 60f8 str r0, [r7, #12]
  18155. 8007398: 460b mov r3, r1
  18156. 800739a: 607a str r2, [r7, #4]
  18157. 800739c: 72fb strb r3, [r7, #11]
  18158. USBD_EndpointTypeDef *pep;
  18159. USBD_StatusTypeDef ret;
  18160. if (epnum == 0U)
  18161. 800739e: 7afb ldrb r3, [r7, #11]
  18162. 80073a0: 2b00 cmp r3, #0
  18163. 80073a2: d16b bne.n 800747c <USBD_LL_DataInStage+0xec>
  18164. {
  18165. pep = &pdev->ep_in[0];
  18166. 80073a4: 68fb ldr r3, [r7, #12]
  18167. 80073a6: 3314 adds r3, #20
  18168. 80073a8: 613b str r3, [r7, #16]
  18169. if (pdev->ep0_state == USBD_EP0_DATA_IN)
  18170. 80073aa: 68fb ldr r3, [r7, #12]
  18171. 80073ac: f8d3 3294 ldr.w r3, [r3, #660] ; 0x294
  18172. 80073b0: 2b02 cmp r3, #2
  18173. 80073b2: d156 bne.n 8007462 <USBD_LL_DataInStage+0xd2>
  18174. {
  18175. if (pep->rem_length > pep->maxpacket)
  18176. 80073b4: 693b ldr r3, [r7, #16]
  18177. 80073b6: 689a ldr r2, [r3, #8]
  18178. 80073b8: 693b ldr r3, [r7, #16]
  18179. 80073ba: 68db ldr r3, [r3, #12]
  18180. 80073bc: 429a cmp r2, r3
  18181. 80073be: d914 bls.n 80073ea <USBD_LL_DataInStage+0x5a>
  18182. {
  18183. pep->rem_length -= pep->maxpacket;
  18184. 80073c0: 693b ldr r3, [r7, #16]
  18185. 80073c2: 689a ldr r2, [r3, #8]
  18186. 80073c4: 693b ldr r3, [r7, #16]
  18187. 80073c6: 68db ldr r3, [r3, #12]
  18188. 80073c8: 1ad2 subs r2, r2, r3
  18189. 80073ca: 693b ldr r3, [r7, #16]
  18190. 80073cc: 609a str r2, [r3, #8]
  18191. (void)USBD_CtlContinueSendData(pdev, pdata, pep->rem_length);
  18192. 80073ce: 693b ldr r3, [r7, #16]
  18193. 80073d0: 689b ldr r3, [r3, #8]
  18194. 80073d2: 461a mov r2, r3
  18195. 80073d4: 6879 ldr r1, [r7, #4]
  18196. 80073d6: 68f8 ldr r0, [r7, #12]
  18197. 80073d8: f000 ffae bl 8008338 <USBD_CtlContinueSendData>
  18198. /* Prepare endpoint for premature end of transfer */
  18199. (void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
  18200. 80073dc: 2300 movs r3, #0
  18201. 80073de: 2200 movs r2, #0
  18202. 80073e0: 2100 movs r1, #0
  18203. 80073e2: 68f8 ldr r0, [r7, #12]
  18204. 80073e4: f001 fcbe bl 8008d64 <USBD_LL_PrepareReceive>
  18205. 80073e8: e03b b.n 8007462 <USBD_LL_DataInStage+0xd2>
  18206. }
  18207. else
  18208. {
  18209. /* last packet is MPS multiple, so send ZLP packet */
  18210. if ((pep->maxpacket == pep->rem_length) &&
  18211. 80073ea: 693b ldr r3, [r7, #16]
  18212. 80073ec: 68da ldr r2, [r3, #12]
  18213. 80073ee: 693b ldr r3, [r7, #16]
  18214. 80073f0: 689b ldr r3, [r3, #8]
  18215. 80073f2: 429a cmp r2, r3
  18216. 80073f4: d11c bne.n 8007430 <USBD_LL_DataInStage+0xa0>
  18217. (pep->total_length >= pep->maxpacket) &&
  18218. 80073f6: 693b ldr r3, [r7, #16]
  18219. 80073f8: 685a ldr r2, [r3, #4]
  18220. 80073fa: 693b ldr r3, [r7, #16]
  18221. 80073fc: 68db ldr r3, [r3, #12]
  18222. if ((pep->maxpacket == pep->rem_length) &&
  18223. 80073fe: 429a cmp r2, r3
  18224. 8007400: d316 bcc.n 8007430 <USBD_LL_DataInStage+0xa0>
  18225. (pep->total_length < pdev->ep0_data_len))
  18226. 8007402: 693b ldr r3, [r7, #16]
  18227. 8007404: 685a ldr r2, [r3, #4]
  18228. 8007406: 68fb ldr r3, [r7, #12]
  18229. 8007408: f8d3 3298 ldr.w r3, [r3, #664] ; 0x298
  18230. (pep->total_length >= pep->maxpacket) &&
  18231. 800740c: 429a cmp r2, r3
  18232. 800740e: d20f bcs.n 8007430 <USBD_LL_DataInStage+0xa0>
  18233. {
  18234. (void)USBD_CtlContinueSendData(pdev, NULL, 0U);
  18235. 8007410: 2200 movs r2, #0
  18236. 8007412: 2100 movs r1, #0
  18237. 8007414: 68f8 ldr r0, [r7, #12]
  18238. 8007416: f000 ff8f bl 8008338 <USBD_CtlContinueSendData>
  18239. pdev->ep0_data_len = 0U;
  18240. 800741a: 68fb ldr r3, [r7, #12]
  18241. 800741c: 2200 movs r2, #0
  18242. 800741e: f8c3 2298 str.w r2, [r3, #664] ; 0x298
  18243. /* Prepare endpoint for premature end of transfer */
  18244. (void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
  18245. 8007422: 2300 movs r3, #0
  18246. 8007424: 2200 movs r2, #0
  18247. 8007426: 2100 movs r1, #0
  18248. 8007428: 68f8 ldr r0, [r7, #12]
  18249. 800742a: f001 fc9b bl 8008d64 <USBD_LL_PrepareReceive>
  18250. 800742e: e018 b.n 8007462 <USBD_LL_DataInStage+0xd2>
  18251. }
  18252. else
  18253. {
  18254. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  18255. 8007430: 68fb ldr r3, [r7, #12]
  18256. 8007432: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18257. 8007436: b2db uxtb r3, r3
  18258. 8007438: 2b03 cmp r3, #3
  18259. 800743a: d10b bne.n 8007454 <USBD_LL_DataInStage+0xc4>
  18260. {
  18261. if (pdev->pClass->EP0_TxSent != NULL)
  18262. 800743c: 68fb ldr r3, [r7, #12]
  18263. 800743e: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18264. 8007442: 68db ldr r3, [r3, #12]
  18265. 8007444: 2b00 cmp r3, #0
  18266. 8007446: d005 beq.n 8007454 <USBD_LL_DataInStage+0xc4>
  18267. {
  18268. pdev->pClass->EP0_TxSent(pdev);
  18269. 8007448: 68fb ldr r3, [r7, #12]
  18270. 800744a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18271. 800744e: 68db ldr r3, [r3, #12]
  18272. 8007450: 68f8 ldr r0, [r7, #12]
  18273. 8007452: 4798 blx r3
  18274. }
  18275. }
  18276. (void)USBD_LL_StallEP(pdev, 0x80U);
  18277. 8007454: 2180 movs r1, #128 ; 0x80
  18278. 8007456: 68f8 ldr r0, [r7, #12]
  18279. 8007458: f001 fbda bl 8008c10 <USBD_LL_StallEP>
  18280. (void)USBD_CtlReceiveStatus(pdev);
  18281. 800745c: 68f8 ldr r0, [r7, #12]
  18282. 800745e: f000 ffbd bl 80083dc <USBD_CtlReceiveStatus>
  18283. (void)USBD_LL_StallEP(pdev, 0x80U);
  18284. }
  18285. #endif
  18286. }
  18287. if (pdev->dev_test_mode == 1U)
  18288. 8007462: 68fb ldr r3, [r7, #12]
  18289. 8007464: f893 32a0 ldrb.w r3, [r3, #672] ; 0x2a0
  18290. 8007468: 2b01 cmp r3, #1
  18291. 800746a: d122 bne.n 80074b2 <USBD_LL_DataInStage+0x122>
  18292. {
  18293. (void)USBD_RunTestMode(pdev);
  18294. 800746c: 68f8 ldr r0, [r7, #12]
  18295. 800746e: f7ff fe98 bl 80071a2 <USBD_RunTestMode>
  18296. pdev->dev_test_mode = 0U;
  18297. 8007472: 68fb ldr r3, [r7, #12]
  18298. 8007474: 2200 movs r2, #0
  18299. 8007476: f883 22a0 strb.w r2, [r3, #672] ; 0x2a0
  18300. 800747a: e01a b.n 80074b2 <USBD_LL_DataInStage+0x122>
  18301. }
  18302. }
  18303. else
  18304. {
  18305. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  18306. 800747c: 68fb ldr r3, [r7, #12]
  18307. 800747e: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18308. 8007482: b2db uxtb r3, r3
  18309. 8007484: 2b03 cmp r3, #3
  18310. 8007486: d114 bne.n 80074b2 <USBD_LL_DataInStage+0x122>
  18311. {
  18312. if (pdev->pClass->DataIn != NULL)
  18313. 8007488: 68fb ldr r3, [r7, #12]
  18314. 800748a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18315. 800748e: 695b ldr r3, [r3, #20]
  18316. 8007490: 2b00 cmp r3, #0
  18317. 8007492: d00e beq.n 80074b2 <USBD_LL_DataInStage+0x122>
  18318. {
  18319. ret = (USBD_StatusTypeDef)pdev->pClass->DataIn(pdev, epnum);
  18320. 8007494: 68fb ldr r3, [r7, #12]
  18321. 8007496: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18322. 800749a: 695b ldr r3, [r3, #20]
  18323. 800749c: 7afa ldrb r2, [r7, #11]
  18324. 800749e: 4611 mov r1, r2
  18325. 80074a0: 68f8 ldr r0, [r7, #12]
  18326. 80074a2: 4798 blx r3
  18327. 80074a4: 4603 mov r3, r0
  18328. 80074a6: 75fb strb r3, [r7, #23]
  18329. if (ret != USBD_OK)
  18330. 80074a8: 7dfb ldrb r3, [r7, #23]
  18331. 80074aa: 2b00 cmp r3, #0
  18332. 80074ac: d001 beq.n 80074b2 <USBD_LL_DataInStage+0x122>
  18333. {
  18334. return ret;
  18335. 80074ae: 7dfb ldrb r3, [r7, #23]
  18336. 80074b0: e000 b.n 80074b4 <USBD_LL_DataInStage+0x124>
  18337. }
  18338. }
  18339. }
  18340. }
  18341. return USBD_OK;
  18342. 80074b2: 2300 movs r3, #0
  18343. }
  18344. 80074b4: 4618 mov r0, r3
  18345. 80074b6: 3718 adds r7, #24
  18346. 80074b8: 46bd mov sp, r7
  18347. 80074ba: bd80 pop {r7, pc}
  18348. 080074bc <USBD_LL_Reset>:
  18349. * @param pdev: device instance
  18350. * @retval status
  18351. */
  18352. USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev)
  18353. {
  18354. 80074bc: b580 push {r7, lr}
  18355. 80074be: b082 sub sp, #8
  18356. 80074c0: af00 add r7, sp, #0
  18357. 80074c2: 6078 str r0, [r7, #4]
  18358. /* Upon Reset call user call back */
  18359. pdev->dev_state = USBD_STATE_DEFAULT;
  18360. 80074c4: 687b ldr r3, [r7, #4]
  18361. 80074c6: 2201 movs r2, #1
  18362. 80074c8: f883 229c strb.w r2, [r3, #668] ; 0x29c
  18363. pdev->ep0_state = USBD_EP0_IDLE;
  18364. 80074cc: 687b ldr r3, [r7, #4]
  18365. 80074ce: 2200 movs r2, #0
  18366. 80074d0: f8c3 2294 str.w r2, [r3, #660] ; 0x294
  18367. pdev->dev_config = 0U;
  18368. 80074d4: 687b ldr r3, [r7, #4]
  18369. 80074d6: 2200 movs r2, #0
  18370. 80074d8: 605a str r2, [r3, #4]
  18371. pdev->dev_remote_wakeup = 0U;
  18372. 80074da: 687b ldr r3, [r7, #4]
  18373. 80074dc: 2200 movs r2, #0
  18374. 80074de: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4
  18375. if (pdev->pClass == NULL)
  18376. 80074e2: 687b ldr r3, [r7, #4]
  18377. 80074e4: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18378. 80074e8: 2b00 cmp r3, #0
  18379. 80074ea: d101 bne.n 80074f0 <USBD_LL_Reset+0x34>
  18380. {
  18381. return USBD_FAIL;
  18382. 80074ec: 2303 movs r3, #3
  18383. 80074ee: e02f b.n 8007550 <USBD_LL_Reset+0x94>
  18384. }
  18385. if (pdev->pClassData != NULL)
  18386. 80074f0: 687b ldr r3, [r7, #4]
  18387. 80074f2: f8d3 32bc ldr.w r3, [r3, #700] ; 0x2bc
  18388. 80074f6: 2b00 cmp r3, #0
  18389. 80074f8: d00f beq.n 800751a <USBD_LL_Reset+0x5e>
  18390. {
  18391. if (pdev->pClass->DeInit != NULL)
  18392. 80074fa: 687b ldr r3, [r7, #4]
  18393. 80074fc: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18394. 8007500: 685b ldr r3, [r3, #4]
  18395. 8007502: 2b00 cmp r3, #0
  18396. 8007504: d009 beq.n 800751a <USBD_LL_Reset+0x5e>
  18397. {
  18398. (void)pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
  18399. 8007506: 687b ldr r3, [r7, #4]
  18400. 8007508: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18401. 800750c: 685b ldr r3, [r3, #4]
  18402. 800750e: 687a ldr r2, [r7, #4]
  18403. 8007510: 6852 ldr r2, [r2, #4]
  18404. 8007512: b2d2 uxtb r2, r2
  18405. 8007514: 4611 mov r1, r2
  18406. 8007516: 6878 ldr r0, [r7, #4]
  18407. 8007518: 4798 blx r3
  18408. }
  18409. }
  18410. /* Open EP0 OUT */
  18411. (void)USBD_LL_OpenEP(pdev, 0x00U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE);
  18412. 800751a: 2340 movs r3, #64 ; 0x40
  18413. 800751c: 2200 movs r2, #0
  18414. 800751e: 2100 movs r1, #0
  18415. 8007520: 6878 ldr r0, [r7, #4]
  18416. 8007522: f001 fb30 bl 8008b86 <USBD_LL_OpenEP>
  18417. pdev->ep_out[0x00U & 0xFU].is_used = 1U;
  18418. 8007526: 687b ldr r3, [r7, #4]
  18419. 8007528: 2201 movs r2, #1
  18420. 800752a: f8a3 2164 strh.w r2, [r3, #356] ; 0x164
  18421. pdev->ep_out[0].maxpacket = USB_MAX_EP0_SIZE;
  18422. 800752e: 687b ldr r3, [r7, #4]
  18423. 8007530: 2240 movs r2, #64 ; 0x40
  18424. 8007532: f8c3 2160 str.w r2, [r3, #352] ; 0x160
  18425. /* Open EP0 IN */
  18426. (void)USBD_LL_OpenEP(pdev, 0x80U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE);
  18427. 8007536: 2340 movs r3, #64 ; 0x40
  18428. 8007538: 2200 movs r2, #0
  18429. 800753a: 2180 movs r1, #128 ; 0x80
  18430. 800753c: 6878 ldr r0, [r7, #4]
  18431. 800753e: f001 fb22 bl 8008b86 <USBD_LL_OpenEP>
  18432. pdev->ep_in[0x80U & 0xFU].is_used = 1U;
  18433. 8007542: 687b ldr r3, [r7, #4]
  18434. 8007544: 2201 movs r2, #1
  18435. 8007546: 849a strh r2, [r3, #36] ; 0x24
  18436. pdev->ep_in[0].maxpacket = USB_MAX_EP0_SIZE;
  18437. 8007548: 687b ldr r3, [r7, #4]
  18438. 800754a: 2240 movs r2, #64 ; 0x40
  18439. 800754c: 621a str r2, [r3, #32]
  18440. return USBD_OK;
  18441. 800754e: 2300 movs r3, #0
  18442. }
  18443. 8007550: 4618 mov r0, r3
  18444. 8007552: 3708 adds r7, #8
  18445. 8007554: 46bd mov sp, r7
  18446. 8007556: bd80 pop {r7, pc}
  18447. 08007558 <USBD_LL_SetSpeed>:
  18448. * @param pdev: device instance
  18449. * @retval status
  18450. */
  18451. USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev,
  18452. USBD_SpeedTypeDef speed)
  18453. {
  18454. 8007558: b480 push {r7}
  18455. 800755a: b083 sub sp, #12
  18456. 800755c: af00 add r7, sp, #0
  18457. 800755e: 6078 str r0, [r7, #4]
  18458. 8007560: 460b mov r3, r1
  18459. 8007562: 70fb strb r3, [r7, #3]
  18460. pdev->dev_speed = speed;
  18461. 8007564: 687b ldr r3, [r7, #4]
  18462. 8007566: 78fa ldrb r2, [r7, #3]
  18463. 8007568: 741a strb r2, [r3, #16]
  18464. return USBD_OK;
  18465. 800756a: 2300 movs r3, #0
  18466. }
  18467. 800756c: 4618 mov r0, r3
  18468. 800756e: 370c adds r7, #12
  18469. 8007570: 46bd mov sp, r7
  18470. 8007572: f85d 7b04 ldr.w r7, [sp], #4
  18471. 8007576: 4770 bx lr
  18472. 08007578 <USBD_LL_Suspend>:
  18473. * @param pdev: device instance
  18474. * @retval status
  18475. */
  18476. USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev)
  18477. {
  18478. 8007578: b480 push {r7}
  18479. 800757a: b083 sub sp, #12
  18480. 800757c: af00 add r7, sp, #0
  18481. 800757e: 6078 str r0, [r7, #4]
  18482. pdev->dev_old_state = pdev->dev_state;
  18483. 8007580: 687b ldr r3, [r7, #4]
  18484. 8007582: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18485. 8007586: b2da uxtb r2, r3
  18486. 8007588: 687b ldr r3, [r7, #4]
  18487. 800758a: f883 229d strb.w r2, [r3, #669] ; 0x29d
  18488. pdev->dev_state = USBD_STATE_SUSPENDED;
  18489. 800758e: 687b ldr r3, [r7, #4]
  18490. 8007590: 2204 movs r2, #4
  18491. 8007592: f883 229c strb.w r2, [r3, #668] ; 0x29c
  18492. return USBD_OK;
  18493. 8007596: 2300 movs r3, #0
  18494. }
  18495. 8007598: 4618 mov r0, r3
  18496. 800759a: 370c adds r7, #12
  18497. 800759c: 46bd mov sp, r7
  18498. 800759e: f85d 7b04 ldr.w r7, [sp], #4
  18499. 80075a2: 4770 bx lr
  18500. 080075a4 <USBD_LL_Resume>:
  18501. * @param pdev: device instance
  18502. * @retval status
  18503. */
  18504. USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev)
  18505. {
  18506. 80075a4: b480 push {r7}
  18507. 80075a6: b083 sub sp, #12
  18508. 80075a8: af00 add r7, sp, #0
  18509. 80075aa: 6078 str r0, [r7, #4]
  18510. if (pdev->dev_state == USBD_STATE_SUSPENDED)
  18511. 80075ac: 687b ldr r3, [r7, #4]
  18512. 80075ae: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18513. 80075b2: b2db uxtb r3, r3
  18514. 80075b4: 2b04 cmp r3, #4
  18515. 80075b6: d106 bne.n 80075c6 <USBD_LL_Resume+0x22>
  18516. {
  18517. pdev->dev_state = pdev->dev_old_state;
  18518. 80075b8: 687b ldr r3, [r7, #4]
  18519. 80075ba: f893 329d ldrb.w r3, [r3, #669] ; 0x29d
  18520. 80075be: b2da uxtb r2, r3
  18521. 80075c0: 687b ldr r3, [r7, #4]
  18522. 80075c2: f883 229c strb.w r2, [r3, #668] ; 0x29c
  18523. }
  18524. return USBD_OK;
  18525. 80075c6: 2300 movs r3, #0
  18526. }
  18527. 80075c8: 4618 mov r0, r3
  18528. 80075ca: 370c adds r7, #12
  18529. 80075cc: 46bd mov sp, r7
  18530. 80075ce: f85d 7b04 ldr.w r7, [sp], #4
  18531. 80075d2: 4770 bx lr
  18532. 080075d4 <USBD_LL_SOF>:
  18533. * @param pdev: device instance
  18534. * @retval status
  18535. */
  18536. USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev)
  18537. {
  18538. 80075d4: b580 push {r7, lr}
  18539. 80075d6: b082 sub sp, #8
  18540. 80075d8: af00 add r7, sp, #0
  18541. 80075da: 6078 str r0, [r7, #4]
  18542. if (pdev->pClass == NULL)
  18543. 80075dc: 687b ldr r3, [r7, #4]
  18544. 80075de: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18545. 80075e2: 2b00 cmp r3, #0
  18546. 80075e4: d101 bne.n 80075ea <USBD_LL_SOF+0x16>
  18547. {
  18548. return USBD_FAIL;
  18549. 80075e6: 2303 movs r3, #3
  18550. 80075e8: e012 b.n 8007610 <USBD_LL_SOF+0x3c>
  18551. }
  18552. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  18553. 80075ea: 687b ldr r3, [r7, #4]
  18554. 80075ec: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18555. 80075f0: b2db uxtb r3, r3
  18556. 80075f2: 2b03 cmp r3, #3
  18557. 80075f4: d10b bne.n 800760e <USBD_LL_SOF+0x3a>
  18558. {
  18559. if (pdev->pClass->SOF != NULL)
  18560. 80075f6: 687b ldr r3, [r7, #4]
  18561. 80075f8: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18562. 80075fc: 69db ldr r3, [r3, #28]
  18563. 80075fe: 2b00 cmp r3, #0
  18564. 8007600: d005 beq.n 800760e <USBD_LL_SOF+0x3a>
  18565. {
  18566. (void)pdev->pClass->SOF(pdev);
  18567. 8007602: 687b ldr r3, [r7, #4]
  18568. 8007604: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18569. 8007608: 69db ldr r3, [r3, #28]
  18570. 800760a: 6878 ldr r0, [r7, #4]
  18571. 800760c: 4798 blx r3
  18572. }
  18573. }
  18574. return USBD_OK;
  18575. 800760e: 2300 movs r3, #0
  18576. }
  18577. 8007610: 4618 mov r0, r3
  18578. 8007612: 3708 adds r7, #8
  18579. 8007614: 46bd mov sp, r7
  18580. 8007616: bd80 pop {r7, pc}
  18581. 08007618 <USBD_LL_IsoINIncomplete>:
  18582. * @param pdev: device instance
  18583. * @retval status
  18584. */
  18585. USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev,
  18586. uint8_t epnum)
  18587. {
  18588. 8007618: b580 push {r7, lr}
  18589. 800761a: b082 sub sp, #8
  18590. 800761c: af00 add r7, sp, #0
  18591. 800761e: 6078 str r0, [r7, #4]
  18592. 8007620: 460b mov r3, r1
  18593. 8007622: 70fb strb r3, [r7, #3]
  18594. if (pdev->pClass == NULL)
  18595. 8007624: 687b ldr r3, [r7, #4]
  18596. 8007626: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18597. 800762a: 2b00 cmp r3, #0
  18598. 800762c: d101 bne.n 8007632 <USBD_LL_IsoINIncomplete+0x1a>
  18599. {
  18600. return USBD_FAIL;
  18601. 800762e: 2303 movs r3, #3
  18602. 8007630: e014 b.n 800765c <USBD_LL_IsoINIncomplete+0x44>
  18603. }
  18604. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  18605. 8007632: 687b ldr r3, [r7, #4]
  18606. 8007634: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18607. 8007638: b2db uxtb r3, r3
  18608. 800763a: 2b03 cmp r3, #3
  18609. 800763c: d10d bne.n 800765a <USBD_LL_IsoINIncomplete+0x42>
  18610. {
  18611. if (pdev->pClass->IsoINIncomplete != NULL)
  18612. 800763e: 687b ldr r3, [r7, #4]
  18613. 8007640: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18614. 8007644: 6a1b ldr r3, [r3, #32]
  18615. 8007646: 2b00 cmp r3, #0
  18616. 8007648: d007 beq.n 800765a <USBD_LL_IsoINIncomplete+0x42>
  18617. {
  18618. (void)pdev->pClass->IsoINIncomplete(pdev, epnum);
  18619. 800764a: 687b ldr r3, [r7, #4]
  18620. 800764c: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18621. 8007650: 6a1b ldr r3, [r3, #32]
  18622. 8007652: 78fa ldrb r2, [r7, #3]
  18623. 8007654: 4611 mov r1, r2
  18624. 8007656: 6878 ldr r0, [r7, #4]
  18625. 8007658: 4798 blx r3
  18626. }
  18627. }
  18628. return USBD_OK;
  18629. 800765a: 2300 movs r3, #0
  18630. }
  18631. 800765c: 4618 mov r0, r3
  18632. 800765e: 3708 adds r7, #8
  18633. 8007660: 46bd mov sp, r7
  18634. 8007662: bd80 pop {r7, pc}
  18635. 08007664 <USBD_LL_IsoOUTIncomplete>:
  18636. * @param pdev: device instance
  18637. * @retval status
  18638. */
  18639. USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev,
  18640. uint8_t epnum)
  18641. {
  18642. 8007664: b580 push {r7, lr}
  18643. 8007666: b082 sub sp, #8
  18644. 8007668: af00 add r7, sp, #0
  18645. 800766a: 6078 str r0, [r7, #4]
  18646. 800766c: 460b mov r3, r1
  18647. 800766e: 70fb strb r3, [r7, #3]
  18648. if (pdev->pClass == NULL)
  18649. 8007670: 687b ldr r3, [r7, #4]
  18650. 8007672: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18651. 8007676: 2b00 cmp r3, #0
  18652. 8007678: d101 bne.n 800767e <USBD_LL_IsoOUTIncomplete+0x1a>
  18653. {
  18654. return USBD_FAIL;
  18655. 800767a: 2303 movs r3, #3
  18656. 800767c: e014 b.n 80076a8 <USBD_LL_IsoOUTIncomplete+0x44>
  18657. }
  18658. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  18659. 800767e: 687b ldr r3, [r7, #4]
  18660. 8007680: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18661. 8007684: b2db uxtb r3, r3
  18662. 8007686: 2b03 cmp r3, #3
  18663. 8007688: d10d bne.n 80076a6 <USBD_LL_IsoOUTIncomplete+0x42>
  18664. {
  18665. if (pdev->pClass->IsoOUTIncomplete != NULL)
  18666. 800768a: 687b ldr r3, [r7, #4]
  18667. 800768c: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18668. 8007690: 6a5b ldr r3, [r3, #36] ; 0x24
  18669. 8007692: 2b00 cmp r3, #0
  18670. 8007694: d007 beq.n 80076a6 <USBD_LL_IsoOUTIncomplete+0x42>
  18671. {
  18672. (void)pdev->pClass->IsoOUTIncomplete(pdev, epnum);
  18673. 8007696: 687b ldr r3, [r7, #4]
  18674. 8007698: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18675. 800769c: 6a5b ldr r3, [r3, #36] ; 0x24
  18676. 800769e: 78fa ldrb r2, [r7, #3]
  18677. 80076a0: 4611 mov r1, r2
  18678. 80076a2: 6878 ldr r0, [r7, #4]
  18679. 80076a4: 4798 blx r3
  18680. }
  18681. }
  18682. return USBD_OK;
  18683. 80076a6: 2300 movs r3, #0
  18684. }
  18685. 80076a8: 4618 mov r0, r3
  18686. 80076aa: 3708 adds r7, #8
  18687. 80076ac: 46bd mov sp, r7
  18688. 80076ae: bd80 pop {r7, pc}
  18689. 080076b0 <USBD_LL_DevConnected>:
  18690. * Handle device connection event
  18691. * @param pdev: device instance
  18692. * @retval status
  18693. */
  18694. USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev)
  18695. {
  18696. 80076b0: b480 push {r7}
  18697. 80076b2: b083 sub sp, #12
  18698. 80076b4: af00 add r7, sp, #0
  18699. 80076b6: 6078 str r0, [r7, #4]
  18700. /* Prevent unused argument compilation warning */
  18701. UNUSED(pdev);
  18702. return USBD_OK;
  18703. 80076b8: 2300 movs r3, #0
  18704. }
  18705. 80076ba: 4618 mov r0, r3
  18706. 80076bc: 370c adds r7, #12
  18707. 80076be: 46bd mov sp, r7
  18708. 80076c0: f85d 7b04 ldr.w r7, [sp], #4
  18709. 80076c4: 4770 bx lr
  18710. 080076c6 <USBD_LL_DevDisconnected>:
  18711. * Handle device disconnection event
  18712. * @param pdev: device instance
  18713. * @retval status
  18714. */
  18715. USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev)
  18716. {
  18717. 80076c6: b580 push {r7, lr}
  18718. 80076c8: b082 sub sp, #8
  18719. 80076ca: af00 add r7, sp, #0
  18720. 80076cc: 6078 str r0, [r7, #4]
  18721. /* Free Class Resources */
  18722. pdev->dev_state = USBD_STATE_DEFAULT;
  18723. 80076ce: 687b ldr r3, [r7, #4]
  18724. 80076d0: 2201 movs r2, #1
  18725. 80076d2: f883 229c strb.w r2, [r3, #668] ; 0x29c
  18726. if (pdev->pClass != NULL)
  18727. 80076d6: 687b ldr r3, [r7, #4]
  18728. 80076d8: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18729. 80076dc: 2b00 cmp r3, #0
  18730. 80076de: d009 beq.n 80076f4 <USBD_LL_DevDisconnected+0x2e>
  18731. {
  18732. (void)pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
  18733. 80076e0: 687b ldr r3, [r7, #4]
  18734. 80076e2: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18735. 80076e6: 685b ldr r3, [r3, #4]
  18736. 80076e8: 687a ldr r2, [r7, #4]
  18737. 80076ea: 6852 ldr r2, [r2, #4]
  18738. 80076ec: b2d2 uxtb r2, r2
  18739. 80076ee: 4611 mov r1, r2
  18740. 80076f0: 6878 ldr r0, [r7, #4]
  18741. 80076f2: 4798 blx r3
  18742. }
  18743. return USBD_OK;
  18744. 80076f4: 2300 movs r3, #0
  18745. }
  18746. 80076f6: 4618 mov r0, r3
  18747. 80076f8: 3708 adds r7, #8
  18748. 80076fa: 46bd mov sp, r7
  18749. 80076fc: bd80 pop {r7, pc}
  18750. 080076fe <SWAPBYTE>:
  18751. /** @defgroup USBD_DEF_Exported_Macros
  18752. * @{
  18753. */
  18754. __STATIC_INLINE uint16_t SWAPBYTE(uint8_t *addr)
  18755. {
  18756. 80076fe: b480 push {r7}
  18757. 8007700: b087 sub sp, #28
  18758. 8007702: af00 add r7, sp, #0
  18759. 8007704: 6078 str r0, [r7, #4]
  18760. uint16_t _SwapVal, _Byte1, _Byte2;
  18761. uint8_t *_pbuff = addr;
  18762. 8007706: 687b ldr r3, [r7, #4]
  18763. 8007708: 617b str r3, [r7, #20]
  18764. _Byte1 = *(uint8_t *)_pbuff;
  18765. 800770a: 697b ldr r3, [r7, #20]
  18766. 800770c: 781b ldrb r3, [r3, #0]
  18767. 800770e: 827b strh r3, [r7, #18]
  18768. _pbuff++;
  18769. 8007710: 697b ldr r3, [r7, #20]
  18770. 8007712: 3301 adds r3, #1
  18771. 8007714: 617b str r3, [r7, #20]
  18772. _Byte2 = *(uint8_t *)_pbuff;
  18773. 8007716: 697b ldr r3, [r7, #20]
  18774. 8007718: 781b ldrb r3, [r3, #0]
  18775. 800771a: 823b strh r3, [r7, #16]
  18776. _SwapVal = (_Byte2 << 8) | _Byte1;
  18777. 800771c: 8a3b ldrh r3, [r7, #16]
  18778. 800771e: 021b lsls r3, r3, #8
  18779. 8007720: b21a sxth r2, r3
  18780. 8007722: f9b7 3012 ldrsh.w r3, [r7, #18]
  18781. 8007726: 4313 orrs r3, r2
  18782. 8007728: b21b sxth r3, r3
  18783. 800772a: 81fb strh r3, [r7, #14]
  18784. return _SwapVal;
  18785. 800772c: 89fb ldrh r3, [r7, #14]
  18786. }
  18787. 800772e: 4618 mov r0, r3
  18788. 8007730: 371c adds r7, #28
  18789. 8007732: 46bd mov sp, r7
  18790. 8007734: f85d 7b04 ldr.w r7, [sp], #4
  18791. 8007738: 4770 bx lr
  18792. ...
  18793. 0800773c <USBD_StdDevReq>:
  18794. * @param pdev: device instance
  18795. * @param req: usb request
  18796. * @retval status
  18797. */
  18798. USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  18799. {
  18800. 800773c: b580 push {r7, lr}
  18801. 800773e: b084 sub sp, #16
  18802. 8007740: af00 add r7, sp, #0
  18803. 8007742: 6078 str r0, [r7, #4]
  18804. 8007744: 6039 str r1, [r7, #0]
  18805. USBD_StatusTypeDef ret = USBD_OK;
  18806. 8007746: 2300 movs r3, #0
  18807. 8007748: 73fb strb r3, [r7, #15]
  18808. switch (req->bmRequest & USB_REQ_TYPE_MASK)
  18809. 800774a: 683b ldr r3, [r7, #0]
  18810. 800774c: 781b ldrb r3, [r3, #0]
  18811. 800774e: f003 0360 and.w r3, r3, #96 ; 0x60
  18812. 8007752: 2b40 cmp r3, #64 ; 0x40
  18813. 8007754: d005 beq.n 8007762 <USBD_StdDevReq+0x26>
  18814. 8007756: 2b40 cmp r3, #64 ; 0x40
  18815. 8007758: d853 bhi.n 8007802 <USBD_StdDevReq+0xc6>
  18816. 800775a: 2b00 cmp r3, #0
  18817. 800775c: d00b beq.n 8007776 <USBD_StdDevReq+0x3a>
  18818. 800775e: 2b20 cmp r3, #32
  18819. 8007760: d14f bne.n 8007802 <USBD_StdDevReq+0xc6>
  18820. {
  18821. case USB_REQ_TYPE_CLASS:
  18822. case USB_REQ_TYPE_VENDOR:
  18823. ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
  18824. 8007762: 687b ldr r3, [r7, #4]
  18825. 8007764: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18826. 8007768: 689b ldr r3, [r3, #8]
  18827. 800776a: 6839 ldr r1, [r7, #0]
  18828. 800776c: 6878 ldr r0, [r7, #4]
  18829. 800776e: 4798 blx r3
  18830. 8007770: 4603 mov r3, r0
  18831. 8007772: 73fb strb r3, [r7, #15]
  18832. break;
  18833. 8007774: e04a b.n 800780c <USBD_StdDevReq+0xd0>
  18834. case USB_REQ_TYPE_STANDARD:
  18835. switch (req->bRequest)
  18836. 8007776: 683b ldr r3, [r7, #0]
  18837. 8007778: 785b ldrb r3, [r3, #1]
  18838. 800777a: 2b09 cmp r3, #9
  18839. 800777c: d83b bhi.n 80077f6 <USBD_StdDevReq+0xba>
  18840. 800777e: a201 add r2, pc, #4 ; (adr r2, 8007784 <USBD_StdDevReq+0x48>)
  18841. 8007780: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  18842. 8007784: 080077d9 .word 0x080077d9
  18843. 8007788: 080077ed .word 0x080077ed
  18844. 800778c: 080077f7 .word 0x080077f7
  18845. 8007790: 080077e3 .word 0x080077e3
  18846. 8007794: 080077f7 .word 0x080077f7
  18847. 8007798: 080077b7 .word 0x080077b7
  18848. 800779c: 080077ad .word 0x080077ad
  18849. 80077a0: 080077f7 .word 0x080077f7
  18850. 80077a4: 080077cf .word 0x080077cf
  18851. 80077a8: 080077c1 .word 0x080077c1
  18852. {
  18853. case USB_REQ_GET_DESCRIPTOR:
  18854. USBD_GetDescriptor(pdev, req);
  18855. 80077ac: 6839 ldr r1, [r7, #0]
  18856. 80077ae: 6878 ldr r0, [r7, #4]
  18857. 80077b0: f000 f9de bl 8007b70 <USBD_GetDescriptor>
  18858. break;
  18859. 80077b4: e024 b.n 8007800 <USBD_StdDevReq+0xc4>
  18860. case USB_REQ_SET_ADDRESS:
  18861. USBD_SetAddress(pdev, req);
  18862. 80077b6: 6839 ldr r1, [r7, #0]
  18863. 80077b8: 6878 ldr r0, [r7, #4]
  18864. 80077ba: f000 fb6d bl 8007e98 <USBD_SetAddress>
  18865. break;
  18866. 80077be: e01f b.n 8007800 <USBD_StdDevReq+0xc4>
  18867. case USB_REQ_SET_CONFIGURATION:
  18868. ret = USBD_SetConfig(pdev, req);
  18869. 80077c0: 6839 ldr r1, [r7, #0]
  18870. 80077c2: 6878 ldr r0, [r7, #4]
  18871. 80077c4: f000 fbac bl 8007f20 <USBD_SetConfig>
  18872. 80077c8: 4603 mov r3, r0
  18873. 80077ca: 73fb strb r3, [r7, #15]
  18874. break;
  18875. 80077cc: e018 b.n 8007800 <USBD_StdDevReq+0xc4>
  18876. case USB_REQ_GET_CONFIGURATION:
  18877. USBD_GetConfig(pdev, req);
  18878. 80077ce: 6839 ldr r1, [r7, #0]
  18879. 80077d0: 6878 ldr r0, [r7, #4]
  18880. 80077d2: f000 fc4b bl 800806c <USBD_GetConfig>
  18881. break;
  18882. 80077d6: e013 b.n 8007800 <USBD_StdDevReq+0xc4>
  18883. case USB_REQ_GET_STATUS:
  18884. USBD_GetStatus(pdev, req);
  18885. 80077d8: 6839 ldr r1, [r7, #0]
  18886. 80077da: 6878 ldr r0, [r7, #4]
  18887. 80077dc: f000 fc7c bl 80080d8 <USBD_GetStatus>
  18888. break;
  18889. 80077e0: e00e b.n 8007800 <USBD_StdDevReq+0xc4>
  18890. case USB_REQ_SET_FEATURE:
  18891. USBD_SetFeature(pdev, req);
  18892. 80077e2: 6839 ldr r1, [r7, #0]
  18893. 80077e4: 6878 ldr r0, [r7, #4]
  18894. 80077e6: f000 fcab bl 8008140 <USBD_SetFeature>
  18895. break;
  18896. 80077ea: e009 b.n 8007800 <USBD_StdDevReq+0xc4>
  18897. case USB_REQ_CLEAR_FEATURE:
  18898. USBD_ClrFeature(pdev, req);
  18899. 80077ec: 6839 ldr r1, [r7, #0]
  18900. 80077ee: 6878 ldr r0, [r7, #4]
  18901. 80077f0: f000 fcba bl 8008168 <USBD_ClrFeature>
  18902. break;
  18903. 80077f4: e004 b.n 8007800 <USBD_StdDevReq+0xc4>
  18904. default:
  18905. USBD_CtlError(pdev, req);
  18906. 80077f6: 6839 ldr r1, [r7, #0]
  18907. 80077f8: 6878 ldr r0, [r7, #4]
  18908. 80077fa: f000 fd11 bl 8008220 <USBD_CtlError>
  18909. break;
  18910. 80077fe: bf00 nop
  18911. }
  18912. break;
  18913. 8007800: e004 b.n 800780c <USBD_StdDevReq+0xd0>
  18914. default:
  18915. USBD_CtlError(pdev, req);
  18916. 8007802: 6839 ldr r1, [r7, #0]
  18917. 8007804: 6878 ldr r0, [r7, #4]
  18918. 8007806: f000 fd0b bl 8008220 <USBD_CtlError>
  18919. break;
  18920. 800780a: bf00 nop
  18921. }
  18922. return ret;
  18923. 800780c: 7bfb ldrb r3, [r7, #15]
  18924. }
  18925. 800780e: 4618 mov r0, r3
  18926. 8007810: 3710 adds r7, #16
  18927. 8007812: 46bd mov sp, r7
  18928. 8007814: bd80 pop {r7, pc}
  18929. 8007816: bf00 nop
  18930. 08007818 <USBD_StdItfReq>:
  18931. * @param pdev: device instance
  18932. * @param req: usb request
  18933. * @retval status
  18934. */
  18935. USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  18936. {
  18937. 8007818: b580 push {r7, lr}
  18938. 800781a: b084 sub sp, #16
  18939. 800781c: af00 add r7, sp, #0
  18940. 800781e: 6078 str r0, [r7, #4]
  18941. 8007820: 6039 str r1, [r7, #0]
  18942. USBD_StatusTypeDef ret = USBD_OK;
  18943. 8007822: 2300 movs r3, #0
  18944. 8007824: 73fb strb r3, [r7, #15]
  18945. switch (req->bmRequest & USB_REQ_TYPE_MASK)
  18946. 8007826: 683b ldr r3, [r7, #0]
  18947. 8007828: 781b ldrb r3, [r3, #0]
  18948. 800782a: f003 0360 and.w r3, r3, #96 ; 0x60
  18949. 800782e: 2b40 cmp r3, #64 ; 0x40
  18950. 8007830: d005 beq.n 800783e <USBD_StdItfReq+0x26>
  18951. 8007832: 2b40 cmp r3, #64 ; 0x40
  18952. 8007834: d82f bhi.n 8007896 <USBD_StdItfReq+0x7e>
  18953. 8007836: 2b00 cmp r3, #0
  18954. 8007838: d001 beq.n 800783e <USBD_StdItfReq+0x26>
  18955. 800783a: 2b20 cmp r3, #32
  18956. 800783c: d12b bne.n 8007896 <USBD_StdItfReq+0x7e>
  18957. {
  18958. case USB_REQ_TYPE_CLASS:
  18959. case USB_REQ_TYPE_VENDOR:
  18960. case USB_REQ_TYPE_STANDARD:
  18961. switch (pdev->dev_state)
  18962. 800783e: 687b ldr r3, [r7, #4]
  18963. 8007840: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  18964. 8007844: b2db uxtb r3, r3
  18965. 8007846: 3b01 subs r3, #1
  18966. 8007848: 2b02 cmp r3, #2
  18967. 800784a: d81d bhi.n 8007888 <USBD_StdItfReq+0x70>
  18968. {
  18969. case USBD_STATE_DEFAULT:
  18970. case USBD_STATE_ADDRESSED:
  18971. case USBD_STATE_CONFIGURED:
  18972. if (LOBYTE(req->wIndex) <= USBD_MAX_NUM_INTERFACES)
  18973. 800784c: 683b ldr r3, [r7, #0]
  18974. 800784e: 889b ldrh r3, [r3, #4]
  18975. 8007850: b2db uxtb r3, r3
  18976. 8007852: 2b01 cmp r3, #1
  18977. 8007854: d813 bhi.n 800787e <USBD_StdItfReq+0x66>
  18978. {
  18979. ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
  18980. 8007856: 687b ldr r3, [r7, #4]
  18981. 8007858: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  18982. 800785c: 689b ldr r3, [r3, #8]
  18983. 800785e: 6839 ldr r1, [r7, #0]
  18984. 8007860: 6878 ldr r0, [r7, #4]
  18985. 8007862: 4798 blx r3
  18986. 8007864: 4603 mov r3, r0
  18987. 8007866: 73fb strb r3, [r7, #15]
  18988. if ((req->wLength == 0U) && (ret == USBD_OK))
  18989. 8007868: 683b ldr r3, [r7, #0]
  18990. 800786a: 88db ldrh r3, [r3, #6]
  18991. 800786c: 2b00 cmp r3, #0
  18992. 800786e: d110 bne.n 8007892 <USBD_StdItfReq+0x7a>
  18993. 8007870: 7bfb ldrb r3, [r7, #15]
  18994. 8007872: 2b00 cmp r3, #0
  18995. 8007874: d10d bne.n 8007892 <USBD_StdItfReq+0x7a>
  18996. {
  18997. (void)USBD_CtlSendStatus(pdev);
  18998. 8007876: 6878 ldr r0, [r7, #4]
  18999. 8007878: f000 fd9d bl 80083b6 <USBD_CtlSendStatus>
  19000. }
  19001. else
  19002. {
  19003. USBD_CtlError(pdev, req);
  19004. }
  19005. break;
  19006. 800787c: e009 b.n 8007892 <USBD_StdItfReq+0x7a>
  19007. USBD_CtlError(pdev, req);
  19008. 800787e: 6839 ldr r1, [r7, #0]
  19009. 8007880: 6878 ldr r0, [r7, #4]
  19010. 8007882: f000 fccd bl 8008220 <USBD_CtlError>
  19011. break;
  19012. 8007886: e004 b.n 8007892 <USBD_StdItfReq+0x7a>
  19013. default:
  19014. USBD_CtlError(pdev, req);
  19015. 8007888: 6839 ldr r1, [r7, #0]
  19016. 800788a: 6878 ldr r0, [r7, #4]
  19017. 800788c: f000 fcc8 bl 8008220 <USBD_CtlError>
  19018. break;
  19019. 8007890: e000 b.n 8007894 <USBD_StdItfReq+0x7c>
  19020. break;
  19021. 8007892: bf00 nop
  19022. }
  19023. break;
  19024. 8007894: e004 b.n 80078a0 <USBD_StdItfReq+0x88>
  19025. default:
  19026. USBD_CtlError(pdev, req);
  19027. 8007896: 6839 ldr r1, [r7, #0]
  19028. 8007898: 6878 ldr r0, [r7, #4]
  19029. 800789a: f000 fcc1 bl 8008220 <USBD_CtlError>
  19030. break;
  19031. 800789e: bf00 nop
  19032. }
  19033. return ret;
  19034. 80078a0: 7bfb ldrb r3, [r7, #15]
  19035. }
  19036. 80078a2: 4618 mov r0, r3
  19037. 80078a4: 3710 adds r7, #16
  19038. 80078a6: 46bd mov sp, r7
  19039. 80078a8: bd80 pop {r7, pc}
  19040. 080078aa <USBD_StdEPReq>:
  19041. * @param pdev: device instance
  19042. * @param req: usb request
  19043. * @retval status
  19044. */
  19045. USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  19046. {
  19047. 80078aa: b580 push {r7, lr}
  19048. 80078ac: b084 sub sp, #16
  19049. 80078ae: af00 add r7, sp, #0
  19050. 80078b0: 6078 str r0, [r7, #4]
  19051. 80078b2: 6039 str r1, [r7, #0]
  19052. USBD_EndpointTypeDef *pep;
  19053. uint8_t ep_addr;
  19054. USBD_StatusTypeDef ret = USBD_OK;
  19055. 80078b4: 2300 movs r3, #0
  19056. 80078b6: 73fb strb r3, [r7, #15]
  19057. ep_addr = LOBYTE(req->wIndex);
  19058. 80078b8: 683b ldr r3, [r7, #0]
  19059. 80078ba: 889b ldrh r3, [r3, #4]
  19060. 80078bc: 73bb strb r3, [r7, #14]
  19061. switch (req->bmRequest & USB_REQ_TYPE_MASK)
  19062. 80078be: 683b ldr r3, [r7, #0]
  19063. 80078c0: 781b ldrb r3, [r3, #0]
  19064. 80078c2: f003 0360 and.w r3, r3, #96 ; 0x60
  19065. 80078c6: 2b40 cmp r3, #64 ; 0x40
  19066. 80078c8: d007 beq.n 80078da <USBD_StdEPReq+0x30>
  19067. 80078ca: 2b40 cmp r3, #64 ; 0x40
  19068. 80078cc: f200 8145 bhi.w 8007b5a <USBD_StdEPReq+0x2b0>
  19069. 80078d0: 2b00 cmp r3, #0
  19070. 80078d2: d00c beq.n 80078ee <USBD_StdEPReq+0x44>
  19071. 80078d4: 2b20 cmp r3, #32
  19072. 80078d6: f040 8140 bne.w 8007b5a <USBD_StdEPReq+0x2b0>
  19073. {
  19074. case USB_REQ_TYPE_CLASS:
  19075. case USB_REQ_TYPE_VENDOR:
  19076. ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
  19077. 80078da: 687b ldr r3, [r7, #4]
  19078. 80078dc: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  19079. 80078e0: 689b ldr r3, [r3, #8]
  19080. 80078e2: 6839 ldr r1, [r7, #0]
  19081. 80078e4: 6878 ldr r0, [r7, #4]
  19082. 80078e6: 4798 blx r3
  19083. 80078e8: 4603 mov r3, r0
  19084. 80078ea: 73fb strb r3, [r7, #15]
  19085. break;
  19086. 80078ec: e13a b.n 8007b64 <USBD_StdEPReq+0x2ba>
  19087. case USB_REQ_TYPE_STANDARD:
  19088. switch (req->bRequest)
  19089. 80078ee: 683b ldr r3, [r7, #0]
  19090. 80078f0: 785b ldrb r3, [r3, #1]
  19091. 80078f2: 2b03 cmp r3, #3
  19092. 80078f4: d007 beq.n 8007906 <USBD_StdEPReq+0x5c>
  19093. 80078f6: 2b03 cmp r3, #3
  19094. 80078f8: f300 8129 bgt.w 8007b4e <USBD_StdEPReq+0x2a4>
  19095. 80078fc: 2b00 cmp r3, #0
  19096. 80078fe: d07f beq.n 8007a00 <USBD_StdEPReq+0x156>
  19097. 8007900: 2b01 cmp r3, #1
  19098. 8007902: d03c beq.n 800797e <USBD_StdEPReq+0xd4>
  19099. 8007904: e123 b.n 8007b4e <USBD_StdEPReq+0x2a4>
  19100. {
  19101. case USB_REQ_SET_FEATURE:
  19102. switch (pdev->dev_state)
  19103. 8007906: 687b ldr r3, [r7, #4]
  19104. 8007908: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  19105. 800790c: b2db uxtb r3, r3
  19106. 800790e: 2b02 cmp r3, #2
  19107. 8007910: d002 beq.n 8007918 <USBD_StdEPReq+0x6e>
  19108. 8007912: 2b03 cmp r3, #3
  19109. 8007914: d016 beq.n 8007944 <USBD_StdEPReq+0x9a>
  19110. 8007916: e02c b.n 8007972 <USBD_StdEPReq+0xc8>
  19111. {
  19112. case USBD_STATE_ADDRESSED:
  19113. if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
  19114. 8007918: 7bbb ldrb r3, [r7, #14]
  19115. 800791a: 2b00 cmp r3, #0
  19116. 800791c: d00d beq.n 800793a <USBD_StdEPReq+0x90>
  19117. 800791e: 7bbb ldrb r3, [r7, #14]
  19118. 8007920: 2b80 cmp r3, #128 ; 0x80
  19119. 8007922: d00a beq.n 800793a <USBD_StdEPReq+0x90>
  19120. {
  19121. (void)USBD_LL_StallEP(pdev, ep_addr);
  19122. 8007924: 7bbb ldrb r3, [r7, #14]
  19123. 8007926: 4619 mov r1, r3
  19124. 8007928: 6878 ldr r0, [r7, #4]
  19125. 800792a: f001 f971 bl 8008c10 <USBD_LL_StallEP>
  19126. (void)USBD_LL_StallEP(pdev, 0x80U);
  19127. 800792e: 2180 movs r1, #128 ; 0x80
  19128. 8007930: 6878 ldr r0, [r7, #4]
  19129. 8007932: f001 f96d bl 8008c10 <USBD_LL_StallEP>
  19130. 8007936: bf00 nop
  19131. }
  19132. else
  19133. {
  19134. USBD_CtlError(pdev, req);
  19135. }
  19136. break;
  19137. 8007938: e020 b.n 800797c <USBD_StdEPReq+0xd2>
  19138. USBD_CtlError(pdev, req);
  19139. 800793a: 6839 ldr r1, [r7, #0]
  19140. 800793c: 6878 ldr r0, [r7, #4]
  19141. 800793e: f000 fc6f bl 8008220 <USBD_CtlError>
  19142. break;
  19143. 8007942: e01b b.n 800797c <USBD_StdEPReq+0xd2>
  19144. case USBD_STATE_CONFIGURED:
  19145. if (req->wValue == USB_FEATURE_EP_HALT)
  19146. 8007944: 683b ldr r3, [r7, #0]
  19147. 8007946: 885b ldrh r3, [r3, #2]
  19148. 8007948: 2b00 cmp r3, #0
  19149. 800794a: d10e bne.n 800796a <USBD_StdEPReq+0xc0>
  19150. {
  19151. if ((ep_addr != 0x00U) && (ep_addr != 0x80U) && (req->wLength == 0x00U))
  19152. 800794c: 7bbb ldrb r3, [r7, #14]
  19153. 800794e: 2b00 cmp r3, #0
  19154. 8007950: d00b beq.n 800796a <USBD_StdEPReq+0xc0>
  19155. 8007952: 7bbb ldrb r3, [r7, #14]
  19156. 8007954: 2b80 cmp r3, #128 ; 0x80
  19157. 8007956: d008 beq.n 800796a <USBD_StdEPReq+0xc0>
  19158. 8007958: 683b ldr r3, [r7, #0]
  19159. 800795a: 88db ldrh r3, [r3, #6]
  19160. 800795c: 2b00 cmp r3, #0
  19161. 800795e: d104 bne.n 800796a <USBD_StdEPReq+0xc0>
  19162. {
  19163. (void)USBD_LL_StallEP(pdev, ep_addr);
  19164. 8007960: 7bbb ldrb r3, [r7, #14]
  19165. 8007962: 4619 mov r1, r3
  19166. 8007964: 6878 ldr r0, [r7, #4]
  19167. 8007966: f001 f953 bl 8008c10 <USBD_LL_StallEP>
  19168. }
  19169. }
  19170. (void)USBD_CtlSendStatus(pdev);
  19171. 800796a: 6878 ldr r0, [r7, #4]
  19172. 800796c: f000 fd23 bl 80083b6 <USBD_CtlSendStatus>
  19173. break;
  19174. 8007970: e004 b.n 800797c <USBD_StdEPReq+0xd2>
  19175. default:
  19176. USBD_CtlError(pdev, req);
  19177. 8007972: 6839 ldr r1, [r7, #0]
  19178. 8007974: 6878 ldr r0, [r7, #4]
  19179. 8007976: f000 fc53 bl 8008220 <USBD_CtlError>
  19180. break;
  19181. 800797a: bf00 nop
  19182. }
  19183. break;
  19184. 800797c: e0ec b.n 8007b58 <USBD_StdEPReq+0x2ae>
  19185. case USB_REQ_CLEAR_FEATURE:
  19186. switch (pdev->dev_state)
  19187. 800797e: 687b ldr r3, [r7, #4]
  19188. 8007980: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  19189. 8007984: b2db uxtb r3, r3
  19190. 8007986: 2b02 cmp r3, #2
  19191. 8007988: d002 beq.n 8007990 <USBD_StdEPReq+0xe6>
  19192. 800798a: 2b03 cmp r3, #3
  19193. 800798c: d016 beq.n 80079bc <USBD_StdEPReq+0x112>
  19194. 800798e: e030 b.n 80079f2 <USBD_StdEPReq+0x148>
  19195. {
  19196. case USBD_STATE_ADDRESSED:
  19197. if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
  19198. 8007990: 7bbb ldrb r3, [r7, #14]
  19199. 8007992: 2b00 cmp r3, #0
  19200. 8007994: d00d beq.n 80079b2 <USBD_StdEPReq+0x108>
  19201. 8007996: 7bbb ldrb r3, [r7, #14]
  19202. 8007998: 2b80 cmp r3, #128 ; 0x80
  19203. 800799a: d00a beq.n 80079b2 <USBD_StdEPReq+0x108>
  19204. {
  19205. (void)USBD_LL_StallEP(pdev, ep_addr);
  19206. 800799c: 7bbb ldrb r3, [r7, #14]
  19207. 800799e: 4619 mov r1, r3
  19208. 80079a0: 6878 ldr r0, [r7, #4]
  19209. 80079a2: f001 f935 bl 8008c10 <USBD_LL_StallEP>
  19210. (void)USBD_LL_StallEP(pdev, 0x80U);
  19211. 80079a6: 2180 movs r1, #128 ; 0x80
  19212. 80079a8: 6878 ldr r0, [r7, #4]
  19213. 80079aa: f001 f931 bl 8008c10 <USBD_LL_StallEP>
  19214. 80079ae: bf00 nop
  19215. }
  19216. else
  19217. {
  19218. USBD_CtlError(pdev, req);
  19219. }
  19220. break;
  19221. 80079b0: e025 b.n 80079fe <USBD_StdEPReq+0x154>
  19222. USBD_CtlError(pdev, req);
  19223. 80079b2: 6839 ldr r1, [r7, #0]
  19224. 80079b4: 6878 ldr r0, [r7, #4]
  19225. 80079b6: f000 fc33 bl 8008220 <USBD_CtlError>
  19226. break;
  19227. 80079ba: e020 b.n 80079fe <USBD_StdEPReq+0x154>
  19228. case USBD_STATE_CONFIGURED:
  19229. if (req->wValue == USB_FEATURE_EP_HALT)
  19230. 80079bc: 683b ldr r3, [r7, #0]
  19231. 80079be: 885b ldrh r3, [r3, #2]
  19232. 80079c0: 2b00 cmp r3, #0
  19233. 80079c2: d11b bne.n 80079fc <USBD_StdEPReq+0x152>
  19234. {
  19235. if ((ep_addr & 0x7FU) != 0x00U)
  19236. 80079c4: 7bbb ldrb r3, [r7, #14]
  19237. 80079c6: f003 037f and.w r3, r3, #127 ; 0x7f
  19238. 80079ca: 2b00 cmp r3, #0
  19239. 80079cc: d004 beq.n 80079d8 <USBD_StdEPReq+0x12e>
  19240. {
  19241. (void)USBD_LL_ClearStallEP(pdev, ep_addr);
  19242. 80079ce: 7bbb ldrb r3, [r7, #14]
  19243. 80079d0: 4619 mov r1, r3
  19244. 80079d2: 6878 ldr r0, [r7, #4]
  19245. 80079d4: f001 f93b bl 8008c4e <USBD_LL_ClearStallEP>
  19246. }
  19247. (void)USBD_CtlSendStatus(pdev);
  19248. 80079d8: 6878 ldr r0, [r7, #4]
  19249. 80079da: f000 fcec bl 80083b6 <USBD_CtlSendStatus>
  19250. ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
  19251. 80079de: 687b ldr r3, [r7, #4]
  19252. 80079e0: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  19253. 80079e4: 689b ldr r3, [r3, #8]
  19254. 80079e6: 6839 ldr r1, [r7, #0]
  19255. 80079e8: 6878 ldr r0, [r7, #4]
  19256. 80079ea: 4798 blx r3
  19257. 80079ec: 4603 mov r3, r0
  19258. 80079ee: 73fb strb r3, [r7, #15]
  19259. }
  19260. break;
  19261. 80079f0: e004 b.n 80079fc <USBD_StdEPReq+0x152>
  19262. default:
  19263. USBD_CtlError(pdev, req);
  19264. 80079f2: 6839 ldr r1, [r7, #0]
  19265. 80079f4: 6878 ldr r0, [r7, #4]
  19266. 80079f6: f000 fc13 bl 8008220 <USBD_CtlError>
  19267. break;
  19268. 80079fa: e000 b.n 80079fe <USBD_StdEPReq+0x154>
  19269. break;
  19270. 80079fc: bf00 nop
  19271. }
  19272. break;
  19273. 80079fe: e0ab b.n 8007b58 <USBD_StdEPReq+0x2ae>
  19274. case USB_REQ_GET_STATUS:
  19275. switch (pdev->dev_state)
  19276. 8007a00: 687b ldr r3, [r7, #4]
  19277. 8007a02: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  19278. 8007a06: b2db uxtb r3, r3
  19279. 8007a08: 2b02 cmp r3, #2
  19280. 8007a0a: d002 beq.n 8007a12 <USBD_StdEPReq+0x168>
  19281. 8007a0c: 2b03 cmp r3, #3
  19282. 8007a0e: d032 beq.n 8007a76 <USBD_StdEPReq+0x1cc>
  19283. 8007a10: e097 b.n 8007b42 <USBD_StdEPReq+0x298>
  19284. {
  19285. case USBD_STATE_ADDRESSED:
  19286. if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
  19287. 8007a12: 7bbb ldrb r3, [r7, #14]
  19288. 8007a14: 2b00 cmp r3, #0
  19289. 8007a16: d007 beq.n 8007a28 <USBD_StdEPReq+0x17e>
  19290. 8007a18: 7bbb ldrb r3, [r7, #14]
  19291. 8007a1a: 2b80 cmp r3, #128 ; 0x80
  19292. 8007a1c: d004 beq.n 8007a28 <USBD_StdEPReq+0x17e>
  19293. {
  19294. USBD_CtlError(pdev, req);
  19295. 8007a1e: 6839 ldr r1, [r7, #0]
  19296. 8007a20: 6878 ldr r0, [r7, #4]
  19297. 8007a22: f000 fbfd bl 8008220 <USBD_CtlError>
  19298. break;
  19299. 8007a26: e091 b.n 8007b4c <USBD_StdEPReq+0x2a2>
  19300. }
  19301. pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
  19302. 8007a28: f997 300e ldrsb.w r3, [r7, #14]
  19303. 8007a2c: 2b00 cmp r3, #0
  19304. 8007a2e: da0b bge.n 8007a48 <USBD_StdEPReq+0x19e>
  19305. 8007a30: 7bbb ldrb r3, [r7, #14]
  19306. 8007a32: f003 027f and.w r2, r3, #127 ; 0x7f
  19307. 8007a36: 4613 mov r3, r2
  19308. 8007a38: 009b lsls r3, r3, #2
  19309. 8007a3a: 4413 add r3, r2
  19310. 8007a3c: 009b lsls r3, r3, #2
  19311. 8007a3e: 3310 adds r3, #16
  19312. 8007a40: 687a ldr r2, [r7, #4]
  19313. 8007a42: 4413 add r3, r2
  19314. 8007a44: 3304 adds r3, #4
  19315. 8007a46: e00b b.n 8007a60 <USBD_StdEPReq+0x1b6>
  19316. &pdev->ep_out[ep_addr & 0x7FU];
  19317. 8007a48: 7bbb ldrb r3, [r7, #14]
  19318. 8007a4a: f003 027f and.w r2, r3, #127 ; 0x7f
  19319. pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
  19320. 8007a4e: 4613 mov r3, r2
  19321. 8007a50: 009b lsls r3, r3, #2
  19322. 8007a52: 4413 add r3, r2
  19323. 8007a54: 009b lsls r3, r3, #2
  19324. 8007a56: f503 73a8 add.w r3, r3, #336 ; 0x150
  19325. 8007a5a: 687a ldr r2, [r7, #4]
  19326. 8007a5c: 4413 add r3, r2
  19327. 8007a5e: 3304 adds r3, #4
  19328. 8007a60: 60bb str r3, [r7, #8]
  19329. pep->status = 0x0000U;
  19330. 8007a62: 68bb ldr r3, [r7, #8]
  19331. 8007a64: 2200 movs r2, #0
  19332. 8007a66: 601a str r2, [r3, #0]
  19333. (void)USBD_CtlSendData(pdev, (uint8_t *)&pep->status, 2U);
  19334. 8007a68: 68bb ldr r3, [r7, #8]
  19335. 8007a6a: 2202 movs r2, #2
  19336. 8007a6c: 4619 mov r1, r3
  19337. 8007a6e: 6878 ldr r0, [r7, #4]
  19338. 8007a70: f000 fc47 bl 8008302 <USBD_CtlSendData>
  19339. break;
  19340. 8007a74: e06a b.n 8007b4c <USBD_StdEPReq+0x2a2>
  19341. case USBD_STATE_CONFIGURED:
  19342. if ((ep_addr & 0x80U) == 0x80U)
  19343. 8007a76: f997 300e ldrsb.w r3, [r7, #14]
  19344. 8007a7a: 2b00 cmp r3, #0
  19345. 8007a7c: da11 bge.n 8007aa2 <USBD_StdEPReq+0x1f8>
  19346. {
  19347. if (pdev->ep_in[ep_addr & 0xFU].is_used == 0U)
  19348. 8007a7e: 7bbb ldrb r3, [r7, #14]
  19349. 8007a80: f003 020f and.w r2, r3, #15
  19350. 8007a84: 6879 ldr r1, [r7, #4]
  19351. 8007a86: 4613 mov r3, r2
  19352. 8007a88: 009b lsls r3, r3, #2
  19353. 8007a8a: 4413 add r3, r2
  19354. 8007a8c: 009b lsls r3, r3, #2
  19355. 8007a8e: 440b add r3, r1
  19356. 8007a90: 3324 adds r3, #36 ; 0x24
  19357. 8007a92: 881b ldrh r3, [r3, #0]
  19358. 8007a94: 2b00 cmp r3, #0
  19359. 8007a96: d117 bne.n 8007ac8 <USBD_StdEPReq+0x21e>
  19360. {
  19361. USBD_CtlError(pdev, req);
  19362. 8007a98: 6839 ldr r1, [r7, #0]
  19363. 8007a9a: 6878 ldr r0, [r7, #4]
  19364. 8007a9c: f000 fbc0 bl 8008220 <USBD_CtlError>
  19365. break;
  19366. 8007aa0: e054 b.n 8007b4c <USBD_StdEPReq+0x2a2>
  19367. }
  19368. }
  19369. else
  19370. {
  19371. if (pdev->ep_out[ep_addr & 0xFU].is_used == 0U)
  19372. 8007aa2: 7bbb ldrb r3, [r7, #14]
  19373. 8007aa4: f003 020f and.w r2, r3, #15
  19374. 8007aa8: 6879 ldr r1, [r7, #4]
  19375. 8007aaa: 4613 mov r3, r2
  19376. 8007aac: 009b lsls r3, r3, #2
  19377. 8007aae: 4413 add r3, r2
  19378. 8007ab0: 009b lsls r3, r3, #2
  19379. 8007ab2: 440b add r3, r1
  19380. 8007ab4: f503 73b2 add.w r3, r3, #356 ; 0x164
  19381. 8007ab8: 881b ldrh r3, [r3, #0]
  19382. 8007aba: 2b00 cmp r3, #0
  19383. 8007abc: d104 bne.n 8007ac8 <USBD_StdEPReq+0x21e>
  19384. {
  19385. USBD_CtlError(pdev, req);
  19386. 8007abe: 6839 ldr r1, [r7, #0]
  19387. 8007ac0: 6878 ldr r0, [r7, #4]
  19388. 8007ac2: f000 fbad bl 8008220 <USBD_CtlError>
  19389. break;
  19390. 8007ac6: e041 b.n 8007b4c <USBD_StdEPReq+0x2a2>
  19391. }
  19392. }
  19393. pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
  19394. 8007ac8: f997 300e ldrsb.w r3, [r7, #14]
  19395. 8007acc: 2b00 cmp r3, #0
  19396. 8007ace: da0b bge.n 8007ae8 <USBD_StdEPReq+0x23e>
  19397. 8007ad0: 7bbb ldrb r3, [r7, #14]
  19398. 8007ad2: f003 027f and.w r2, r3, #127 ; 0x7f
  19399. 8007ad6: 4613 mov r3, r2
  19400. 8007ad8: 009b lsls r3, r3, #2
  19401. 8007ada: 4413 add r3, r2
  19402. 8007adc: 009b lsls r3, r3, #2
  19403. 8007ade: 3310 adds r3, #16
  19404. 8007ae0: 687a ldr r2, [r7, #4]
  19405. 8007ae2: 4413 add r3, r2
  19406. 8007ae4: 3304 adds r3, #4
  19407. 8007ae6: e00b b.n 8007b00 <USBD_StdEPReq+0x256>
  19408. &pdev->ep_out[ep_addr & 0x7FU];
  19409. 8007ae8: 7bbb ldrb r3, [r7, #14]
  19410. 8007aea: f003 027f and.w r2, r3, #127 ; 0x7f
  19411. pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
  19412. 8007aee: 4613 mov r3, r2
  19413. 8007af0: 009b lsls r3, r3, #2
  19414. 8007af2: 4413 add r3, r2
  19415. 8007af4: 009b lsls r3, r3, #2
  19416. 8007af6: f503 73a8 add.w r3, r3, #336 ; 0x150
  19417. 8007afa: 687a ldr r2, [r7, #4]
  19418. 8007afc: 4413 add r3, r2
  19419. 8007afe: 3304 adds r3, #4
  19420. 8007b00: 60bb str r3, [r7, #8]
  19421. if ((ep_addr == 0x00U) || (ep_addr == 0x80U))
  19422. 8007b02: 7bbb ldrb r3, [r7, #14]
  19423. 8007b04: 2b00 cmp r3, #0
  19424. 8007b06: d002 beq.n 8007b0e <USBD_StdEPReq+0x264>
  19425. 8007b08: 7bbb ldrb r3, [r7, #14]
  19426. 8007b0a: 2b80 cmp r3, #128 ; 0x80
  19427. 8007b0c: d103 bne.n 8007b16 <USBD_StdEPReq+0x26c>
  19428. {
  19429. pep->status = 0x0000U;
  19430. 8007b0e: 68bb ldr r3, [r7, #8]
  19431. 8007b10: 2200 movs r2, #0
  19432. 8007b12: 601a str r2, [r3, #0]
  19433. 8007b14: e00e b.n 8007b34 <USBD_StdEPReq+0x28a>
  19434. }
  19435. else if (USBD_LL_IsStallEP(pdev, ep_addr) != 0U)
  19436. 8007b16: 7bbb ldrb r3, [r7, #14]
  19437. 8007b18: 4619 mov r1, r3
  19438. 8007b1a: 6878 ldr r0, [r7, #4]
  19439. 8007b1c: f001 f8b6 bl 8008c8c <USBD_LL_IsStallEP>
  19440. 8007b20: 4603 mov r3, r0
  19441. 8007b22: 2b00 cmp r3, #0
  19442. 8007b24: d003 beq.n 8007b2e <USBD_StdEPReq+0x284>
  19443. {
  19444. pep->status = 0x0001U;
  19445. 8007b26: 68bb ldr r3, [r7, #8]
  19446. 8007b28: 2201 movs r2, #1
  19447. 8007b2a: 601a str r2, [r3, #0]
  19448. 8007b2c: e002 b.n 8007b34 <USBD_StdEPReq+0x28a>
  19449. }
  19450. else
  19451. {
  19452. pep->status = 0x0000U;
  19453. 8007b2e: 68bb ldr r3, [r7, #8]
  19454. 8007b30: 2200 movs r2, #0
  19455. 8007b32: 601a str r2, [r3, #0]
  19456. }
  19457. (void)USBD_CtlSendData(pdev, (uint8_t *)&pep->status, 2U);
  19458. 8007b34: 68bb ldr r3, [r7, #8]
  19459. 8007b36: 2202 movs r2, #2
  19460. 8007b38: 4619 mov r1, r3
  19461. 8007b3a: 6878 ldr r0, [r7, #4]
  19462. 8007b3c: f000 fbe1 bl 8008302 <USBD_CtlSendData>
  19463. break;
  19464. 8007b40: e004 b.n 8007b4c <USBD_StdEPReq+0x2a2>
  19465. default:
  19466. USBD_CtlError(pdev, req);
  19467. 8007b42: 6839 ldr r1, [r7, #0]
  19468. 8007b44: 6878 ldr r0, [r7, #4]
  19469. 8007b46: f000 fb6b bl 8008220 <USBD_CtlError>
  19470. break;
  19471. 8007b4a: bf00 nop
  19472. }
  19473. break;
  19474. 8007b4c: e004 b.n 8007b58 <USBD_StdEPReq+0x2ae>
  19475. default:
  19476. USBD_CtlError(pdev, req);
  19477. 8007b4e: 6839 ldr r1, [r7, #0]
  19478. 8007b50: 6878 ldr r0, [r7, #4]
  19479. 8007b52: f000 fb65 bl 8008220 <USBD_CtlError>
  19480. break;
  19481. 8007b56: bf00 nop
  19482. }
  19483. break;
  19484. 8007b58: e004 b.n 8007b64 <USBD_StdEPReq+0x2ba>
  19485. default:
  19486. USBD_CtlError(pdev, req);
  19487. 8007b5a: 6839 ldr r1, [r7, #0]
  19488. 8007b5c: 6878 ldr r0, [r7, #4]
  19489. 8007b5e: f000 fb5f bl 8008220 <USBD_CtlError>
  19490. break;
  19491. 8007b62: bf00 nop
  19492. }
  19493. return ret;
  19494. 8007b64: 7bfb ldrb r3, [r7, #15]
  19495. }
  19496. 8007b66: 4618 mov r0, r3
  19497. 8007b68: 3710 adds r7, #16
  19498. 8007b6a: 46bd mov sp, r7
  19499. 8007b6c: bd80 pop {r7, pc}
  19500. ...
  19501. 08007b70 <USBD_GetDescriptor>:
  19502. * @param pdev: device instance
  19503. * @param req: usb request
  19504. * @retval status
  19505. */
  19506. static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  19507. {
  19508. 8007b70: b580 push {r7, lr}
  19509. 8007b72: b084 sub sp, #16
  19510. 8007b74: af00 add r7, sp, #0
  19511. 8007b76: 6078 str r0, [r7, #4]
  19512. 8007b78: 6039 str r1, [r7, #0]
  19513. uint16_t len = 0U;
  19514. 8007b7a: 2300 movs r3, #0
  19515. 8007b7c: 813b strh r3, [r7, #8]
  19516. uint8_t *pbuf = NULL;
  19517. 8007b7e: 2300 movs r3, #0
  19518. 8007b80: 60fb str r3, [r7, #12]
  19519. uint8_t err = 0U;
  19520. 8007b82: 2300 movs r3, #0
  19521. 8007b84: 72fb strb r3, [r7, #11]
  19522. switch (req->wValue >> 8)
  19523. 8007b86: 683b ldr r3, [r7, #0]
  19524. 8007b88: 885b ldrh r3, [r3, #2]
  19525. 8007b8a: 0a1b lsrs r3, r3, #8
  19526. 8007b8c: b29b uxth r3, r3
  19527. 8007b8e: 3b01 subs r3, #1
  19528. 8007b90: 2b0e cmp r3, #14
  19529. 8007b92: f200 8152 bhi.w 8007e3a <USBD_GetDescriptor+0x2ca>
  19530. 8007b96: a201 add r2, pc, #4 ; (adr r2, 8007b9c <USBD_GetDescriptor+0x2c>)
  19531. 8007b98: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  19532. 8007b9c: 08007c0d .word 0x08007c0d
  19533. 8007ba0: 08007c25 .word 0x08007c25
  19534. 8007ba4: 08007c65 .word 0x08007c65
  19535. 8007ba8: 08007e3b .word 0x08007e3b
  19536. 8007bac: 08007e3b .word 0x08007e3b
  19537. 8007bb0: 08007ddb .word 0x08007ddb
  19538. 8007bb4: 08007e07 .word 0x08007e07
  19539. 8007bb8: 08007e3b .word 0x08007e3b
  19540. 8007bbc: 08007e3b .word 0x08007e3b
  19541. 8007bc0: 08007e3b .word 0x08007e3b
  19542. 8007bc4: 08007e3b .word 0x08007e3b
  19543. 8007bc8: 08007e3b .word 0x08007e3b
  19544. 8007bcc: 08007e3b .word 0x08007e3b
  19545. 8007bd0: 08007e3b .word 0x08007e3b
  19546. 8007bd4: 08007bd9 .word 0x08007bd9
  19547. {
  19548. #if ((USBD_LPM_ENABLED == 1U) || (USBD_CLASS_BOS_ENABLED == 1U))
  19549. case USB_DESC_TYPE_BOS:
  19550. if (pdev->pDesc->GetBOSDescriptor != NULL)
  19551. 8007bd8: 687b ldr r3, [r7, #4]
  19552. 8007bda: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19553. 8007bde: 69db ldr r3, [r3, #28]
  19554. 8007be0: 2b00 cmp r3, #0
  19555. 8007be2: d00b beq.n 8007bfc <USBD_GetDescriptor+0x8c>
  19556. {
  19557. pbuf = pdev->pDesc->GetBOSDescriptor(pdev->dev_speed, &len);
  19558. 8007be4: 687b ldr r3, [r7, #4]
  19559. 8007be6: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19560. 8007bea: 69db ldr r3, [r3, #28]
  19561. 8007bec: 687a ldr r2, [r7, #4]
  19562. 8007bee: 7c12 ldrb r2, [r2, #16]
  19563. 8007bf0: f107 0108 add.w r1, r7, #8
  19564. 8007bf4: 4610 mov r0, r2
  19565. 8007bf6: 4798 blx r3
  19566. 8007bf8: 60f8 str r0, [r7, #12]
  19567. else
  19568. {
  19569. USBD_CtlError(pdev, req);
  19570. err++;
  19571. }
  19572. break;
  19573. 8007bfa: e126 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19574. USBD_CtlError(pdev, req);
  19575. 8007bfc: 6839 ldr r1, [r7, #0]
  19576. 8007bfe: 6878 ldr r0, [r7, #4]
  19577. 8007c00: f000 fb0e bl 8008220 <USBD_CtlError>
  19578. err++;
  19579. 8007c04: 7afb ldrb r3, [r7, #11]
  19580. 8007c06: 3301 adds r3, #1
  19581. 8007c08: 72fb strb r3, [r7, #11]
  19582. break;
  19583. 8007c0a: e11e b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19584. #endif
  19585. case USB_DESC_TYPE_DEVICE:
  19586. pbuf = pdev->pDesc->GetDeviceDescriptor(pdev->dev_speed, &len);
  19587. 8007c0c: 687b ldr r3, [r7, #4]
  19588. 8007c0e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19589. 8007c12: 681b ldr r3, [r3, #0]
  19590. 8007c14: 687a ldr r2, [r7, #4]
  19591. 8007c16: 7c12 ldrb r2, [r2, #16]
  19592. 8007c18: f107 0108 add.w r1, r7, #8
  19593. 8007c1c: 4610 mov r0, r2
  19594. 8007c1e: 4798 blx r3
  19595. 8007c20: 60f8 str r0, [r7, #12]
  19596. break;
  19597. 8007c22: e112 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19598. case USB_DESC_TYPE_CONFIGURATION:
  19599. if (pdev->dev_speed == USBD_SPEED_HIGH)
  19600. 8007c24: 687b ldr r3, [r7, #4]
  19601. 8007c26: 7c1b ldrb r3, [r3, #16]
  19602. 8007c28: 2b00 cmp r3, #0
  19603. 8007c2a: d10d bne.n 8007c48 <USBD_GetDescriptor+0xd8>
  19604. {
  19605. pbuf = pdev->pClass->GetHSConfigDescriptor(&len);
  19606. 8007c2c: 687b ldr r3, [r7, #4]
  19607. 8007c2e: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  19608. 8007c32: 6a9b ldr r3, [r3, #40] ; 0x28
  19609. 8007c34: f107 0208 add.w r2, r7, #8
  19610. 8007c38: 4610 mov r0, r2
  19611. 8007c3a: 4798 blx r3
  19612. 8007c3c: 60f8 str r0, [r7, #12]
  19613. pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
  19614. 8007c3e: 68fb ldr r3, [r7, #12]
  19615. 8007c40: 3301 adds r3, #1
  19616. 8007c42: 2202 movs r2, #2
  19617. 8007c44: 701a strb r2, [r3, #0]
  19618. else
  19619. {
  19620. pbuf = pdev->pClass->GetFSConfigDescriptor(&len);
  19621. pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
  19622. }
  19623. break;
  19624. 8007c46: e100 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19625. pbuf = pdev->pClass->GetFSConfigDescriptor(&len);
  19626. 8007c48: 687b ldr r3, [r7, #4]
  19627. 8007c4a: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  19628. 8007c4e: 6adb ldr r3, [r3, #44] ; 0x2c
  19629. 8007c50: f107 0208 add.w r2, r7, #8
  19630. 8007c54: 4610 mov r0, r2
  19631. 8007c56: 4798 blx r3
  19632. 8007c58: 60f8 str r0, [r7, #12]
  19633. pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
  19634. 8007c5a: 68fb ldr r3, [r7, #12]
  19635. 8007c5c: 3301 adds r3, #1
  19636. 8007c5e: 2202 movs r2, #2
  19637. 8007c60: 701a strb r2, [r3, #0]
  19638. break;
  19639. 8007c62: e0f2 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19640. case USB_DESC_TYPE_STRING:
  19641. switch ((uint8_t)(req->wValue))
  19642. 8007c64: 683b ldr r3, [r7, #0]
  19643. 8007c66: 885b ldrh r3, [r3, #2]
  19644. 8007c68: b2db uxtb r3, r3
  19645. 8007c6a: 2b05 cmp r3, #5
  19646. 8007c6c: f200 80ac bhi.w 8007dc8 <USBD_GetDescriptor+0x258>
  19647. 8007c70: a201 add r2, pc, #4 ; (adr r2, 8007c78 <USBD_GetDescriptor+0x108>)
  19648. 8007c72: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  19649. 8007c76: bf00 nop
  19650. 8007c78: 08007c91 .word 0x08007c91
  19651. 8007c7c: 08007cc5 .word 0x08007cc5
  19652. 8007c80: 08007cf9 .word 0x08007cf9
  19653. 8007c84: 08007d2d .word 0x08007d2d
  19654. 8007c88: 08007d61 .word 0x08007d61
  19655. 8007c8c: 08007d95 .word 0x08007d95
  19656. {
  19657. case USBD_IDX_LANGID_STR:
  19658. if (pdev->pDesc->GetLangIDStrDescriptor != NULL)
  19659. 8007c90: 687b ldr r3, [r7, #4]
  19660. 8007c92: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19661. 8007c96: 685b ldr r3, [r3, #4]
  19662. 8007c98: 2b00 cmp r3, #0
  19663. 8007c9a: d00b beq.n 8007cb4 <USBD_GetDescriptor+0x144>
  19664. {
  19665. pbuf = pdev->pDesc->GetLangIDStrDescriptor(pdev->dev_speed, &len);
  19666. 8007c9c: 687b ldr r3, [r7, #4]
  19667. 8007c9e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19668. 8007ca2: 685b ldr r3, [r3, #4]
  19669. 8007ca4: 687a ldr r2, [r7, #4]
  19670. 8007ca6: 7c12 ldrb r2, [r2, #16]
  19671. 8007ca8: f107 0108 add.w r1, r7, #8
  19672. 8007cac: 4610 mov r0, r2
  19673. 8007cae: 4798 blx r3
  19674. 8007cb0: 60f8 str r0, [r7, #12]
  19675. else
  19676. {
  19677. USBD_CtlError(pdev, req);
  19678. err++;
  19679. }
  19680. break;
  19681. 8007cb2: e091 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19682. USBD_CtlError(pdev, req);
  19683. 8007cb4: 6839 ldr r1, [r7, #0]
  19684. 8007cb6: 6878 ldr r0, [r7, #4]
  19685. 8007cb8: f000 fab2 bl 8008220 <USBD_CtlError>
  19686. err++;
  19687. 8007cbc: 7afb ldrb r3, [r7, #11]
  19688. 8007cbe: 3301 adds r3, #1
  19689. 8007cc0: 72fb strb r3, [r7, #11]
  19690. break;
  19691. 8007cc2: e089 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19692. case USBD_IDX_MFC_STR:
  19693. if (pdev->pDesc->GetManufacturerStrDescriptor != NULL)
  19694. 8007cc4: 687b ldr r3, [r7, #4]
  19695. 8007cc6: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19696. 8007cca: 689b ldr r3, [r3, #8]
  19697. 8007ccc: 2b00 cmp r3, #0
  19698. 8007cce: d00b beq.n 8007ce8 <USBD_GetDescriptor+0x178>
  19699. {
  19700. pbuf = pdev->pDesc->GetManufacturerStrDescriptor(pdev->dev_speed, &len);
  19701. 8007cd0: 687b ldr r3, [r7, #4]
  19702. 8007cd2: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19703. 8007cd6: 689b ldr r3, [r3, #8]
  19704. 8007cd8: 687a ldr r2, [r7, #4]
  19705. 8007cda: 7c12 ldrb r2, [r2, #16]
  19706. 8007cdc: f107 0108 add.w r1, r7, #8
  19707. 8007ce0: 4610 mov r0, r2
  19708. 8007ce2: 4798 blx r3
  19709. 8007ce4: 60f8 str r0, [r7, #12]
  19710. else
  19711. {
  19712. USBD_CtlError(pdev, req);
  19713. err++;
  19714. }
  19715. break;
  19716. 8007ce6: e077 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19717. USBD_CtlError(pdev, req);
  19718. 8007ce8: 6839 ldr r1, [r7, #0]
  19719. 8007cea: 6878 ldr r0, [r7, #4]
  19720. 8007cec: f000 fa98 bl 8008220 <USBD_CtlError>
  19721. err++;
  19722. 8007cf0: 7afb ldrb r3, [r7, #11]
  19723. 8007cf2: 3301 adds r3, #1
  19724. 8007cf4: 72fb strb r3, [r7, #11]
  19725. break;
  19726. 8007cf6: e06f b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19727. case USBD_IDX_PRODUCT_STR:
  19728. if (pdev->pDesc->GetProductStrDescriptor != NULL)
  19729. 8007cf8: 687b ldr r3, [r7, #4]
  19730. 8007cfa: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19731. 8007cfe: 68db ldr r3, [r3, #12]
  19732. 8007d00: 2b00 cmp r3, #0
  19733. 8007d02: d00b beq.n 8007d1c <USBD_GetDescriptor+0x1ac>
  19734. {
  19735. pbuf = pdev->pDesc->GetProductStrDescriptor(pdev->dev_speed, &len);
  19736. 8007d04: 687b ldr r3, [r7, #4]
  19737. 8007d06: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19738. 8007d0a: 68db ldr r3, [r3, #12]
  19739. 8007d0c: 687a ldr r2, [r7, #4]
  19740. 8007d0e: 7c12 ldrb r2, [r2, #16]
  19741. 8007d10: f107 0108 add.w r1, r7, #8
  19742. 8007d14: 4610 mov r0, r2
  19743. 8007d16: 4798 blx r3
  19744. 8007d18: 60f8 str r0, [r7, #12]
  19745. else
  19746. {
  19747. USBD_CtlError(pdev, req);
  19748. err++;
  19749. }
  19750. break;
  19751. 8007d1a: e05d b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19752. USBD_CtlError(pdev, req);
  19753. 8007d1c: 6839 ldr r1, [r7, #0]
  19754. 8007d1e: 6878 ldr r0, [r7, #4]
  19755. 8007d20: f000 fa7e bl 8008220 <USBD_CtlError>
  19756. err++;
  19757. 8007d24: 7afb ldrb r3, [r7, #11]
  19758. 8007d26: 3301 adds r3, #1
  19759. 8007d28: 72fb strb r3, [r7, #11]
  19760. break;
  19761. 8007d2a: e055 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19762. case USBD_IDX_SERIAL_STR:
  19763. if (pdev->pDesc->GetSerialStrDescriptor != NULL)
  19764. 8007d2c: 687b ldr r3, [r7, #4]
  19765. 8007d2e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19766. 8007d32: 691b ldr r3, [r3, #16]
  19767. 8007d34: 2b00 cmp r3, #0
  19768. 8007d36: d00b beq.n 8007d50 <USBD_GetDescriptor+0x1e0>
  19769. {
  19770. pbuf = pdev->pDesc->GetSerialStrDescriptor(pdev->dev_speed, &len);
  19771. 8007d38: 687b ldr r3, [r7, #4]
  19772. 8007d3a: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19773. 8007d3e: 691b ldr r3, [r3, #16]
  19774. 8007d40: 687a ldr r2, [r7, #4]
  19775. 8007d42: 7c12 ldrb r2, [r2, #16]
  19776. 8007d44: f107 0108 add.w r1, r7, #8
  19777. 8007d48: 4610 mov r0, r2
  19778. 8007d4a: 4798 blx r3
  19779. 8007d4c: 60f8 str r0, [r7, #12]
  19780. else
  19781. {
  19782. USBD_CtlError(pdev, req);
  19783. err++;
  19784. }
  19785. break;
  19786. 8007d4e: e043 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19787. USBD_CtlError(pdev, req);
  19788. 8007d50: 6839 ldr r1, [r7, #0]
  19789. 8007d52: 6878 ldr r0, [r7, #4]
  19790. 8007d54: f000 fa64 bl 8008220 <USBD_CtlError>
  19791. err++;
  19792. 8007d58: 7afb ldrb r3, [r7, #11]
  19793. 8007d5a: 3301 adds r3, #1
  19794. 8007d5c: 72fb strb r3, [r7, #11]
  19795. break;
  19796. 8007d5e: e03b b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19797. case USBD_IDX_CONFIG_STR:
  19798. if (pdev->pDesc->GetConfigurationStrDescriptor != NULL)
  19799. 8007d60: 687b ldr r3, [r7, #4]
  19800. 8007d62: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19801. 8007d66: 695b ldr r3, [r3, #20]
  19802. 8007d68: 2b00 cmp r3, #0
  19803. 8007d6a: d00b beq.n 8007d84 <USBD_GetDescriptor+0x214>
  19804. {
  19805. pbuf = pdev->pDesc->GetConfigurationStrDescriptor(pdev->dev_speed, &len);
  19806. 8007d6c: 687b ldr r3, [r7, #4]
  19807. 8007d6e: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19808. 8007d72: 695b ldr r3, [r3, #20]
  19809. 8007d74: 687a ldr r2, [r7, #4]
  19810. 8007d76: 7c12 ldrb r2, [r2, #16]
  19811. 8007d78: f107 0108 add.w r1, r7, #8
  19812. 8007d7c: 4610 mov r0, r2
  19813. 8007d7e: 4798 blx r3
  19814. 8007d80: 60f8 str r0, [r7, #12]
  19815. else
  19816. {
  19817. USBD_CtlError(pdev, req);
  19818. err++;
  19819. }
  19820. break;
  19821. 8007d82: e029 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19822. USBD_CtlError(pdev, req);
  19823. 8007d84: 6839 ldr r1, [r7, #0]
  19824. 8007d86: 6878 ldr r0, [r7, #4]
  19825. 8007d88: f000 fa4a bl 8008220 <USBD_CtlError>
  19826. err++;
  19827. 8007d8c: 7afb ldrb r3, [r7, #11]
  19828. 8007d8e: 3301 adds r3, #1
  19829. 8007d90: 72fb strb r3, [r7, #11]
  19830. break;
  19831. 8007d92: e021 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19832. case USBD_IDX_INTERFACE_STR:
  19833. if (pdev->pDesc->GetInterfaceStrDescriptor != NULL)
  19834. 8007d94: 687b ldr r3, [r7, #4]
  19835. 8007d96: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19836. 8007d9a: 699b ldr r3, [r3, #24]
  19837. 8007d9c: 2b00 cmp r3, #0
  19838. 8007d9e: d00b beq.n 8007db8 <USBD_GetDescriptor+0x248>
  19839. {
  19840. pbuf = pdev->pDesc->GetInterfaceStrDescriptor(pdev->dev_speed, &len);
  19841. 8007da0: 687b ldr r3, [r7, #4]
  19842. 8007da2: f8d3 32b4 ldr.w r3, [r3, #692] ; 0x2b4
  19843. 8007da6: 699b ldr r3, [r3, #24]
  19844. 8007da8: 687a ldr r2, [r7, #4]
  19845. 8007daa: 7c12 ldrb r2, [r2, #16]
  19846. 8007dac: f107 0108 add.w r1, r7, #8
  19847. 8007db0: 4610 mov r0, r2
  19848. 8007db2: 4798 blx r3
  19849. 8007db4: 60f8 str r0, [r7, #12]
  19850. else
  19851. {
  19852. USBD_CtlError(pdev, req);
  19853. err++;
  19854. }
  19855. break;
  19856. 8007db6: e00f b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19857. USBD_CtlError(pdev, req);
  19858. 8007db8: 6839 ldr r1, [r7, #0]
  19859. 8007dba: 6878 ldr r0, [r7, #4]
  19860. 8007dbc: f000 fa30 bl 8008220 <USBD_CtlError>
  19861. err++;
  19862. 8007dc0: 7afb ldrb r3, [r7, #11]
  19863. 8007dc2: 3301 adds r3, #1
  19864. 8007dc4: 72fb strb r3, [r7, #11]
  19865. break;
  19866. 8007dc6: e007 b.n 8007dd8 <USBD_GetDescriptor+0x268>
  19867. err++;
  19868. }
  19869. #endif
  19870. #if ((USBD_CLASS_USER_STRING_DESC == 0U) && (USBD_SUPPORT_USER_STRING_DESC == 0U))
  19871. USBD_CtlError(pdev, req);
  19872. 8007dc8: 6839 ldr r1, [r7, #0]
  19873. 8007dca: 6878 ldr r0, [r7, #4]
  19874. 8007dcc: f000 fa28 bl 8008220 <USBD_CtlError>
  19875. err++;
  19876. 8007dd0: 7afb ldrb r3, [r7, #11]
  19877. 8007dd2: 3301 adds r3, #1
  19878. 8007dd4: 72fb strb r3, [r7, #11]
  19879. #endif
  19880. break;
  19881. 8007dd6: bf00 nop
  19882. }
  19883. break;
  19884. 8007dd8: e037 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19885. case USB_DESC_TYPE_DEVICE_QUALIFIER:
  19886. if (pdev->dev_speed == USBD_SPEED_HIGH)
  19887. 8007dda: 687b ldr r3, [r7, #4]
  19888. 8007ddc: 7c1b ldrb r3, [r3, #16]
  19889. 8007dde: 2b00 cmp r3, #0
  19890. 8007de0: d109 bne.n 8007df6 <USBD_GetDescriptor+0x286>
  19891. {
  19892. pbuf = pdev->pClass->GetDeviceQualifierDescriptor(&len);
  19893. 8007de2: 687b ldr r3, [r7, #4]
  19894. 8007de4: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  19895. 8007de8: 6b5b ldr r3, [r3, #52] ; 0x34
  19896. 8007dea: f107 0208 add.w r2, r7, #8
  19897. 8007dee: 4610 mov r0, r2
  19898. 8007df0: 4798 blx r3
  19899. 8007df2: 60f8 str r0, [r7, #12]
  19900. else
  19901. {
  19902. USBD_CtlError(pdev, req);
  19903. err++;
  19904. }
  19905. break;
  19906. 8007df4: e029 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19907. USBD_CtlError(pdev, req);
  19908. 8007df6: 6839 ldr r1, [r7, #0]
  19909. 8007df8: 6878 ldr r0, [r7, #4]
  19910. 8007dfa: f000 fa11 bl 8008220 <USBD_CtlError>
  19911. err++;
  19912. 8007dfe: 7afb ldrb r3, [r7, #11]
  19913. 8007e00: 3301 adds r3, #1
  19914. 8007e02: 72fb strb r3, [r7, #11]
  19915. break;
  19916. 8007e04: e021 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19917. case USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION:
  19918. if (pdev->dev_speed == USBD_SPEED_HIGH)
  19919. 8007e06: 687b ldr r3, [r7, #4]
  19920. 8007e08: 7c1b ldrb r3, [r3, #16]
  19921. 8007e0a: 2b00 cmp r3, #0
  19922. 8007e0c: d10d bne.n 8007e2a <USBD_GetDescriptor+0x2ba>
  19923. {
  19924. pbuf = pdev->pClass->GetOtherSpeedConfigDescriptor(&len);
  19925. 8007e0e: 687b ldr r3, [r7, #4]
  19926. 8007e10: f8d3 32b8 ldr.w r3, [r3, #696] ; 0x2b8
  19927. 8007e14: 6b1b ldr r3, [r3, #48] ; 0x30
  19928. 8007e16: f107 0208 add.w r2, r7, #8
  19929. 8007e1a: 4610 mov r0, r2
  19930. 8007e1c: 4798 blx r3
  19931. 8007e1e: 60f8 str r0, [r7, #12]
  19932. pbuf[1] = USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION;
  19933. 8007e20: 68fb ldr r3, [r7, #12]
  19934. 8007e22: 3301 adds r3, #1
  19935. 8007e24: 2207 movs r2, #7
  19936. 8007e26: 701a strb r2, [r3, #0]
  19937. else
  19938. {
  19939. USBD_CtlError(pdev, req);
  19940. err++;
  19941. }
  19942. break;
  19943. 8007e28: e00f b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19944. USBD_CtlError(pdev, req);
  19945. 8007e2a: 6839 ldr r1, [r7, #0]
  19946. 8007e2c: 6878 ldr r0, [r7, #4]
  19947. 8007e2e: f000 f9f7 bl 8008220 <USBD_CtlError>
  19948. err++;
  19949. 8007e32: 7afb ldrb r3, [r7, #11]
  19950. 8007e34: 3301 adds r3, #1
  19951. 8007e36: 72fb strb r3, [r7, #11]
  19952. break;
  19953. 8007e38: e007 b.n 8007e4a <USBD_GetDescriptor+0x2da>
  19954. default:
  19955. USBD_CtlError(pdev, req);
  19956. 8007e3a: 6839 ldr r1, [r7, #0]
  19957. 8007e3c: 6878 ldr r0, [r7, #4]
  19958. 8007e3e: f000 f9ef bl 8008220 <USBD_CtlError>
  19959. err++;
  19960. 8007e42: 7afb ldrb r3, [r7, #11]
  19961. 8007e44: 3301 adds r3, #1
  19962. 8007e46: 72fb strb r3, [r7, #11]
  19963. break;
  19964. 8007e48: bf00 nop
  19965. }
  19966. if (err != 0U)
  19967. 8007e4a: 7afb ldrb r3, [r7, #11]
  19968. 8007e4c: 2b00 cmp r3, #0
  19969. 8007e4e: d11e bne.n 8007e8e <USBD_GetDescriptor+0x31e>
  19970. {
  19971. return;
  19972. }
  19973. if (req->wLength != 0U)
  19974. 8007e50: 683b ldr r3, [r7, #0]
  19975. 8007e52: 88db ldrh r3, [r3, #6]
  19976. 8007e54: 2b00 cmp r3, #0
  19977. 8007e56: d016 beq.n 8007e86 <USBD_GetDescriptor+0x316>
  19978. {
  19979. if (len != 0U)
  19980. 8007e58: 893b ldrh r3, [r7, #8]
  19981. 8007e5a: 2b00 cmp r3, #0
  19982. 8007e5c: d00e beq.n 8007e7c <USBD_GetDescriptor+0x30c>
  19983. {
  19984. len = MIN(len, req->wLength);
  19985. 8007e5e: 683b ldr r3, [r7, #0]
  19986. 8007e60: 88da ldrh r2, [r3, #6]
  19987. 8007e62: 893b ldrh r3, [r7, #8]
  19988. 8007e64: 4293 cmp r3, r2
  19989. 8007e66: bf28 it cs
  19990. 8007e68: 4613 movcs r3, r2
  19991. 8007e6a: b29b uxth r3, r3
  19992. 8007e6c: 813b strh r3, [r7, #8]
  19993. (void)USBD_CtlSendData(pdev, pbuf, len);
  19994. 8007e6e: 893b ldrh r3, [r7, #8]
  19995. 8007e70: 461a mov r2, r3
  19996. 8007e72: 68f9 ldr r1, [r7, #12]
  19997. 8007e74: 6878 ldr r0, [r7, #4]
  19998. 8007e76: f000 fa44 bl 8008302 <USBD_CtlSendData>
  19999. 8007e7a: e009 b.n 8007e90 <USBD_GetDescriptor+0x320>
  20000. }
  20001. else
  20002. {
  20003. USBD_CtlError(pdev, req);
  20004. 8007e7c: 6839 ldr r1, [r7, #0]
  20005. 8007e7e: 6878 ldr r0, [r7, #4]
  20006. 8007e80: f000 f9ce bl 8008220 <USBD_CtlError>
  20007. 8007e84: e004 b.n 8007e90 <USBD_GetDescriptor+0x320>
  20008. }
  20009. }
  20010. else
  20011. {
  20012. (void)USBD_CtlSendStatus(pdev);
  20013. 8007e86: 6878 ldr r0, [r7, #4]
  20014. 8007e88: f000 fa95 bl 80083b6 <USBD_CtlSendStatus>
  20015. 8007e8c: e000 b.n 8007e90 <USBD_GetDescriptor+0x320>
  20016. return;
  20017. 8007e8e: bf00 nop
  20018. }
  20019. }
  20020. 8007e90: 3710 adds r7, #16
  20021. 8007e92: 46bd mov sp, r7
  20022. 8007e94: bd80 pop {r7, pc}
  20023. 8007e96: bf00 nop
  20024. 08007e98 <USBD_SetAddress>:
  20025. * @param pdev: device instance
  20026. * @param req: usb request
  20027. * @retval status
  20028. */
  20029. static void USBD_SetAddress(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  20030. {
  20031. 8007e98: b580 push {r7, lr}
  20032. 8007e9a: b084 sub sp, #16
  20033. 8007e9c: af00 add r7, sp, #0
  20034. 8007e9e: 6078 str r0, [r7, #4]
  20035. 8007ea0: 6039 str r1, [r7, #0]
  20036. uint8_t dev_addr;
  20037. if ((req->wIndex == 0U) && (req->wLength == 0U) && (req->wValue < 128U))
  20038. 8007ea2: 683b ldr r3, [r7, #0]
  20039. 8007ea4: 889b ldrh r3, [r3, #4]
  20040. 8007ea6: 2b00 cmp r3, #0
  20041. 8007ea8: d131 bne.n 8007f0e <USBD_SetAddress+0x76>
  20042. 8007eaa: 683b ldr r3, [r7, #0]
  20043. 8007eac: 88db ldrh r3, [r3, #6]
  20044. 8007eae: 2b00 cmp r3, #0
  20045. 8007eb0: d12d bne.n 8007f0e <USBD_SetAddress+0x76>
  20046. 8007eb2: 683b ldr r3, [r7, #0]
  20047. 8007eb4: 885b ldrh r3, [r3, #2]
  20048. 8007eb6: 2b7f cmp r3, #127 ; 0x7f
  20049. 8007eb8: d829 bhi.n 8007f0e <USBD_SetAddress+0x76>
  20050. {
  20051. dev_addr = (uint8_t)(req->wValue) & 0x7FU;
  20052. 8007eba: 683b ldr r3, [r7, #0]
  20053. 8007ebc: 885b ldrh r3, [r3, #2]
  20054. 8007ebe: b2db uxtb r3, r3
  20055. 8007ec0: f003 037f and.w r3, r3, #127 ; 0x7f
  20056. 8007ec4: 73fb strb r3, [r7, #15]
  20057. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  20058. 8007ec6: 687b ldr r3, [r7, #4]
  20059. 8007ec8: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  20060. 8007ecc: b2db uxtb r3, r3
  20061. 8007ece: 2b03 cmp r3, #3
  20062. 8007ed0: d104 bne.n 8007edc <USBD_SetAddress+0x44>
  20063. {
  20064. USBD_CtlError(pdev, req);
  20065. 8007ed2: 6839 ldr r1, [r7, #0]
  20066. 8007ed4: 6878 ldr r0, [r7, #4]
  20067. 8007ed6: f000 f9a3 bl 8008220 <USBD_CtlError>
  20068. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  20069. 8007eda: e01d b.n 8007f18 <USBD_SetAddress+0x80>
  20070. }
  20071. else
  20072. {
  20073. pdev->dev_address = dev_addr;
  20074. 8007edc: 687b ldr r3, [r7, #4]
  20075. 8007ede: 7bfa ldrb r2, [r7, #15]
  20076. 8007ee0: f883 229e strb.w r2, [r3, #670] ; 0x29e
  20077. (void)USBD_LL_SetUSBAddress(pdev, dev_addr);
  20078. 8007ee4: 7bfb ldrb r3, [r7, #15]
  20079. 8007ee6: 4619 mov r1, r3
  20080. 8007ee8: 6878 ldr r0, [r7, #4]
  20081. 8007eea: f000 fefb bl 8008ce4 <USBD_LL_SetUSBAddress>
  20082. (void)USBD_CtlSendStatus(pdev);
  20083. 8007eee: 6878 ldr r0, [r7, #4]
  20084. 8007ef0: f000 fa61 bl 80083b6 <USBD_CtlSendStatus>
  20085. if (dev_addr != 0U)
  20086. 8007ef4: 7bfb ldrb r3, [r7, #15]
  20087. 8007ef6: 2b00 cmp r3, #0
  20088. 8007ef8: d004 beq.n 8007f04 <USBD_SetAddress+0x6c>
  20089. {
  20090. pdev->dev_state = USBD_STATE_ADDRESSED;
  20091. 8007efa: 687b ldr r3, [r7, #4]
  20092. 8007efc: 2202 movs r2, #2
  20093. 8007efe: f883 229c strb.w r2, [r3, #668] ; 0x29c
  20094. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  20095. 8007f02: e009 b.n 8007f18 <USBD_SetAddress+0x80>
  20096. }
  20097. else
  20098. {
  20099. pdev->dev_state = USBD_STATE_DEFAULT;
  20100. 8007f04: 687b ldr r3, [r7, #4]
  20101. 8007f06: 2201 movs r2, #1
  20102. 8007f08: f883 229c strb.w r2, [r3, #668] ; 0x29c
  20103. if (pdev->dev_state == USBD_STATE_CONFIGURED)
  20104. 8007f0c: e004 b.n 8007f18 <USBD_SetAddress+0x80>
  20105. }
  20106. }
  20107. }
  20108. else
  20109. {
  20110. USBD_CtlError(pdev, req);
  20111. 8007f0e: 6839 ldr r1, [r7, #0]
  20112. 8007f10: 6878 ldr r0, [r7, #4]
  20113. 8007f12: f000 f985 bl 8008220 <USBD_CtlError>
  20114. }
  20115. }
  20116. 8007f16: bf00 nop
  20117. 8007f18: bf00 nop
  20118. 8007f1a: 3710 adds r7, #16
  20119. 8007f1c: 46bd mov sp, r7
  20120. 8007f1e: bd80 pop {r7, pc}
  20121. 08007f20 <USBD_SetConfig>:
  20122. * @param pdev: device instance
  20123. * @param req: usb request
  20124. * @retval status
  20125. */
  20126. static USBD_StatusTypeDef USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  20127. {
  20128. 8007f20: b580 push {r7, lr}
  20129. 8007f22: b084 sub sp, #16
  20130. 8007f24: af00 add r7, sp, #0
  20131. 8007f26: 6078 str r0, [r7, #4]
  20132. 8007f28: 6039 str r1, [r7, #0]
  20133. USBD_StatusTypeDef ret = USBD_OK;
  20134. 8007f2a: 2300 movs r3, #0
  20135. 8007f2c: 73fb strb r3, [r7, #15]
  20136. static uint8_t cfgidx;
  20137. cfgidx = (uint8_t)(req->wValue);
  20138. 8007f2e: 683b ldr r3, [r7, #0]
  20139. 8007f30: 885b ldrh r3, [r3, #2]
  20140. 8007f32: b2da uxtb r2, r3
  20141. 8007f34: 4b4c ldr r3, [pc, #304] ; (8008068 <USBD_SetConfig+0x148>)
  20142. 8007f36: 701a strb r2, [r3, #0]
  20143. if (cfgidx > USBD_MAX_NUM_CONFIGURATION)
  20144. 8007f38: 4b4b ldr r3, [pc, #300] ; (8008068 <USBD_SetConfig+0x148>)
  20145. 8007f3a: 781b ldrb r3, [r3, #0]
  20146. 8007f3c: 2b01 cmp r3, #1
  20147. 8007f3e: d905 bls.n 8007f4c <USBD_SetConfig+0x2c>
  20148. {
  20149. USBD_CtlError(pdev, req);
  20150. 8007f40: 6839 ldr r1, [r7, #0]
  20151. 8007f42: 6878 ldr r0, [r7, #4]
  20152. 8007f44: f000 f96c bl 8008220 <USBD_CtlError>
  20153. return USBD_FAIL;
  20154. 8007f48: 2303 movs r3, #3
  20155. 8007f4a: e088 b.n 800805e <USBD_SetConfig+0x13e>
  20156. }
  20157. switch (pdev->dev_state)
  20158. 8007f4c: 687b ldr r3, [r7, #4]
  20159. 8007f4e: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  20160. 8007f52: b2db uxtb r3, r3
  20161. 8007f54: 2b02 cmp r3, #2
  20162. 8007f56: d002 beq.n 8007f5e <USBD_SetConfig+0x3e>
  20163. 8007f58: 2b03 cmp r3, #3
  20164. 8007f5a: d025 beq.n 8007fa8 <USBD_SetConfig+0x88>
  20165. 8007f5c: e071 b.n 8008042 <USBD_SetConfig+0x122>
  20166. {
  20167. case USBD_STATE_ADDRESSED:
  20168. if (cfgidx != 0U)
  20169. 8007f5e: 4b42 ldr r3, [pc, #264] ; (8008068 <USBD_SetConfig+0x148>)
  20170. 8007f60: 781b ldrb r3, [r3, #0]
  20171. 8007f62: 2b00 cmp r3, #0
  20172. 8007f64: d01c beq.n 8007fa0 <USBD_SetConfig+0x80>
  20173. {
  20174. pdev->dev_config = cfgidx;
  20175. 8007f66: 4b40 ldr r3, [pc, #256] ; (8008068 <USBD_SetConfig+0x148>)
  20176. 8007f68: 781b ldrb r3, [r3, #0]
  20177. 8007f6a: 461a mov r2, r3
  20178. 8007f6c: 687b ldr r3, [r7, #4]
  20179. 8007f6e: 605a str r2, [r3, #4]
  20180. ret = USBD_SetClassConfig(pdev, cfgidx);
  20181. 8007f70: 4b3d ldr r3, [pc, #244] ; (8008068 <USBD_SetConfig+0x148>)
  20182. 8007f72: 781b ldrb r3, [r3, #0]
  20183. 8007f74: 4619 mov r1, r3
  20184. 8007f76: 6878 ldr r0, [r7, #4]
  20185. 8007f78: f7ff f91e bl 80071b8 <USBD_SetClassConfig>
  20186. 8007f7c: 4603 mov r3, r0
  20187. 8007f7e: 73fb strb r3, [r7, #15]
  20188. if (ret != USBD_OK)
  20189. 8007f80: 7bfb ldrb r3, [r7, #15]
  20190. 8007f82: 2b00 cmp r3, #0
  20191. 8007f84: d004 beq.n 8007f90 <USBD_SetConfig+0x70>
  20192. {
  20193. USBD_CtlError(pdev, req);
  20194. 8007f86: 6839 ldr r1, [r7, #0]
  20195. 8007f88: 6878 ldr r0, [r7, #4]
  20196. 8007f8a: f000 f949 bl 8008220 <USBD_CtlError>
  20197. }
  20198. else
  20199. {
  20200. (void)USBD_CtlSendStatus(pdev);
  20201. }
  20202. break;
  20203. 8007f8e: e065 b.n 800805c <USBD_SetConfig+0x13c>
  20204. (void)USBD_CtlSendStatus(pdev);
  20205. 8007f90: 6878 ldr r0, [r7, #4]
  20206. 8007f92: f000 fa10 bl 80083b6 <USBD_CtlSendStatus>
  20207. pdev->dev_state = USBD_STATE_CONFIGURED;
  20208. 8007f96: 687b ldr r3, [r7, #4]
  20209. 8007f98: 2203 movs r2, #3
  20210. 8007f9a: f883 229c strb.w r2, [r3, #668] ; 0x29c
  20211. break;
  20212. 8007f9e: e05d b.n 800805c <USBD_SetConfig+0x13c>
  20213. (void)USBD_CtlSendStatus(pdev);
  20214. 8007fa0: 6878 ldr r0, [r7, #4]
  20215. 8007fa2: f000 fa08 bl 80083b6 <USBD_CtlSendStatus>
  20216. break;
  20217. 8007fa6: e059 b.n 800805c <USBD_SetConfig+0x13c>
  20218. case USBD_STATE_CONFIGURED:
  20219. if (cfgidx == 0U)
  20220. 8007fa8: 4b2f ldr r3, [pc, #188] ; (8008068 <USBD_SetConfig+0x148>)
  20221. 8007faa: 781b ldrb r3, [r3, #0]
  20222. 8007fac: 2b00 cmp r3, #0
  20223. 8007fae: d112 bne.n 8007fd6 <USBD_SetConfig+0xb6>
  20224. {
  20225. pdev->dev_state = USBD_STATE_ADDRESSED;
  20226. 8007fb0: 687b ldr r3, [r7, #4]
  20227. 8007fb2: 2202 movs r2, #2
  20228. 8007fb4: f883 229c strb.w r2, [r3, #668] ; 0x29c
  20229. pdev->dev_config = cfgidx;
  20230. 8007fb8: 4b2b ldr r3, [pc, #172] ; (8008068 <USBD_SetConfig+0x148>)
  20231. 8007fba: 781b ldrb r3, [r3, #0]
  20232. 8007fbc: 461a mov r2, r3
  20233. 8007fbe: 687b ldr r3, [r7, #4]
  20234. 8007fc0: 605a str r2, [r3, #4]
  20235. (void)USBD_ClrClassConfig(pdev, cfgidx);
  20236. 8007fc2: 4b29 ldr r3, [pc, #164] ; (8008068 <USBD_SetConfig+0x148>)
  20237. 8007fc4: 781b ldrb r3, [r3, #0]
  20238. 8007fc6: 4619 mov r1, r3
  20239. 8007fc8: 6878 ldr r0, [r7, #4]
  20240. 8007fca: f7ff f911 bl 80071f0 <USBD_ClrClassConfig>
  20241. (void)USBD_CtlSendStatus(pdev);
  20242. 8007fce: 6878 ldr r0, [r7, #4]
  20243. 8007fd0: f000 f9f1 bl 80083b6 <USBD_CtlSendStatus>
  20244. }
  20245. else
  20246. {
  20247. (void)USBD_CtlSendStatus(pdev);
  20248. }
  20249. break;
  20250. 8007fd4: e042 b.n 800805c <USBD_SetConfig+0x13c>
  20251. else if (cfgidx != pdev->dev_config)
  20252. 8007fd6: 4b24 ldr r3, [pc, #144] ; (8008068 <USBD_SetConfig+0x148>)
  20253. 8007fd8: 781b ldrb r3, [r3, #0]
  20254. 8007fda: 461a mov r2, r3
  20255. 8007fdc: 687b ldr r3, [r7, #4]
  20256. 8007fde: 685b ldr r3, [r3, #4]
  20257. 8007fe0: 429a cmp r2, r3
  20258. 8007fe2: d02a beq.n 800803a <USBD_SetConfig+0x11a>
  20259. (void)USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config);
  20260. 8007fe4: 687b ldr r3, [r7, #4]
  20261. 8007fe6: 685b ldr r3, [r3, #4]
  20262. 8007fe8: b2db uxtb r3, r3
  20263. 8007fea: 4619 mov r1, r3
  20264. 8007fec: 6878 ldr r0, [r7, #4]
  20265. 8007fee: f7ff f8ff bl 80071f0 <USBD_ClrClassConfig>
  20266. pdev->dev_config = cfgidx;
  20267. 8007ff2: 4b1d ldr r3, [pc, #116] ; (8008068 <USBD_SetConfig+0x148>)
  20268. 8007ff4: 781b ldrb r3, [r3, #0]
  20269. 8007ff6: 461a mov r2, r3
  20270. 8007ff8: 687b ldr r3, [r7, #4]
  20271. 8007ffa: 605a str r2, [r3, #4]
  20272. ret = USBD_SetClassConfig(pdev, cfgidx);
  20273. 8007ffc: 4b1a ldr r3, [pc, #104] ; (8008068 <USBD_SetConfig+0x148>)
  20274. 8007ffe: 781b ldrb r3, [r3, #0]
  20275. 8008000: 4619 mov r1, r3
  20276. 8008002: 6878 ldr r0, [r7, #4]
  20277. 8008004: f7ff f8d8 bl 80071b8 <USBD_SetClassConfig>
  20278. 8008008: 4603 mov r3, r0
  20279. 800800a: 73fb strb r3, [r7, #15]
  20280. if (ret != USBD_OK)
  20281. 800800c: 7bfb ldrb r3, [r7, #15]
  20282. 800800e: 2b00 cmp r3, #0
  20283. 8008010: d00f beq.n 8008032 <USBD_SetConfig+0x112>
  20284. USBD_CtlError(pdev, req);
  20285. 8008012: 6839 ldr r1, [r7, #0]
  20286. 8008014: 6878 ldr r0, [r7, #4]
  20287. 8008016: f000 f903 bl 8008220 <USBD_CtlError>
  20288. (void)USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config);
  20289. 800801a: 687b ldr r3, [r7, #4]
  20290. 800801c: 685b ldr r3, [r3, #4]
  20291. 800801e: b2db uxtb r3, r3
  20292. 8008020: 4619 mov r1, r3
  20293. 8008022: 6878 ldr r0, [r7, #4]
  20294. 8008024: f7ff f8e4 bl 80071f0 <USBD_ClrClassConfig>
  20295. pdev->dev_state = USBD_STATE_ADDRESSED;
  20296. 8008028: 687b ldr r3, [r7, #4]
  20297. 800802a: 2202 movs r2, #2
  20298. 800802c: f883 229c strb.w r2, [r3, #668] ; 0x29c
  20299. break;
  20300. 8008030: e014 b.n 800805c <USBD_SetConfig+0x13c>
  20301. (void)USBD_CtlSendStatus(pdev);
  20302. 8008032: 6878 ldr r0, [r7, #4]
  20303. 8008034: f000 f9bf bl 80083b6 <USBD_CtlSendStatus>
  20304. break;
  20305. 8008038: e010 b.n 800805c <USBD_SetConfig+0x13c>
  20306. (void)USBD_CtlSendStatus(pdev);
  20307. 800803a: 6878 ldr r0, [r7, #4]
  20308. 800803c: f000 f9bb bl 80083b6 <USBD_CtlSendStatus>
  20309. break;
  20310. 8008040: e00c b.n 800805c <USBD_SetConfig+0x13c>
  20311. default:
  20312. USBD_CtlError(pdev, req);
  20313. 8008042: 6839 ldr r1, [r7, #0]
  20314. 8008044: 6878 ldr r0, [r7, #4]
  20315. 8008046: f000 f8eb bl 8008220 <USBD_CtlError>
  20316. (void)USBD_ClrClassConfig(pdev, cfgidx);
  20317. 800804a: 4b07 ldr r3, [pc, #28] ; (8008068 <USBD_SetConfig+0x148>)
  20318. 800804c: 781b ldrb r3, [r3, #0]
  20319. 800804e: 4619 mov r1, r3
  20320. 8008050: 6878 ldr r0, [r7, #4]
  20321. 8008052: f7ff f8cd bl 80071f0 <USBD_ClrClassConfig>
  20322. ret = USBD_FAIL;
  20323. 8008056: 2303 movs r3, #3
  20324. 8008058: 73fb strb r3, [r7, #15]
  20325. break;
  20326. 800805a: bf00 nop
  20327. }
  20328. return ret;
  20329. 800805c: 7bfb ldrb r3, [r7, #15]
  20330. }
  20331. 800805e: 4618 mov r0, r3
  20332. 8008060: 3710 adds r7, #16
  20333. 8008062: 46bd mov sp, r7
  20334. 8008064: bd80 pop {r7, pc}
  20335. 8008066: bf00 nop
  20336. 8008068: 200001ac .word 0x200001ac
  20337. 0800806c <USBD_GetConfig>:
  20338. * @param pdev: device instance
  20339. * @param req: usb request
  20340. * @retval status
  20341. */
  20342. static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  20343. {
  20344. 800806c: b580 push {r7, lr}
  20345. 800806e: b082 sub sp, #8
  20346. 8008070: af00 add r7, sp, #0
  20347. 8008072: 6078 str r0, [r7, #4]
  20348. 8008074: 6039 str r1, [r7, #0]
  20349. if (req->wLength != 1U)
  20350. 8008076: 683b ldr r3, [r7, #0]
  20351. 8008078: 88db ldrh r3, [r3, #6]
  20352. 800807a: 2b01 cmp r3, #1
  20353. 800807c: d004 beq.n 8008088 <USBD_GetConfig+0x1c>
  20354. {
  20355. USBD_CtlError(pdev, req);
  20356. 800807e: 6839 ldr r1, [r7, #0]
  20357. 8008080: 6878 ldr r0, [r7, #4]
  20358. 8008082: f000 f8cd bl 8008220 <USBD_CtlError>
  20359. default:
  20360. USBD_CtlError(pdev, req);
  20361. break;
  20362. }
  20363. }
  20364. }
  20365. 8008086: e023 b.n 80080d0 <USBD_GetConfig+0x64>
  20366. switch (pdev->dev_state)
  20367. 8008088: 687b ldr r3, [r7, #4]
  20368. 800808a: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  20369. 800808e: b2db uxtb r3, r3
  20370. 8008090: 2b02 cmp r3, #2
  20371. 8008092: dc02 bgt.n 800809a <USBD_GetConfig+0x2e>
  20372. 8008094: 2b00 cmp r3, #0
  20373. 8008096: dc03 bgt.n 80080a0 <USBD_GetConfig+0x34>
  20374. 8008098: e015 b.n 80080c6 <USBD_GetConfig+0x5a>
  20375. 800809a: 2b03 cmp r3, #3
  20376. 800809c: d00b beq.n 80080b6 <USBD_GetConfig+0x4a>
  20377. 800809e: e012 b.n 80080c6 <USBD_GetConfig+0x5a>
  20378. pdev->dev_default_config = 0U;
  20379. 80080a0: 687b ldr r3, [r7, #4]
  20380. 80080a2: 2200 movs r2, #0
  20381. 80080a4: 609a str r2, [r3, #8]
  20382. (void)USBD_CtlSendData(pdev, (uint8_t *)&pdev->dev_default_config, 1U);
  20383. 80080a6: 687b ldr r3, [r7, #4]
  20384. 80080a8: 3308 adds r3, #8
  20385. 80080aa: 2201 movs r2, #1
  20386. 80080ac: 4619 mov r1, r3
  20387. 80080ae: 6878 ldr r0, [r7, #4]
  20388. 80080b0: f000 f927 bl 8008302 <USBD_CtlSendData>
  20389. break;
  20390. 80080b4: e00c b.n 80080d0 <USBD_GetConfig+0x64>
  20391. (void)USBD_CtlSendData(pdev, (uint8_t *)&pdev->dev_config, 1U);
  20392. 80080b6: 687b ldr r3, [r7, #4]
  20393. 80080b8: 3304 adds r3, #4
  20394. 80080ba: 2201 movs r2, #1
  20395. 80080bc: 4619 mov r1, r3
  20396. 80080be: 6878 ldr r0, [r7, #4]
  20397. 80080c0: f000 f91f bl 8008302 <USBD_CtlSendData>
  20398. break;
  20399. 80080c4: e004 b.n 80080d0 <USBD_GetConfig+0x64>
  20400. USBD_CtlError(pdev, req);
  20401. 80080c6: 6839 ldr r1, [r7, #0]
  20402. 80080c8: 6878 ldr r0, [r7, #4]
  20403. 80080ca: f000 f8a9 bl 8008220 <USBD_CtlError>
  20404. break;
  20405. 80080ce: bf00 nop
  20406. }
  20407. 80080d0: bf00 nop
  20408. 80080d2: 3708 adds r7, #8
  20409. 80080d4: 46bd mov sp, r7
  20410. 80080d6: bd80 pop {r7, pc}
  20411. 080080d8 <USBD_GetStatus>:
  20412. * @param pdev: device instance
  20413. * @param req: usb request
  20414. * @retval status
  20415. */
  20416. static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  20417. {
  20418. 80080d8: b580 push {r7, lr}
  20419. 80080da: b082 sub sp, #8
  20420. 80080dc: af00 add r7, sp, #0
  20421. 80080de: 6078 str r0, [r7, #4]
  20422. 80080e0: 6039 str r1, [r7, #0]
  20423. switch (pdev->dev_state)
  20424. 80080e2: 687b ldr r3, [r7, #4]
  20425. 80080e4: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  20426. 80080e8: b2db uxtb r3, r3
  20427. 80080ea: 3b01 subs r3, #1
  20428. 80080ec: 2b02 cmp r3, #2
  20429. 80080ee: d81e bhi.n 800812e <USBD_GetStatus+0x56>
  20430. {
  20431. case USBD_STATE_DEFAULT:
  20432. case USBD_STATE_ADDRESSED:
  20433. case USBD_STATE_CONFIGURED:
  20434. if (req->wLength != 0x2U)
  20435. 80080f0: 683b ldr r3, [r7, #0]
  20436. 80080f2: 88db ldrh r3, [r3, #6]
  20437. 80080f4: 2b02 cmp r3, #2
  20438. 80080f6: d004 beq.n 8008102 <USBD_GetStatus+0x2a>
  20439. {
  20440. USBD_CtlError(pdev, req);
  20441. 80080f8: 6839 ldr r1, [r7, #0]
  20442. 80080fa: 6878 ldr r0, [r7, #4]
  20443. 80080fc: f000 f890 bl 8008220 <USBD_CtlError>
  20444. break;
  20445. 8008100: e01a b.n 8008138 <USBD_GetStatus+0x60>
  20446. }
  20447. #if (USBD_SELF_POWERED == 1U)
  20448. pdev->dev_config_status = USB_CONFIG_SELF_POWERED;
  20449. 8008102: 687b ldr r3, [r7, #4]
  20450. 8008104: 2201 movs r2, #1
  20451. 8008106: 60da str r2, [r3, #12]
  20452. #else
  20453. pdev->dev_config_status = 0U;
  20454. #endif
  20455. if (pdev->dev_remote_wakeup != 0U)
  20456. 8008108: 687b ldr r3, [r7, #4]
  20457. 800810a: f8d3 32a4 ldr.w r3, [r3, #676] ; 0x2a4
  20458. 800810e: 2b00 cmp r3, #0
  20459. 8008110: d005 beq.n 800811e <USBD_GetStatus+0x46>
  20460. {
  20461. pdev->dev_config_status |= USB_CONFIG_REMOTE_WAKEUP;
  20462. 8008112: 687b ldr r3, [r7, #4]
  20463. 8008114: 68db ldr r3, [r3, #12]
  20464. 8008116: f043 0202 orr.w r2, r3, #2
  20465. 800811a: 687b ldr r3, [r7, #4]
  20466. 800811c: 60da str r2, [r3, #12]
  20467. }
  20468. (void)USBD_CtlSendData(pdev, (uint8_t *)&pdev->dev_config_status, 2U);
  20469. 800811e: 687b ldr r3, [r7, #4]
  20470. 8008120: 330c adds r3, #12
  20471. 8008122: 2202 movs r2, #2
  20472. 8008124: 4619 mov r1, r3
  20473. 8008126: 6878 ldr r0, [r7, #4]
  20474. 8008128: f000 f8eb bl 8008302 <USBD_CtlSendData>
  20475. break;
  20476. 800812c: e004 b.n 8008138 <USBD_GetStatus+0x60>
  20477. default:
  20478. USBD_CtlError(pdev, req);
  20479. 800812e: 6839 ldr r1, [r7, #0]
  20480. 8008130: 6878 ldr r0, [r7, #4]
  20481. 8008132: f000 f875 bl 8008220 <USBD_CtlError>
  20482. break;
  20483. 8008136: bf00 nop
  20484. }
  20485. }
  20486. 8008138: bf00 nop
  20487. 800813a: 3708 adds r7, #8
  20488. 800813c: 46bd mov sp, r7
  20489. 800813e: bd80 pop {r7, pc}
  20490. 08008140 <USBD_SetFeature>:
  20491. * @param pdev: device instance
  20492. * @param req: usb request
  20493. * @retval status
  20494. */
  20495. static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  20496. {
  20497. 8008140: b580 push {r7, lr}
  20498. 8008142: b082 sub sp, #8
  20499. 8008144: af00 add r7, sp, #0
  20500. 8008146: 6078 str r0, [r7, #4]
  20501. 8008148: 6039 str r1, [r7, #0]
  20502. if (req->wValue == USB_FEATURE_REMOTE_WAKEUP)
  20503. 800814a: 683b ldr r3, [r7, #0]
  20504. 800814c: 885b ldrh r3, [r3, #2]
  20505. 800814e: 2b01 cmp r3, #1
  20506. 8008150: d106 bne.n 8008160 <USBD_SetFeature+0x20>
  20507. {
  20508. pdev->dev_remote_wakeup = 1U;
  20509. 8008152: 687b ldr r3, [r7, #4]
  20510. 8008154: 2201 movs r2, #1
  20511. 8008156: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4
  20512. (void)USBD_CtlSendStatus(pdev);
  20513. 800815a: 6878 ldr r0, [r7, #4]
  20514. 800815c: f000 f92b bl 80083b6 <USBD_CtlSendStatus>
  20515. }
  20516. }
  20517. 8008160: bf00 nop
  20518. 8008162: 3708 adds r7, #8
  20519. 8008164: 46bd mov sp, r7
  20520. 8008166: bd80 pop {r7, pc}
  20521. 08008168 <USBD_ClrFeature>:
  20522. * @param pdev: device instance
  20523. * @param req: usb request
  20524. * @retval status
  20525. */
  20526. static void USBD_ClrFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  20527. {
  20528. 8008168: b580 push {r7, lr}
  20529. 800816a: b082 sub sp, #8
  20530. 800816c: af00 add r7, sp, #0
  20531. 800816e: 6078 str r0, [r7, #4]
  20532. 8008170: 6039 str r1, [r7, #0]
  20533. switch (pdev->dev_state)
  20534. 8008172: 687b ldr r3, [r7, #4]
  20535. 8008174: f893 329c ldrb.w r3, [r3, #668] ; 0x29c
  20536. 8008178: b2db uxtb r3, r3
  20537. 800817a: 3b01 subs r3, #1
  20538. 800817c: 2b02 cmp r3, #2
  20539. 800817e: d80b bhi.n 8008198 <USBD_ClrFeature+0x30>
  20540. {
  20541. case USBD_STATE_DEFAULT:
  20542. case USBD_STATE_ADDRESSED:
  20543. case USBD_STATE_CONFIGURED:
  20544. if (req->wValue == USB_FEATURE_REMOTE_WAKEUP)
  20545. 8008180: 683b ldr r3, [r7, #0]
  20546. 8008182: 885b ldrh r3, [r3, #2]
  20547. 8008184: 2b01 cmp r3, #1
  20548. 8008186: d10c bne.n 80081a2 <USBD_ClrFeature+0x3a>
  20549. {
  20550. pdev->dev_remote_wakeup = 0U;
  20551. 8008188: 687b ldr r3, [r7, #4]
  20552. 800818a: 2200 movs r2, #0
  20553. 800818c: f8c3 22a4 str.w r2, [r3, #676] ; 0x2a4
  20554. (void)USBD_CtlSendStatus(pdev);
  20555. 8008190: 6878 ldr r0, [r7, #4]
  20556. 8008192: f000 f910 bl 80083b6 <USBD_CtlSendStatus>
  20557. }
  20558. break;
  20559. 8008196: e004 b.n 80081a2 <USBD_ClrFeature+0x3a>
  20560. default:
  20561. USBD_CtlError(pdev, req);
  20562. 8008198: 6839 ldr r1, [r7, #0]
  20563. 800819a: 6878 ldr r0, [r7, #4]
  20564. 800819c: f000 f840 bl 8008220 <USBD_CtlError>
  20565. break;
  20566. 80081a0: e000 b.n 80081a4 <USBD_ClrFeature+0x3c>
  20567. break;
  20568. 80081a2: bf00 nop
  20569. }
  20570. }
  20571. 80081a4: bf00 nop
  20572. 80081a6: 3708 adds r7, #8
  20573. 80081a8: 46bd mov sp, r7
  20574. 80081aa: bd80 pop {r7, pc}
  20575. 080081ac <USBD_ParseSetupRequest>:
  20576. * @param pdev: device instance
  20577. * @param req: usb request
  20578. * @retval None
  20579. */
  20580. void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata)
  20581. {
  20582. 80081ac: b580 push {r7, lr}
  20583. 80081ae: b084 sub sp, #16
  20584. 80081b0: af00 add r7, sp, #0
  20585. 80081b2: 6078 str r0, [r7, #4]
  20586. 80081b4: 6039 str r1, [r7, #0]
  20587. uint8_t *pbuff = pdata;
  20588. 80081b6: 683b ldr r3, [r7, #0]
  20589. 80081b8: 60fb str r3, [r7, #12]
  20590. req->bmRequest = *(uint8_t *)(pbuff);
  20591. 80081ba: 68fb ldr r3, [r7, #12]
  20592. 80081bc: 781a ldrb r2, [r3, #0]
  20593. 80081be: 687b ldr r3, [r7, #4]
  20594. 80081c0: 701a strb r2, [r3, #0]
  20595. pbuff++;
  20596. 80081c2: 68fb ldr r3, [r7, #12]
  20597. 80081c4: 3301 adds r3, #1
  20598. 80081c6: 60fb str r3, [r7, #12]
  20599. req->bRequest = *(uint8_t *)(pbuff);
  20600. 80081c8: 68fb ldr r3, [r7, #12]
  20601. 80081ca: 781a ldrb r2, [r3, #0]
  20602. 80081cc: 687b ldr r3, [r7, #4]
  20603. 80081ce: 705a strb r2, [r3, #1]
  20604. pbuff++;
  20605. 80081d0: 68fb ldr r3, [r7, #12]
  20606. 80081d2: 3301 adds r3, #1
  20607. 80081d4: 60fb str r3, [r7, #12]
  20608. req->wValue = SWAPBYTE(pbuff);
  20609. 80081d6: 68f8 ldr r0, [r7, #12]
  20610. 80081d8: f7ff fa91 bl 80076fe <SWAPBYTE>
  20611. 80081dc: 4603 mov r3, r0
  20612. 80081de: 461a mov r2, r3
  20613. 80081e0: 687b ldr r3, [r7, #4]
  20614. 80081e2: 805a strh r2, [r3, #2]
  20615. pbuff++;
  20616. 80081e4: 68fb ldr r3, [r7, #12]
  20617. 80081e6: 3301 adds r3, #1
  20618. 80081e8: 60fb str r3, [r7, #12]
  20619. pbuff++;
  20620. 80081ea: 68fb ldr r3, [r7, #12]
  20621. 80081ec: 3301 adds r3, #1
  20622. 80081ee: 60fb str r3, [r7, #12]
  20623. req->wIndex = SWAPBYTE(pbuff);
  20624. 80081f0: 68f8 ldr r0, [r7, #12]
  20625. 80081f2: f7ff fa84 bl 80076fe <SWAPBYTE>
  20626. 80081f6: 4603 mov r3, r0
  20627. 80081f8: 461a mov r2, r3
  20628. 80081fa: 687b ldr r3, [r7, #4]
  20629. 80081fc: 809a strh r2, [r3, #4]
  20630. pbuff++;
  20631. 80081fe: 68fb ldr r3, [r7, #12]
  20632. 8008200: 3301 adds r3, #1
  20633. 8008202: 60fb str r3, [r7, #12]
  20634. pbuff++;
  20635. 8008204: 68fb ldr r3, [r7, #12]
  20636. 8008206: 3301 adds r3, #1
  20637. 8008208: 60fb str r3, [r7, #12]
  20638. req->wLength = SWAPBYTE(pbuff);
  20639. 800820a: 68f8 ldr r0, [r7, #12]
  20640. 800820c: f7ff fa77 bl 80076fe <SWAPBYTE>
  20641. 8008210: 4603 mov r3, r0
  20642. 8008212: 461a mov r2, r3
  20643. 8008214: 687b ldr r3, [r7, #4]
  20644. 8008216: 80da strh r2, [r3, #6]
  20645. }
  20646. 8008218: bf00 nop
  20647. 800821a: 3710 adds r7, #16
  20648. 800821c: 46bd mov sp, r7
  20649. 800821e: bd80 pop {r7, pc}
  20650. 08008220 <USBD_CtlError>:
  20651. * @param pdev: device instance
  20652. * @param req: usb request
  20653. * @retval None
  20654. */
  20655. void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
  20656. {
  20657. 8008220: b580 push {r7, lr}
  20658. 8008222: b082 sub sp, #8
  20659. 8008224: af00 add r7, sp, #0
  20660. 8008226: 6078 str r0, [r7, #4]
  20661. 8008228: 6039 str r1, [r7, #0]
  20662. UNUSED(req);
  20663. (void)USBD_LL_StallEP(pdev, 0x80U);
  20664. 800822a: 2180 movs r1, #128 ; 0x80
  20665. 800822c: 6878 ldr r0, [r7, #4]
  20666. 800822e: f000 fcef bl 8008c10 <USBD_LL_StallEP>
  20667. (void)USBD_LL_StallEP(pdev, 0U);
  20668. 8008232: 2100 movs r1, #0
  20669. 8008234: 6878 ldr r0, [r7, #4]
  20670. 8008236: f000 fceb bl 8008c10 <USBD_LL_StallEP>
  20671. }
  20672. 800823a: bf00 nop
  20673. 800823c: 3708 adds r7, #8
  20674. 800823e: 46bd mov sp, r7
  20675. 8008240: bd80 pop {r7, pc}
  20676. 08008242 <USBD_GetString>:
  20677. * @param unicode : Formatted string buffer (unicode)
  20678. * @param len : descriptor length
  20679. * @retval None
  20680. */
  20681. void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len)
  20682. {
  20683. 8008242: b580 push {r7, lr}
  20684. 8008244: b086 sub sp, #24
  20685. 8008246: af00 add r7, sp, #0
  20686. 8008248: 60f8 str r0, [r7, #12]
  20687. 800824a: 60b9 str r1, [r7, #8]
  20688. 800824c: 607a str r2, [r7, #4]
  20689. uint8_t idx = 0U;
  20690. 800824e: 2300 movs r3, #0
  20691. 8008250: 75fb strb r3, [r7, #23]
  20692. uint8_t *pdesc;
  20693. if (desc == NULL)
  20694. 8008252: 68fb ldr r3, [r7, #12]
  20695. 8008254: 2b00 cmp r3, #0
  20696. 8008256: d036 beq.n 80082c6 <USBD_GetString+0x84>
  20697. {
  20698. return;
  20699. }
  20700. pdesc = desc;
  20701. 8008258: 68fb ldr r3, [r7, #12]
  20702. 800825a: 613b str r3, [r7, #16]
  20703. *len = ((uint16_t)USBD_GetLen(pdesc) * 2U) + 2U;
  20704. 800825c: 6938 ldr r0, [r7, #16]
  20705. 800825e: f000 f836 bl 80082ce <USBD_GetLen>
  20706. 8008262: 4603 mov r3, r0
  20707. 8008264: 3301 adds r3, #1
  20708. 8008266: b29b uxth r3, r3
  20709. 8008268: 005b lsls r3, r3, #1
  20710. 800826a: b29a uxth r2, r3
  20711. 800826c: 687b ldr r3, [r7, #4]
  20712. 800826e: 801a strh r2, [r3, #0]
  20713. unicode[idx] = *(uint8_t *)len;
  20714. 8008270: 7dfb ldrb r3, [r7, #23]
  20715. 8008272: 68ba ldr r2, [r7, #8]
  20716. 8008274: 4413 add r3, r2
  20717. 8008276: 687a ldr r2, [r7, #4]
  20718. 8008278: 7812 ldrb r2, [r2, #0]
  20719. 800827a: 701a strb r2, [r3, #0]
  20720. idx++;
  20721. 800827c: 7dfb ldrb r3, [r7, #23]
  20722. 800827e: 3301 adds r3, #1
  20723. 8008280: 75fb strb r3, [r7, #23]
  20724. unicode[idx] = USB_DESC_TYPE_STRING;
  20725. 8008282: 7dfb ldrb r3, [r7, #23]
  20726. 8008284: 68ba ldr r2, [r7, #8]
  20727. 8008286: 4413 add r3, r2
  20728. 8008288: 2203 movs r2, #3
  20729. 800828a: 701a strb r2, [r3, #0]
  20730. idx++;
  20731. 800828c: 7dfb ldrb r3, [r7, #23]
  20732. 800828e: 3301 adds r3, #1
  20733. 8008290: 75fb strb r3, [r7, #23]
  20734. while (*pdesc != (uint8_t)'\0')
  20735. 8008292: e013 b.n 80082bc <USBD_GetString+0x7a>
  20736. {
  20737. unicode[idx] = *pdesc;
  20738. 8008294: 7dfb ldrb r3, [r7, #23]
  20739. 8008296: 68ba ldr r2, [r7, #8]
  20740. 8008298: 4413 add r3, r2
  20741. 800829a: 693a ldr r2, [r7, #16]
  20742. 800829c: 7812 ldrb r2, [r2, #0]
  20743. 800829e: 701a strb r2, [r3, #0]
  20744. pdesc++;
  20745. 80082a0: 693b ldr r3, [r7, #16]
  20746. 80082a2: 3301 adds r3, #1
  20747. 80082a4: 613b str r3, [r7, #16]
  20748. idx++;
  20749. 80082a6: 7dfb ldrb r3, [r7, #23]
  20750. 80082a8: 3301 adds r3, #1
  20751. 80082aa: 75fb strb r3, [r7, #23]
  20752. unicode[idx] = 0U;
  20753. 80082ac: 7dfb ldrb r3, [r7, #23]
  20754. 80082ae: 68ba ldr r2, [r7, #8]
  20755. 80082b0: 4413 add r3, r2
  20756. 80082b2: 2200 movs r2, #0
  20757. 80082b4: 701a strb r2, [r3, #0]
  20758. idx++;
  20759. 80082b6: 7dfb ldrb r3, [r7, #23]
  20760. 80082b8: 3301 adds r3, #1
  20761. 80082ba: 75fb strb r3, [r7, #23]
  20762. while (*pdesc != (uint8_t)'\0')
  20763. 80082bc: 693b ldr r3, [r7, #16]
  20764. 80082be: 781b ldrb r3, [r3, #0]
  20765. 80082c0: 2b00 cmp r3, #0
  20766. 80082c2: d1e7 bne.n 8008294 <USBD_GetString+0x52>
  20767. 80082c4: e000 b.n 80082c8 <USBD_GetString+0x86>
  20768. return;
  20769. 80082c6: bf00 nop
  20770. }
  20771. }
  20772. 80082c8: 3718 adds r7, #24
  20773. 80082ca: 46bd mov sp, r7
  20774. 80082cc: bd80 pop {r7, pc}
  20775. 080082ce <USBD_GetLen>:
  20776. * return the string length
  20777. * @param buf : pointer to the ascii string buffer
  20778. * @retval string length
  20779. */
  20780. static uint8_t USBD_GetLen(uint8_t *buf)
  20781. {
  20782. 80082ce: b480 push {r7}
  20783. 80082d0: b085 sub sp, #20
  20784. 80082d2: af00 add r7, sp, #0
  20785. 80082d4: 6078 str r0, [r7, #4]
  20786. uint8_t len = 0U;
  20787. 80082d6: 2300 movs r3, #0
  20788. 80082d8: 73fb strb r3, [r7, #15]
  20789. uint8_t *pbuff = buf;
  20790. 80082da: 687b ldr r3, [r7, #4]
  20791. 80082dc: 60bb str r3, [r7, #8]
  20792. while (*pbuff != (uint8_t)'\0')
  20793. 80082de: e005 b.n 80082ec <USBD_GetLen+0x1e>
  20794. {
  20795. len++;
  20796. 80082e0: 7bfb ldrb r3, [r7, #15]
  20797. 80082e2: 3301 adds r3, #1
  20798. 80082e4: 73fb strb r3, [r7, #15]
  20799. pbuff++;
  20800. 80082e6: 68bb ldr r3, [r7, #8]
  20801. 80082e8: 3301 adds r3, #1
  20802. 80082ea: 60bb str r3, [r7, #8]
  20803. while (*pbuff != (uint8_t)'\0')
  20804. 80082ec: 68bb ldr r3, [r7, #8]
  20805. 80082ee: 781b ldrb r3, [r3, #0]
  20806. 80082f0: 2b00 cmp r3, #0
  20807. 80082f2: d1f5 bne.n 80082e0 <USBD_GetLen+0x12>
  20808. }
  20809. return len;
  20810. 80082f4: 7bfb ldrb r3, [r7, #15]
  20811. }
  20812. 80082f6: 4618 mov r0, r3
  20813. 80082f8: 3714 adds r7, #20
  20814. 80082fa: 46bd mov sp, r7
  20815. 80082fc: f85d 7b04 ldr.w r7, [sp], #4
  20816. 8008300: 4770 bx lr
  20817. 08008302 <USBD_CtlSendData>:
  20818. * @param len: length of data to be sent
  20819. * @retval status
  20820. */
  20821. USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
  20822. uint8_t *pbuf, uint32_t len)
  20823. {
  20824. 8008302: b580 push {r7, lr}
  20825. 8008304: b084 sub sp, #16
  20826. 8008306: af00 add r7, sp, #0
  20827. 8008308: 60f8 str r0, [r7, #12]
  20828. 800830a: 60b9 str r1, [r7, #8]
  20829. 800830c: 607a str r2, [r7, #4]
  20830. /* Set EP0 State */
  20831. pdev->ep0_state = USBD_EP0_DATA_IN;
  20832. 800830e: 68fb ldr r3, [r7, #12]
  20833. 8008310: 2202 movs r2, #2
  20834. 8008312: f8c3 2294 str.w r2, [r3, #660] ; 0x294
  20835. pdev->ep_in[0].total_length = len;
  20836. 8008316: 68fb ldr r3, [r7, #12]
  20837. 8008318: 687a ldr r2, [r7, #4]
  20838. 800831a: 619a str r2, [r3, #24]
  20839. #ifdef USBD_AVOID_PACKET_SPLIT_MPS
  20840. pdev->ep_in[0].rem_length = 0U;
  20841. #else
  20842. pdev->ep_in[0].rem_length = len;
  20843. 800831c: 68fb ldr r3, [r7, #12]
  20844. 800831e: 687a ldr r2, [r7, #4]
  20845. 8008320: 61da str r2, [r3, #28]
  20846. #endif
  20847. /* Start the transfer */
  20848. (void)USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
  20849. 8008322: 687b ldr r3, [r7, #4]
  20850. 8008324: 68ba ldr r2, [r7, #8]
  20851. 8008326: 2100 movs r1, #0
  20852. 8008328: 68f8 ldr r0, [r7, #12]
  20853. 800832a: f000 fcfa bl 8008d22 <USBD_LL_Transmit>
  20854. return USBD_OK;
  20855. 800832e: 2300 movs r3, #0
  20856. }
  20857. 8008330: 4618 mov r0, r3
  20858. 8008332: 3710 adds r7, #16
  20859. 8008334: 46bd mov sp, r7
  20860. 8008336: bd80 pop {r7, pc}
  20861. 08008338 <USBD_CtlContinueSendData>:
  20862. * @param len: length of data to be sent
  20863. * @retval status
  20864. */
  20865. USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev,
  20866. uint8_t *pbuf, uint32_t len)
  20867. {
  20868. 8008338: b580 push {r7, lr}
  20869. 800833a: b084 sub sp, #16
  20870. 800833c: af00 add r7, sp, #0
  20871. 800833e: 60f8 str r0, [r7, #12]
  20872. 8008340: 60b9 str r1, [r7, #8]
  20873. 8008342: 607a str r2, [r7, #4]
  20874. /* Start the next transfer */
  20875. (void)USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
  20876. 8008344: 687b ldr r3, [r7, #4]
  20877. 8008346: 68ba ldr r2, [r7, #8]
  20878. 8008348: 2100 movs r1, #0
  20879. 800834a: 68f8 ldr r0, [r7, #12]
  20880. 800834c: f000 fce9 bl 8008d22 <USBD_LL_Transmit>
  20881. return USBD_OK;
  20882. 8008350: 2300 movs r3, #0
  20883. }
  20884. 8008352: 4618 mov r0, r3
  20885. 8008354: 3710 adds r7, #16
  20886. 8008356: 46bd mov sp, r7
  20887. 8008358: bd80 pop {r7, pc}
  20888. 0800835a <USBD_CtlPrepareRx>:
  20889. * @param len: length of data to be received
  20890. * @retval status
  20891. */
  20892. USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
  20893. uint8_t *pbuf, uint32_t len)
  20894. {
  20895. 800835a: b580 push {r7, lr}
  20896. 800835c: b084 sub sp, #16
  20897. 800835e: af00 add r7, sp, #0
  20898. 8008360: 60f8 str r0, [r7, #12]
  20899. 8008362: 60b9 str r1, [r7, #8]
  20900. 8008364: 607a str r2, [r7, #4]
  20901. /* Set EP0 State */
  20902. pdev->ep0_state = USBD_EP0_DATA_OUT;
  20903. 8008366: 68fb ldr r3, [r7, #12]
  20904. 8008368: 2203 movs r2, #3
  20905. 800836a: f8c3 2294 str.w r2, [r3, #660] ; 0x294
  20906. pdev->ep_out[0].total_length = len;
  20907. 800836e: 68fb ldr r3, [r7, #12]
  20908. 8008370: 687a ldr r2, [r7, #4]
  20909. 8008372: f8c3 2158 str.w r2, [r3, #344] ; 0x158
  20910. #ifdef USBD_AVOID_PACKET_SPLIT_MPS
  20911. pdev->ep_out[0].rem_length = 0U;
  20912. #else
  20913. pdev->ep_out[0].rem_length = len;
  20914. 8008376: 68fb ldr r3, [r7, #12]
  20915. 8008378: 687a ldr r2, [r7, #4]
  20916. 800837a: f8c3 215c str.w r2, [r3, #348] ; 0x15c
  20917. #endif
  20918. /* Start the transfer */
  20919. (void)USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
  20920. 800837e: 687b ldr r3, [r7, #4]
  20921. 8008380: 68ba ldr r2, [r7, #8]
  20922. 8008382: 2100 movs r1, #0
  20923. 8008384: 68f8 ldr r0, [r7, #12]
  20924. 8008386: f000 fced bl 8008d64 <USBD_LL_PrepareReceive>
  20925. return USBD_OK;
  20926. 800838a: 2300 movs r3, #0
  20927. }
  20928. 800838c: 4618 mov r0, r3
  20929. 800838e: 3710 adds r7, #16
  20930. 8008390: 46bd mov sp, r7
  20931. 8008392: bd80 pop {r7, pc}
  20932. 08008394 <USBD_CtlContinueRx>:
  20933. * @param len: length of data to be received
  20934. * @retval status
  20935. */
  20936. USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev,
  20937. uint8_t *pbuf, uint32_t len)
  20938. {
  20939. 8008394: b580 push {r7, lr}
  20940. 8008396: b084 sub sp, #16
  20941. 8008398: af00 add r7, sp, #0
  20942. 800839a: 60f8 str r0, [r7, #12]
  20943. 800839c: 60b9 str r1, [r7, #8]
  20944. 800839e: 607a str r2, [r7, #4]
  20945. (void)USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
  20946. 80083a0: 687b ldr r3, [r7, #4]
  20947. 80083a2: 68ba ldr r2, [r7, #8]
  20948. 80083a4: 2100 movs r1, #0
  20949. 80083a6: 68f8 ldr r0, [r7, #12]
  20950. 80083a8: f000 fcdc bl 8008d64 <USBD_LL_PrepareReceive>
  20951. return USBD_OK;
  20952. 80083ac: 2300 movs r3, #0
  20953. }
  20954. 80083ae: 4618 mov r0, r3
  20955. 80083b0: 3710 adds r7, #16
  20956. 80083b2: 46bd mov sp, r7
  20957. 80083b4: bd80 pop {r7, pc}
  20958. 080083b6 <USBD_CtlSendStatus>:
  20959. * send zero lzngth packet on the ctl pipe
  20960. * @param pdev: device instance
  20961. * @retval status
  20962. */
  20963. USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev)
  20964. {
  20965. 80083b6: b580 push {r7, lr}
  20966. 80083b8: b082 sub sp, #8
  20967. 80083ba: af00 add r7, sp, #0
  20968. 80083bc: 6078 str r0, [r7, #4]
  20969. /* Set EP0 State */
  20970. pdev->ep0_state = USBD_EP0_STATUS_IN;
  20971. 80083be: 687b ldr r3, [r7, #4]
  20972. 80083c0: 2204 movs r2, #4
  20973. 80083c2: f8c3 2294 str.w r2, [r3, #660] ; 0x294
  20974. /* Start the transfer */
  20975. (void)USBD_LL_Transmit(pdev, 0x00U, NULL, 0U);
  20976. 80083c6: 2300 movs r3, #0
  20977. 80083c8: 2200 movs r2, #0
  20978. 80083ca: 2100 movs r1, #0
  20979. 80083cc: 6878 ldr r0, [r7, #4]
  20980. 80083ce: f000 fca8 bl 8008d22 <USBD_LL_Transmit>
  20981. return USBD_OK;
  20982. 80083d2: 2300 movs r3, #0
  20983. }
  20984. 80083d4: 4618 mov r0, r3
  20985. 80083d6: 3708 adds r7, #8
  20986. 80083d8: 46bd mov sp, r7
  20987. 80083da: bd80 pop {r7, pc}
  20988. 080083dc <USBD_CtlReceiveStatus>:
  20989. * receive zero lzngth packet on the ctl pipe
  20990. * @param pdev: device instance
  20991. * @retval status
  20992. */
  20993. USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev)
  20994. {
  20995. 80083dc: b580 push {r7, lr}
  20996. 80083de: b082 sub sp, #8
  20997. 80083e0: af00 add r7, sp, #0
  20998. 80083e2: 6078 str r0, [r7, #4]
  20999. /* Set EP0 State */
  21000. pdev->ep0_state = USBD_EP0_STATUS_OUT;
  21001. 80083e4: 687b ldr r3, [r7, #4]
  21002. 80083e6: 2205 movs r2, #5
  21003. 80083e8: f8c3 2294 str.w r2, [r3, #660] ; 0x294
  21004. /* Start the transfer */
  21005. (void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
  21006. 80083ec: 2300 movs r3, #0
  21007. 80083ee: 2200 movs r2, #0
  21008. 80083f0: 2100 movs r1, #0
  21009. 80083f2: 6878 ldr r0, [r7, #4]
  21010. 80083f4: f000 fcb6 bl 8008d64 <USBD_LL_PrepareReceive>
  21011. return USBD_OK;
  21012. 80083f8: 2300 movs r3, #0
  21013. }
  21014. 80083fa: 4618 mov r0, r3
  21015. 80083fc: 3708 adds r7, #8
  21016. 80083fe: 46bd mov sp, r7
  21017. 8008400: bd80 pop {r7, pc}
  21018. ...
  21019. 08008404 <MX_USB_DEVICE_Init>:
  21020. /**
  21021. * Init USB device Library, add supported class and start the library
  21022. * @retval None
  21023. */
  21024. void MX_USB_DEVICE_Init(void)
  21025. {
  21026. 8008404: b580 push {r7, lr}
  21027. 8008406: af00 add r7, sp, #0
  21028. /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */
  21029. /* USER CODE END USB_DEVICE_Init_PreTreatment */
  21030. /* Init Device Library, add supported class and start the library. */
  21031. if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK)
  21032. 8008408: 2200 movs r2, #0
  21033. 800840a: 4912 ldr r1, [pc, #72] ; (8008454 <MX_USB_DEVICE_Init+0x50>)
  21034. 800840c: 4812 ldr r0, [pc, #72] ; (8008458 <MX_USB_DEVICE_Init+0x54>)
  21035. 800840e: f7fe fe65 bl 80070dc <USBD_Init>
  21036. 8008412: 4603 mov r3, r0
  21037. 8008414: 2b00 cmp r3, #0
  21038. 8008416: d001 beq.n 800841c <MX_USB_DEVICE_Init+0x18>
  21039. {
  21040. Error_Handler();
  21041. 8008418: f7f8 fc22 bl 8000c60 <Error_Handler>
  21042. }
  21043. if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK)
  21044. 800841c: 490f ldr r1, [pc, #60] ; (800845c <MX_USB_DEVICE_Init+0x58>)
  21045. 800841e: 480e ldr r0, [pc, #56] ; (8008458 <MX_USB_DEVICE_Init+0x54>)
  21046. 8008420: f7fe fe8c bl 800713c <USBD_RegisterClass>
  21047. 8008424: 4603 mov r3, r0
  21048. 8008426: 2b00 cmp r3, #0
  21049. 8008428: d001 beq.n 800842e <MX_USB_DEVICE_Init+0x2a>
  21050. {
  21051. Error_Handler();
  21052. 800842a: f7f8 fc19 bl 8000c60 <Error_Handler>
  21053. }
  21054. if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK)
  21055. 800842e: 490c ldr r1, [pc, #48] ; (8008460 <MX_USB_DEVICE_Init+0x5c>)
  21056. 8008430: 4809 ldr r0, [pc, #36] ; (8008458 <MX_USB_DEVICE_Init+0x54>)
  21057. 8008432: f7fe fddd bl 8006ff0 <USBD_CDC_RegisterInterface>
  21058. 8008436: 4603 mov r3, r0
  21059. 8008438: 2b00 cmp r3, #0
  21060. 800843a: d001 beq.n 8008440 <MX_USB_DEVICE_Init+0x3c>
  21061. {
  21062. Error_Handler();
  21063. 800843c: f7f8 fc10 bl 8000c60 <Error_Handler>
  21064. }
  21065. if (USBD_Start(&hUsbDeviceFS) != USBD_OK)
  21066. 8008440: 4805 ldr r0, [pc, #20] ; (8008458 <MX_USB_DEVICE_Init+0x54>)
  21067. 8008442: f7fe fea2 bl 800718a <USBD_Start>
  21068. 8008446: 4603 mov r3, r0
  21069. 8008448: 2b00 cmp r3, #0
  21070. 800844a: d001 beq.n 8008450 <MX_USB_DEVICE_Init+0x4c>
  21071. {
  21072. Error_Handler();
  21073. 800844c: f7f8 fc08 bl 8000c60 <Error_Handler>
  21074. }
  21075. /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */
  21076. /* USER CODE END USB_DEVICE_Init_PostTreatment */
  21077. }
  21078. 8008450: bf00 nop
  21079. 8008452: bd80 pop {r7, pc}
  21080. 8008454: 20000130 .word 0x20000130
  21081. 8008458: 20000624 .word 0x20000624
  21082. 800845c: 20000018 .word 0x20000018
  21083. 8008460: 2000011c .word 0x2000011c
  21084. 08008464 <CDC_Init_FS>:
  21085. /**
  21086. * @brief Initializes the CDC media low layer over the FS USB IP
  21087. * @retval USBD_OK if all operations are OK else USBD_FAIL
  21088. */
  21089. static int8_t CDC_Init_FS(void)
  21090. {
  21091. 8008464: b580 push {r7, lr}
  21092. 8008466: af00 add r7, sp, #0
  21093. /* USER CODE BEGIN 3 */
  21094. /* Set Application Buffers */
  21095. USBD_CDC_SetTxBuffer(&hUsbDeviceFS, UserTxBufferFS, 0);
  21096. 8008468: 2200 movs r2, #0
  21097. 800846a: 4905 ldr r1, [pc, #20] ; (8008480 <CDC_Init_FS+0x1c>)
  21098. 800846c: 4805 ldr r0, [pc, #20] ; (8008484 <CDC_Init_FS+0x20>)
  21099. 800846e: f7fe fdd4 bl 800701a <USBD_CDC_SetTxBuffer>
  21100. USBD_CDC_SetRxBuffer(&hUsbDeviceFS, UserRxBufferFS);
  21101. 8008472: 4905 ldr r1, [pc, #20] ; (8008488 <CDC_Init_FS+0x24>)
  21102. 8008474: 4803 ldr r0, [pc, #12] ; (8008484 <CDC_Init_FS+0x20>)
  21103. 8008476: f7fe fdee bl 8007056 <USBD_CDC_SetRxBuffer>
  21104. return (USBD_OK);
  21105. 800847a: 2300 movs r3, #0
  21106. /* USER CODE END 3 */
  21107. }
  21108. 800847c: 4618 mov r0, r3
  21109. 800847e: bd80 pop {r7, pc}
  21110. 8008480: 200010f4 .word 0x200010f4
  21111. 8008484: 20000624 .word 0x20000624
  21112. 8008488: 200008f4 .word 0x200008f4
  21113. 0800848c <CDC_DeInit_FS>:
  21114. /**
  21115. * @brief DeInitializes the CDC media low layer
  21116. * @retval USBD_OK if all operations are OK else USBD_FAIL
  21117. */
  21118. static int8_t CDC_DeInit_FS(void)
  21119. {
  21120. 800848c: b480 push {r7}
  21121. 800848e: af00 add r7, sp, #0
  21122. /* USER CODE BEGIN 4 */
  21123. return (USBD_OK);
  21124. 8008490: 2300 movs r3, #0
  21125. /* USER CODE END 4 */
  21126. }
  21127. 8008492: 4618 mov r0, r3
  21128. 8008494: 46bd mov sp, r7
  21129. 8008496: f85d 7b04 ldr.w r7, [sp], #4
  21130. 800849a: 4770 bx lr
  21131. 0800849c <CDC_Control_FS>:
  21132. * @param pbuf: Buffer containing command data (request parameters)
  21133. * @param length: Number of data to be sent (in bytes)
  21134. * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
  21135. */
  21136. static int8_t CDC_Control_FS(uint8_t cmd, uint8_t* pbuf, uint16_t length)
  21137. {
  21138. 800849c: b480 push {r7}
  21139. 800849e: b083 sub sp, #12
  21140. 80084a0: af00 add r7, sp, #0
  21141. 80084a2: 4603 mov r3, r0
  21142. 80084a4: 6039 str r1, [r7, #0]
  21143. 80084a6: 71fb strb r3, [r7, #7]
  21144. 80084a8: 4613 mov r3, r2
  21145. 80084aa: 80bb strh r3, [r7, #4]
  21146. /* USER CODE BEGIN 5 */
  21147. switch(cmd)
  21148. 80084ac: 79fb ldrb r3, [r7, #7]
  21149. 80084ae: 2b23 cmp r3, #35 ; 0x23
  21150. 80084b0: d84a bhi.n 8008548 <CDC_Control_FS+0xac>
  21151. 80084b2: a201 add r2, pc, #4 ; (adr r2, 80084b8 <CDC_Control_FS+0x1c>)
  21152. 80084b4: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  21153. 80084b8: 08008549 .word 0x08008549
  21154. 80084bc: 08008549 .word 0x08008549
  21155. 80084c0: 08008549 .word 0x08008549
  21156. 80084c4: 08008549 .word 0x08008549
  21157. 80084c8: 08008549 .word 0x08008549
  21158. 80084cc: 08008549 .word 0x08008549
  21159. 80084d0: 08008549 .word 0x08008549
  21160. 80084d4: 08008549 .word 0x08008549
  21161. 80084d8: 08008549 .word 0x08008549
  21162. 80084dc: 08008549 .word 0x08008549
  21163. 80084e0: 08008549 .word 0x08008549
  21164. 80084e4: 08008549 .word 0x08008549
  21165. 80084e8: 08008549 .word 0x08008549
  21166. 80084ec: 08008549 .word 0x08008549
  21167. 80084f0: 08008549 .word 0x08008549
  21168. 80084f4: 08008549 .word 0x08008549
  21169. 80084f8: 08008549 .word 0x08008549
  21170. 80084fc: 08008549 .word 0x08008549
  21171. 8008500: 08008549 .word 0x08008549
  21172. 8008504: 08008549 .word 0x08008549
  21173. 8008508: 08008549 .word 0x08008549
  21174. 800850c: 08008549 .word 0x08008549
  21175. 8008510: 08008549 .word 0x08008549
  21176. 8008514: 08008549 .word 0x08008549
  21177. 8008518: 08008549 .word 0x08008549
  21178. 800851c: 08008549 .word 0x08008549
  21179. 8008520: 08008549 .word 0x08008549
  21180. 8008524: 08008549 .word 0x08008549
  21181. 8008528: 08008549 .word 0x08008549
  21182. 800852c: 08008549 .word 0x08008549
  21183. 8008530: 08008549 .word 0x08008549
  21184. 8008534: 08008549 .word 0x08008549
  21185. 8008538: 08008549 .word 0x08008549
  21186. 800853c: 08008549 .word 0x08008549
  21187. 8008540: 08008549 .word 0x08008549
  21188. 8008544: 08008549 .word 0x08008549
  21189. case CDC_SEND_BREAK:
  21190. break;
  21191. default:
  21192. break;
  21193. 8008548: bf00 nop
  21194. }
  21195. return (USBD_OK);
  21196. 800854a: 2300 movs r3, #0
  21197. /* USER CODE END 5 */
  21198. }
  21199. 800854c: 4618 mov r0, r3
  21200. 800854e: 370c adds r7, #12
  21201. 8008550: 46bd mov sp, r7
  21202. 8008552: f85d 7b04 ldr.w r7, [sp], #4
  21203. 8008556: 4770 bx lr
  21204. 08008558 <CDC_Receive_FS>:
  21205. * @param Buf: Buffer of data to be received
  21206. * @param Len: Number of data received (in bytes)
  21207. * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
  21208. */
  21209. static int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len)
  21210. {
  21211. 8008558: b580 push {r7, lr}
  21212. 800855a: b082 sub sp, #8
  21213. 800855c: af00 add r7, sp, #0
  21214. 800855e: 6078 str r0, [r7, #4]
  21215. 8008560: 6039 str r1, [r7, #0]
  21216. /* USER CODE BEGIN 6 */
  21217. USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]);
  21218. 8008562: 6879 ldr r1, [r7, #4]
  21219. 8008564: 4805 ldr r0, [pc, #20] ; (800857c <CDC_Receive_FS+0x24>)
  21220. 8008566: f7fe fd76 bl 8007056 <USBD_CDC_SetRxBuffer>
  21221. USBD_CDC_ReceivePacket(&hUsbDeviceFS);
  21222. 800856a: 4804 ldr r0, [pc, #16] ; (800857c <CDC_Receive_FS+0x24>)
  21223. 800856c: f7fe fd8c bl 8007088 <USBD_CDC_ReceivePacket>
  21224. return (USBD_OK);
  21225. 8008570: 2300 movs r3, #0
  21226. /* USER CODE END 6 */
  21227. }
  21228. 8008572: 4618 mov r0, r3
  21229. 8008574: 3708 adds r7, #8
  21230. 8008576: 46bd mov sp, r7
  21231. 8008578: bd80 pop {r7, pc}
  21232. 800857a: bf00 nop
  21233. 800857c: 20000624 .word 0x20000624
  21234. 08008580 <CDC_TransmitCplt_FS>:
  21235. * @param Buf: Buffer of data to be received
  21236. * @param Len: Number of data received (in bytes)
  21237. * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
  21238. */
  21239. static int8_t CDC_TransmitCplt_FS(uint8_t *Buf, uint32_t *Len, uint8_t epnum)
  21240. {
  21241. 8008580: b480 push {r7}
  21242. 8008582: b087 sub sp, #28
  21243. 8008584: af00 add r7, sp, #0
  21244. 8008586: 60f8 str r0, [r7, #12]
  21245. 8008588: 60b9 str r1, [r7, #8]
  21246. 800858a: 4613 mov r3, r2
  21247. 800858c: 71fb strb r3, [r7, #7]
  21248. uint8_t result = USBD_OK;
  21249. 800858e: 2300 movs r3, #0
  21250. 8008590: 75fb strb r3, [r7, #23]
  21251. /* USER CODE BEGIN 13 */
  21252. UNUSED(Buf);
  21253. UNUSED(Len);
  21254. UNUSED(epnum);
  21255. /* USER CODE END 13 */
  21256. return result;
  21257. 8008592: f997 3017 ldrsb.w r3, [r7, #23]
  21258. }
  21259. 8008596: 4618 mov r0, r3
  21260. 8008598: 371c adds r7, #28
  21261. 800859a: 46bd mov sp, r7
  21262. 800859c: f85d 7b04 ldr.w r7, [sp], #4
  21263. 80085a0: 4770 bx lr
  21264. ...
  21265. 080085a4 <USBD_FS_DeviceDescriptor>:
  21266. * @param speed : Current device speed
  21267. * @param length : Pointer to data length variable
  21268. * @retval Pointer to descriptor buffer
  21269. */
  21270. uint8_t * USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21271. {
  21272. 80085a4: b480 push {r7}
  21273. 80085a6: b083 sub sp, #12
  21274. 80085a8: af00 add r7, sp, #0
  21275. 80085aa: 4603 mov r3, r0
  21276. 80085ac: 6039 str r1, [r7, #0]
  21277. 80085ae: 71fb strb r3, [r7, #7]
  21278. UNUSED(speed);
  21279. *length = sizeof(USBD_FS_DeviceDesc);
  21280. 80085b0: 683b ldr r3, [r7, #0]
  21281. 80085b2: 2212 movs r2, #18
  21282. 80085b4: 801a strh r2, [r3, #0]
  21283. return USBD_FS_DeviceDesc;
  21284. 80085b6: 4b03 ldr r3, [pc, #12] ; (80085c4 <USBD_FS_DeviceDescriptor+0x20>)
  21285. }
  21286. 80085b8: 4618 mov r0, r3
  21287. 80085ba: 370c adds r7, #12
  21288. 80085bc: 46bd mov sp, r7
  21289. 80085be: f85d 7b04 ldr.w r7, [sp], #4
  21290. 80085c2: 4770 bx lr
  21291. 80085c4: 20000150 .word 0x20000150
  21292. 080085c8 <USBD_FS_LangIDStrDescriptor>:
  21293. * @param speed : Current device speed
  21294. * @param length : Pointer to data length variable
  21295. * @retval Pointer to descriptor buffer
  21296. */
  21297. uint8_t * USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21298. {
  21299. 80085c8: b480 push {r7}
  21300. 80085ca: b083 sub sp, #12
  21301. 80085cc: af00 add r7, sp, #0
  21302. 80085ce: 4603 mov r3, r0
  21303. 80085d0: 6039 str r1, [r7, #0]
  21304. 80085d2: 71fb strb r3, [r7, #7]
  21305. UNUSED(speed);
  21306. *length = sizeof(USBD_LangIDDesc);
  21307. 80085d4: 683b ldr r3, [r7, #0]
  21308. 80085d6: 2204 movs r2, #4
  21309. 80085d8: 801a strh r2, [r3, #0]
  21310. return USBD_LangIDDesc;
  21311. 80085da: 4b03 ldr r3, [pc, #12] ; (80085e8 <USBD_FS_LangIDStrDescriptor+0x20>)
  21312. }
  21313. 80085dc: 4618 mov r0, r3
  21314. 80085de: 370c adds r7, #12
  21315. 80085e0: 46bd mov sp, r7
  21316. 80085e2: f85d 7b04 ldr.w r7, [sp], #4
  21317. 80085e6: 4770 bx lr
  21318. 80085e8: 20000170 .word 0x20000170
  21319. 080085ec <USBD_FS_ProductStrDescriptor>:
  21320. * @param speed : Current device speed
  21321. * @param length : Pointer to data length variable
  21322. * @retval Pointer to descriptor buffer
  21323. */
  21324. uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21325. {
  21326. 80085ec: b580 push {r7, lr}
  21327. 80085ee: b082 sub sp, #8
  21328. 80085f0: af00 add r7, sp, #0
  21329. 80085f2: 4603 mov r3, r0
  21330. 80085f4: 6039 str r1, [r7, #0]
  21331. 80085f6: 71fb strb r3, [r7, #7]
  21332. if(speed == 0)
  21333. 80085f8: 79fb ldrb r3, [r7, #7]
  21334. 80085fa: 2b00 cmp r3, #0
  21335. 80085fc: d105 bne.n 800860a <USBD_FS_ProductStrDescriptor+0x1e>
  21336. {
  21337. USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
  21338. 80085fe: 683a ldr r2, [r7, #0]
  21339. 8008600: 4907 ldr r1, [pc, #28] ; (8008620 <USBD_FS_ProductStrDescriptor+0x34>)
  21340. 8008602: 4808 ldr r0, [pc, #32] ; (8008624 <USBD_FS_ProductStrDescriptor+0x38>)
  21341. 8008604: f7ff fe1d bl 8008242 <USBD_GetString>
  21342. 8008608: e004 b.n 8008614 <USBD_FS_ProductStrDescriptor+0x28>
  21343. }
  21344. else
  21345. {
  21346. USBD_GetString((uint8_t *)USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
  21347. 800860a: 683a ldr r2, [r7, #0]
  21348. 800860c: 4904 ldr r1, [pc, #16] ; (8008620 <USBD_FS_ProductStrDescriptor+0x34>)
  21349. 800860e: 4805 ldr r0, [pc, #20] ; (8008624 <USBD_FS_ProductStrDescriptor+0x38>)
  21350. 8008610: f7ff fe17 bl 8008242 <USBD_GetString>
  21351. }
  21352. return USBD_StrDesc;
  21353. 8008614: 4b02 ldr r3, [pc, #8] ; (8008620 <USBD_FS_ProductStrDescriptor+0x34>)
  21354. }
  21355. 8008616: 4618 mov r0, r3
  21356. 8008618: 3708 adds r7, #8
  21357. 800861a: 46bd mov sp, r7
  21358. 800861c: bd80 pop {r7, pc}
  21359. 800861e: bf00 nop
  21360. 8008620: 200018f4 .word 0x200018f4
  21361. 8008624: 08008f60 .word 0x08008f60
  21362. 08008628 <USBD_FS_ManufacturerStrDescriptor>:
  21363. * @param speed : Current device speed
  21364. * @param length : Pointer to data length variable
  21365. * @retval Pointer to descriptor buffer
  21366. */
  21367. uint8_t * USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21368. {
  21369. 8008628: b580 push {r7, lr}
  21370. 800862a: b082 sub sp, #8
  21371. 800862c: af00 add r7, sp, #0
  21372. 800862e: 4603 mov r3, r0
  21373. 8008630: 6039 str r1, [r7, #0]
  21374. 8008632: 71fb strb r3, [r7, #7]
  21375. UNUSED(speed);
  21376. USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
  21377. 8008634: 683a ldr r2, [r7, #0]
  21378. 8008636: 4904 ldr r1, [pc, #16] ; (8008648 <USBD_FS_ManufacturerStrDescriptor+0x20>)
  21379. 8008638: 4804 ldr r0, [pc, #16] ; (800864c <USBD_FS_ManufacturerStrDescriptor+0x24>)
  21380. 800863a: f7ff fe02 bl 8008242 <USBD_GetString>
  21381. return USBD_StrDesc;
  21382. 800863e: 4b02 ldr r3, [pc, #8] ; (8008648 <USBD_FS_ManufacturerStrDescriptor+0x20>)
  21383. }
  21384. 8008640: 4618 mov r0, r3
  21385. 8008642: 3708 adds r7, #8
  21386. 8008644: 46bd mov sp, r7
  21387. 8008646: bd80 pop {r7, pc}
  21388. 8008648: 200018f4 .word 0x200018f4
  21389. 800864c: 08008f78 .word 0x08008f78
  21390. 08008650 <USBD_FS_SerialStrDescriptor>:
  21391. * @param speed : Current device speed
  21392. * @param length : Pointer to data length variable
  21393. * @retval Pointer to descriptor buffer
  21394. */
  21395. uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21396. {
  21397. 8008650: b580 push {r7, lr}
  21398. 8008652: b082 sub sp, #8
  21399. 8008654: af00 add r7, sp, #0
  21400. 8008656: 4603 mov r3, r0
  21401. 8008658: 6039 str r1, [r7, #0]
  21402. 800865a: 71fb strb r3, [r7, #7]
  21403. UNUSED(speed);
  21404. *length = USB_SIZ_STRING_SERIAL;
  21405. 800865c: 683b ldr r3, [r7, #0]
  21406. 800865e: 221a movs r2, #26
  21407. 8008660: 801a strh r2, [r3, #0]
  21408. /* Update the serial number string descriptor with the data from the unique
  21409. * ID */
  21410. Get_SerialNum();
  21411. 8008662: f000 f855 bl 8008710 <Get_SerialNum>
  21412. /* USER CODE BEGIN USBD_FS_SerialStrDescriptor */
  21413. /* USER CODE END USBD_FS_SerialStrDescriptor */
  21414. return (uint8_t *) USBD_StringSerial;
  21415. 8008666: 4b02 ldr r3, [pc, #8] ; (8008670 <USBD_FS_SerialStrDescriptor+0x20>)
  21416. }
  21417. 8008668: 4618 mov r0, r3
  21418. 800866a: 3708 adds r7, #8
  21419. 800866c: 46bd mov sp, r7
  21420. 800866e: bd80 pop {r7, pc}
  21421. 8008670: 20000174 .word 0x20000174
  21422. 08008674 <USBD_FS_ConfigStrDescriptor>:
  21423. * @param speed : Current device speed
  21424. * @param length : Pointer to data length variable
  21425. * @retval Pointer to descriptor buffer
  21426. */
  21427. uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21428. {
  21429. 8008674: b580 push {r7, lr}
  21430. 8008676: b082 sub sp, #8
  21431. 8008678: af00 add r7, sp, #0
  21432. 800867a: 4603 mov r3, r0
  21433. 800867c: 6039 str r1, [r7, #0]
  21434. 800867e: 71fb strb r3, [r7, #7]
  21435. if(speed == USBD_SPEED_HIGH)
  21436. 8008680: 79fb ldrb r3, [r7, #7]
  21437. 8008682: 2b00 cmp r3, #0
  21438. 8008684: d105 bne.n 8008692 <USBD_FS_ConfigStrDescriptor+0x1e>
  21439. {
  21440. USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
  21441. 8008686: 683a ldr r2, [r7, #0]
  21442. 8008688: 4907 ldr r1, [pc, #28] ; (80086a8 <USBD_FS_ConfigStrDescriptor+0x34>)
  21443. 800868a: 4808 ldr r0, [pc, #32] ; (80086ac <USBD_FS_ConfigStrDescriptor+0x38>)
  21444. 800868c: f7ff fdd9 bl 8008242 <USBD_GetString>
  21445. 8008690: e004 b.n 800869c <USBD_FS_ConfigStrDescriptor+0x28>
  21446. }
  21447. else
  21448. {
  21449. USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
  21450. 8008692: 683a ldr r2, [r7, #0]
  21451. 8008694: 4904 ldr r1, [pc, #16] ; (80086a8 <USBD_FS_ConfigStrDescriptor+0x34>)
  21452. 8008696: 4805 ldr r0, [pc, #20] ; (80086ac <USBD_FS_ConfigStrDescriptor+0x38>)
  21453. 8008698: f7ff fdd3 bl 8008242 <USBD_GetString>
  21454. }
  21455. return USBD_StrDesc;
  21456. 800869c: 4b02 ldr r3, [pc, #8] ; (80086a8 <USBD_FS_ConfigStrDescriptor+0x34>)
  21457. }
  21458. 800869e: 4618 mov r0, r3
  21459. 80086a0: 3708 adds r7, #8
  21460. 80086a2: 46bd mov sp, r7
  21461. 80086a4: bd80 pop {r7, pc}
  21462. 80086a6: bf00 nop
  21463. 80086a8: 200018f4 .word 0x200018f4
  21464. 80086ac: 08008f8c .word 0x08008f8c
  21465. 080086b0 <USBD_FS_InterfaceStrDescriptor>:
  21466. * @param speed : Current device speed
  21467. * @param length : Pointer to data length variable
  21468. * @retval Pointer to descriptor buffer
  21469. */
  21470. uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21471. {
  21472. 80086b0: b580 push {r7, lr}
  21473. 80086b2: b082 sub sp, #8
  21474. 80086b4: af00 add r7, sp, #0
  21475. 80086b6: 4603 mov r3, r0
  21476. 80086b8: 6039 str r1, [r7, #0]
  21477. 80086ba: 71fb strb r3, [r7, #7]
  21478. if(speed == 0)
  21479. 80086bc: 79fb ldrb r3, [r7, #7]
  21480. 80086be: 2b00 cmp r3, #0
  21481. 80086c0: d105 bne.n 80086ce <USBD_FS_InterfaceStrDescriptor+0x1e>
  21482. {
  21483. USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
  21484. 80086c2: 683a ldr r2, [r7, #0]
  21485. 80086c4: 4907 ldr r1, [pc, #28] ; (80086e4 <USBD_FS_InterfaceStrDescriptor+0x34>)
  21486. 80086c6: 4808 ldr r0, [pc, #32] ; (80086e8 <USBD_FS_InterfaceStrDescriptor+0x38>)
  21487. 80086c8: f7ff fdbb bl 8008242 <USBD_GetString>
  21488. 80086cc: e004 b.n 80086d8 <USBD_FS_InterfaceStrDescriptor+0x28>
  21489. }
  21490. else
  21491. {
  21492. USBD_GetString((uint8_t *)USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
  21493. 80086ce: 683a ldr r2, [r7, #0]
  21494. 80086d0: 4904 ldr r1, [pc, #16] ; (80086e4 <USBD_FS_InterfaceStrDescriptor+0x34>)
  21495. 80086d2: 4805 ldr r0, [pc, #20] ; (80086e8 <USBD_FS_InterfaceStrDescriptor+0x38>)
  21496. 80086d4: f7ff fdb5 bl 8008242 <USBD_GetString>
  21497. }
  21498. return USBD_StrDesc;
  21499. 80086d8: 4b02 ldr r3, [pc, #8] ; (80086e4 <USBD_FS_InterfaceStrDescriptor+0x34>)
  21500. }
  21501. 80086da: 4618 mov r0, r3
  21502. 80086dc: 3708 adds r7, #8
  21503. 80086de: 46bd mov sp, r7
  21504. 80086e0: bd80 pop {r7, pc}
  21505. 80086e2: bf00 nop
  21506. 80086e4: 200018f4 .word 0x200018f4
  21507. 80086e8: 08008f98 .word 0x08008f98
  21508. 080086ec <USBD_FS_USR_BOSDescriptor>:
  21509. * @param speed : Current device speed
  21510. * @param length : Pointer to data length variable
  21511. * @retval Pointer to descriptor buffer
  21512. */
  21513. uint8_t * USBD_FS_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
  21514. {
  21515. 80086ec: b480 push {r7}
  21516. 80086ee: b083 sub sp, #12
  21517. 80086f0: af00 add r7, sp, #0
  21518. 80086f2: 4603 mov r3, r0
  21519. 80086f4: 6039 str r1, [r7, #0]
  21520. 80086f6: 71fb strb r3, [r7, #7]
  21521. UNUSED(speed);
  21522. *length = sizeof(USBD_FS_BOSDesc);
  21523. 80086f8: 683b ldr r3, [r7, #0]
  21524. 80086fa: 220c movs r2, #12
  21525. 80086fc: 801a strh r2, [r3, #0]
  21526. return (uint8_t*)USBD_FS_BOSDesc;
  21527. 80086fe: 4b03 ldr r3, [pc, #12] ; (800870c <USBD_FS_USR_BOSDescriptor+0x20>)
  21528. }
  21529. 8008700: 4618 mov r0, r3
  21530. 8008702: 370c adds r7, #12
  21531. 8008704: 46bd mov sp, r7
  21532. 8008706: f85d 7b04 ldr.w r7, [sp], #4
  21533. 800870a: 4770 bx lr
  21534. 800870c: 20000164 .word 0x20000164
  21535. 08008710 <Get_SerialNum>:
  21536. * @brief Create the serial number string descriptor
  21537. * @param None
  21538. * @retval None
  21539. */
  21540. static void Get_SerialNum(void)
  21541. {
  21542. 8008710: b580 push {r7, lr}
  21543. 8008712: b084 sub sp, #16
  21544. 8008714: af00 add r7, sp, #0
  21545. uint32_t deviceserial0, deviceserial1, deviceserial2;
  21546. deviceserial0 = *(uint32_t *) DEVICE_ID1;
  21547. 8008716: 4b0f ldr r3, [pc, #60] ; (8008754 <Get_SerialNum+0x44>)
  21548. 8008718: 681b ldr r3, [r3, #0]
  21549. 800871a: 60fb str r3, [r7, #12]
  21550. deviceserial1 = *(uint32_t *) DEVICE_ID2;
  21551. 800871c: 4b0e ldr r3, [pc, #56] ; (8008758 <Get_SerialNum+0x48>)
  21552. 800871e: 681b ldr r3, [r3, #0]
  21553. 8008720: 60bb str r3, [r7, #8]
  21554. deviceserial2 = *(uint32_t *) DEVICE_ID3;
  21555. 8008722: 4b0e ldr r3, [pc, #56] ; (800875c <Get_SerialNum+0x4c>)
  21556. 8008724: 681b ldr r3, [r3, #0]
  21557. 8008726: 607b str r3, [r7, #4]
  21558. deviceserial0 += deviceserial2;
  21559. 8008728: 68fa ldr r2, [r7, #12]
  21560. 800872a: 687b ldr r3, [r7, #4]
  21561. 800872c: 4413 add r3, r2
  21562. 800872e: 60fb str r3, [r7, #12]
  21563. if (deviceserial0 != 0)
  21564. 8008730: 68fb ldr r3, [r7, #12]
  21565. 8008732: 2b00 cmp r3, #0
  21566. 8008734: d009 beq.n 800874a <Get_SerialNum+0x3a>
  21567. {
  21568. IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);
  21569. 8008736: 2208 movs r2, #8
  21570. 8008738: 4909 ldr r1, [pc, #36] ; (8008760 <Get_SerialNum+0x50>)
  21571. 800873a: 68f8 ldr r0, [r7, #12]
  21572. 800873c: f000 f814 bl 8008768 <IntToUnicode>
  21573. IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);
  21574. 8008740: 2204 movs r2, #4
  21575. 8008742: 4908 ldr r1, [pc, #32] ; (8008764 <Get_SerialNum+0x54>)
  21576. 8008744: 68b8 ldr r0, [r7, #8]
  21577. 8008746: f000 f80f bl 8008768 <IntToUnicode>
  21578. }
  21579. }
  21580. 800874a: bf00 nop
  21581. 800874c: 3710 adds r7, #16
  21582. 800874e: 46bd mov sp, r7
  21583. 8008750: bd80 pop {r7, pc}
  21584. 8008752: bf00 nop
  21585. 8008754: 1fff7a10 .word 0x1fff7a10
  21586. 8008758: 1fff7a14 .word 0x1fff7a14
  21587. 800875c: 1fff7a18 .word 0x1fff7a18
  21588. 8008760: 20000176 .word 0x20000176
  21589. 8008764: 20000186 .word 0x20000186
  21590. 08008768 <IntToUnicode>:
  21591. * @param pbuf: pointer to the buffer
  21592. * @param len: buffer length
  21593. * @retval None
  21594. */
  21595. static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len)
  21596. {
  21597. 8008768: b480 push {r7}
  21598. 800876a: b087 sub sp, #28
  21599. 800876c: af00 add r7, sp, #0
  21600. 800876e: 60f8 str r0, [r7, #12]
  21601. 8008770: 60b9 str r1, [r7, #8]
  21602. 8008772: 4613 mov r3, r2
  21603. 8008774: 71fb strb r3, [r7, #7]
  21604. uint8_t idx = 0;
  21605. 8008776: 2300 movs r3, #0
  21606. 8008778: 75fb strb r3, [r7, #23]
  21607. for (idx = 0; idx < len; idx++)
  21608. 800877a: 2300 movs r3, #0
  21609. 800877c: 75fb strb r3, [r7, #23]
  21610. 800877e: e027 b.n 80087d0 <IntToUnicode+0x68>
  21611. {
  21612. if (((value >> 28)) < 0xA)
  21613. 8008780: 68fb ldr r3, [r7, #12]
  21614. 8008782: 0f1b lsrs r3, r3, #28
  21615. 8008784: 2b09 cmp r3, #9
  21616. 8008786: d80b bhi.n 80087a0 <IntToUnicode+0x38>
  21617. {
  21618. pbuf[2 * idx] = (value >> 28) + '0';
  21619. 8008788: 68fb ldr r3, [r7, #12]
  21620. 800878a: 0f1b lsrs r3, r3, #28
  21621. 800878c: b2da uxtb r2, r3
  21622. 800878e: 7dfb ldrb r3, [r7, #23]
  21623. 8008790: 005b lsls r3, r3, #1
  21624. 8008792: 4619 mov r1, r3
  21625. 8008794: 68bb ldr r3, [r7, #8]
  21626. 8008796: 440b add r3, r1
  21627. 8008798: 3230 adds r2, #48 ; 0x30
  21628. 800879a: b2d2 uxtb r2, r2
  21629. 800879c: 701a strb r2, [r3, #0]
  21630. 800879e: e00a b.n 80087b6 <IntToUnicode+0x4e>
  21631. }
  21632. else
  21633. {
  21634. pbuf[2 * idx] = (value >> 28) + 'A' - 10;
  21635. 80087a0: 68fb ldr r3, [r7, #12]
  21636. 80087a2: 0f1b lsrs r3, r3, #28
  21637. 80087a4: b2da uxtb r2, r3
  21638. 80087a6: 7dfb ldrb r3, [r7, #23]
  21639. 80087a8: 005b lsls r3, r3, #1
  21640. 80087aa: 4619 mov r1, r3
  21641. 80087ac: 68bb ldr r3, [r7, #8]
  21642. 80087ae: 440b add r3, r1
  21643. 80087b0: 3237 adds r2, #55 ; 0x37
  21644. 80087b2: b2d2 uxtb r2, r2
  21645. 80087b4: 701a strb r2, [r3, #0]
  21646. }
  21647. value = value << 4;
  21648. 80087b6: 68fb ldr r3, [r7, #12]
  21649. 80087b8: 011b lsls r3, r3, #4
  21650. 80087ba: 60fb str r3, [r7, #12]
  21651. pbuf[2 * idx + 1] = 0;
  21652. 80087bc: 7dfb ldrb r3, [r7, #23]
  21653. 80087be: 005b lsls r3, r3, #1
  21654. 80087c0: 3301 adds r3, #1
  21655. 80087c2: 68ba ldr r2, [r7, #8]
  21656. 80087c4: 4413 add r3, r2
  21657. 80087c6: 2200 movs r2, #0
  21658. 80087c8: 701a strb r2, [r3, #0]
  21659. for (idx = 0; idx < len; idx++)
  21660. 80087ca: 7dfb ldrb r3, [r7, #23]
  21661. 80087cc: 3301 adds r3, #1
  21662. 80087ce: 75fb strb r3, [r7, #23]
  21663. 80087d0: 7dfa ldrb r2, [r7, #23]
  21664. 80087d2: 79fb ldrb r3, [r7, #7]
  21665. 80087d4: 429a cmp r2, r3
  21666. 80087d6: d3d3 bcc.n 8008780 <IntToUnicode+0x18>
  21667. }
  21668. }
  21669. 80087d8: bf00 nop
  21670. 80087da: bf00 nop
  21671. 80087dc: 371c adds r7, #28
  21672. 80087de: 46bd mov sp, r7
  21673. 80087e0: f85d 7b04 ldr.w r7, [sp], #4
  21674. 80087e4: 4770 bx lr
  21675. ...
  21676. 080087e8 <HAL_PCD_MspInit>:
  21677. LL Driver Callbacks (PCD -> USB Device Library)
  21678. *******************************************************************************/
  21679. /* MSP Init */
  21680. void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
  21681. {
  21682. 80087e8: b580 push {r7, lr}
  21683. 80087ea: b0a0 sub sp, #128 ; 0x80
  21684. 80087ec: af00 add r7, sp, #0
  21685. 80087ee: 6078 str r0, [r7, #4]
  21686. GPIO_InitTypeDef GPIO_InitStruct = {0};
  21687. 80087f0: f107 036c add.w r3, r7, #108 ; 0x6c
  21688. 80087f4: 2200 movs r2, #0
  21689. 80087f6: 601a str r2, [r3, #0]
  21690. 80087f8: 605a str r2, [r3, #4]
  21691. 80087fa: 609a str r2, [r3, #8]
  21692. 80087fc: 60da str r2, [r3, #12]
  21693. 80087fe: 611a str r2, [r3, #16]
  21694. RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
  21695. 8008800: f107 0310 add.w r3, r7, #16
  21696. 8008804: 225c movs r2, #92 ; 0x5c
  21697. 8008806: 2100 movs r1, #0
  21698. 8008808: 4618 mov r0, r3
  21699. 800880a: f000 fb95 bl 8008f38 <memset>
  21700. if(pcdHandle->Instance==USB_OTG_FS)
  21701. 800880e: 687b ldr r3, [r7, #4]
  21702. 8008810: 681b ldr r3, [r3, #0]
  21703. 8008812: f1b3 4fa0 cmp.w r3, #1342177280 ; 0x50000000
  21704. 8008816: d154 bne.n 80088c2 <HAL_PCD_MspInit+0xda>
  21705. /* USER CODE BEGIN USB_OTG_FS_MspInit 0 */
  21706. /* USER CODE END USB_OTG_FS_MspInit 0 */
  21707. /** Initializes the peripherals clock
  21708. */
  21709. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48;
  21710. 8008818: f44f 7380 mov.w r3, #256 ; 0x100
  21711. 800881c: 613b str r3, [r7, #16]
  21712. PeriphClkInitStruct.PLLSAI.PLLSAIM = 8;
  21713. 800881e: 2308 movs r3, #8
  21714. 8008820: 62bb str r3, [r7, #40] ; 0x28
  21715. PeriphClkInitStruct.PLLSAI.PLLSAIN = 192;
  21716. 8008822: 23c0 movs r3, #192 ; 0xc0
  21717. 8008824: 62fb str r3, [r7, #44] ; 0x2c
  21718. PeriphClkInitStruct.PLLSAI.PLLSAIQ = 2;
  21719. 8008826: 2302 movs r3, #2
  21720. 8008828: 637b str r3, [r7, #52] ; 0x34
  21721. PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV4;
  21722. 800882a: 2304 movs r3, #4
  21723. 800882c: 633b str r3, [r7, #48] ; 0x30
  21724. PeriphClkInitStruct.PLLSAIDivQ = 1;
  21725. 800882e: 2301 movs r3, #1
  21726. 8008830: 63fb str r3, [r7, #60] ; 0x3c
  21727. PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLSAIP;
  21728. 8008832: f04f 6300 mov.w r3, #134217728 ; 0x8000000
  21729. 8008836: 667b str r3, [r7, #100] ; 0x64
  21730. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  21731. 8008838: f107 0310 add.w r3, r7, #16
  21732. 800883c: 4618 mov r0, r3
  21733. 800883e: f7fa fde7 bl 8003410 <HAL_RCCEx_PeriphCLKConfig>
  21734. 8008842: 4603 mov r3, r0
  21735. 8008844: 2b00 cmp r3, #0
  21736. 8008846: d001 beq.n 800884c <HAL_PCD_MspInit+0x64>
  21737. {
  21738. Error_Handler();
  21739. 8008848: f7f8 fa0a bl 8000c60 <Error_Handler>
  21740. }
  21741. __HAL_RCC_GPIOA_CLK_ENABLE();
  21742. 800884c: 2300 movs r3, #0
  21743. 800884e: 60fb str r3, [r7, #12]
  21744. 8008850: 4b1e ldr r3, [pc, #120] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21745. 8008852: 6b1b ldr r3, [r3, #48] ; 0x30
  21746. 8008854: 4a1d ldr r2, [pc, #116] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21747. 8008856: f043 0301 orr.w r3, r3, #1
  21748. 800885a: 6313 str r3, [r2, #48] ; 0x30
  21749. 800885c: 4b1b ldr r3, [pc, #108] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21750. 800885e: 6b1b ldr r3, [r3, #48] ; 0x30
  21751. 8008860: f003 0301 and.w r3, r3, #1
  21752. 8008864: 60fb str r3, [r7, #12]
  21753. 8008866: 68fb ldr r3, [r7, #12]
  21754. /**USB_OTG_FS GPIO Configuration
  21755. PA11 ------> USB_OTG_FS_DM
  21756. PA12 ------> USB_OTG_FS_DP
  21757. */
  21758. GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
  21759. 8008868: f44f 53c0 mov.w r3, #6144 ; 0x1800
  21760. 800886c: 66fb str r3, [r7, #108] ; 0x6c
  21761. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  21762. 800886e: 2302 movs r3, #2
  21763. 8008870: 673b str r3, [r7, #112] ; 0x70
  21764. GPIO_InitStruct.Pull = GPIO_NOPULL;
  21765. 8008872: 2300 movs r3, #0
  21766. 8008874: 677b str r3, [r7, #116] ; 0x74
  21767. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  21768. 8008876: 2303 movs r3, #3
  21769. 8008878: 67bb str r3, [r7, #120] ; 0x78
  21770. GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
  21771. 800887a: 230a movs r3, #10
  21772. 800887c: 67fb str r3, [r7, #124] ; 0x7c
  21773. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  21774. 800887e: f107 036c add.w r3, r7, #108 ; 0x6c
  21775. 8008882: 4619 mov r1, r3
  21776. 8008884: 4812 ldr r0, [pc, #72] ; (80088d0 <HAL_PCD_MspInit+0xe8>)
  21777. 8008886: f7f9 f92d bl 8001ae4 <HAL_GPIO_Init>
  21778. /* Peripheral clock enable */
  21779. __HAL_RCC_USB_OTG_FS_CLK_ENABLE();
  21780. 800888a: 4b10 ldr r3, [pc, #64] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21781. 800888c: 6b5b ldr r3, [r3, #52] ; 0x34
  21782. 800888e: 4a0f ldr r2, [pc, #60] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21783. 8008890: f043 0380 orr.w r3, r3, #128 ; 0x80
  21784. 8008894: 6353 str r3, [r2, #52] ; 0x34
  21785. 8008896: 2300 movs r3, #0
  21786. 8008898: 60bb str r3, [r7, #8]
  21787. 800889a: 4b0c ldr r3, [pc, #48] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21788. 800889c: 6c5b ldr r3, [r3, #68] ; 0x44
  21789. 800889e: 4a0b ldr r2, [pc, #44] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21790. 80088a0: f443 4380 orr.w r3, r3, #16384 ; 0x4000
  21791. 80088a4: 6453 str r3, [r2, #68] ; 0x44
  21792. 80088a6: 4b09 ldr r3, [pc, #36] ; (80088cc <HAL_PCD_MspInit+0xe4>)
  21793. 80088a8: 6c5b ldr r3, [r3, #68] ; 0x44
  21794. 80088aa: f403 4380 and.w r3, r3, #16384 ; 0x4000
  21795. 80088ae: 60bb str r3, [r7, #8]
  21796. 80088b0: 68bb ldr r3, [r7, #8]
  21797. /* Peripheral interrupt init */
  21798. HAL_NVIC_SetPriority(OTG_FS_IRQn, 0, 0);
  21799. 80088b2: 2200 movs r2, #0
  21800. 80088b4: 2100 movs r1, #0
  21801. 80088b6: 2043 movs r0, #67 ; 0x43
  21802. 80088b8: f7f9 f86d bl 8001996 <HAL_NVIC_SetPriority>
  21803. HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
  21804. 80088bc: 2043 movs r0, #67 ; 0x43
  21805. 80088be: f7f9 f886 bl 80019ce <HAL_NVIC_EnableIRQ>
  21806. /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
  21807. /* USER CODE END USB_OTG_FS_MspInit 1 */
  21808. }
  21809. }
  21810. 80088c2: bf00 nop
  21811. 80088c4: 3780 adds r7, #128 ; 0x80
  21812. 80088c6: 46bd mov sp, r7
  21813. 80088c8: bd80 pop {r7, pc}
  21814. 80088ca: bf00 nop
  21815. 80088cc: 40023800 .word 0x40023800
  21816. 80088d0: 40020000 .word 0x40020000
  21817. 080088d4 <HAL_PCD_SetupStageCallback>:
  21818. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  21819. static void PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
  21820. #else
  21821. void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
  21822. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  21823. {
  21824. 80088d4: b580 push {r7, lr}
  21825. 80088d6: b082 sub sp, #8
  21826. 80088d8: af00 add r7, sp, #0
  21827. 80088da: 6078 str r0, [r7, #4]
  21828. USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup);
  21829. 80088dc: 687b ldr r3, [r7, #4]
  21830. 80088de: f8d3 2404 ldr.w r2, [r3, #1028] ; 0x404
  21831. 80088e2: 687b ldr r3, [r7, #4]
  21832. 80088e4: f503 7371 add.w r3, r3, #964 ; 0x3c4
  21833. 80088e8: 4619 mov r1, r3
  21834. 80088ea: 4610 mov r0, r2
  21835. 80088ec: f7fe fc98 bl 8007220 <USBD_LL_SetupStage>
  21836. }
  21837. 80088f0: bf00 nop
  21838. 80088f2: 3708 adds r7, #8
  21839. 80088f4: 46bd mov sp, r7
  21840. 80088f6: bd80 pop {r7, pc}
  21841. 080088f8 <HAL_PCD_DataOutStageCallback>:
  21842. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  21843. static void PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  21844. #else
  21845. void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  21846. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  21847. {
  21848. 80088f8: b580 push {r7, lr}
  21849. 80088fa: b082 sub sp, #8
  21850. 80088fc: af00 add r7, sp, #0
  21851. 80088fe: 6078 str r0, [r7, #4]
  21852. 8008900: 460b mov r3, r1
  21853. 8008902: 70fb strb r3, [r7, #3]
  21854. USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff);
  21855. 8008904: 687b ldr r3, [r7, #4]
  21856. 8008906: f8d3 0404 ldr.w r0, [r3, #1028] ; 0x404
  21857. 800890a: 78fa ldrb r2, [r7, #3]
  21858. 800890c: 6879 ldr r1, [r7, #4]
  21859. 800890e: 4613 mov r3, r2
  21860. 8008910: 00db lsls r3, r3, #3
  21861. 8008912: 1a9b subs r3, r3, r2
  21862. 8008914: 009b lsls r3, r3, #2
  21863. 8008916: 440b add r3, r1
  21864. 8008918: f503 7302 add.w r3, r3, #520 ; 0x208
  21865. 800891c: 681a ldr r2, [r3, #0]
  21866. 800891e: 78fb ldrb r3, [r7, #3]
  21867. 8008920: 4619 mov r1, r3
  21868. 8008922: f7fe fcd2 bl 80072ca <USBD_LL_DataOutStage>
  21869. }
  21870. 8008926: bf00 nop
  21871. 8008928: 3708 adds r7, #8
  21872. 800892a: 46bd mov sp, r7
  21873. 800892c: bd80 pop {r7, pc}
  21874. 0800892e <HAL_PCD_DataInStageCallback>:
  21875. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  21876. static void PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  21877. #else
  21878. void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  21879. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  21880. {
  21881. 800892e: b580 push {r7, lr}
  21882. 8008930: b082 sub sp, #8
  21883. 8008932: af00 add r7, sp, #0
  21884. 8008934: 6078 str r0, [r7, #4]
  21885. 8008936: 460b mov r3, r1
  21886. 8008938: 70fb strb r3, [r7, #3]
  21887. USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff);
  21888. 800893a: 687b ldr r3, [r7, #4]
  21889. 800893c: f8d3 0404 ldr.w r0, [r3, #1028] ; 0x404
  21890. 8008940: 78fa ldrb r2, [r7, #3]
  21891. 8008942: 6879 ldr r1, [r7, #4]
  21892. 8008944: 4613 mov r3, r2
  21893. 8008946: 00db lsls r3, r3, #3
  21894. 8008948: 1a9b subs r3, r3, r2
  21895. 800894a: 009b lsls r3, r3, #2
  21896. 800894c: 440b add r3, r1
  21897. 800894e: 3348 adds r3, #72 ; 0x48
  21898. 8008950: 681a ldr r2, [r3, #0]
  21899. 8008952: 78fb ldrb r3, [r7, #3]
  21900. 8008954: 4619 mov r1, r3
  21901. 8008956: f7fe fd1b bl 8007390 <USBD_LL_DataInStage>
  21902. }
  21903. 800895a: bf00 nop
  21904. 800895c: 3708 adds r7, #8
  21905. 800895e: 46bd mov sp, r7
  21906. 8008960: bd80 pop {r7, pc}
  21907. 08008962 <HAL_PCD_SOFCallback>:
  21908. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  21909. static void PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
  21910. #else
  21911. void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
  21912. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  21913. {
  21914. 8008962: b580 push {r7, lr}
  21915. 8008964: b082 sub sp, #8
  21916. 8008966: af00 add r7, sp, #0
  21917. 8008968: 6078 str r0, [r7, #4]
  21918. USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData);
  21919. 800896a: 687b ldr r3, [r7, #4]
  21920. 800896c: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  21921. 8008970: 4618 mov r0, r3
  21922. 8008972: f7fe fe2f bl 80075d4 <USBD_LL_SOF>
  21923. }
  21924. 8008976: bf00 nop
  21925. 8008978: 3708 adds r7, #8
  21926. 800897a: 46bd mov sp, r7
  21927. 800897c: bd80 pop {r7, pc}
  21928. 0800897e <HAL_PCD_ResetCallback>:
  21929. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  21930. static void PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
  21931. #else
  21932. void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
  21933. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  21934. {
  21935. 800897e: b580 push {r7, lr}
  21936. 8008980: b084 sub sp, #16
  21937. 8008982: af00 add r7, sp, #0
  21938. 8008984: 6078 str r0, [r7, #4]
  21939. USBD_SpeedTypeDef speed = USBD_SPEED_FULL;
  21940. 8008986: 2301 movs r3, #1
  21941. 8008988: 73fb strb r3, [r7, #15]
  21942. if ( hpcd->Init.speed == PCD_SPEED_HIGH)
  21943. 800898a: 687b ldr r3, [r7, #4]
  21944. 800898c: 68db ldr r3, [r3, #12]
  21945. 800898e: 2b00 cmp r3, #0
  21946. 8008990: d102 bne.n 8008998 <HAL_PCD_ResetCallback+0x1a>
  21947. {
  21948. speed = USBD_SPEED_HIGH;
  21949. 8008992: 2300 movs r3, #0
  21950. 8008994: 73fb strb r3, [r7, #15]
  21951. 8008996: e008 b.n 80089aa <HAL_PCD_ResetCallback+0x2c>
  21952. }
  21953. else if ( hpcd->Init.speed == PCD_SPEED_FULL)
  21954. 8008998: 687b ldr r3, [r7, #4]
  21955. 800899a: 68db ldr r3, [r3, #12]
  21956. 800899c: 2b02 cmp r3, #2
  21957. 800899e: d102 bne.n 80089a6 <HAL_PCD_ResetCallback+0x28>
  21958. {
  21959. speed = USBD_SPEED_FULL;
  21960. 80089a0: 2301 movs r3, #1
  21961. 80089a2: 73fb strb r3, [r7, #15]
  21962. 80089a4: e001 b.n 80089aa <HAL_PCD_ResetCallback+0x2c>
  21963. }
  21964. else
  21965. {
  21966. Error_Handler();
  21967. 80089a6: f7f8 f95b bl 8000c60 <Error_Handler>
  21968. }
  21969. /* Set Speed. */
  21970. USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed);
  21971. 80089aa: 687b ldr r3, [r7, #4]
  21972. 80089ac: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  21973. 80089b0: 7bfa ldrb r2, [r7, #15]
  21974. 80089b2: 4611 mov r1, r2
  21975. 80089b4: 4618 mov r0, r3
  21976. 80089b6: f7fe fdcf bl 8007558 <USBD_LL_SetSpeed>
  21977. /* Reset Device. */
  21978. USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData);
  21979. 80089ba: 687b ldr r3, [r7, #4]
  21980. 80089bc: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  21981. 80089c0: 4618 mov r0, r3
  21982. 80089c2: f7fe fd7b bl 80074bc <USBD_LL_Reset>
  21983. }
  21984. 80089c6: bf00 nop
  21985. 80089c8: 3710 adds r7, #16
  21986. 80089ca: 46bd mov sp, r7
  21987. 80089cc: bd80 pop {r7, pc}
  21988. ...
  21989. 080089d0 <HAL_PCD_SuspendCallback>:
  21990. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  21991. static void PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
  21992. #else
  21993. void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
  21994. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  21995. {
  21996. 80089d0: b580 push {r7, lr}
  21997. 80089d2: b082 sub sp, #8
  21998. 80089d4: af00 add r7, sp, #0
  21999. 80089d6: 6078 str r0, [r7, #4]
  22000. /* Inform USB library that core enters in suspend Mode. */
  22001. USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData);
  22002. 80089d8: 687b ldr r3, [r7, #4]
  22003. 80089da: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22004. 80089de: 4618 mov r0, r3
  22005. 80089e0: f7fe fdca bl 8007578 <USBD_LL_Suspend>
  22006. __HAL_PCD_GATE_PHYCLOCK(hpcd);
  22007. 80089e4: 687b ldr r3, [r7, #4]
  22008. 80089e6: 681b ldr r3, [r3, #0]
  22009. 80089e8: f503 6360 add.w r3, r3, #3584 ; 0xe00
  22010. 80089ec: 681b ldr r3, [r3, #0]
  22011. 80089ee: 687a ldr r2, [r7, #4]
  22012. 80089f0: 6812 ldr r2, [r2, #0]
  22013. 80089f2: f502 6260 add.w r2, r2, #3584 ; 0xe00
  22014. 80089f6: f043 0301 orr.w r3, r3, #1
  22015. 80089fa: 6013 str r3, [r2, #0]
  22016. /* Enter in STOP mode. */
  22017. /* USER CODE BEGIN 2 */
  22018. if (hpcd->Init.low_power_enable)
  22019. 80089fc: 687b ldr r3, [r7, #4]
  22020. 80089fe: 6a1b ldr r3, [r3, #32]
  22021. 8008a00: 2b00 cmp r3, #0
  22022. 8008a02: d005 beq.n 8008a10 <HAL_PCD_SuspendCallback+0x40>
  22023. {
  22024. /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */
  22025. SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
  22026. 8008a04: 4b04 ldr r3, [pc, #16] ; (8008a18 <HAL_PCD_SuspendCallback+0x48>)
  22027. 8008a06: 691b ldr r3, [r3, #16]
  22028. 8008a08: 4a03 ldr r2, [pc, #12] ; (8008a18 <HAL_PCD_SuspendCallback+0x48>)
  22029. 8008a0a: f043 0306 orr.w r3, r3, #6
  22030. 8008a0e: 6113 str r3, [r2, #16]
  22031. }
  22032. /* USER CODE END 2 */
  22033. }
  22034. 8008a10: bf00 nop
  22035. 8008a12: 3708 adds r7, #8
  22036. 8008a14: 46bd mov sp, r7
  22037. 8008a16: bd80 pop {r7, pc}
  22038. 8008a18: e000ed00 .word 0xe000ed00
  22039. 08008a1c <HAL_PCD_ResumeCallback>:
  22040. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  22041. static void PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
  22042. #else
  22043. void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
  22044. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  22045. {
  22046. 8008a1c: b580 push {r7, lr}
  22047. 8008a1e: b082 sub sp, #8
  22048. 8008a20: af00 add r7, sp, #0
  22049. 8008a22: 6078 str r0, [r7, #4]
  22050. /* USER CODE BEGIN 3 */
  22051. /* USER CODE END 3 */
  22052. USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData);
  22053. 8008a24: 687b ldr r3, [r7, #4]
  22054. 8008a26: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22055. 8008a2a: 4618 mov r0, r3
  22056. 8008a2c: f7fe fdba bl 80075a4 <USBD_LL_Resume>
  22057. }
  22058. 8008a30: bf00 nop
  22059. 8008a32: 3708 adds r7, #8
  22060. 8008a34: 46bd mov sp, r7
  22061. 8008a36: bd80 pop {r7, pc}
  22062. 08008a38 <HAL_PCD_ISOOUTIncompleteCallback>:
  22063. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  22064. static void PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  22065. #else
  22066. void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  22067. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  22068. {
  22069. 8008a38: b580 push {r7, lr}
  22070. 8008a3a: b082 sub sp, #8
  22071. 8008a3c: af00 add r7, sp, #0
  22072. 8008a3e: 6078 str r0, [r7, #4]
  22073. 8008a40: 460b mov r3, r1
  22074. 8008a42: 70fb strb r3, [r7, #3]
  22075. USBD_LL_IsoOUTIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
  22076. 8008a44: 687b ldr r3, [r7, #4]
  22077. 8008a46: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22078. 8008a4a: 78fa ldrb r2, [r7, #3]
  22079. 8008a4c: 4611 mov r1, r2
  22080. 8008a4e: 4618 mov r0, r3
  22081. 8008a50: f7fe fe08 bl 8007664 <USBD_LL_IsoOUTIncomplete>
  22082. }
  22083. 8008a54: bf00 nop
  22084. 8008a56: 3708 adds r7, #8
  22085. 8008a58: 46bd mov sp, r7
  22086. 8008a5a: bd80 pop {r7, pc}
  22087. 08008a5c <HAL_PCD_ISOINIncompleteCallback>:
  22088. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  22089. static void PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  22090. #else
  22091. void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
  22092. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  22093. {
  22094. 8008a5c: b580 push {r7, lr}
  22095. 8008a5e: b082 sub sp, #8
  22096. 8008a60: af00 add r7, sp, #0
  22097. 8008a62: 6078 str r0, [r7, #4]
  22098. 8008a64: 460b mov r3, r1
  22099. 8008a66: 70fb strb r3, [r7, #3]
  22100. USBD_LL_IsoINIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
  22101. 8008a68: 687b ldr r3, [r7, #4]
  22102. 8008a6a: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22103. 8008a6e: 78fa ldrb r2, [r7, #3]
  22104. 8008a70: 4611 mov r1, r2
  22105. 8008a72: 4618 mov r0, r3
  22106. 8008a74: f7fe fdd0 bl 8007618 <USBD_LL_IsoINIncomplete>
  22107. }
  22108. 8008a78: bf00 nop
  22109. 8008a7a: 3708 adds r7, #8
  22110. 8008a7c: 46bd mov sp, r7
  22111. 8008a7e: bd80 pop {r7, pc}
  22112. 08008a80 <HAL_PCD_ConnectCallback>:
  22113. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  22114. static void PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
  22115. #else
  22116. void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
  22117. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  22118. {
  22119. 8008a80: b580 push {r7, lr}
  22120. 8008a82: b082 sub sp, #8
  22121. 8008a84: af00 add r7, sp, #0
  22122. 8008a86: 6078 str r0, [r7, #4]
  22123. USBD_LL_DevConnected((USBD_HandleTypeDef*)hpcd->pData);
  22124. 8008a88: 687b ldr r3, [r7, #4]
  22125. 8008a8a: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22126. 8008a8e: 4618 mov r0, r3
  22127. 8008a90: f7fe fe0e bl 80076b0 <USBD_LL_DevConnected>
  22128. }
  22129. 8008a94: bf00 nop
  22130. 8008a96: 3708 adds r7, #8
  22131. 8008a98: 46bd mov sp, r7
  22132. 8008a9a: bd80 pop {r7, pc}
  22133. 08008a9c <HAL_PCD_DisconnectCallback>:
  22134. #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
  22135. static void PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
  22136. #else
  22137. void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
  22138. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  22139. {
  22140. 8008a9c: b580 push {r7, lr}
  22141. 8008a9e: b082 sub sp, #8
  22142. 8008aa0: af00 add r7, sp, #0
  22143. 8008aa2: 6078 str r0, [r7, #4]
  22144. USBD_LL_DevDisconnected((USBD_HandleTypeDef*)hpcd->pData);
  22145. 8008aa4: 687b ldr r3, [r7, #4]
  22146. 8008aa6: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22147. 8008aaa: 4618 mov r0, r3
  22148. 8008aac: f7fe fe0b bl 80076c6 <USBD_LL_DevDisconnected>
  22149. }
  22150. 8008ab0: bf00 nop
  22151. 8008ab2: 3708 adds r7, #8
  22152. 8008ab4: 46bd mov sp, r7
  22153. 8008ab6: bd80 pop {r7, pc}
  22154. 08008ab8 <USBD_LL_Init>:
  22155. * @brief Initializes the low level portion of the device driver.
  22156. * @param pdev: Device handle
  22157. * @retval USBD status
  22158. */
  22159. USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
  22160. {
  22161. 8008ab8: b580 push {r7, lr}
  22162. 8008aba: b082 sub sp, #8
  22163. 8008abc: af00 add r7, sp, #0
  22164. 8008abe: 6078 str r0, [r7, #4]
  22165. /* Init USB Ip. */
  22166. if (pdev->id == DEVICE_FS) {
  22167. 8008ac0: 687b ldr r3, [r7, #4]
  22168. 8008ac2: 781b ldrb r3, [r3, #0]
  22169. 8008ac4: 2b00 cmp r3, #0
  22170. 8008ac6: d13c bne.n 8008b42 <USBD_LL_Init+0x8a>
  22171. /* Link the driver to the stack. */
  22172. hpcd_USB_OTG_FS.pData = pdev;
  22173. 8008ac8: 4a20 ldr r2, [pc, #128] ; (8008b4c <USBD_LL_Init+0x94>)
  22174. 8008aca: 687b ldr r3, [r7, #4]
  22175. 8008acc: f8c2 3404 str.w r3, [r2, #1028] ; 0x404
  22176. pdev->pData = &hpcd_USB_OTG_FS;
  22177. 8008ad0: 687b ldr r3, [r7, #4]
  22178. 8008ad2: 4a1e ldr r2, [pc, #120] ; (8008b4c <USBD_LL_Init+0x94>)
  22179. 8008ad4: f8c3 22c4 str.w r2, [r3, #708] ; 0x2c4
  22180. hpcd_USB_OTG_FS.Instance = USB_OTG_FS;
  22181. 8008ad8: 4b1c ldr r3, [pc, #112] ; (8008b4c <USBD_LL_Init+0x94>)
  22182. 8008ada: f04f 42a0 mov.w r2, #1342177280 ; 0x50000000
  22183. 8008ade: 601a str r2, [r3, #0]
  22184. hpcd_USB_OTG_FS.Init.dev_endpoints = 6;
  22185. 8008ae0: 4b1a ldr r3, [pc, #104] ; (8008b4c <USBD_LL_Init+0x94>)
  22186. 8008ae2: 2206 movs r2, #6
  22187. 8008ae4: 605a str r2, [r3, #4]
  22188. hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL;
  22189. 8008ae6: 4b19 ldr r3, [pc, #100] ; (8008b4c <USBD_LL_Init+0x94>)
  22190. 8008ae8: 2202 movs r2, #2
  22191. 8008aea: 60da str r2, [r3, #12]
  22192. hpcd_USB_OTG_FS.Init.dma_enable = DISABLE;
  22193. 8008aec: 4b17 ldr r3, [pc, #92] ; (8008b4c <USBD_LL_Init+0x94>)
  22194. 8008aee: 2200 movs r2, #0
  22195. 8008af0: 611a str r2, [r3, #16]
  22196. hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
  22197. 8008af2: 4b16 ldr r3, [pc, #88] ; (8008b4c <USBD_LL_Init+0x94>)
  22198. 8008af4: 2202 movs r2, #2
  22199. 8008af6: 619a str r2, [r3, #24]
  22200. hpcd_USB_OTG_FS.Init.Sof_enable = DISABLE;
  22201. 8008af8: 4b14 ldr r3, [pc, #80] ; (8008b4c <USBD_LL_Init+0x94>)
  22202. 8008afa: 2200 movs r2, #0
  22203. 8008afc: 61da str r2, [r3, #28]
  22204. hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE;
  22205. 8008afe: 4b13 ldr r3, [pc, #76] ; (8008b4c <USBD_LL_Init+0x94>)
  22206. 8008b00: 2200 movs r2, #0
  22207. 8008b02: 621a str r2, [r3, #32]
  22208. hpcd_USB_OTG_FS.Init.lpm_enable = DISABLE;
  22209. 8008b04: 4b11 ldr r3, [pc, #68] ; (8008b4c <USBD_LL_Init+0x94>)
  22210. 8008b06: 2200 movs r2, #0
  22211. 8008b08: 625a str r2, [r3, #36] ; 0x24
  22212. hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE;
  22213. 8008b0a: 4b10 ldr r3, [pc, #64] ; (8008b4c <USBD_LL_Init+0x94>)
  22214. 8008b0c: 2200 movs r2, #0
  22215. 8008b0e: 62da str r2, [r3, #44] ; 0x2c
  22216. hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE;
  22217. 8008b10: 4b0e ldr r3, [pc, #56] ; (8008b4c <USBD_LL_Init+0x94>)
  22218. 8008b12: 2200 movs r2, #0
  22219. 8008b14: 631a str r2, [r3, #48] ; 0x30
  22220. if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK)
  22221. 8008b16: 480d ldr r0, [pc, #52] ; (8008b4c <USBD_LL_Init+0x94>)
  22222. 8008b18: f7f9 f991 bl 8001e3e <HAL_PCD_Init>
  22223. 8008b1c: 4603 mov r3, r0
  22224. 8008b1e: 2b00 cmp r3, #0
  22225. 8008b20: d001 beq.n 8008b26 <USBD_LL_Init+0x6e>
  22226. {
  22227. Error_Handler( );
  22228. 8008b22: f7f8 f89d bl 8000c60 <Error_Handler>
  22229. HAL_PCD_RegisterDataOutStageCallback(&hpcd_USB_OTG_FS, PCD_DataOutStageCallback);
  22230. HAL_PCD_RegisterDataInStageCallback(&hpcd_USB_OTG_FS, PCD_DataInStageCallback);
  22231. HAL_PCD_RegisterIsoOutIncpltCallback(&hpcd_USB_OTG_FS, PCD_ISOOUTIncompleteCallback);
  22232. HAL_PCD_RegisterIsoInIncpltCallback(&hpcd_USB_OTG_FS, PCD_ISOINIncompleteCallback);
  22233. #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
  22234. HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_FS, 0x80);
  22235. 8008b26: 2180 movs r1, #128 ; 0x80
  22236. 8008b28: 4808 ldr r0, [pc, #32] ; (8008b4c <USBD_LL_Init+0x94>)
  22237. 8008b2a: f7fa fb22 bl 8003172 <HAL_PCDEx_SetRxFiFo>
  22238. HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 0, 0x40);
  22239. 8008b2e: 2240 movs r2, #64 ; 0x40
  22240. 8008b30: 2100 movs r1, #0
  22241. 8008b32: 4806 ldr r0, [pc, #24] ; (8008b4c <USBD_LL_Init+0x94>)
  22242. 8008b34: f7fa fad6 bl 80030e4 <HAL_PCDEx_SetTxFiFo>
  22243. HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 1, 0x80);
  22244. 8008b38: 2280 movs r2, #128 ; 0x80
  22245. 8008b3a: 2101 movs r1, #1
  22246. 8008b3c: 4803 ldr r0, [pc, #12] ; (8008b4c <USBD_LL_Init+0x94>)
  22247. 8008b3e: f7fa fad1 bl 80030e4 <HAL_PCDEx_SetTxFiFo>
  22248. }
  22249. return USBD_OK;
  22250. 8008b42: 2300 movs r3, #0
  22251. }
  22252. 8008b44: 4618 mov r0, r3
  22253. 8008b46: 3708 adds r7, #8
  22254. 8008b48: 46bd mov sp, r7
  22255. 8008b4a: bd80 pop {r7, pc}
  22256. 8008b4c: 20001af4 .word 0x20001af4
  22257. 08008b50 <USBD_LL_Start>:
  22258. * @brief Starts the low level portion of the device driver.
  22259. * @param pdev: Device handle
  22260. * @retval USBD status
  22261. */
  22262. USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
  22263. {
  22264. 8008b50: b580 push {r7, lr}
  22265. 8008b52: b084 sub sp, #16
  22266. 8008b54: af00 add r7, sp, #0
  22267. 8008b56: 6078 str r0, [r7, #4]
  22268. HAL_StatusTypeDef hal_status = HAL_OK;
  22269. 8008b58: 2300 movs r3, #0
  22270. 8008b5a: 73fb strb r3, [r7, #15]
  22271. USBD_StatusTypeDef usb_status = USBD_OK;
  22272. 8008b5c: 2300 movs r3, #0
  22273. 8008b5e: 73bb strb r3, [r7, #14]
  22274. hal_status = HAL_PCD_Start(pdev->pData);
  22275. 8008b60: 687b ldr r3, [r7, #4]
  22276. 8008b62: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  22277. 8008b66: 4618 mov r0, r3
  22278. 8008b68: f7f9 fa8d bl 8002086 <HAL_PCD_Start>
  22279. 8008b6c: 4603 mov r3, r0
  22280. 8008b6e: 73fb strb r3, [r7, #15]
  22281. usb_status = USBD_Get_USB_Status(hal_status);
  22282. 8008b70: 7bfb ldrb r3, [r7, #15]
  22283. 8008b72: 4618 mov r0, r3
  22284. 8008b74: f000 f990 bl 8008e98 <USBD_Get_USB_Status>
  22285. 8008b78: 4603 mov r3, r0
  22286. 8008b7a: 73bb strb r3, [r7, #14]
  22287. return usb_status;
  22288. 8008b7c: 7bbb ldrb r3, [r7, #14]
  22289. }
  22290. 8008b7e: 4618 mov r0, r3
  22291. 8008b80: 3710 adds r7, #16
  22292. 8008b82: 46bd mov sp, r7
  22293. 8008b84: bd80 pop {r7, pc}
  22294. 08008b86 <USBD_LL_OpenEP>:
  22295. * @param ep_type: Endpoint type
  22296. * @param ep_mps: Endpoint max packet size
  22297. * @retval USBD status
  22298. */
  22299. USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps)
  22300. {
  22301. 8008b86: b580 push {r7, lr}
  22302. 8008b88: b084 sub sp, #16
  22303. 8008b8a: af00 add r7, sp, #0
  22304. 8008b8c: 6078 str r0, [r7, #4]
  22305. 8008b8e: 4608 mov r0, r1
  22306. 8008b90: 4611 mov r1, r2
  22307. 8008b92: 461a mov r2, r3
  22308. 8008b94: 4603 mov r3, r0
  22309. 8008b96: 70fb strb r3, [r7, #3]
  22310. 8008b98: 460b mov r3, r1
  22311. 8008b9a: 70bb strb r3, [r7, #2]
  22312. 8008b9c: 4613 mov r3, r2
  22313. 8008b9e: 803b strh r3, [r7, #0]
  22314. HAL_StatusTypeDef hal_status = HAL_OK;
  22315. 8008ba0: 2300 movs r3, #0
  22316. 8008ba2: 73fb strb r3, [r7, #15]
  22317. USBD_StatusTypeDef usb_status = USBD_OK;
  22318. 8008ba4: 2300 movs r3, #0
  22319. 8008ba6: 73bb strb r3, [r7, #14]
  22320. hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type);
  22321. 8008ba8: 687b ldr r3, [r7, #4]
  22322. 8008baa: f8d3 02c4 ldr.w r0, [r3, #708] ; 0x2c4
  22323. 8008bae: 78bb ldrb r3, [r7, #2]
  22324. 8008bb0: 883a ldrh r2, [r7, #0]
  22325. 8008bb2: 78f9 ldrb r1, [r7, #3]
  22326. 8008bb4: f7f9 fe9e bl 80028f4 <HAL_PCD_EP_Open>
  22327. 8008bb8: 4603 mov r3, r0
  22328. 8008bba: 73fb strb r3, [r7, #15]
  22329. usb_status = USBD_Get_USB_Status(hal_status);
  22330. 8008bbc: 7bfb ldrb r3, [r7, #15]
  22331. 8008bbe: 4618 mov r0, r3
  22332. 8008bc0: f000 f96a bl 8008e98 <USBD_Get_USB_Status>
  22333. 8008bc4: 4603 mov r3, r0
  22334. 8008bc6: 73bb strb r3, [r7, #14]
  22335. return usb_status;
  22336. 8008bc8: 7bbb ldrb r3, [r7, #14]
  22337. }
  22338. 8008bca: 4618 mov r0, r3
  22339. 8008bcc: 3710 adds r7, #16
  22340. 8008bce: 46bd mov sp, r7
  22341. 8008bd0: bd80 pop {r7, pc}
  22342. 08008bd2 <USBD_LL_CloseEP>:
  22343. * @param pdev: Device handle
  22344. * @param ep_addr: Endpoint number
  22345. * @retval USBD status
  22346. */
  22347. USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  22348. {
  22349. 8008bd2: b580 push {r7, lr}
  22350. 8008bd4: b084 sub sp, #16
  22351. 8008bd6: af00 add r7, sp, #0
  22352. 8008bd8: 6078 str r0, [r7, #4]
  22353. 8008bda: 460b mov r3, r1
  22354. 8008bdc: 70fb strb r3, [r7, #3]
  22355. HAL_StatusTypeDef hal_status = HAL_OK;
  22356. 8008bde: 2300 movs r3, #0
  22357. 8008be0: 73fb strb r3, [r7, #15]
  22358. USBD_StatusTypeDef usb_status = USBD_OK;
  22359. 8008be2: 2300 movs r3, #0
  22360. 8008be4: 73bb strb r3, [r7, #14]
  22361. hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr);
  22362. 8008be6: 687b ldr r3, [r7, #4]
  22363. 8008be8: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  22364. 8008bec: 78fa ldrb r2, [r7, #3]
  22365. 8008bee: 4611 mov r1, r2
  22366. 8008bf0: 4618 mov r0, r3
  22367. 8008bf2: f7f9 fee7 bl 80029c4 <HAL_PCD_EP_Close>
  22368. 8008bf6: 4603 mov r3, r0
  22369. 8008bf8: 73fb strb r3, [r7, #15]
  22370. usb_status = USBD_Get_USB_Status(hal_status);
  22371. 8008bfa: 7bfb ldrb r3, [r7, #15]
  22372. 8008bfc: 4618 mov r0, r3
  22373. 8008bfe: f000 f94b bl 8008e98 <USBD_Get_USB_Status>
  22374. 8008c02: 4603 mov r3, r0
  22375. 8008c04: 73bb strb r3, [r7, #14]
  22376. return usb_status;
  22377. 8008c06: 7bbb ldrb r3, [r7, #14]
  22378. }
  22379. 8008c08: 4618 mov r0, r3
  22380. 8008c0a: 3710 adds r7, #16
  22381. 8008c0c: 46bd mov sp, r7
  22382. 8008c0e: bd80 pop {r7, pc}
  22383. 08008c10 <USBD_LL_StallEP>:
  22384. * @param pdev: Device handle
  22385. * @param ep_addr: Endpoint number
  22386. * @retval USBD status
  22387. */
  22388. USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  22389. {
  22390. 8008c10: b580 push {r7, lr}
  22391. 8008c12: b084 sub sp, #16
  22392. 8008c14: af00 add r7, sp, #0
  22393. 8008c16: 6078 str r0, [r7, #4]
  22394. 8008c18: 460b mov r3, r1
  22395. 8008c1a: 70fb strb r3, [r7, #3]
  22396. HAL_StatusTypeDef hal_status = HAL_OK;
  22397. 8008c1c: 2300 movs r3, #0
  22398. 8008c1e: 73fb strb r3, [r7, #15]
  22399. USBD_StatusTypeDef usb_status = USBD_OK;
  22400. 8008c20: 2300 movs r3, #0
  22401. 8008c22: 73bb strb r3, [r7, #14]
  22402. hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr);
  22403. 8008c24: 687b ldr r3, [r7, #4]
  22404. 8008c26: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  22405. 8008c2a: 78fa ldrb r2, [r7, #3]
  22406. 8008c2c: 4611 mov r1, r2
  22407. 8008c2e: 4618 mov r0, r3
  22408. 8008c30: f7f9 ffbf bl 8002bb2 <HAL_PCD_EP_SetStall>
  22409. 8008c34: 4603 mov r3, r0
  22410. 8008c36: 73fb strb r3, [r7, #15]
  22411. usb_status = USBD_Get_USB_Status(hal_status);
  22412. 8008c38: 7bfb ldrb r3, [r7, #15]
  22413. 8008c3a: 4618 mov r0, r3
  22414. 8008c3c: f000 f92c bl 8008e98 <USBD_Get_USB_Status>
  22415. 8008c40: 4603 mov r3, r0
  22416. 8008c42: 73bb strb r3, [r7, #14]
  22417. return usb_status;
  22418. 8008c44: 7bbb ldrb r3, [r7, #14]
  22419. }
  22420. 8008c46: 4618 mov r0, r3
  22421. 8008c48: 3710 adds r7, #16
  22422. 8008c4a: 46bd mov sp, r7
  22423. 8008c4c: bd80 pop {r7, pc}
  22424. 08008c4e <USBD_LL_ClearStallEP>:
  22425. * @param pdev: Device handle
  22426. * @param ep_addr: Endpoint number
  22427. * @retval USBD status
  22428. */
  22429. USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  22430. {
  22431. 8008c4e: b580 push {r7, lr}
  22432. 8008c50: b084 sub sp, #16
  22433. 8008c52: af00 add r7, sp, #0
  22434. 8008c54: 6078 str r0, [r7, #4]
  22435. 8008c56: 460b mov r3, r1
  22436. 8008c58: 70fb strb r3, [r7, #3]
  22437. HAL_StatusTypeDef hal_status = HAL_OK;
  22438. 8008c5a: 2300 movs r3, #0
  22439. 8008c5c: 73fb strb r3, [r7, #15]
  22440. USBD_StatusTypeDef usb_status = USBD_OK;
  22441. 8008c5e: 2300 movs r3, #0
  22442. 8008c60: 73bb strb r3, [r7, #14]
  22443. hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr);
  22444. 8008c62: 687b ldr r3, [r7, #4]
  22445. 8008c64: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  22446. 8008c68: 78fa ldrb r2, [r7, #3]
  22447. 8008c6a: 4611 mov r1, r2
  22448. 8008c6c: 4618 mov r0, r3
  22449. 8008c6e: f7fa f804 bl 8002c7a <HAL_PCD_EP_ClrStall>
  22450. 8008c72: 4603 mov r3, r0
  22451. 8008c74: 73fb strb r3, [r7, #15]
  22452. usb_status = USBD_Get_USB_Status(hal_status);
  22453. 8008c76: 7bfb ldrb r3, [r7, #15]
  22454. 8008c78: 4618 mov r0, r3
  22455. 8008c7a: f000 f90d bl 8008e98 <USBD_Get_USB_Status>
  22456. 8008c7e: 4603 mov r3, r0
  22457. 8008c80: 73bb strb r3, [r7, #14]
  22458. return usb_status;
  22459. 8008c82: 7bbb ldrb r3, [r7, #14]
  22460. }
  22461. 8008c84: 4618 mov r0, r3
  22462. 8008c86: 3710 adds r7, #16
  22463. 8008c88: 46bd mov sp, r7
  22464. 8008c8a: bd80 pop {r7, pc}
  22465. 08008c8c <USBD_LL_IsStallEP>:
  22466. * @param pdev: Device handle
  22467. * @param ep_addr: Endpoint number
  22468. * @retval Stall (1: Yes, 0: No)
  22469. */
  22470. uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  22471. {
  22472. 8008c8c: b480 push {r7}
  22473. 8008c8e: b085 sub sp, #20
  22474. 8008c90: af00 add r7, sp, #0
  22475. 8008c92: 6078 str r0, [r7, #4]
  22476. 8008c94: 460b mov r3, r1
  22477. 8008c96: 70fb strb r3, [r7, #3]
  22478. PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData;
  22479. 8008c98: 687b ldr r3, [r7, #4]
  22480. 8008c9a: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  22481. 8008c9e: 60fb str r3, [r7, #12]
  22482. if((ep_addr & 0x80) == 0x80)
  22483. 8008ca0: f997 3003 ldrsb.w r3, [r7, #3]
  22484. 8008ca4: 2b00 cmp r3, #0
  22485. 8008ca6: da0b bge.n 8008cc0 <USBD_LL_IsStallEP+0x34>
  22486. {
  22487. return hpcd->IN_ep[ep_addr & 0x7F].is_stall;
  22488. 8008ca8: 78fb ldrb r3, [r7, #3]
  22489. 8008caa: f003 027f and.w r2, r3, #127 ; 0x7f
  22490. 8008cae: 68f9 ldr r1, [r7, #12]
  22491. 8008cb0: 4613 mov r3, r2
  22492. 8008cb2: 00db lsls r3, r3, #3
  22493. 8008cb4: 1a9b subs r3, r3, r2
  22494. 8008cb6: 009b lsls r3, r3, #2
  22495. 8008cb8: 440b add r3, r1
  22496. 8008cba: 333e adds r3, #62 ; 0x3e
  22497. 8008cbc: 781b ldrb r3, [r3, #0]
  22498. 8008cbe: e00b b.n 8008cd8 <USBD_LL_IsStallEP+0x4c>
  22499. }
  22500. else
  22501. {
  22502. return hpcd->OUT_ep[ep_addr & 0x7F].is_stall;
  22503. 8008cc0: 78fb ldrb r3, [r7, #3]
  22504. 8008cc2: f003 027f and.w r2, r3, #127 ; 0x7f
  22505. 8008cc6: 68f9 ldr r1, [r7, #12]
  22506. 8008cc8: 4613 mov r3, r2
  22507. 8008cca: 00db lsls r3, r3, #3
  22508. 8008ccc: 1a9b subs r3, r3, r2
  22509. 8008cce: 009b lsls r3, r3, #2
  22510. 8008cd0: 440b add r3, r1
  22511. 8008cd2: f503 73ff add.w r3, r3, #510 ; 0x1fe
  22512. 8008cd6: 781b ldrb r3, [r3, #0]
  22513. }
  22514. }
  22515. 8008cd8: 4618 mov r0, r3
  22516. 8008cda: 3714 adds r7, #20
  22517. 8008cdc: 46bd mov sp, r7
  22518. 8008cde: f85d 7b04 ldr.w r7, [sp], #4
  22519. 8008ce2: 4770 bx lr
  22520. 08008ce4 <USBD_LL_SetUSBAddress>:
  22521. * @param pdev: Device handle
  22522. * @param dev_addr: Device address
  22523. * @retval USBD status
  22524. */
  22525. USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr)
  22526. {
  22527. 8008ce4: b580 push {r7, lr}
  22528. 8008ce6: b084 sub sp, #16
  22529. 8008ce8: af00 add r7, sp, #0
  22530. 8008cea: 6078 str r0, [r7, #4]
  22531. 8008cec: 460b mov r3, r1
  22532. 8008cee: 70fb strb r3, [r7, #3]
  22533. HAL_StatusTypeDef hal_status = HAL_OK;
  22534. 8008cf0: 2300 movs r3, #0
  22535. 8008cf2: 73fb strb r3, [r7, #15]
  22536. USBD_StatusTypeDef usb_status = USBD_OK;
  22537. 8008cf4: 2300 movs r3, #0
  22538. 8008cf6: 73bb strb r3, [r7, #14]
  22539. hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr);
  22540. 8008cf8: 687b ldr r3, [r7, #4]
  22541. 8008cfa: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  22542. 8008cfe: 78fa ldrb r2, [r7, #3]
  22543. 8008d00: 4611 mov r1, r2
  22544. 8008d02: 4618 mov r0, r3
  22545. 8008d04: f7f9 fdd1 bl 80028aa <HAL_PCD_SetAddress>
  22546. 8008d08: 4603 mov r3, r0
  22547. 8008d0a: 73fb strb r3, [r7, #15]
  22548. usb_status = USBD_Get_USB_Status(hal_status);
  22549. 8008d0c: 7bfb ldrb r3, [r7, #15]
  22550. 8008d0e: 4618 mov r0, r3
  22551. 8008d10: f000 f8c2 bl 8008e98 <USBD_Get_USB_Status>
  22552. 8008d14: 4603 mov r3, r0
  22553. 8008d16: 73bb strb r3, [r7, #14]
  22554. return usb_status;
  22555. 8008d18: 7bbb ldrb r3, [r7, #14]
  22556. }
  22557. 8008d1a: 4618 mov r0, r3
  22558. 8008d1c: 3710 adds r7, #16
  22559. 8008d1e: 46bd mov sp, r7
  22560. 8008d20: bd80 pop {r7, pc}
  22561. 08008d22 <USBD_LL_Transmit>:
  22562. * @param pbuf: Pointer to data to be sent
  22563. * @param size: Data size
  22564. * @retval USBD status
  22565. */
  22566. USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size)
  22567. {
  22568. 8008d22: b580 push {r7, lr}
  22569. 8008d24: b086 sub sp, #24
  22570. 8008d26: af00 add r7, sp, #0
  22571. 8008d28: 60f8 str r0, [r7, #12]
  22572. 8008d2a: 607a str r2, [r7, #4]
  22573. 8008d2c: 603b str r3, [r7, #0]
  22574. 8008d2e: 460b mov r3, r1
  22575. 8008d30: 72fb strb r3, [r7, #11]
  22576. HAL_StatusTypeDef hal_status = HAL_OK;
  22577. 8008d32: 2300 movs r3, #0
  22578. 8008d34: 75fb strb r3, [r7, #23]
  22579. USBD_StatusTypeDef usb_status = USBD_OK;
  22580. 8008d36: 2300 movs r3, #0
  22581. 8008d38: 75bb strb r3, [r7, #22]
  22582. hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size);
  22583. 8008d3a: 68fb ldr r3, [r7, #12]
  22584. 8008d3c: f8d3 02c4 ldr.w r0, [r3, #708] ; 0x2c4
  22585. 8008d40: 7af9 ldrb r1, [r7, #11]
  22586. 8008d42: 683b ldr r3, [r7, #0]
  22587. 8008d44: 687a ldr r2, [r7, #4]
  22588. 8008d46: f7f9 feea bl 8002b1e <HAL_PCD_EP_Transmit>
  22589. 8008d4a: 4603 mov r3, r0
  22590. 8008d4c: 75fb strb r3, [r7, #23]
  22591. usb_status = USBD_Get_USB_Status(hal_status);
  22592. 8008d4e: 7dfb ldrb r3, [r7, #23]
  22593. 8008d50: 4618 mov r0, r3
  22594. 8008d52: f000 f8a1 bl 8008e98 <USBD_Get_USB_Status>
  22595. 8008d56: 4603 mov r3, r0
  22596. 8008d58: 75bb strb r3, [r7, #22]
  22597. return usb_status;
  22598. 8008d5a: 7dbb ldrb r3, [r7, #22]
  22599. }
  22600. 8008d5c: 4618 mov r0, r3
  22601. 8008d5e: 3718 adds r7, #24
  22602. 8008d60: 46bd mov sp, r7
  22603. 8008d62: bd80 pop {r7, pc}
  22604. 08008d64 <USBD_LL_PrepareReceive>:
  22605. * @param pbuf: Pointer to data to be received
  22606. * @param size: Data size
  22607. * @retval USBD status
  22608. */
  22609. USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size)
  22610. {
  22611. 8008d64: b580 push {r7, lr}
  22612. 8008d66: b086 sub sp, #24
  22613. 8008d68: af00 add r7, sp, #0
  22614. 8008d6a: 60f8 str r0, [r7, #12]
  22615. 8008d6c: 607a str r2, [r7, #4]
  22616. 8008d6e: 603b str r3, [r7, #0]
  22617. 8008d70: 460b mov r3, r1
  22618. 8008d72: 72fb strb r3, [r7, #11]
  22619. HAL_StatusTypeDef hal_status = HAL_OK;
  22620. 8008d74: 2300 movs r3, #0
  22621. 8008d76: 75fb strb r3, [r7, #23]
  22622. USBD_StatusTypeDef usb_status = USBD_OK;
  22623. 8008d78: 2300 movs r3, #0
  22624. 8008d7a: 75bb strb r3, [r7, #22]
  22625. hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size);
  22626. 8008d7c: 68fb ldr r3, [r7, #12]
  22627. 8008d7e: f8d3 02c4 ldr.w r0, [r3, #708] ; 0x2c4
  22628. 8008d82: 7af9 ldrb r1, [r7, #11]
  22629. 8008d84: 683b ldr r3, [r7, #0]
  22630. 8008d86: 687a ldr r2, [r7, #4]
  22631. 8008d88: f7f9 fe66 bl 8002a58 <HAL_PCD_EP_Receive>
  22632. 8008d8c: 4603 mov r3, r0
  22633. 8008d8e: 75fb strb r3, [r7, #23]
  22634. usb_status = USBD_Get_USB_Status(hal_status);
  22635. 8008d90: 7dfb ldrb r3, [r7, #23]
  22636. 8008d92: 4618 mov r0, r3
  22637. 8008d94: f000 f880 bl 8008e98 <USBD_Get_USB_Status>
  22638. 8008d98: 4603 mov r3, r0
  22639. 8008d9a: 75bb strb r3, [r7, #22]
  22640. return usb_status;
  22641. 8008d9c: 7dbb ldrb r3, [r7, #22]
  22642. }
  22643. 8008d9e: 4618 mov r0, r3
  22644. 8008da0: 3718 adds r7, #24
  22645. 8008da2: 46bd mov sp, r7
  22646. 8008da4: bd80 pop {r7, pc}
  22647. 08008da6 <USBD_LL_GetRxDataSize>:
  22648. * @param pdev: Device handle
  22649. * @param ep_addr: Endpoint number
  22650. * @retval Received Data Size
  22651. */
  22652. uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  22653. {
  22654. 8008da6: b580 push {r7, lr}
  22655. 8008da8: b082 sub sp, #8
  22656. 8008daa: af00 add r7, sp, #0
  22657. 8008dac: 6078 str r0, [r7, #4]
  22658. 8008dae: 460b mov r3, r1
  22659. 8008db0: 70fb strb r3, [r7, #3]
  22660. return HAL_PCD_EP_GetRxCount((PCD_HandleTypeDef*) pdev->pData, ep_addr);
  22661. 8008db2: 687b ldr r3, [r7, #4]
  22662. 8008db4: f8d3 32c4 ldr.w r3, [r3, #708] ; 0x2c4
  22663. 8008db8: 78fa ldrb r2, [r7, #3]
  22664. 8008dba: 4611 mov r1, r2
  22665. 8008dbc: 4618 mov r0, r3
  22666. 8008dbe: f7f9 fe96 bl 8002aee <HAL_PCD_EP_GetRxCount>
  22667. 8008dc2: 4603 mov r3, r0
  22668. }
  22669. 8008dc4: 4618 mov r0, r3
  22670. 8008dc6: 3708 adds r7, #8
  22671. 8008dc8: 46bd mov sp, r7
  22672. 8008dca: bd80 pop {r7, pc}
  22673. 08008dcc <HAL_PCDEx_LPM_Callback>:
  22674. * @param hpcd: PCD handle
  22675. * @param msg: LPM message
  22676. * @retval None
  22677. */
  22678. void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg)
  22679. {
  22680. 8008dcc: b580 push {r7, lr}
  22681. 8008dce: b082 sub sp, #8
  22682. 8008dd0: af00 add r7, sp, #0
  22683. 8008dd2: 6078 str r0, [r7, #4]
  22684. 8008dd4: 460b mov r3, r1
  22685. 8008dd6: 70fb strb r3, [r7, #3]
  22686. switch (msg)
  22687. 8008dd8: 78fb ldrb r3, [r7, #3]
  22688. 8008dda: 2b00 cmp r3, #0
  22689. 8008ddc: d002 beq.n 8008de4 <HAL_PCDEx_LPM_Callback+0x18>
  22690. 8008dde: 2b01 cmp r3, #1
  22691. 8008de0: d01f beq.n 8008e22 <HAL_PCDEx_LPM_Callback+0x56>
  22692. /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */
  22693. SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
  22694. }
  22695. break;
  22696. }
  22697. }
  22698. 8008de2: e03b b.n 8008e5c <HAL_PCDEx_LPM_Callback+0x90>
  22699. if (hpcd->Init.low_power_enable)
  22700. 8008de4: 687b ldr r3, [r7, #4]
  22701. 8008de6: 6a1b ldr r3, [r3, #32]
  22702. 8008de8: 2b00 cmp r3, #0
  22703. 8008dea: d007 beq.n 8008dfc <HAL_PCDEx_LPM_Callback+0x30>
  22704. SystemClock_Config();
  22705. 8008dec: f7f7 fba4 bl 8000538 <SystemClock_Config>
  22706. SCB->SCR &= (uint32_t)~((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
  22707. 8008df0: 4b1c ldr r3, [pc, #112] ; (8008e64 <HAL_PCDEx_LPM_Callback+0x98>)
  22708. 8008df2: 691b ldr r3, [r3, #16]
  22709. 8008df4: 4a1b ldr r2, [pc, #108] ; (8008e64 <HAL_PCDEx_LPM_Callback+0x98>)
  22710. 8008df6: f023 0306 bic.w r3, r3, #6
  22711. 8008dfa: 6113 str r3, [r2, #16]
  22712. __HAL_PCD_UNGATE_PHYCLOCK(hpcd);
  22713. 8008dfc: 687b ldr r3, [r7, #4]
  22714. 8008dfe: 681b ldr r3, [r3, #0]
  22715. 8008e00: f503 6360 add.w r3, r3, #3584 ; 0xe00
  22716. 8008e04: 681b ldr r3, [r3, #0]
  22717. 8008e06: 687a ldr r2, [r7, #4]
  22718. 8008e08: 6812 ldr r2, [r2, #0]
  22719. 8008e0a: f502 6260 add.w r2, r2, #3584 ; 0xe00
  22720. 8008e0e: f023 0301 bic.w r3, r3, #1
  22721. 8008e12: 6013 str r3, [r2, #0]
  22722. USBD_LL_Resume(hpcd->pData);
  22723. 8008e14: 687b ldr r3, [r7, #4]
  22724. 8008e16: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22725. 8008e1a: 4618 mov r0, r3
  22726. 8008e1c: f7fe fbc2 bl 80075a4 <USBD_LL_Resume>
  22727. break;
  22728. 8008e20: e01c b.n 8008e5c <HAL_PCDEx_LPM_Callback+0x90>
  22729. __HAL_PCD_GATE_PHYCLOCK(hpcd);
  22730. 8008e22: 687b ldr r3, [r7, #4]
  22731. 8008e24: 681b ldr r3, [r3, #0]
  22732. 8008e26: f503 6360 add.w r3, r3, #3584 ; 0xe00
  22733. 8008e2a: 681b ldr r3, [r3, #0]
  22734. 8008e2c: 687a ldr r2, [r7, #4]
  22735. 8008e2e: 6812 ldr r2, [r2, #0]
  22736. 8008e30: f502 6260 add.w r2, r2, #3584 ; 0xe00
  22737. 8008e34: f043 0301 orr.w r3, r3, #1
  22738. 8008e38: 6013 str r3, [r2, #0]
  22739. USBD_LL_Suspend(hpcd->pData);
  22740. 8008e3a: 687b ldr r3, [r7, #4]
  22741. 8008e3c: f8d3 3404 ldr.w r3, [r3, #1028] ; 0x404
  22742. 8008e40: 4618 mov r0, r3
  22743. 8008e42: f7fe fb99 bl 8007578 <USBD_LL_Suspend>
  22744. if (hpcd->Init.low_power_enable)
  22745. 8008e46: 687b ldr r3, [r7, #4]
  22746. 8008e48: 6a1b ldr r3, [r3, #32]
  22747. 8008e4a: 2b00 cmp r3, #0
  22748. 8008e4c: d005 beq.n 8008e5a <HAL_PCDEx_LPM_Callback+0x8e>
  22749. SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
  22750. 8008e4e: 4b05 ldr r3, [pc, #20] ; (8008e64 <HAL_PCDEx_LPM_Callback+0x98>)
  22751. 8008e50: 691b ldr r3, [r3, #16]
  22752. 8008e52: 4a04 ldr r2, [pc, #16] ; (8008e64 <HAL_PCDEx_LPM_Callback+0x98>)
  22753. 8008e54: f043 0306 orr.w r3, r3, #6
  22754. 8008e58: 6113 str r3, [r2, #16]
  22755. break;
  22756. 8008e5a: bf00 nop
  22757. }
  22758. 8008e5c: bf00 nop
  22759. 8008e5e: 3708 adds r7, #8
  22760. 8008e60: 46bd mov sp, r7
  22761. 8008e62: bd80 pop {r7, pc}
  22762. 8008e64: e000ed00 .word 0xe000ed00
  22763. 08008e68 <USBD_static_malloc>:
  22764. * @brief Static single allocation.
  22765. * @param size: Size of allocated memory
  22766. * @retval None
  22767. */
  22768. void *USBD_static_malloc(uint32_t size)
  22769. {
  22770. 8008e68: b480 push {r7}
  22771. 8008e6a: b083 sub sp, #12
  22772. 8008e6c: af00 add r7, sp, #0
  22773. 8008e6e: 6078 str r0, [r7, #4]
  22774. static uint32_t mem[(sizeof(USBD_CDC_HandleTypeDef)/4)+1];/* On 32-bit boundary */
  22775. return mem;
  22776. 8008e70: 4b03 ldr r3, [pc, #12] ; (8008e80 <USBD_static_malloc+0x18>)
  22777. }
  22778. 8008e72: 4618 mov r0, r3
  22779. 8008e74: 370c adds r7, #12
  22780. 8008e76: 46bd mov sp, r7
  22781. 8008e78: f85d 7b04 ldr.w r7, [sp], #4
  22782. 8008e7c: 4770 bx lr
  22783. 8008e7e: bf00 nop
  22784. 8008e80: 200001b0 .word 0x200001b0
  22785. 08008e84 <USBD_static_free>:
  22786. * @brief Dummy memory free
  22787. * @param p: Pointer to allocated memory address
  22788. * @retval None
  22789. */
  22790. void USBD_static_free(void *p)
  22791. {
  22792. 8008e84: b480 push {r7}
  22793. 8008e86: b083 sub sp, #12
  22794. 8008e88: af00 add r7, sp, #0
  22795. 8008e8a: 6078 str r0, [r7, #4]
  22796. }
  22797. 8008e8c: bf00 nop
  22798. 8008e8e: 370c adds r7, #12
  22799. 8008e90: 46bd mov sp, r7
  22800. 8008e92: f85d 7b04 ldr.w r7, [sp], #4
  22801. 8008e96: 4770 bx lr
  22802. 08008e98 <USBD_Get_USB_Status>:
  22803. * @brief Returns the USB status depending on the HAL status:
  22804. * @param hal_status: HAL status
  22805. * @retval USB status
  22806. */
  22807. USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status)
  22808. {
  22809. 8008e98: b480 push {r7}
  22810. 8008e9a: b085 sub sp, #20
  22811. 8008e9c: af00 add r7, sp, #0
  22812. 8008e9e: 4603 mov r3, r0
  22813. 8008ea0: 71fb strb r3, [r7, #7]
  22814. USBD_StatusTypeDef usb_status = USBD_OK;
  22815. 8008ea2: 2300 movs r3, #0
  22816. 8008ea4: 73fb strb r3, [r7, #15]
  22817. switch (hal_status)
  22818. 8008ea6: 79fb ldrb r3, [r7, #7]
  22819. 8008ea8: 2b03 cmp r3, #3
  22820. 8008eaa: d817 bhi.n 8008edc <USBD_Get_USB_Status+0x44>
  22821. 8008eac: a201 add r2, pc, #4 ; (adr r2, 8008eb4 <USBD_Get_USB_Status+0x1c>)
  22822. 8008eae: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  22823. 8008eb2: bf00 nop
  22824. 8008eb4: 08008ec5 .word 0x08008ec5
  22825. 8008eb8: 08008ecb .word 0x08008ecb
  22826. 8008ebc: 08008ed1 .word 0x08008ed1
  22827. 8008ec0: 08008ed7 .word 0x08008ed7
  22828. {
  22829. case HAL_OK :
  22830. usb_status = USBD_OK;
  22831. 8008ec4: 2300 movs r3, #0
  22832. 8008ec6: 73fb strb r3, [r7, #15]
  22833. break;
  22834. 8008ec8: e00b b.n 8008ee2 <USBD_Get_USB_Status+0x4a>
  22835. case HAL_ERROR :
  22836. usb_status = USBD_FAIL;
  22837. 8008eca: 2303 movs r3, #3
  22838. 8008ecc: 73fb strb r3, [r7, #15]
  22839. break;
  22840. 8008ece: e008 b.n 8008ee2 <USBD_Get_USB_Status+0x4a>
  22841. case HAL_BUSY :
  22842. usb_status = USBD_BUSY;
  22843. 8008ed0: 2301 movs r3, #1
  22844. 8008ed2: 73fb strb r3, [r7, #15]
  22845. break;
  22846. 8008ed4: e005 b.n 8008ee2 <USBD_Get_USB_Status+0x4a>
  22847. case HAL_TIMEOUT :
  22848. usb_status = USBD_FAIL;
  22849. 8008ed6: 2303 movs r3, #3
  22850. 8008ed8: 73fb strb r3, [r7, #15]
  22851. break;
  22852. 8008eda: e002 b.n 8008ee2 <USBD_Get_USB_Status+0x4a>
  22853. default :
  22854. usb_status = USBD_FAIL;
  22855. 8008edc: 2303 movs r3, #3
  22856. 8008ede: 73fb strb r3, [r7, #15]
  22857. break;
  22858. 8008ee0: bf00 nop
  22859. }
  22860. return usb_status;
  22861. 8008ee2: 7bfb ldrb r3, [r7, #15]
  22862. }
  22863. 8008ee4: 4618 mov r0, r3
  22864. 8008ee6: 3714 adds r7, #20
  22865. 8008ee8: 46bd mov sp, r7
  22866. 8008eea: f85d 7b04 ldr.w r7, [sp], #4
  22867. 8008eee: 4770 bx lr
  22868. 08008ef0 <__libc_init_array>:
  22869. 8008ef0: b570 push {r4, r5, r6, lr}
  22870. 8008ef2: 4d0d ldr r5, [pc, #52] ; (8008f28 <__libc_init_array+0x38>)
  22871. 8008ef4: 4c0d ldr r4, [pc, #52] ; (8008f2c <__libc_init_array+0x3c>)
  22872. 8008ef6: 1b64 subs r4, r4, r5
  22873. 8008ef8: 10a4 asrs r4, r4, #2
  22874. 8008efa: 2600 movs r6, #0
  22875. 8008efc: 42a6 cmp r6, r4
  22876. 8008efe: d109 bne.n 8008f14 <__libc_init_array+0x24>
  22877. 8008f00: 4d0b ldr r5, [pc, #44] ; (8008f30 <__libc_init_array+0x40>)
  22878. 8008f02: 4c0c ldr r4, [pc, #48] ; (8008f34 <__libc_init_array+0x44>)
  22879. 8008f04: f000 f820 bl 8008f48 <_init>
  22880. 8008f08: 1b64 subs r4, r4, r5
  22881. 8008f0a: 10a4 asrs r4, r4, #2
  22882. 8008f0c: 2600 movs r6, #0
  22883. 8008f0e: 42a6 cmp r6, r4
  22884. 8008f10: d105 bne.n 8008f1e <__libc_init_array+0x2e>
  22885. 8008f12: bd70 pop {r4, r5, r6, pc}
  22886. 8008f14: f855 3b04 ldr.w r3, [r5], #4
  22887. 8008f18: 4798 blx r3
  22888. 8008f1a: 3601 adds r6, #1
  22889. 8008f1c: e7ee b.n 8008efc <__libc_init_array+0xc>
  22890. 8008f1e: f855 3b04 ldr.w r3, [r5], #4
  22891. 8008f22: 4798 blx r3
  22892. 8008f24: 3601 adds r6, #1
  22893. 8008f26: e7f2 b.n 8008f0e <__libc_init_array+0x1e>
  22894. 8008f28: 08008fc8 .word 0x08008fc8
  22895. 8008f2c: 08008fc8 .word 0x08008fc8
  22896. 8008f30: 08008fc8 .word 0x08008fc8
  22897. 8008f34: 08008fcc .word 0x08008fcc
  22898. 08008f38 <memset>:
  22899. 8008f38: 4402 add r2, r0
  22900. 8008f3a: 4603 mov r3, r0
  22901. 8008f3c: 4293 cmp r3, r2
  22902. 8008f3e: d100 bne.n 8008f42 <memset+0xa>
  22903. 8008f40: 4770 bx lr
  22904. 8008f42: f803 1b01 strb.w r1, [r3], #1
  22905. 8008f46: e7f9 b.n 8008f3c <memset+0x4>
  22906. 08008f48 <_init>:
  22907. 8008f48: b5f8 push {r3, r4, r5, r6, r7, lr}
  22908. 8008f4a: bf00 nop
  22909. 8008f4c: bcf8 pop {r3, r4, r5, r6, r7}
  22910. 8008f4e: bc08 pop {r3}
  22911. 8008f50: 469e mov lr, r3
  22912. 8008f52: 4770 bx lr
  22913. 08008f54 <_fini>:
  22914. 8008f54: b5f8 push {r3, r4, r5, r6, r7, lr}
  22915. 8008f56: bf00 nop
  22916. 8008f58: bcf8 pop {r3, r4, r5, r6, r7}
  22917. 8008f5a: bc08 pop {r3}
  22918. 8008f5c: 469e mov lr, r3
  22919. 8008f5e: 4770 bx lr