stm32f405_boot.list 551 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373
  1. stm32f405_boot.elf: file format elf32-littlearm
  2. Sections:
  3. Idx Name Size VMA LMA File off Algn
  4. 0 .isr_vector 00000188 08000000 08000000 00001000 2**0
  5. CONTENTS, ALLOC, LOAD, READONLY, DATA
  6. 1 .version_info 00000004 08000188 08000188 00001188 2**2
  7. CONTENTS, ALLOC, LOAD, READONLY, DATA
  8. 2 .text 00005834 0800018c 0800018c 0000118c 2**2
  9. CONTENTS, ALLOC, LOAD, READONLY, CODE
  10. 3 .rodata 00000430 080059c0 080059c0 000069c0 2**2
  11. CONTENTS, ALLOC, LOAD, READONLY, DATA
  12. 4 .ARM.extab 00000000 08005df0 08005df0 00007014 2**0
  13. CONTENTS, READONLY
  14. 5 .ARM 00000008 08005df0 08005df0 00006df0 2**2
  15. CONTENTS, ALLOC, LOAD, READONLY, DATA
  16. 6 .preinit_array 00000000 08005df8 08005df8 00007014 2**0
  17. CONTENTS, ALLOC, LOAD, DATA
  18. 7 .init_array 00000004 08005df8 08005df8 00006df8 2**2
  19. CONTENTS, ALLOC, LOAD, READONLY, DATA
  20. 8 .fini_array 00000004 08005dfc 08005dfc 00006dfc 2**2
  21. CONTENTS, ALLOC, LOAD, READONLY, DATA
  22. 9 .data 00000014 20000000 08005e00 00007000 2**2
  23. CONTENTS, ALLOC, LOAD, DATA
  24. 10 .ccmram 00000000 10000000 10000000 00007014 2**0
  25. CONTENTS
  26. 11 .bss 00001eac 20000014 20000014 00007014 2**2
  27. ALLOC
  28. 12 ._user_heap_stack 00000600 20001ec0 20001ec0 00007014 2**0
  29. ALLOC
  30. 13 .ARM.attributes 00000030 00000000 00000000 00007014 2**0
  31. CONTENTS, READONLY
  32. 14 .debug_info 0000d684 00000000 00000000 00007044 2**0
  33. CONTENTS, READONLY, DEBUGGING, OCTETS
  34. 15 .debug_abbrev 00002875 00000000 00000000 000146c8 2**0
  35. CONTENTS, READONLY, DEBUGGING, OCTETS
  36. 16 .debug_aranges 00000d80 00000000 00000000 00016f40 2**3
  37. CONTENTS, READONLY, DEBUGGING, OCTETS
  38. 17 .debug_rnglists 00000a4b 00000000 00000000 00017cc0 2**0
  39. CONTENTS, READONLY, DEBUGGING, OCTETS
  40. 18 .debug_macro 0002079d 00000000 00000000 0001870b 2**0
  41. CONTENTS, READONLY, DEBUGGING, OCTETS
  42. 19 .debug_line 00011046 00000000 00000000 00038ea8 2**0
  43. CONTENTS, READONLY, DEBUGGING, OCTETS
  44. 20 .debug_str 000c1a67 00000000 00000000 00049eee 2**0
  45. CONTENTS, READONLY, DEBUGGING, OCTETS
  46. 21 .comment 00000043 00000000 00000000 0010b955 2**0
  47. CONTENTS, READONLY
  48. 22 .debug_frame 000036d0 00000000 00000000 0010b998 2**2
  49. CONTENTS, READONLY, DEBUGGING, OCTETS
  50. 23 .debug_line_str 00000066 00000000 00000000 0010f068 2**0
  51. CONTENTS, READONLY, DEBUGGING, OCTETS
  52. Disassembly of section .text:
  53. 0800018c <__do_global_dtors_aux>:
  54. 800018c: b510 push {r4, lr}
  55. 800018e: 4c05 ldr r4, [pc, #20] @ (80001a4 <__do_global_dtors_aux+0x18>)
  56. 8000190: 7823 ldrb r3, [r4, #0]
  57. 8000192: b933 cbnz r3, 80001a2 <__do_global_dtors_aux+0x16>
  58. 8000194: 4b04 ldr r3, [pc, #16] @ (80001a8 <__do_global_dtors_aux+0x1c>)
  59. 8000196: b113 cbz r3, 800019e <__do_global_dtors_aux+0x12>
  60. 8000198: 4804 ldr r0, [pc, #16] @ (80001ac <__do_global_dtors_aux+0x20>)
  61. 800019a: f3af 8000 nop.w
  62. 800019e: 2301 movs r3, #1
  63. 80001a0: 7023 strb r3, [r4, #0]
  64. 80001a2: bd10 pop {r4, pc}
  65. 80001a4: 20000014 .word 0x20000014
  66. 80001a8: 00000000 .word 0x00000000
  67. 80001ac: 080059a8 .word 0x080059a8
  68. 080001b0 <frame_dummy>:
  69. 80001b0: b508 push {r3, lr}
  70. 80001b2: 4b03 ldr r3, [pc, #12] @ (80001c0 <frame_dummy+0x10>)
  71. 80001b4: b11b cbz r3, 80001be <frame_dummy+0xe>
  72. 80001b6: 4903 ldr r1, [pc, #12] @ (80001c4 <frame_dummy+0x14>)
  73. 80001b8: 4803 ldr r0, [pc, #12] @ (80001c8 <frame_dummy+0x18>)
  74. 80001ba: f3af 8000 nop.w
  75. 80001be: bd08 pop {r3, pc}
  76. 80001c0: 00000000 .word 0x00000000
  77. 80001c4: 20000018 .word 0x20000018
  78. 80001c8: 080059a8 .word 0x080059a8
  79. 080001cc <__aeabi_uldivmod>:
  80. 80001cc: b953 cbnz r3, 80001e4 <__aeabi_uldivmod+0x18>
  81. 80001ce: b94a cbnz r2, 80001e4 <__aeabi_uldivmod+0x18>
  82. 80001d0: 2900 cmp r1, #0
  83. 80001d2: bf08 it eq
  84. 80001d4: 2800 cmpeq r0, #0
  85. 80001d6: bf1c itt ne
  86. 80001d8: f04f 31ff movne.w r1, #4294967295
  87. 80001dc: f04f 30ff movne.w r0, #4294967295
  88. 80001e0: f000 b988 b.w 80004f4 <__aeabi_idiv0>
  89. 80001e4: f1ad 0c08 sub.w ip, sp, #8
  90. 80001e8: e96d ce04 strd ip, lr, [sp, #-16]!
  91. 80001ec: f000 f806 bl 80001fc <__udivmoddi4>
  92. 80001f0: f8dd e004 ldr.w lr, [sp, #4]
  93. 80001f4: e9dd 2302 ldrd r2, r3, [sp, #8]
  94. 80001f8: b004 add sp, #16
  95. 80001fa: 4770 bx lr
  96. 080001fc <__udivmoddi4>:
  97. 80001fc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  98. 8000200: 9d08 ldr r5, [sp, #32]
  99. 8000202: 468e mov lr, r1
  100. 8000204: 4604 mov r4, r0
  101. 8000206: 4688 mov r8, r1
  102. 8000208: 2b00 cmp r3, #0
  103. 800020a: d14a bne.n 80002a2 <__udivmoddi4+0xa6>
  104. 800020c: 428a cmp r2, r1
  105. 800020e: 4617 mov r7, r2
  106. 8000210: d962 bls.n 80002d8 <__udivmoddi4+0xdc>
  107. 8000212: fab2 f682 clz r6, r2
  108. 8000216: b14e cbz r6, 800022c <__udivmoddi4+0x30>
  109. 8000218: f1c6 0320 rsb r3, r6, #32
  110. 800021c: fa01 f806 lsl.w r8, r1, r6
  111. 8000220: fa20 f303 lsr.w r3, r0, r3
  112. 8000224: 40b7 lsls r7, r6
  113. 8000226: ea43 0808 orr.w r8, r3, r8
  114. 800022a: 40b4 lsls r4, r6
  115. 800022c: ea4f 4e17 mov.w lr, r7, lsr #16
  116. 8000230: fa1f fc87 uxth.w ip, r7
  117. 8000234: fbb8 f1fe udiv r1, r8, lr
  118. 8000238: 0c23 lsrs r3, r4, #16
  119. 800023a: fb0e 8811 mls r8, lr, r1, r8
  120. 800023e: ea43 4308 orr.w r3, r3, r8, lsl #16
  121. 8000242: fb01 f20c mul.w r2, r1, ip
  122. 8000246: 429a cmp r2, r3
  123. 8000248: d909 bls.n 800025e <__udivmoddi4+0x62>
  124. 800024a: 18fb adds r3, r7, r3
  125. 800024c: f101 30ff add.w r0, r1, #4294967295
  126. 8000250: f080 80ea bcs.w 8000428 <__udivmoddi4+0x22c>
  127. 8000254: 429a cmp r2, r3
  128. 8000256: f240 80e7 bls.w 8000428 <__udivmoddi4+0x22c>
  129. 800025a: 3902 subs r1, #2
  130. 800025c: 443b add r3, r7
  131. 800025e: 1a9a subs r2, r3, r2
  132. 8000260: b2a3 uxth r3, r4
  133. 8000262: fbb2 f0fe udiv r0, r2, lr
  134. 8000266: fb0e 2210 mls r2, lr, r0, r2
  135. 800026a: ea43 4302 orr.w r3, r3, r2, lsl #16
  136. 800026e: fb00 fc0c mul.w ip, r0, ip
  137. 8000272: 459c cmp ip, r3
  138. 8000274: d909 bls.n 800028a <__udivmoddi4+0x8e>
  139. 8000276: 18fb adds r3, r7, r3
  140. 8000278: f100 32ff add.w r2, r0, #4294967295
  141. 800027c: f080 80d6 bcs.w 800042c <__udivmoddi4+0x230>
  142. 8000280: 459c cmp ip, r3
  143. 8000282: f240 80d3 bls.w 800042c <__udivmoddi4+0x230>
  144. 8000286: 443b add r3, r7
  145. 8000288: 3802 subs r0, #2
  146. 800028a: ea40 4001 orr.w r0, r0, r1, lsl #16
  147. 800028e: eba3 030c sub.w r3, r3, ip
  148. 8000292: 2100 movs r1, #0
  149. 8000294: b11d cbz r5, 800029e <__udivmoddi4+0xa2>
  150. 8000296: 40f3 lsrs r3, r6
  151. 8000298: 2200 movs r2, #0
  152. 800029a: e9c5 3200 strd r3, r2, [r5]
  153. 800029e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  154. 80002a2: 428b cmp r3, r1
  155. 80002a4: d905 bls.n 80002b2 <__udivmoddi4+0xb6>
  156. 80002a6: b10d cbz r5, 80002ac <__udivmoddi4+0xb0>
  157. 80002a8: e9c5 0100 strd r0, r1, [r5]
  158. 80002ac: 2100 movs r1, #0
  159. 80002ae: 4608 mov r0, r1
  160. 80002b0: e7f5 b.n 800029e <__udivmoddi4+0xa2>
  161. 80002b2: fab3 f183 clz r1, r3
  162. 80002b6: 2900 cmp r1, #0
  163. 80002b8: d146 bne.n 8000348 <__udivmoddi4+0x14c>
  164. 80002ba: 4573 cmp r3, lr
  165. 80002bc: d302 bcc.n 80002c4 <__udivmoddi4+0xc8>
  166. 80002be: 4282 cmp r2, r0
  167. 80002c0: f200 8105 bhi.w 80004ce <__udivmoddi4+0x2d2>
  168. 80002c4: 1a84 subs r4, r0, r2
  169. 80002c6: eb6e 0203 sbc.w r2, lr, r3
  170. 80002ca: 2001 movs r0, #1
  171. 80002cc: 4690 mov r8, r2
  172. 80002ce: 2d00 cmp r5, #0
  173. 80002d0: d0e5 beq.n 800029e <__udivmoddi4+0xa2>
  174. 80002d2: e9c5 4800 strd r4, r8, [r5]
  175. 80002d6: e7e2 b.n 800029e <__udivmoddi4+0xa2>
  176. 80002d8: 2a00 cmp r2, #0
  177. 80002da: f000 8090 beq.w 80003fe <__udivmoddi4+0x202>
  178. 80002de: fab2 f682 clz r6, r2
  179. 80002e2: 2e00 cmp r6, #0
  180. 80002e4: f040 80a4 bne.w 8000430 <__udivmoddi4+0x234>
  181. 80002e8: 1a8a subs r2, r1, r2
  182. 80002ea: 0c03 lsrs r3, r0, #16
  183. 80002ec: ea4f 4e17 mov.w lr, r7, lsr #16
  184. 80002f0: b280 uxth r0, r0
  185. 80002f2: b2bc uxth r4, r7
  186. 80002f4: 2101 movs r1, #1
  187. 80002f6: fbb2 fcfe udiv ip, r2, lr
  188. 80002fa: fb0e 221c mls r2, lr, ip, r2
  189. 80002fe: ea43 4302 orr.w r3, r3, r2, lsl #16
  190. 8000302: fb04 f20c mul.w r2, r4, ip
  191. 8000306: 429a cmp r2, r3
  192. 8000308: d907 bls.n 800031a <__udivmoddi4+0x11e>
  193. 800030a: 18fb adds r3, r7, r3
  194. 800030c: f10c 38ff add.w r8, ip, #4294967295
  195. 8000310: d202 bcs.n 8000318 <__udivmoddi4+0x11c>
  196. 8000312: 429a cmp r2, r3
  197. 8000314: f200 80e0 bhi.w 80004d8 <__udivmoddi4+0x2dc>
  198. 8000318: 46c4 mov ip, r8
  199. 800031a: 1a9b subs r3, r3, r2
  200. 800031c: fbb3 f2fe udiv r2, r3, lr
  201. 8000320: fb0e 3312 mls r3, lr, r2, r3
  202. 8000324: ea40 4303 orr.w r3, r0, r3, lsl #16
  203. 8000328: fb02 f404 mul.w r4, r2, r4
  204. 800032c: 429c cmp r4, r3
  205. 800032e: d907 bls.n 8000340 <__udivmoddi4+0x144>
  206. 8000330: 18fb adds r3, r7, r3
  207. 8000332: f102 30ff add.w r0, r2, #4294967295
  208. 8000336: d202 bcs.n 800033e <__udivmoddi4+0x142>
  209. 8000338: 429c cmp r4, r3
  210. 800033a: f200 80ca bhi.w 80004d2 <__udivmoddi4+0x2d6>
  211. 800033e: 4602 mov r2, r0
  212. 8000340: 1b1b subs r3, r3, r4
  213. 8000342: ea42 400c orr.w r0, r2, ip, lsl #16
  214. 8000346: e7a5 b.n 8000294 <__udivmoddi4+0x98>
  215. 8000348: f1c1 0620 rsb r6, r1, #32
  216. 800034c: 408b lsls r3, r1
  217. 800034e: fa22 f706 lsr.w r7, r2, r6
  218. 8000352: 431f orrs r7, r3
  219. 8000354: fa0e f401 lsl.w r4, lr, r1
  220. 8000358: fa20 f306 lsr.w r3, r0, r6
  221. 800035c: fa2e fe06 lsr.w lr, lr, r6
  222. 8000360: ea4f 4917 mov.w r9, r7, lsr #16
  223. 8000364: 4323 orrs r3, r4
  224. 8000366: fa00 f801 lsl.w r8, r0, r1
  225. 800036a: fa1f fc87 uxth.w ip, r7
  226. 800036e: fbbe f0f9 udiv r0, lr, r9
  227. 8000372: 0c1c lsrs r4, r3, #16
  228. 8000374: fb09 ee10 mls lr, r9, r0, lr
  229. 8000378: ea44 440e orr.w r4, r4, lr, lsl #16
  230. 800037c: fb00 fe0c mul.w lr, r0, ip
  231. 8000380: 45a6 cmp lr, r4
  232. 8000382: fa02 f201 lsl.w r2, r2, r1
  233. 8000386: d909 bls.n 800039c <__udivmoddi4+0x1a0>
  234. 8000388: 193c adds r4, r7, r4
  235. 800038a: f100 3aff add.w sl, r0, #4294967295
  236. 800038e: f080 809c bcs.w 80004ca <__udivmoddi4+0x2ce>
  237. 8000392: 45a6 cmp lr, r4
  238. 8000394: f240 8099 bls.w 80004ca <__udivmoddi4+0x2ce>
  239. 8000398: 3802 subs r0, #2
  240. 800039a: 443c add r4, r7
  241. 800039c: eba4 040e sub.w r4, r4, lr
  242. 80003a0: fa1f fe83 uxth.w lr, r3
  243. 80003a4: fbb4 f3f9 udiv r3, r4, r9
  244. 80003a8: fb09 4413 mls r4, r9, r3, r4
  245. 80003ac: ea4e 4404 orr.w r4, lr, r4, lsl #16
  246. 80003b0: fb03 fc0c mul.w ip, r3, ip
  247. 80003b4: 45a4 cmp ip, r4
  248. 80003b6: d908 bls.n 80003ca <__udivmoddi4+0x1ce>
  249. 80003b8: 193c adds r4, r7, r4
  250. 80003ba: f103 3eff add.w lr, r3, #4294967295
  251. 80003be: f080 8082 bcs.w 80004c6 <__udivmoddi4+0x2ca>
  252. 80003c2: 45a4 cmp ip, r4
  253. 80003c4: d97f bls.n 80004c6 <__udivmoddi4+0x2ca>
  254. 80003c6: 3b02 subs r3, #2
  255. 80003c8: 443c add r4, r7
  256. 80003ca: ea43 4000 orr.w r0, r3, r0, lsl #16
  257. 80003ce: eba4 040c sub.w r4, r4, ip
  258. 80003d2: fba0 ec02 umull lr, ip, r0, r2
  259. 80003d6: 4564 cmp r4, ip
  260. 80003d8: 4673 mov r3, lr
  261. 80003da: 46e1 mov r9, ip
  262. 80003dc: d362 bcc.n 80004a4 <__udivmoddi4+0x2a8>
  263. 80003de: d05f beq.n 80004a0 <__udivmoddi4+0x2a4>
  264. 80003e0: b15d cbz r5, 80003fa <__udivmoddi4+0x1fe>
  265. 80003e2: ebb8 0203 subs.w r2, r8, r3
  266. 80003e6: eb64 0409 sbc.w r4, r4, r9
  267. 80003ea: fa04 f606 lsl.w r6, r4, r6
  268. 80003ee: fa22 f301 lsr.w r3, r2, r1
  269. 80003f2: 431e orrs r6, r3
  270. 80003f4: 40cc lsrs r4, r1
  271. 80003f6: e9c5 6400 strd r6, r4, [r5]
  272. 80003fa: 2100 movs r1, #0
  273. 80003fc: e74f b.n 800029e <__udivmoddi4+0xa2>
  274. 80003fe: fbb1 fcf2 udiv ip, r1, r2
  275. 8000402: 0c01 lsrs r1, r0, #16
  276. 8000404: ea41 410e orr.w r1, r1, lr, lsl #16
  277. 8000408: b280 uxth r0, r0
  278. 800040a: ea40 4201 orr.w r2, r0, r1, lsl #16
  279. 800040e: 463b mov r3, r7
  280. 8000410: 4638 mov r0, r7
  281. 8000412: 463c mov r4, r7
  282. 8000414: 46b8 mov r8, r7
  283. 8000416: 46be mov lr, r7
  284. 8000418: 2620 movs r6, #32
  285. 800041a: fbb1 f1f7 udiv r1, r1, r7
  286. 800041e: eba2 0208 sub.w r2, r2, r8
  287. 8000422: ea41 410c orr.w r1, r1, ip, lsl #16
  288. 8000426: e766 b.n 80002f6 <__udivmoddi4+0xfa>
  289. 8000428: 4601 mov r1, r0
  290. 800042a: e718 b.n 800025e <__udivmoddi4+0x62>
  291. 800042c: 4610 mov r0, r2
  292. 800042e: e72c b.n 800028a <__udivmoddi4+0x8e>
  293. 8000430: f1c6 0220 rsb r2, r6, #32
  294. 8000434: fa2e f302 lsr.w r3, lr, r2
  295. 8000438: 40b7 lsls r7, r6
  296. 800043a: 40b1 lsls r1, r6
  297. 800043c: fa20 f202 lsr.w r2, r0, r2
  298. 8000440: ea4f 4e17 mov.w lr, r7, lsr #16
  299. 8000444: 430a orrs r2, r1
  300. 8000446: fbb3 f8fe udiv r8, r3, lr
  301. 800044a: b2bc uxth r4, r7
  302. 800044c: fb0e 3318 mls r3, lr, r8, r3
  303. 8000450: 0c11 lsrs r1, r2, #16
  304. 8000452: ea41 4103 orr.w r1, r1, r3, lsl #16
  305. 8000456: fb08 f904 mul.w r9, r8, r4
  306. 800045a: 40b0 lsls r0, r6
  307. 800045c: 4589 cmp r9, r1
  308. 800045e: ea4f 4310 mov.w r3, r0, lsr #16
  309. 8000462: b280 uxth r0, r0
  310. 8000464: d93e bls.n 80004e4 <__udivmoddi4+0x2e8>
  311. 8000466: 1879 adds r1, r7, r1
  312. 8000468: f108 3cff add.w ip, r8, #4294967295
  313. 800046c: d201 bcs.n 8000472 <__udivmoddi4+0x276>
  314. 800046e: 4589 cmp r9, r1
  315. 8000470: d81f bhi.n 80004b2 <__udivmoddi4+0x2b6>
  316. 8000472: eba1 0109 sub.w r1, r1, r9
  317. 8000476: fbb1 f9fe udiv r9, r1, lr
  318. 800047a: fb09 f804 mul.w r8, r9, r4
  319. 800047e: fb0e 1119 mls r1, lr, r9, r1
  320. 8000482: b292 uxth r2, r2
  321. 8000484: ea42 4201 orr.w r2, r2, r1, lsl #16
  322. 8000488: 4542 cmp r2, r8
  323. 800048a: d229 bcs.n 80004e0 <__udivmoddi4+0x2e4>
  324. 800048c: 18ba adds r2, r7, r2
  325. 800048e: f109 31ff add.w r1, r9, #4294967295
  326. 8000492: d2c4 bcs.n 800041e <__udivmoddi4+0x222>
  327. 8000494: 4542 cmp r2, r8
  328. 8000496: d2c2 bcs.n 800041e <__udivmoddi4+0x222>
  329. 8000498: f1a9 0102 sub.w r1, r9, #2
  330. 800049c: 443a add r2, r7
  331. 800049e: e7be b.n 800041e <__udivmoddi4+0x222>
  332. 80004a0: 45f0 cmp r8, lr
  333. 80004a2: d29d bcs.n 80003e0 <__udivmoddi4+0x1e4>
  334. 80004a4: ebbe 0302 subs.w r3, lr, r2
  335. 80004a8: eb6c 0c07 sbc.w ip, ip, r7
  336. 80004ac: 3801 subs r0, #1
  337. 80004ae: 46e1 mov r9, ip
  338. 80004b0: e796 b.n 80003e0 <__udivmoddi4+0x1e4>
  339. 80004b2: eba7 0909 sub.w r9, r7, r9
  340. 80004b6: 4449 add r1, r9
  341. 80004b8: f1a8 0c02 sub.w ip, r8, #2
  342. 80004bc: fbb1 f9fe udiv r9, r1, lr
  343. 80004c0: fb09 f804 mul.w r8, r9, r4
  344. 80004c4: e7db b.n 800047e <__udivmoddi4+0x282>
  345. 80004c6: 4673 mov r3, lr
  346. 80004c8: e77f b.n 80003ca <__udivmoddi4+0x1ce>
  347. 80004ca: 4650 mov r0, sl
  348. 80004cc: e766 b.n 800039c <__udivmoddi4+0x1a0>
  349. 80004ce: 4608 mov r0, r1
  350. 80004d0: e6fd b.n 80002ce <__udivmoddi4+0xd2>
  351. 80004d2: 443b add r3, r7
  352. 80004d4: 3a02 subs r2, #2
  353. 80004d6: e733 b.n 8000340 <__udivmoddi4+0x144>
  354. 80004d8: f1ac 0c02 sub.w ip, ip, #2
  355. 80004dc: 443b add r3, r7
  356. 80004de: e71c b.n 800031a <__udivmoddi4+0x11e>
  357. 80004e0: 4649 mov r1, r9
  358. 80004e2: e79c b.n 800041e <__udivmoddi4+0x222>
  359. 80004e4: eba1 0109 sub.w r1, r1, r9
  360. 80004e8: 46c4 mov ip, r8
  361. 80004ea: fbb1 f9fe udiv r9, r1, lr
  362. 80004ee: fb09 f804 mul.w r8, r9, r4
  363. 80004f2: e7c4 b.n 800047e <__udivmoddi4+0x282>
  364. 080004f4 <__aeabi_idiv0>:
  365. 80004f4: 4770 bx lr
  366. 80004f6: bf00 nop
  367. 080004f8 <MX_CAN1_Init>:
  368. CAN_HandleTypeDef hcan1;
  369. /* CAN1 init function */
  370. void MX_CAN1_Init(void)
  371. {
  372. 80004f8: b580 push {r7, lr}
  373. 80004fa: af00 add r7, sp, #0
  374. /* USER CODE END CAN1_Init 0 */
  375. /* USER CODE BEGIN CAN1_Init 1 */
  376. /* USER CODE END CAN1_Init 1 */
  377. hcan1.Instance = CAN1;
  378. 80004fc: 4b17 ldr r3, [pc, #92] @ (800055c <MX_CAN1_Init+0x64>)
  379. 80004fe: 4a18 ldr r2, [pc, #96] @ (8000560 <MX_CAN1_Init+0x68>)
  380. 8000500: 601a str r2, [r3, #0]
  381. // hcan1.Init.Prescaler = 12;//250k
  382. hcan1.Init.Prescaler = 6;//500k
  383. 8000502: 4b16 ldr r3, [pc, #88] @ (800055c <MX_CAN1_Init+0x64>)
  384. 8000504: 2206 movs r2, #6
  385. 8000506: 605a str r2, [r3, #4]
  386. // hcan1.Init.Prescaler = 3;//1000k
  387. hcan1.Init.Mode = CAN_MODE_NORMAL;
  388. 8000508: 4b14 ldr r3, [pc, #80] @ (800055c <MX_CAN1_Init+0x64>)
  389. 800050a: 2200 movs r2, #0
  390. 800050c: 609a str r2, [r3, #8]
  391. hcan1.Init.SyncJumpWidth = CAN_SJW_1TQ;
  392. 800050e: 4b13 ldr r3, [pc, #76] @ (800055c <MX_CAN1_Init+0x64>)
  393. 8000510: 2200 movs r2, #0
  394. 8000512: 60da str r2, [r3, #12]
  395. hcan1.Init.TimeSeg1 = CAN_BS1_11TQ;
  396. 8000514: 4b11 ldr r3, [pc, #68] @ (800055c <MX_CAN1_Init+0x64>)
  397. 8000516: f44f 2220 mov.w r2, #655360 @ 0xa0000
  398. 800051a: 611a str r2, [r3, #16]
  399. hcan1.Init.TimeSeg2 = CAN_BS2_2TQ;
  400. 800051c: 4b0f ldr r3, [pc, #60] @ (800055c <MX_CAN1_Init+0x64>)
  401. 800051e: f44f 1280 mov.w r2, #1048576 @ 0x100000
  402. 8000522: 615a str r2, [r3, #20]
  403. hcan1.Init.TimeTriggeredMode = DISABLE;
  404. 8000524: 4b0d ldr r3, [pc, #52] @ (800055c <MX_CAN1_Init+0x64>)
  405. 8000526: 2200 movs r2, #0
  406. 8000528: 761a strb r2, [r3, #24]
  407. hcan1.Init.AutoBusOff = ENABLE;
  408. 800052a: 4b0c ldr r3, [pc, #48] @ (800055c <MX_CAN1_Init+0x64>)
  409. 800052c: 2201 movs r2, #1
  410. 800052e: 765a strb r2, [r3, #25]
  411. hcan1.Init.AutoWakeUp = ENABLE;
  412. 8000530: 4b0a ldr r3, [pc, #40] @ (800055c <MX_CAN1_Init+0x64>)
  413. 8000532: 2201 movs r2, #1
  414. 8000534: 769a strb r2, [r3, #26]
  415. hcan1.Init.AutoRetransmission = ENABLE;
  416. 8000536: 4b09 ldr r3, [pc, #36] @ (800055c <MX_CAN1_Init+0x64>)
  417. 8000538: 2201 movs r2, #1
  418. 800053a: 76da strb r2, [r3, #27]
  419. hcan1.Init.ReceiveFifoLocked = DISABLE;
  420. 800053c: 4b07 ldr r3, [pc, #28] @ (800055c <MX_CAN1_Init+0x64>)
  421. 800053e: 2200 movs r2, #0
  422. 8000540: 771a strb r2, [r3, #28]
  423. hcan1.Init.TransmitFifoPriority = DISABLE;
  424. 8000542: 4b06 ldr r3, [pc, #24] @ (800055c <MX_CAN1_Init+0x64>)
  425. 8000544: 2200 movs r2, #0
  426. 8000546: 775a strb r2, [r3, #29]
  427. if (HAL_CAN_Init(&hcan1) != HAL_OK)
  428. 8000548: 4804 ldr r0, [pc, #16] @ (800055c <MX_CAN1_Init+0x64>)
  429. 800054a: f002 fe09 bl 8003160 <HAL_CAN_Init>
  430. 800054e: 4603 mov r3, r0
  431. 8000550: 2b00 cmp r3, #0
  432. 8000552: d001 beq.n 8000558 <MX_CAN1_Init+0x60>
  433. {
  434. Error_Handler();
  435. 8000554: f000 fdf6 bl 8001144 <Error_Handler>
  436. }
  437. /* USER CODE BEGIN CAN1_Init 2 */
  438. /* USER CODE END CAN1_Init 2 */
  439. }
  440. 8000558: bf00 nop
  441. 800055a: bd80 pop {r7, pc}
  442. 800055c: 20000064 .word 0x20000064
  443. 8000560: 40006400 .word 0x40006400
  444. 08000564 <HAL_CAN_MspInit>:
  445. void HAL_CAN_MspInit(CAN_HandleTypeDef* canHandle)
  446. {
  447. 8000564: b580 push {r7, lr}
  448. 8000566: b08a sub sp, #40 @ 0x28
  449. 8000568: af00 add r7, sp, #0
  450. 800056a: 6078 str r0, [r7, #4]
  451. GPIO_InitTypeDef GPIO_InitStruct = {0};
  452. 800056c: f107 0314 add.w r3, r7, #20
  453. 8000570: 2200 movs r2, #0
  454. 8000572: 601a str r2, [r3, #0]
  455. 8000574: 605a str r2, [r3, #4]
  456. 8000576: 609a str r2, [r3, #8]
  457. 8000578: 60da str r2, [r3, #12]
  458. 800057a: 611a str r2, [r3, #16]
  459. if(canHandle->Instance==CAN1)
  460. 800057c: 687b ldr r3, [r7, #4]
  461. 800057e: 681b ldr r3, [r3, #0]
  462. 8000580: 4a1d ldr r2, [pc, #116] @ (80005f8 <HAL_CAN_MspInit+0x94>)
  463. 8000582: 4293 cmp r3, r2
  464. 8000584: d134 bne.n 80005f0 <HAL_CAN_MspInit+0x8c>
  465. {
  466. /* USER CODE BEGIN CAN1_MspInit 0 */
  467. /* USER CODE END CAN1_MspInit 0 */
  468. /* CAN1 clock enable */
  469. __HAL_RCC_CAN1_CLK_ENABLE();
  470. 8000586: 2300 movs r3, #0
  471. 8000588: 613b str r3, [r7, #16]
  472. 800058a: 4b1c ldr r3, [pc, #112] @ (80005fc <HAL_CAN_MspInit+0x98>)
  473. 800058c: 6c1b ldr r3, [r3, #64] @ 0x40
  474. 800058e: 4a1b ldr r2, [pc, #108] @ (80005fc <HAL_CAN_MspInit+0x98>)
  475. 8000590: f043 7300 orr.w r3, r3, #33554432 @ 0x2000000
  476. 8000594: 6413 str r3, [r2, #64] @ 0x40
  477. 8000596: 4b19 ldr r3, [pc, #100] @ (80005fc <HAL_CAN_MspInit+0x98>)
  478. 8000598: 6c1b ldr r3, [r3, #64] @ 0x40
  479. 800059a: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
  480. 800059e: 613b str r3, [r7, #16]
  481. 80005a0: 693b ldr r3, [r7, #16]
  482. __HAL_RCC_GPIOB_CLK_ENABLE();
  483. 80005a2: 2300 movs r3, #0
  484. 80005a4: 60fb str r3, [r7, #12]
  485. 80005a6: 4b15 ldr r3, [pc, #84] @ (80005fc <HAL_CAN_MspInit+0x98>)
  486. 80005a8: 6b1b ldr r3, [r3, #48] @ 0x30
  487. 80005aa: 4a14 ldr r2, [pc, #80] @ (80005fc <HAL_CAN_MspInit+0x98>)
  488. 80005ac: f043 0302 orr.w r3, r3, #2
  489. 80005b0: 6313 str r3, [r2, #48] @ 0x30
  490. 80005b2: 4b12 ldr r3, [pc, #72] @ (80005fc <HAL_CAN_MspInit+0x98>)
  491. 80005b4: 6b1b ldr r3, [r3, #48] @ 0x30
  492. 80005b6: f003 0302 and.w r3, r3, #2
  493. 80005ba: 60fb str r3, [r7, #12]
  494. 80005bc: 68fb ldr r3, [r7, #12]
  495. /**CAN1 GPIO Configuration
  496. PB8 ------> CAN1_RX
  497. PB9 ------> CAN1_TX
  498. */
  499. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  500. 80005be: f44f 7340 mov.w r3, #768 @ 0x300
  501. 80005c2: 617b str r3, [r7, #20]
  502. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  503. 80005c4: 2302 movs r3, #2
  504. 80005c6: 61bb str r3, [r7, #24]
  505. GPIO_InitStruct.Pull = GPIO_NOPULL;
  506. 80005c8: 2300 movs r3, #0
  507. 80005ca: 61fb str r3, [r7, #28]
  508. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  509. 80005cc: 2303 movs r3, #3
  510. 80005ce: 623b str r3, [r7, #32]
  511. GPIO_InitStruct.Alternate = GPIO_AF9_CAN1;
  512. 80005d0: 2309 movs r3, #9
  513. 80005d2: 627b str r3, [r7, #36] @ 0x24
  514. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  515. 80005d4: f107 0314 add.w r3, r7, #20
  516. 80005d8: 4619 mov r1, r3
  517. 80005da: 4809 ldr r0, [pc, #36] @ (8000600 <HAL_CAN_MspInit+0x9c>)
  518. 80005dc: f003 fe3e bl 800425c <HAL_GPIO_Init>
  519. /* CAN1 interrupt Init */
  520. HAL_NVIC_SetPriority(CAN1_RX0_IRQn, 0, 0);
  521. 80005e0: 2200 movs r2, #0
  522. 80005e2: 2100 movs r1, #0
  523. 80005e4: 2014 movs r0, #20
  524. 80005e6: f003 fdf4 bl 80041d2 <HAL_NVIC_SetPriority>
  525. HAL_NVIC_EnableIRQ(CAN1_RX0_IRQn);
  526. 80005ea: 2014 movs r0, #20
  527. 80005ec: f003 fe0d bl 800420a <HAL_NVIC_EnableIRQ>
  528. /* USER CODE BEGIN CAN1_MspInit 1 */
  529. /* USER CODE END CAN1_MspInit 1 */
  530. }
  531. }
  532. 80005f0: bf00 nop
  533. 80005f2: 3728 adds r7, #40 @ 0x28
  534. 80005f4: 46bd mov sp, r7
  535. 80005f6: bd80 pop {r7, pc}
  536. 80005f8: 40006400 .word 0x40006400
  537. 80005fc: 40023800 .word 0x40023800
  538. 8000600: 40020400 .word 0x40020400
  539. 08000604 <HAL_CAN_MspDeInit>:
  540. void HAL_CAN_MspDeInit(CAN_HandleTypeDef* canHandle)
  541. {
  542. 8000604: b580 push {r7, lr}
  543. 8000606: b082 sub sp, #8
  544. 8000608: af00 add r7, sp, #0
  545. 800060a: 6078 str r0, [r7, #4]
  546. if(canHandle->Instance==CAN1)
  547. 800060c: 687b ldr r3, [r7, #4]
  548. 800060e: 681b ldr r3, [r3, #0]
  549. 8000610: 4a0a ldr r2, [pc, #40] @ (800063c <HAL_CAN_MspDeInit+0x38>)
  550. 8000612: 4293 cmp r3, r2
  551. 8000614: d10d bne.n 8000632 <HAL_CAN_MspDeInit+0x2e>
  552. {
  553. /* USER CODE BEGIN CAN1_MspDeInit 0 */
  554. /* USER CODE END CAN1_MspDeInit 0 */
  555. /* Peripheral clock disable */
  556. __HAL_RCC_CAN1_CLK_DISABLE();
  557. 8000616: 4b0a ldr r3, [pc, #40] @ (8000640 <HAL_CAN_MspDeInit+0x3c>)
  558. 8000618: 6c1b ldr r3, [r3, #64] @ 0x40
  559. 800061a: 4a09 ldr r2, [pc, #36] @ (8000640 <HAL_CAN_MspDeInit+0x3c>)
  560. 800061c: f023 7300 bic.w r3, r3, #33554432 @ 0x2000000
  561. 8000620: 6413 str r3, [r2, #64] @ 0x40
  562. /**CAN1 GPIO Configuration
  563. PB8 ------> CAN1_RX
  564. PB9 ------> CAN1_TX
  565. */
  566. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9);
  567. 8000622: f44f 7140 mov.w r1, #768 @ 0x300
  568. 8000626: 4807 ldr r0, [pc, #28] @ (8000644 <HAL_CAN_MspDeInit+0x40>)
  569. 8000628: f003 ffb4 bl 8004594 <HAL_GPIO_DeInit>
  570. /* CAN1 interrupt Deinit */
  571. HAL_NVIC_DisableIRQ(CAN1_RX0_IRQn);
  572. 800062c: 2014 movs r0, #20
  573. 800062e: f003 fdfa bl 8004226 <HAL_NVIC_DisableIRQ>
  574. /* USER CODE BEGIN CAN1_MspDeInit 1 */
  575. /* USER CODE END CAN1_MspDeInit 1 */
  576. }
  577. }
  578. 8000632: bf00 nop
  579. 8000634: 3708 adds r7, #8
  580. 8000636: 46bd mov sp, r7
  581. 8000638: bd80 pop {r7, pc}
  582. 800063a: bf00 nop
  583. 800063c: 40006400 .word 0x40006400
  584. 8000640: 40023800 .word 0x40023800
  585. 8000644: 40020400 .word 0x40020400
  586. 08000648 <get_hardware_version>:
  587. /* USER CODE BEGIN 1 */
  588. extern uint8_t app2_crc_flag;//crc校验成功标志位,成功后应答版本号位新的。
  589. uint16_t get_hardware_version(void) {
  590. 8000648: b480 push {r7}
  591. 800064a: af00 add r7, sp, #0
  592. return *(volatile uint16_t*)(0x08000188);
  593. 800064c: 4b03 ldr r3, [pc, #12] @ (800065c <get_hardware_version+0x14>)
  594. 800064e: 881b ldrh r3, [r3, #0]
  595. 8000650: b29b uxth r3, r3
  596. }
  597. 8000652: 4618 mov r0, r3
  598. 8000654: 46bd mov sp, r7
  599. 8000656: f85d 7b04 ldr.w r7, [sp], #4
  600. 800065a: 4770 bx lr
  601. 800065c: 08000188 .word 0x08000188
  602. 08000660 <get_publish_data>:
  603. {
  604. return *(volatile uint32_t*)0x0800C188;
  605. }
  606. }
  607. uint32_t get_publish_data(void) {
  608. 8000660: b480 push {r7}
  609. 8000662: af00 add r7, sp, #0
  610. if(*(volatile uint32_t*)(0x0800C188+4) == 0xFFFFFFFF)
  611. 8000664: 4b07 ldr r3, [pc, #28] @ (8000684 <get_publish_data+0x24>)
  612. 8000666: 681b ldr r3, [r3, #0]
  613. 8000668: f1b3 3fff cmp.w r3, #4294967295
  614. 800066c: d102 bne.n 8000674 <get_publish_data+0x14>
  615. {
  616. return *(volatile uint32_t*)(0x08060188+4);
  617. 800066e: 4b06 ldr r3, [pc, #24] @ (8000688 <get_publish_data+0x28>)
  618. 8000670: 681b ldr r3, [r3, #0]
  619. 8000672: e001 b.n 8000678 <get_publish_data+0x18>
  620. }
  621. else
  622. {
  623. return *(volatile uint32_t*)(0x0800C188+4);
  624. 8000674: 4b03 ldr r3, [pc, #12] @ (8000684 <get_publish_data+0x24>)
  625. 8000676: 681b ldr r3, [r3, #0]
  626. }
  627. }
  628. 8000678: 4618 mov r0, r3
  629. 800067a: 46bd mov sp, r7
  630. 800067c: f85d 7b04 ldr.w r7, [sp], #4
  631. 8000680: 4770 bx lr
  632. 8000682: bf00 nop
  633. 8000684: 0800c18c .word 0x0800c18c
  634. 8000688: 0806018c .word 0x0806018c
  635. 0800068c <CAN_Filter_config>:
  636. void CAN_Filter_config(void)
  637. {
  638. 800068c: b580 push {r7, lr}
  639. 800068e: b08a sub sp, #40 @ 0x28
  640. 8000690: af00 add r7, sp, #0
  641. CAN_FilterTypeDef sFilterConfig;
  642. /* 配置CAN过滤器 */
  643. sFilterConfig.FilterBank = 0; /* 过滤器0 */
  644. 8000692: 2300 movs r3, #0
  645. 8000694: 617b str r3, [r7, #20]
  646. sFilterConfig.FilterMode = CAN_FILTERMODE_IDMASK;
  647. 8000696: 2300 movs r3, #0
  648. 8000698: 61bb str r3, [r7, #24]
  649. sFilterConfig.FilterScale = CAN_FILTERSCALE_32BIT;
  650. 800069a: 2301 movs r3, #1
  651. 800069c: 61fb str r3, [r7, #28]
  652. sFilterConfig.FilterIdHigh = 0x0000; /* 32位ID */
  653. 800069e: 2300 movs r3, #0
  654. 80006a0: 603b str r3, [r7, #0]
  655. sFilterConfig.FilterIdLow = 0x0000;
  656. 80006a2: 2300 movs r3, #0
  657. 80006a4: 607b str r3, [r7, #4]
  658. sFilterConfig.FilterMaskIdHigh = 0x0000; /* 32位MASK */
  659. 80006a6: 2300 movs r3, #0
  660. 80006a8: 60bb str r3, [r7, #8]
  661. sFilterConfig.FilterMaskIdLow = 0x0000;
  662. 80006aa: 2300 movs r3, #0
  663. 80006ac: 60fb str r3, [r7, #12]
  664. sFilterConfig.FilterFIFOAssignment = CAN_FILTER_FIFO0; /* 过滤器0关联到FIFO0 */
  665. 80006ae: 2300 movs r3, #0
  666. 80006b0: 613b str r3, [r7, #16]
  667. sFilterConfig.FilterActivation = CAN_FILTER_ENABLE; /* 激活滤波器0 */
  668. 80006b2: 2301 movs r3, #1
  669. 80006b4: 623b str r3, [r7, #32]
  670. sFilterConfig.SlaveStartFilterBank = 14;
  671. 80006b6: 230e movs r3, #14
  672. 80006b8: 627b str r3, [r7, #36] @ 0x24
  673. /* 过滤器配置 */
  674. if (HAL_CAN_ConfigFilter(&hcan1, &sFilterConfig) != HAL_OK)
  675. 80006ba: 463b mov r3, r7
  676. 80006bc: 4619 mov r1, r3
  677. 80006be: 4809 ldr r0, [pc, #36] @ (80006e4 <CAN_Filter_config+0x58>)
  678. 80006c0: f002 fe6c bl 800339c <HAL_CAN_ConfigFilter>
  679. 80006c4: 4603 mov r3, r0
  680. 80006c6: 2b00 cmp r3, #0
  681. 80006c8: d001 beq.n 80006ce <CAN_Filter_config+0x42>
  682. {
  683. Error_Handler();
  684. 80006ca: f000 fd3b bl 8001144 <Error_Handler>
  685. }
  686. HAL_CAN_Start(&hcan1);//开启CAN
  687. 80006ce: 4805 ldr r0, [pc, #20] @ (80006e4 <CAN_Filter_config+0x58>)
  688. 80006d0: f002 ff42 bl 8003558 <HAL_CAN_Start>
  689. HAL_CAN_ActivateNotification(&hcan1 ,CAN_IT_RX_FIFO0_MSG_PENDING);//开启CAN的中断
  690. 80006d4: 2102 movs r1, #2
  691. 80006d6: 4803 ldr r0, [pc, #12] @ (80006e4 <CAN_Filter_config+0x58>)
  692. 80006d8: f003 fa26 bl 8003b28 <HAL_CAN_ActivateNotification>
  693. }
  694. 80006dc: bf00 nop
  695. 80006de: 3728 adds r7, #40 @ 0x28
  696. 80006e0: 46bd mov sp, r7
  697. 80006e2: bd80 pop {r7, pc}
  698. 80006e4: 20000064 .word 0x20000064
  699. 080006e8 <CAN_SendData>:
  700. void CAN_SendData(uint8_t canCom, uint32_t mailbox, uint32_t messageId, uint8_t * data, uint32_t len)
  701. {
  702. 80006e8: b580 push {r7, lr}
  703. 80006ea: b086 sub sp, #24
  704. 80006ec: af00 add r7, sp, #0
  705. 80006ee: 60b9 str r1, [r7, #8]
  706. 80006f0: 607a str r2, [r7, #4]
  707. 80006f2: 603b str r3, [r7, #0]
  708. 80006f4: 4603 mov r3, r0
  709. 80006f6: 73fb strb r3, [r7, #15]
  710. uint32_t start_time = HAL_GetTick(); // 使用系统时间戳,更精确
  711. 80006f8: f002 fd26 bl 8003148 <HAL_GetTick>
  712. 80006fc: 6178 str r0, [r7, #20]
  713. uint32_t TxMailbox = CAN_TX_MAILBOX0;
  714. 80006fe: 2301 movs r3, #1
  715. 8000700: 613b str r3, [r7, #16]
  716. TxHeader.StdId = messageId; /* 标准标识符 */
  717. 8000702: 4a1a ldr r2, [pc, #104] @ (800076c <CAN_SendData+0x84>)
  718. 8000704: 687b ldr r3, [r7, #4]
  719. 8000706: 6013 str r3, [r2, #0]
  720. TxHeader.ExtId = messageId; /* 扩展标识符(29位) */
  721. 8000708: 4a18 ldr r2, [pc, #96] @ (800076c <CAN_SendData+0x84>)
  722. 800070a: 687b ldr r3, [r7, #4]
  723. 800070c: 6053 str r3, [r2, #4]
  724. TxHeader.IDE = CAN_ID_EXT; /* 使用标准帧 or 扩展帧 */
  725. 800070e: 4b17 ldr r3, [pc, #92] @ (800076c <CAN_SendData+0x84>)
  726. 8000710: 2204 movs r2, #4
  727. 8000712: 609a str r2, [r3, #8]
  728. TxHeader.RTR = CAN_RTR_DATA; /* 数据帧 */
  729. 8000714: 4b15 ldr r3, [pc, #84] @ (800076c <CAN_SendData+0x84>)
  730. 8000716: 2200 movs r2, #0
  731. 8000718: 60da str r2, [r3, #12]
  732. if(len > 8)
  733. 800071a: 6a3b ldr r3, [r7, #32]
  734. 800071c: 2b08 cmp r3, #8
  735. 800071e: d901 bls.n 8000724 <CAN_SendData+0x3c>
  736. {
  737. len=8;
  738. 8000720: 2308 movs r3, #8
  739. 8000722: 623b str r3, [r7, #32]
  740. }
  741. TxHeader.DLC = len;
  742. 8000724: 4a11 ldr r2, [pc, #68] @ (800076c <CAN_SendData+0x84>)
  743. 8000726: 6a3b ldr r3, [r7, #32]
  744. 8000728: 6113 str r3, [r2, #16]
  745. if (HAL_CAN_AddTxMessage(&hcan1 , &TxHeader, data, &TxMailbox) != HAL_OK) /* 发送消息 */
  746. 800072a: f107 0310 add.w r3, r7, #16
  747. 800072e: 683a ldr r2, [r7, #0]
  748. 8000730: 490e ldr r1, [pc, #56] @ (800076c <CAN_SendData+0x84>)
  749. 8000732: 480f ldr r0, [pc, #60] @ (8000770 <CAN_SendData+0x88>)
  750. 8000734: f002 ff9d bl 8003672 <HAL_CAN_AddTxMessage>
  751. {
  752. //return 1;
  753. }
  754. // 超时时间:100ms
  755. while (HAL_CAN_IsTxMessagePending(&hcan1, TxMailbox))
  756. 8000738: e00b b.n 8000752 <CAN_SendData+0x6a>
  757. {
  758. if (HAL_GetTick() - start_time > 100) // 100ms超时
  759. 800073a: f002 fd05 bl 8003148 <HAL_GetTick>
  760. 800073e: 4602 mov r2, r0
  761. 8000740: 697b ldr r3, [r7, #20]
  762. 8000742: 1ad3 subs r3, r2, r3
  763. 8000744: 2b64 cmp r3, #100 @ 0x64
  764. 8000746: d904 bls.n 8000752 <CAN_SendData+0x6a>
  765. {
  766. HAL_CAN_AbortTxRequest(&hcan1, TxMailbox); /* 超时,直接中止邮箱的发送请求 */
  767. 8000748: 693b ldr r3, [r7, #16]
  768. 800074a: 4619 mov r1, r3
  769. 800074c: 4808 ldr r0, [pc, #32] @ (8000770 <CAN_SendData+0x88>)
  770. 800074e: f003 f860 bl 8003812 <HAL_CAN_AbortTxRequest>
  771. while (HAL_CAN_IsTxMessagePending(&hcan1, TxMailbox))
  772. 8000752: 693b ldr r3, [r7, #16]
  773. 8000754: 4619 mov r1, r3
  774. 8000756: 4806 ldr r0, [pc, #24] @ (8000770 <CAN_SendData+0x88>)
  775. 8000758: f003 f8a0 bl 800389c <HAL_CAN_IsTxMessagePending>
  776. 800075c: 4603 mov r3, r0
  777. 800075e: 2b00 cmp r3, #0
  778. 8000760: d1eb bne.n 800073a <CAN_SendData+0x52>
  779. }
  780. }
  781. //return 0;
  782. }
  783. 8000762: bf00 nop
  784. 8000764: bf00 nop
  785. 8000766: 3718 adds r7, #24
  786. 8000768: 46bd mov sp, r7
  787. 800076a: bd80 pop {r7, pc}
  788. 800076c: 20000030 .word 0x20000030
  789. 8000770: 20000064 .word 0x20000064
  790. 08000774 <HAL_CAN_RxFifo0MsgPendingCallback>:
  791. /*CAN接收中断函数*/
  792. void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan){
  793. 8000774: b580 push {r7, lr}
  794. 8000776: b08a sub sp, #40 @ 0x28
  795. 8000778: af02 add r7, sp, #8
  796. 800077a: 6078 str r0, [r7, #4]
  797. uint8_t RxData[8];
  798. if(hcan->Instance == CAN1){
  799. 800077c: 687b ldr r3, [r7, #4]
  800. 800077e: 681b ldr r3, [r3, #0]
  801. 8000780: 4a33 ldr r2, [pc, #204] @ (8000850 <HAL_CAN_RxFifo0MsgPendingCallback+0xdc>)
  802. 8000782: 4293 cmp r3, r2
  803. 8000784: d15f bne.n 8000846 <HAL_CAN_RxFifo0MsgPendingCallback+0xd2>
  804. HAL_CAN_GetRxMessage(&hcan1, CAN_RX_FIFO0, &RxHeader, RxData);
  805. 8000786: f107 0310 add.w r3, r7, #16
  806. 800078a: 4a32 ldr r2, [pc, #200] @ (8000854 <HAL_CAN_RxFifo0MsgPendingCallback+0xe0>)
  807. 800078c: 2100 movs r1, #0
  808. 800078e: 4832 ldr r0, [pc, #200] @ (8000858 <HAL_CAN_RxFifo0MsgPendingCallback+0xe4>)
  809. 8000790: f003 f8a8 bl 80038e4 <HAL_CAN_GetRxMessage>
  810. if (RxHeader.ExtId == 0x701 && RxHeader.IDE == CAN_ID_EXT) {
  811. 8000794: 4b2f ldr r3, [pc, #188] @ (8000854 <HAL_CAN_RxFifo0MsgPendingCallback+0xe0>)
  812. 8000796: 685b ldr r3, [r3, #4]
  813. 8000798: f240 7201 movw r2, #1793 @ 0x701
  814. 800079c: 4293 cmp r3, r2
  815. 800079e: d10d bne.n 80007bc <HAL_CAN_RxFifo0MsgPendingCallback+0x48>
  816. 80007a0: 4b2c ldr r3, [pc, #176] @ (8000854 <HAL_CAN_RxFifo0MsgPendingCallback+0xe0>)
  817. 80007a2: 689b ldr r3, [r3, #8]
  818. 80007a4: 2b04 cmp r3, #4
  819. 80007a6: d109 bne.n 80007bc <HAL_CAN_RxFifo0MsgPendingCallback+0x48>
  820. can_rx_isr_i(0,RxHeader.ExtId,RxData, RxHeader.DLC);
  821. 80007a8: 4b2a ldr r3, [pc, #168] @ (8000854 <HAL_CAN_RxFifo0MsgPendingCallback+0xe0>)
  822. 80007aa: 6859 ldr r1, [r3, #4]
  823. 80007ac: 4b29 ldr r3, [pc, #164] @ (8000854 <HAL_CAN_RxFifo0MsgPendingCallback+0xe0>)
  824. 80007ae: 691b ldr r3, [r3, #16]
  825. 80007b0: b2db uxtb r3, r3
  826. 80007b2: f107 0210 add.w r2, r7, #16
  827. 80007b6: 2000 movs r0, #0
  828. 80007b8: f000 febe bl 8001538 <can_rx_isr_i>
  829. //can_rx_isr_i(0,,id,data,len);
  830. }
  831. //读取版本号
  832. if (RxHeader.ExtId == 0x21D && RxHeader.IDE == CAN_ID_EXT) {
  833. 80007bc: 4b25 ldr r3, [pc, #148] @ (8000854 <HAL_CAN_RxFifo0MsgPendingCallback+0xe0>)
  834. 80007be: 685b ldr r3, [r3, #4]
  835. 80007c0: f240 221d movw r2, #541 @ 0x21d
  836. 80007c4: 4293 cmp r3, r2
  837. 80007c6: d13e bne.n 8000846 <HAL_CAN_RxFifo0MsgPendingCallback+0xd2>
  838. 80007c8: 4b22 ldr r3, [pc, #136] @ (8000854 <HAL_CAN_RxFifo0MsgPendingCallback+0xe0>)
  839. 80007ca: 689b ldr r3, [r3, #8]
  840. 80007cc: 2b04 cmp r3, #4
  841. 80007ce: d13a bne.n 8000846 <HAL_CAN_RxFifo0MsgPendingCallback+0xd2>
  842. uint16_t hardware_version = get_hardware_version();
  843. 80007d0: f7ff ff3a bl 8000648 <get_hardware_version>
  844. 80007d4: 4603 mov r3, r0
  845. 80007d6: 83bb strh r3, [r7, #28]
  846. uint16_t software_version;
  847. if(app2_crc_flag == 1)//crc校验成功标志位,成功后应答版本号位新的。
  848. 80007d8: 4b20 ldr r3, [pc, #128] @ (800085c <HAL_CAN_RxFifo0MsgPendingCallback+0xe8>)
  849. 80007da: 781b ldrb r3, [r3, #0]
  850. 80007dc: 2b01 cmp r3, #1
  851. 80007de: d103 bne.n 80007e8 <HAL_CAN_RxFifo0MsgPendingCallback+0x74>
  852. {
  853. software_version = *(volatile uint32_t*)0x08060188;
  854. 80007e0: 4b1f ldr r3, [pc, #124] @ (8000860 <HAL_CAN_RxFifo0MsgPendingCallback+0xec>)
  855. 80007e2: 681b ldr r3, [r3, #0]
  856. 80007e4: 83fb strh r3, [r7, #30]
  857. 80007e6: e002 b.n 80007ee <HAL_CAN_RxFifo0MsgPendingCallback+0x7a>
  858. }
  859. else
  860. {
  861. software_version = *(volatile uint32_t*)0x0800C188;
  862. 80007e8: 4b1e ldr r3, [pc, #120] @ (8000864 <HAL_CAN_RxFifo0MsgPendingCallback+0xf0>)
  863. 80007ea: 681b ldr r3, [r3, #0]
  864. 80007ec: 83fb strh r3, [r7, #30]
  865. }
  866. uint32_t publish_data = get_publish_data();
  867. 80007ee: f7ff ff37 bl 8000660 <get_publish_data>
  868. 80007f2: 61b8 str r0, [r7, #24]
  869. uint8_t version[8];
  870. version[0] = hardware_version >> 8;
  871. 80007f4: 8bbb ldrh r3, [r7, #28]
  872. 80007f6: 0a1b lsrs r3, r3, #8
  873. 80007f8: b29b uxth r3, r3
  874. 80007fa: b2db uxtb r3, r3
  875. 80007fc: 723b strb r3, [r7, #8]
  876. version[1] = hardware_version & 0xFF;
  877. 80007fe: 8bbb ldrh r3, [r7, #28]
  878. 8000800: b2db uxtb r3, r3
  879. 8000802: 727b strb r3, [r7, #9]
  880. version[2] = software_version >> 8;
  881. 8000804: 8bfb ldrh r3, [r7, #30]
  882. 8000806: 0a1b lsrs r3, r3, #8
  883. 8000808: b29b uxth r3, r3
  884. 800080a: b2db uxtb r3, r3
  885. 800080c: 72bb strb r3, [r7, #10]
  886. version[3] = software_version & 0xFF;
  887. 800080e: 8bfb ldrh r3, [r7, #30]
  888. 8000810: b2db uxtb r3, r3
  889. 8000812: 72fb strb r3, [r7, #11]
  890. version[4] = publish_data >> 24;
  891. 8000814: 69bb ldr r3, [r7, #24]
  892. 8000816: 0e1b lsrs r3, r3, #24
  893. 8000818: b2db uxtb r3, r3
  894. 800081a: 733b strb r3, [r7, #12]
  895. version[5] = publish_data >> 16;
  896. 800081c: 69bb ldr r3, [r7, #24]
  897. 800081e: 0c1b lsrs r3, r3, #16
  898. 8000820: b2db uxtb r3, r3
  899. 8000822: 737b strb r3, [r7, #13]
  900. version[6] = publish_data >> 8;
  901. 8000824: 69bb ldr r3, [r7, #24]
  902. 8000826: 0a1b lsrs r3, r3, #8
  903. 8000828: b2db uxtb r3, r3
  904. 800082a: 73bb strb r3, [r7, #14]
  905. version[7] = publish_data & 0xFF;
  906. 800082c: 69bb ldr r3, [r7, #24]
  907. 800082e: b2db uxtb r3, r3
  908. 8000830: 73fb strb r3, [r7, #15]
  909. CAN_SendData(1, 2, 0x21D, version,8);
  910. 8000832: f107 0308 add.w r3, r7, #8
  911. 8000836: 2208 movs r2, #8
  912. 8000838: 9200 str r2, [sp, #0]
  913. 800083a: f240 221d movw r2, #541 @ 0x21d
  914. 800083e: 2102 movs r1, #2
  915. 8000840: 2001 movs r0, #1
  916. 8000842: f7ff ff51 bl 80006e8 <CAN_SendData>
  917. }
  918. }
  919. }
  920. 8000846: bf00 nop
  921. 8000848: 3720 adds r7, #32
  922. 800084a: 46bd mov sp, r7
  923. 800084c: bd80 pop {r7, pc}
  924. 800084e: bf00 nop
  925. 8000850: 40006400 .word 0x40006400
  926. 8000854: 20000048 .word 0x20000048
  927. 8000858: 20000064 .word 0x20000064
  928. 800085c: 20001eb8 .word 0x20001eb8
  929. 8000860: 08060188 .word 0x08060188
  930. 8000864: 0800c188 .word 0x0800c188
  931. 08000868 <HAL_FLASH_ClearError>:
  932. #if defined(FLASH_FLAG_PGPERR)
  933. FLASH_FLAG_PGPERR |
  934. #endif
  935. 0;
  936. void HAL_FLASH_ClearError() {
  937. 8000868: b480 push {r7}
  938. 800086a: af00 add r7, sp, #0
  939. __HAL_FLASH_CLEAR_FLAG(FLASH_ERR_FLAGS);
  940. 800086c: 4b03 ldr r3, [pc, #12] @ (800087c <HAL_FLASH_ClearError+0x14>)
  941. 800086e: 22f3 movs r2, #243 @ 0xf3
  942. 8000870: 60da str r2, [r3, #12]
  943. }
  944. 8000872: bf00 nop
  945. 8000874: 46bd mov sp, r7
  946. 8000876: f85d 7b04 ldr.w r7, [sp], #4
  947. 800087a: 4770 bx lr
  948. 800087c: 40023c00 .word 0x40023c00
  949. 08000880 <_sector_frame_address>:
  950. static uint32_t _sector_frame_address(uint32_t Address)
  951. {
  952. 8000880: b480 push {r7}
  953. 8000882: b085 sub sp, #20
  954. 8000884: af00 add r7, sp, #0
  955. 8000886: 6078 str r0, [r7, #4]
  956. uint32_t sector = 0;
  957. 8000888: 2300 movs r3, #0
  958. 800088a: 60fb str r3, [r7, #12]
  959. if((Address < ADDR_FLASH_SECTOR_1) && (Address >= ADDR_FLASH_SECTOR_0))
  960. 800088c: 687b ldr r3, [r7, #4]
  961. 800088e: 4a40 ldr r2, [pc, #256] @ (8000990 <_sector_frame_address+0x110>)
  962. 8000890: 4293 cmp r3, r2
  963. 8000892: d206 bcs.n 80008a2 <_sector_frame_address+0x22>
  964. 8000894: 687b ldr r3, [r7, #4]
  965. 8000896: f1b3 6f00 cmp.w r3, #134217728 @ 0x8000000
  966. 800089a: d302 bcc.n 80008a2 <_sector_frame_address+0x22>
  967. {
  968. sector = FLASH_SECTOR_0;
  969. 800089c: 2300 movs r3, #0
  970. 800089e: 60fb str r3, [r7, #12]
  971. 80008a0: e06f b.n 8000982 <_sector_frame_address+0x102>
  972. }
  973. else if((Address < ADDR_FLASH_SECTOR_2) && (Address >= ADDR_FLASH_SECTOR_1))
  974. 80008a2: 687b ldr r3, [r7, #4]
  975. 80008a4: 4a3b ldr r2, [pc, #236] @ (8000994 <_sector_frame_address+0x114>)
  976. 80008a6: 4293 cmp r3, r2
  977. 80008a8: d206 bcs.n 80008b8 <_sector_frame_address+0x38>
  978. 80008aa: 687b ldr r3, [r7, #4]
  979. 80008ac: 4a38 ldr r2, [pc, #224] @ (8000990 <_sector_frame_address+0x110>)
  980. 80008ae: 4293 cmp r3, r2
  981. 80008b0: d302 bcc.n 80008b8 <_sector_frame_address+0x38>
  982. {
  983. sector = FLASH_SECTOR_1;
  984. 80008b2: 2301 movs r3, #1
  985. 80008b4: 60fb str r3, [r7, #12]
  986. 80008b6: e064 b.n 8000982 <_sector_frame_address+0x102>
  987. }
  988. else if((Address < ADDR_FLASH_SECTOR_3) && (Address >= ADDR_FLASH_SECTOR_2))
  989. 80008b8: 687b ldr r3, [r7, #4]
  990. 80008ba: 4a37 ldr r2, [pc, #220] @ (8000998 <_sector_frame_address+0x118>)
  991. 80008bc: 4293 cmp r3, r2
  992. 80008be: d206 bcs.n 80008ce <_sector_frame_address+0x4e>
  993. 80008c0: 687b ldr r3, [r7, #4]
  994. 80008c2: 4a34 ldr r2, [pc, #208] @ (8000994 <_sector_frame_address+0x114>)
  995. 80008c4: 4293 cmp r3, r2
  996. 80008c6: d302 bcc.n 80008ce <_sector_frame_address+0x4e>
  997. {
  998. sector = FLASH_SECTOR_2;
  999. 80008c8: 2302 movs r3, #2
  1000. 80008ca: 60fb str r3, [r7, #12]
  1001. 80008cc: e059 b.n 8000982 <_sector_frame_address+0x102>
  1002. }
  1003. else if((Address < ADDR_FLASH_SECTOR_4) && (Address >= ADDR_FLASH_SECTOR_3))
  1004. 80008ce: 687b ldr r3, [r7, #4]
  1005. 80008d0: 4a32 ldr r2, [pc, #200] @ (800099c <_sector_frame_address+0x11c>)
  1006. 80008d2: 4293 cmp r3, r2
  1007. 80008d4: d806 bhi.n 80008e4 <_sector_frame_address+0x64>
  1008. 80008d6: 687b ldr r3, [r7, #4]
  1009. 80008d8: 4a2f ldr r2, [pc, #188] @ (8000998 <_sector_frame_address+0x118>)
  1010. 80008da: 4293 cmp r3, r2
  1011. 80008dc: d302 bcc.n 80008e4 <_sector_frame_address+0x64>
  1012. {
  1013. sector = FLASH_SECTOR_3;
  1014. 80008de: 2303 movs r3, #3
  1015. 80008e0: 60fb str r3, [r7, #12]
  1016. 80008e2: e04e b.n 8000982 <_sector_frame_address+0x102>
  1017. }
  1018. else if((Address < ADDR_FLASH_SECTOR_5) && (Address >= ADDR_FLASH_SECTOR_4))
  1019. 80008e4: 687b ldr r3, [r7, #4]
  1020. 80008e6: 4a2e ldr r2, [pc, #184] @ (80009a0 <_sector_frame_address+0x120>)
  1021. 80008e8: 4293 cmp r3, r2
  1022. 80008ea: d806 bhi.n 80008fa <_sector_frame_address+0x7a>
  1023. 80008ec: 687b ldr r3, [r7, #4]
  1024. 80008ee: 4a2b ldr r2, [pc, #172] @ (800099c <_sector_frame_address+0x11c>)
  1025. 80008f0: 4293 cmp r3, r2
  1026. 80008f2: d902 bls.n 80008fa <_sector_frame_address+0x7a>
  1027. {
  1028. sector = FLASH_SECTOR_4;
  1029. 80008f4: 2304 movs r3, #4
  1030. 80008f6: 60fb str r3, [r7, #12]
  1031. 80008f8: e043 b.n 8000982 <_sector_frame_address+0x102>
  1032. }
  1033. else if((Address < ADDR_FLASH_SECTOR_6) && (Address >= ADDR_FLASH_SECTOR_5))
  1034. 80008fa: 687b ldr r3, [r7, #4]
  1035. 80008fc: 4a29 ldr r2, [pc, #164] @ (80009a4 <_sector_frame_address+0x124>)
  1036. 80008fe: 4293 cmp r3, r2
  1037. 8000900: d806 bhi.n 8000910 <_sector_frame_address+0x90>
  1038. 8000902: 687b ldr r3, [r7, #4]
  1039. 8000904: 4a26 ldr r2, [pc, #152] @ (80009a0 <_sector_frame_address+0x120>)
  1040. 8000906: 4293 cmp r3, r2
  1041. 8000908: d902 bls.n 8000910 <_sector_frame_address+0x90>
  1042. {
  1043. sector = FLASH_SECTOR_5;
  1044. 800090a: 2305 movs r3, #5
  1045. 800090c: 60fb str r3, [r7, #12]
  1046. 800090e: e038 b.n 8000982 <_sector_frame_address+0x102>
  1047. }
  1048. else if((Address < ADDR_FLASH_SECTOR_7) && (Address >= ADDR_FLASH_SECTOR_6))
  1049. 8000910: 687b ldr r3, [r7, #4]
  1050. 8000912: 4a25 ldr r2, [pc, #148] @ (80009a8 <_sector_frame_address+0x128>)
  1051. 8000914: 4293 cmp r3, r2
  1052. 8000916: d806 bhi.n 8000926 <_sector_frame_address+0xa6>
  1053. 8000918: 687b ldr r3, [r7, #4]
  1054. 800091a: 4a22 ldr r2, [pc, #136] @ (80009a4 <_sector_frame_address+0x124>)
  1055. 800091c: 4293 cmp r3, r2
  1056. 800091e: d902 bls.n 8000926 <_sector_frame_address+0xa6>
  1057. {
  1058. sector = FLASH_SECTOR_6;
  1059. 8000920: 2306 movs r3, #6
  1060. 8000922: 60fb str r3, [r7, #12]
  1061. 8000924: e02d b.n 8000982 <_sector_frame_address+0x102>
  1062. }
  1063. else if((Address < ADDR_FLASH_SECTOR_8) && (Address >= ADDR_FLASH_SECTOR_7))
  1064. 8000926: 687b ldr r3, [r7, #4]
  1065. 8000928: 4a20 ldr r2, [pc, #128] @ (80009ac <_sector_frame_address+0x12c>)
  1066. 800092a: 4293 cmp r3, r2
  1067. 800092c: d806 bhi.n 800093c <_sector_frame_address+0xbc>
  1068. 800092e: 687b ldr r3, [r7, #4]
  1069. 8000930: 4a1d ldr r2, [pc, #116] @ (80009a8 <_sector_frame_address+0x128>)
  1070. 8000932: 4293 cmp r3, r2
  1071. 8000934: d902 bls.n 800093c <_sector_frame_address+0xbc>
  1072. {
  1073. sector = FLASH_SECTOR_7;
  1074. 8000936: 2307 movs r3, #7
  1075. 8000938: 60fb str r3, [r7, #12]
  1076. 800093a: e022 b.n 8000982 <_sector_frame_address+0x102>
  1077. }
  1078. else if((Address < ADDR_FLASH_SECTOR_9) && (Address >= ADDR_FLASH_SECTOR_8))
  1079. 800093c: 687b ldr r3, [r7, #4]
  1080. 800093e: 4a1c ldr r2, [pc, #112] @ (80009b0 <_sector_frame_address+0x130>)
  1081. 8000940: 4293 cmp r3, r2
  1082. 8000942: d806 bhi.n 8000952 <_sector_frame_address+0xd2>
  1083. 8000944: 687b ldr r3, [r7, #4]
  1084. 8000946: 4a19 ldr r2, [pc, #100] @ (80009ac <_sector_frame_address+0x12c>)
  1085. 8000948: 4293 cmp r3, r2
  1086. 800094a: d902 bls.n 8000952 <_sector_frame_address+0xd2>
  1087. {
  1088. sector = FLASH_SECTOR_8;
  1089. 800094c: 2308 movs r3, #8
  1090. 800094e: 60fb str r3, [r7, #12]
  1091. 8000950: e017 b.n 8000982 <_sector_frame_address+0x102>
  1092. }
  1093. else if((Address < ADDR_FLASH_SECTOR_10) && (Address >= ADDR_FLASH_SECTOR_9))
  1094. 8000952: 687b ldr r3, [r7, #4]
  1095. 8000954: 4a17 ldr r2, [pc, #92] @ (80009b4 <_sector_frame_address+0x134>)
  1096. 8000956: 4293 cmp r3, r2
  1097. 8000958: d806 bhi.n 8000968 <_sector_frame_address+0xe8>
  1098. 800095a: 687b ldr r3, [r7, #4]
  1099. 800095c: 4a14 ldr r2, [pc, #80] @ (80009b0 <_sector_frame_address+0x130>)
  1100. 800095e: 4293 cmp r3, r2
  1101. 8000960: d902 bls.n 8000968 <_sector_frame_address+0xe8>
  1102. {
  1103. sector = FLASH_SECTOR_9;
  1104. 8000962: 2309 movs r3, #9
  1105. 8000964: 60fb str r3, [r7, #12]
  1106. 8000966: e00c b.n 8000982 <_sector_frame_address+0x102>
  1107. }
  1108. else if((Address < ADDR_FLASH_SECTOR_11) && (Address >= ADDR_FLASH_SECTOR_10))
  1109. 8000968: 687b ldr r3, [r7, #4]
  1110. 800096a: 4a13 ldr r2, [pc, #76] @ (80009b8 <_sector_frame_address+0x138>)
  1111. 800096c: 4293 cmp r3, r2
  1112. 800096e: d806 bhi.n 800097e <_sector_frame_address+0xfe>
  1113. 8000970: 687b ldr r3, [r7, #4]
  1114. 8000972: 4a10 ldr r2, [pc, #64] @ (80009b4 <_sector_frame_address+0x134>)
  1115. 8000974: 4293 cmp r3, r2
  1116. 8000976: d902 bls.n 800097e <_sector_frame_address+0xfe>
  1117. {
  1118. sector = FLASH_SECTOR_10;
  1119. 8000978: 230a movs r3, #10
  1120. 800097a: 60fb str r3, [r7, #12]
  1121. 800097c: e001 b.n 8000982 <_sector_frame_address+0x102>
  1122. }else {
  1123. sector = FLASH_SECTOR_11;
  1124. 800097e: 230b movs r3, #11
  1125. 8000980: 60fb str r3, [r7, #12]
  1126. }
  1127. return sector;
  1128. 8000982: 68fb ldr r3, [r7, #12]
  1129. }
  1130. 8000984: 4618 mov r0, r3
  1131. 8000986: 3714 adds r7, #20
  1132. 8000988: 46bd mov sp, r7
  1133. 800098a: f85d 7b04 ldr.w r7, [sp], #4
  1134. 800098e: 4770 bx lr
  1135. 8000990: 08004000 .word 0x08004000
  1136. 8000994: 08008000 .word 0x08008000
  1137. 8000998: 0800c000 .word 0x0800c000
  1138. 800099c: 0800ffff .word 0x0800ffff
  1139. 80009a0: 0801ffff .word 0x0801ffff
  1140. 80009a4: 0803ffff .word 0x0803ffff
  1141. 80009a8: 0805ffff .word 0x0805ffff
  1142. 80009ac: 0807ffff .word 0x0807ffff
  1143. 80009b0: 0809ffff .word 0x0809ffff
  1144. 80009b4: 080bffff .word 0x080bffff
  1145. 80009b8: 080dffff .word 0x080dffff
  1146. 080009bc <flash_unlock>:
  1147. void flash_unlock(void)
  1148. {
  1149. 80009bc: b480 push {r7}
  1150. 80009be: af00 add r7, sp, #0
  1151. /* Authorize the FLASH Registers access */
  1152. WRITE_REG(FLASH->KEYR, FLASH_KEY1);
  1153. 80009c0: 4b05 ldr r3, [pc, #20] @ (80009d8 <flash_unlock+0x1c>)
  1154. 80009c2: 4a06 ldr r2, [pc, #24] @ (80009dc <flash_unlock+0x20>)
  1155. 80009c4: 605a str r2, [r3, #4]
  1156. WRITE_REG(FLASH->KEYR, FLASH_KEY2);
  1157. 80009c6: 4b04 ldr r3, [pc, #16] @ (80009d8 <flash_unlock+0x1c>)
  1158. 80009c8: 4a05 ldr r2, [pc, #20] @ (80009e0 <flash_unlock+0x24>)
  1159. 80009ca: 605a str r2, [r3, #4]
  1160. }
  1161. 80009cc: bf00 nop
  1162. 80009ce: 46bd mov sp, r7
  1163. 80009d0: f85d 7b04 ldr.w r7, [sp], #4
  1164. 80009d4: 4770 bx lr
  1165. 80009d6: bf00 nop
  1166. 80009d8: 40023c00 .word 0x40023c00
  1167. 80009dc: 45670123 .word 0x45670123
  1168. 80009e0: cdef89ab .word 0xcdef89ab
  1169. 080009e4 <flash_lock>:
  1170. /**
  1171. * @brief Locks the FLASH control register access
  1172. * @retval HAL Status
  1173. */
  1174. void flash_lock(void)
  1175. {
  1176. 80009e4: b480 push {r7}
  1177. 80009e6: af00 add r7, sp, #0
  1178. /* Set the LOCK Bit to lock the FLASH Registers access */
  1179. FLASH->CR |= FLASH_CR_LOCK;
  1180. 80009e8: 4b05 ldr r3, [pc, #20] @ (8000a00 <flash_lock+0x1c>)
  1181. 80009ea: 691b ldr r3, [r3, #16]
  1182. 80009ec: 4a04 ldr r2, [pc, #16] @ (8000a00 <flash_lock+0x1c>)
  1183. 80009ee: f043 4300 orr.w r3, r3, #2147483648 @ 0x80000000
  1184. 80009f2: 6113 str r3, [r2, #16]
  1185. }
  1186. 80009f4: bf00 nop
  1187. 80009f6: 46bd mov sp, r7
  1188. 80009f8: f85d 7b04 ldr.w r7, [sp], #4
  1189. 80009fc: 4770 bx lr
  1190. 80009fe: bf00 nop
  1191. 8000a00: 40023c00 .word 0x40023c00
  1192. 08000a04 <flash_wait_ready>:
  1193. void flash_wait_ready(uint32_t Timeout)
  1194. {
  1195. 8000a04: b580 push {r7, lr}
  1196. 8000a06: b084 sub sp, #16
  1197. 8000a08: af00 add r7, sp, #0
  1198. 8000a0a: 6078 str r0, [r7, #4]
  1199. uint32_t tickstart = 0U;
  1200. 8000a0c: 2300 movs r3, #0
  1201. 8000a0e: 60fb str r3, [r7, #12]
  1202. tickstart = HAL_GetTick();
  1203. 8000a10: f002 fb9a bl 8003148 <HAL_GetTick>
  1204. 8000a14: 60f8 str r0, [r7, #12]
  1205. while(__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY) != RESET)
  1206. 8000a16: e00e b.n 8000a36 <flash_wait_ready+0x32>
  1207. {
  1208. // wdog_reload();
  1209. if(Timeout != HAL_MAX_DELAY)
  1210. 8000a18: 687b ldr r3, [r7, #4]
  1211. 8000a1a: f1b3 3fff cmp.w r3, #4294967295
  1212. 8000a1e: d00a beq.n 8000a36 <flash_wait_ready+0x32>
  1213. {
  1214. if((Timeout == 0U)||((HAL_GetTick() - tickstart ) > Timeout))
  1215. 8000a20: 687b ldr r3, [r7, #4]
  1216. 8000a22: 2b00 cmp r3, #0
  1217. 8000a24: d017 beq.n 8000a56 <flash_wait_ready+0x52>
  1218. 8000a26: f002 fb8f bl 8003148 <HAL_GetTick>
  1219. 8000a2a: 4602 mov r2, r0
  1220. 8000a2c: 68fb ldr r3, [r7, #12]
  1221. 8000a2e: 1ad3 subs r3, r2, r3
  1222. 8000a30: 687a ldr r2, [r7, #4]
  1223. 8000a32: 429a cmp r2, r3
  1224. 8000a34: d30f bcc.n 8000a56 <flash_wait_ready+0x52>
  1225. while(__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY) != RESET)
  1226. 8000a36: 4b0a ldr r3, [pc, #40] @ (8000a60 <flash_wait_ready+0x5c>)
  1227. 8000a38: 68db ldr r3, [r3, #12]
  1228. 8000a3a: f403 3380 and.w r3, r3, #65536 @ 0x10000
  1229. 8000a3e: 2b00 cmp r3, #0
  1230. 8000a40: d1ea bne.n 8000a18 <flash_wait_ready+0x14>
  1231. return;
  1232. }
  1233. }
  1234. }
  1235. /* Check FLASH End of Operation flag */
  1236. if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP) != RESET)
  1237. 8000a42: 4b07 ldr r3, [pc, #28] @ (8000a60 <flash_wait_ready+0x5c>)
  1238. 8000a44: 68db ldr r3, [r3, #12]
  1239. 8000a46: f003 0301 and.w r3, r3, #1
  1240. 8000a4a: 2b00 cmp r3, #0
  1241. 8000a4c: d004 beq.n 8000a58 <flash_wait_ready+0x54>
  1242. {
  1243. /* Clear FLASH End of Operation pending bit */
  1244. __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP);
  1245. 8000a4e: 4b04 ldr r3, [pc, #16] @ (8000a60 <flash_wait_ready+0x5c>)
  1246. 8000a50: 2201 movs r2, #1
  1247. 8000a52: 60da str r2, [r3, #12]
  1248. 8000a54: e000 b.n 8000a58 <flash_wait_ready+0x54>
  1249. return;
  1250. 8000a56: bf00 nop
  1251. }
  1252. }
  1253. 8000a58: 3710 adds r7, #16
  1254. 8000a5a: 46bd mov sp, r7
  1255. 8000a5c: bd80 pop {r7, pc}
  1256. 8000a5e: bf00 nop
  1257. 8000a60: 40023c00 .word 0x40023c00
  1258. 08000a64 <flash_erase_sector>:
  1259. void flash_erase_sector(uint32_t Sector)
  1260. {
  1261. 8000a64: b580 push {r7, lr}
  1262. 8000a66: b084 sub sp, #16
  1263. 8000a68: af00 add r7, sp, #0
  1264. 8000a6a: 6078 str r0, [r7, #4]
  1265. uint32_t tmp_psize = 0U;
  1266. 8000a6c: 2300 movs r3, #0
  1267. 8000a6e: 60fb str r3, [r7, #12]
  1268. uint8_t VoltageRange = FLASH_VOLTAGE_RANGE_3;
  1269. 8000a70: 2302 movs r3, #2
  1270. 8000a72: 72fb strb r3, [r7, #11]
  1271. if (VoltageRange == FLASH_VOLTAGE_RANGE_1)
  1272. 8000a74: 7afb ldrb r3, [r7, #11]
  1273. 8000a76: 2b00 cmp r3, #0
  1274. 8000a78: d102 bne.n 8000a80 <flash_erase_sector+0x1c>
  1275. {
  1276. tmp_psize = FLASH_PSIZE_BYTE;
  1277. 8000a7a: 2300 movs r3, #0
  1278. 8000a7c: 60fb str r3, [r7, #12]
  1279. 8000a7e: e010 b.n 8000aa2 <flash_erase_sector+0x3e>
  1280. }
  1281. else if (VoltageRange == FLASH_VOLTAGE_RANGE_2)
  1282. 8000a80: 7afb ldrb r3, [r7, #11]
  1283. 8000a82: 2b01 cmp r3, #1
  1284. 8000a84: d103 bne.n 8000a8e <flash_erase_sector+0x2a>
  1285. {
  1286. tmp_psize = FLASH_PSIZE_HALF_WORD;
  1287. 8000a86: f44f 7380 mov.w r3, #256 @ 0x100
  1288. 8000a8a: 60fb str r3, [r7, #12]
  1289. 8000a8c: e009 b.n 8000aa2 <flash_erase_sector+0x3e>
  1290. }
  1291. else if (VoltageRange == FLASH_VOLTAGE_RANGE_3)
  1292. 8000a8e: 7afb ldrb r3, [r7, #11]
  1293. 8000a90: 2b02 cmp r3, #2
  1294. 8000a92: d103 bne.n 8000a9c <flash_erase_sector+0x38>
  1295. {
  1296. tmp_psize = FLASH_PSIZE_WORD;
  1297. 8000a94: f44f 7300 mov.w r3, #512 @ 0x200
  1298. 8000a98: 60fb str r3, [r7, #12]
  1299. 8000a9a: e002 b.n 8000aa2 <flash_erase_sector+0x3e>
  1300. }
  1301. else
  1302. {
  1303. tmp_psize = FLASH_PSIZE_DOUBLE_WORD;
  1304. 8000a9c: f44f 7340 mov.w r3, #768 @ 0x300
  1305. 8000aa0: 60fb str r3, [r7, #12]
  1306. }
  1307. /* Need to add offset of 4 when sector higher than FLASH_SECTOR_11 */
  1308. if (Sector > FLASH_SECTOR_11)
  1309. 8000aa2: 687b ldr r3, [r7, #4]
  1310. 8000aa4: 2b0b cmp r3, #11
  1311. 8000aa6: d902 bls.n 8000aae <flash_erase_sector+0x4a>
  1312. {
  1313. Sector += 4U;
  1314. 8000aa8: 687b ldr r3, [r7, #4]
  1315. 8000aaa: 3304 adds r3, #4
  1316. 8000aac: 607b str r3, [r7, #4]
  1317. }
  1318. /* If the previous operation is completed, proceed to erase the sector */
  1319. CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1320. 8000aae: 4b17 ldr r3, [pc, #92] @ (8000b0c <flash_erase_sector+0xa8>)
  1321. 8000ab0: 691b ldr r3, [r3, #16]
  1322. 8000ab2: 4a16 ldr r2, [pc, #88] @ (8000b0c <flash_erase_sector+0xa8>)
  1323. 8000ab4: f423 7340 bic.w r3, r3, #768 @ 0x300
  1324. 8000ab8: 6113 str r3, [r2, #16]
  1325. FLASH->CR |= tmp_psize;
  1326. 8000aba: 4b14 ldr r3, [pc, #80] @ (8000b0c <flash_erase_sector+0xa8>)
  1327. 8000abc: 691a ldr r2, [r3, #16]
  1328. 8000abe: 4913 ldr r1, [pc, #76] @ (8000b0c <flash_erase_sector+0xa8>)
  1329. 8000ac0: 68fb ldr r3, [r7, #12]
  1330. 8000ac2: 4313 orrs r3, r2
  1331. 8000ac4: 610b str r3, [r1, #16]
  1332. CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
  1333. 8000ac6: 4b11 ldr r3, [pc, #68] @ (8000b0c <flash_erase_sector+0xa8>)
  1334. 8000ac8: 691b ldr r3, [r3, #16]
  1335. 8000aca: 4a10 ldr r2, [pc, #64] @ (8000b0c <flash_erase_sector+0xa8>)
  1336. 8000acc: f023 0378 bic.w r3, r3, #120 @ 0x78
  1337. 8000ad0: 6113 str r3, [r2, #16]
  1338. FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos);
  1339. 8000ad2: 4b0e ldr r3, [pc, #56] @ (8000b0c <flash_erase_sector+0xa8>)
  1340. 8000ad4: 691a ldr r2, [r3, #16]
  1341. 8000ad6: 687b ldr r3, [r7, #4]
  1342. 8000ad8: 00db lsls r3, r3, #3
  1343. 8000ada: 4313 orrs r3, r2
  1344. 8000adc: 4a0b ldr r2, [pc, #44] @ (8000b0c <flash_erase_sector+0xa8>)
  1345. 8000ade: f043 0302 orr.w r3, r3, #2
  1346. 8000ae2: 6113 str r3, [r2, #16]
  1347. FLASH->CR |= FLASH_CR_STRT;
  1348. 8000ae4: 4b09 ldr r3, [pc, #36] @ (8000b0c <flash_erase_sector+0xa8>)
  1349. 8000ae6: 691b ldr r3, [r3, #16]
  1350. 8000ae8: 4a08 ldr r2, [pc, #32] @ (8000b0c <flash_erase_sector+0xa8>)
  1351. 8000aea: f443 3380 orr.w r3, r3, #65536 @ 0x10000
  1352. 8000aee: 6113 str r3, [r2, #16]
  1353. flash_wait_ready(2000);
  1354. 8000af0: f44f 60fa mov.w r0, #2000 @ 0x7d0
  1355. 8000af4: f7ff ff86 bl 8000a04 <flash_wait_ready>
  1356. CLEAR_BIT(FLASH->CR, (FLASH_CR_SER | FLASH_CR_SNB));
  1357. 8000af8: 4b04 ldr r3, [pc, #16] @ (8000b0c <flash_erase_sector+0xa8>)
  1358. 8000afa: 691b ldr r3, [r3, #16]
  1359. 8000afc: 4a03 ldr r2, [pc, #12] @ (8000b0c <flash_erase_sector+0xa8>)
  1360. 8000afe: f023 037a bic.w r3, r3, #122 @ 0x7a
  1361. 8000b02: 6113 str r3, [r2, #16]
  1362. }
  1363. 8000b04: bf00 nop
  1364. 8000b06: 3710 adds r7, #16
  1365. 8000b08: 46bd mov sp, r7
  1366. 8000b0a: bd80 pop {r7, pc}
  1367. 8000b0c: 40023c00 .word 0x40023c00
  1368. 08000b10 <flash_write_word>:
  1369. static void flash_write_word(uint32_t Address, uint32_t Data)
  1370. {
  1371. 8000b10: b580 push {r7, lr}
  1372. 8000b12: b082 sub sp, #8
  1373. 8000b14: af00 add r7, sp, #0
  1374. 8000b16: 6078 str r0, [r7, #4]
  1375. 8000b18: 6039 str r1, [r7, #0]
  1376. /* If the previous operation is completed, proceed to program the new data */
  1377. CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1378. 8000b1a: 4b11 ldr r3, [pc, #68] @ (8000b60 <flash_write_word+0x50>)
  1379. 8000b1c: 691b ldr r3, [r3, #16]
  1380. 8000b1e: 4a10 ldr r2, [pc, #64] @ (8000b60 <flash_write_word+0x50>)
  1381. 8000b20: f423 7340 bic.w r3, r3, #768 @ 0x300
  1382. 8000b24: 6113 str r3, [r2, #16]
  1383. FLASH->CR |= FLASH_PSIZE_WORD;
  1384. 8000b26: 4b0e ldr r3, [pc, #56] @ (8000b60 <flash_write_word+0x50>)
  1385. 8000b28: 691b ldr r3, [r3, #16]
  1386. 8000b2a: 4a0d ldr r2, [pc, #52] @ (8000b60 <flash_write_word+0x50>)
  1387. 8000b2c: f443 7300 orr.w r3, r3, #512 @ 0x200
  1388. 8000b30: 6113 str r3, [r2, #16]
  1389. FLASH->CR |= FLASH_CR_PG;
  1390. 8000b32: 4b0b ldr r3, [pc, #44] @ (8000b60 <flash_write_word+0x50>)
  1391. 8000b34: 691b ldr r3, [r3, #16]
  1392. 8000b36: 4a0a ldr r2, [pc, #40] @ (8000b60 <flash_write_word+0x50>)
  1393. 8000b38: f043 0301 orr.w r3, r3, #1
  1394. 8000b3c: 6113 str r3, [r2, #16]
  1395. *(__IO uint32_t*)Address = Data;
  1396. 8000b3e: 687b ldr r3, [r7, #4]
  1397. 8000b40: 683a ldr r2, [r7, #0]
  1398. 8000b42: 601a str r2, [r3, #0]
  1399. flash_wait_ready(10);
  1400. 8000b44: 200a movs r0, #10
  1401. 8000b46: f7ff ff5d bl 8000a04 <flash_wait_ready>
  1402. FLASH->CR &= (~FLASH_CR_PG);
  1403. 8000b4a: 4b05 ldr r3, [pc, #20] @ (8000b60 <flash_write_word+0x50>)
  1404. 8000b4c: 691b ldr r3, [r3, #16]
  1405. 8000b4e: 4a04 ldr r2, [pc, #16] @ (8000b60 <flash_write_word+0x50>)
  1406. 8000b50: f023 0301 bic.w r3, r3, #1
  1407. 8000b54: 6113 str r3, [r2, #16]
  1408. }
  1409. 8000b56: bf00 nop
  1410. 8000b58: 3708 adds r7, #8
  1411. 8000b5a: 46bd mov sp, r7
  1412. 8000b5c: bd80 pop {r7, pc}
  1413. 8000b5e: bf00 nop
  1414. 8000b60: 40023c00 .word 0x40023c00
  1415. 08000b64 <flash_write_byte>:
  1416. //不能用
  1417. static void flash_write_byte(uint32_t Address, uint8_t Data)
  1418. {
  1419. 8000b64: b580 push {r7, lr}
  1420. 8000b66: b082 sub sp, #8
  1421. 8000b68: af00 add r7, sp, #0
  1422. 8000b6a: 6078 str r0, [r7, #4]
  1423. 8000b6c: 460b mov r3, r1
  1424. 8000b6e: 70fb strb r3, [r7, #3]
  1425. /* If the previous operation is completed, proceed to program the new data */
  1426. CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
  1427. 8000b70: 4b0f ldr r3, [pc, #60] @ (8000bb0 <flash_write_byte+0x4c>)
  1428. 8000b72: 691b ldr r3, [r3, #16]
  1429. 8000b74: 4a0e ldr r2, [pc, #56] @ (8000bb0 <flash_write_byte+0x4c>)
  1430. 8000b76: f423 7340 bic.w r3, r3, #768 @ 0x300
  1431. 8000b7a: 6113 str r3, [r2, #16]
  1432. FLASH->CR |= FLASH_PSIZE_BYTE;
  1433. 8000b7c: 4b0c ldr r3, [pc, #48] @ (8000bb0 <flash_write_byte+0x4c>)
  1434. 8000b7e: 4a0c ldr r2, [pc, #48] @ (8000bb0 <flash_write_byte+0x4c>)
  1435. 8000b80: 691b ldr r3, [r3, #16]
  1436. 8000b82: 6113 str r3, [r2, #16]
  1437. FLASH->CR |= FLASH_CR_PG;
  1438. 8000b84: 4b0a ldr r3, [pc, #40] @ (8000bb0 <flash_write_byte+0x4c>)
  1439. 8000b86: 691b ldr r3, [r3, #16]
  1440. 8000b88: 4a09 ldr r2, [pc, #36] @ (8000bb0 <flash_write_byte+0x4c>)
  1441. 8000b8a: f043 0301 orr.w r3, r3, #1
  1442. 8000b8e: 6113 str r3, [r2, #16]
  1443. *(__IO uint8_t*)Address = Data;
  1444. 8000b90: 687b ldr r3, [r7, #4]
  1445. 8000b92: 78fa ldrb r2, [r7, #3]
  1446. 8000b94: 701a strb r2, [r3, #0]
  1447. flash_wait_ready(10);
  1448. 8000b96: 200a movs r0, #10
  1449. 8000b98: f7ff ff34 bl 8000a04 <flash_wait_ready>
  1450. FLASH->CR &= (~FLASH_CR_PG);
  1451. 8000b9c: 4b04 ldr r3, [pc, #16] @ (8000bb0 <flash_write_byte+0x4c>)
  1452. 8000b9e: 691b ldr r3, [r3, #16]
  1453. 8000ba0: 4a03 ldr r2, [pc, #12] @ (8000bb0 <flash_write_byte+0x4c>)
  1454. 8000ba2: f023 0301 bic.w r3, r3, #1
  1455. 8000ba6: 6113 str r3, [r2, #16]
  1456. }
  1457. 8000ba8: bf00 nop
  1458. 8000baa: 3708 adds r7, #8
  1459. 8000bac: 46bd mov sp, r7
  1460. 8000bae: bd80 pop {r7, pc}
  1461. 8000bb0: 40023c00 .word 0x40023c00
  1462. 08000bb4 <flash_erase_page>:
  1463. // @brief Erases a flash sector. This sets all bits in the sector to 1.
  1464. // The sector's current index is reset to the minimum value (n_reserved).
  1465. // @returns 0 on success or a non-zero error code otherwise
  1466. int flash_erase_page(uint32_t address) {
  1467. 8000bb4: b580 push {r7, lr}
  1468. 8000bb6: b082 sub sp, #8
  1469. 8000bb8: af00 add r7, sp, #0
  1470. 8000bba: 6078 str r0, [r7, #4]
  1471. // wdog_reload();
  1472. flash_unlock();
  1473. 8000bbc: f7ff fefe bl 80009bc <flash_unlock>
  1474. HAL_FLASH_ClearError();
  1475. 8000bc0: f7ff fe52 bl 8000868 <HAL_FLASH_ClearError>
  1476. flash_erase_sector(_sector_frame_address(address));
  1477. 8000bc4: 6878 ldr r0, [r7, #4]
  1478. 8000bc6: f7ff fe5b bl 8000880 <_sector_frame_address>
  1479. 8000bca: 4603 mov r3, r0
  1480. 8000bcc: 4618 mov r0, r3
  1481. 8000bce: f7ff ff49 bl 8000a64 <flash_erase_sector>
  1482. flash_lock();
  1483. 8000bd2: f7ff ff07 bl 80009e4 <flash_lock>
  1484. // wdog_reload();
  1485. return 0;
  1486. 8000bd6: 2300 movs r3, #0
  1487. }
  1488. 8000bd8: 4618 mov r0, r3
  1489. 8000bda: 3708 adds r7, #8
  1490. 8000bdc: 46bd mov sp, r7
  1491. 8000bde: bd80 pop {r7, pc}
  1492. 08000be0 <flash_erase_app>:
  1493. size -= sectors_size[sector];;
  1494. }
  1495. return 0;
  1496. }
  1497. int flash_erase_app(uint8_t app_num) {
  1498. 8000be0: b580 push {r7, lr}
  1499. 8000be2: b082 sub sp, #8
  1500. 8000be4: af00 add r7, sp, #0
  1501. 8000be6: 4603 mov r3, r0
  1502. 8000be8: 71fb strb r3, [r7, #7]
  1503. if(app_num == 1) {
  1504. 8000bea: 79fb ldrb r3, [r7, #7]
  1505. 8000bec: 2b01 cmp r3, #1
  1506. 8000bee: d110 bne.n 8000c12 <flash_erase_app+0x32>
  1507. app_status_set(1,false);
  1508. 8000bf0: 2100 movs r1, #0
  1509. 8000bf2: 2001 movs r0, #1
  1510. 8000bf4: f000 f830 bl 8000c58 <app_status_set>
  1511. //total = 16+64+128+128=336k
  1512. flash_erase_page(ADDR_FLASH_SECTOR_3);//16k
  1513. 8000bf8: 4810 ldr r0, [pc, #64] @ (8000c3c <flash_erase_app+0x5c>)
  1514. 8000bfa: f7ff ffdb bl 8000bb4 <flash_erase_page>
  1515. flash_erase_page(ADDR_FLASH_SECTOR_4);//64k
  1516. 8000bfe: 4810 ldr r0, [pc, #64] @ (8000c40 <flash_erase_app+0x60>)
  1517. 8000c00: f7ff ffd8 bl 8000bb4 <flash_erase_page>
  1518. flash_erase_page(ADDR_FLASH_SECTOR_5);//128k
  1519. 8000c04: 480f ldr r0, [pc, #60] @ (8000c44 <flash_erase_app+0x64>)
  1520. 8000c06: f7ff ffd5 bl 8000bb4 <flash_erase_page>
  1521. flash_erase_page(ADDR_FLASH_SECTOR_6);//128k
  1522. 8000c0a: 480f ldr r0, [pc, #60] @ (8000c48 <flash_erase_app+0x68>)
  1523. 8000c0c: f7ff ffd2 bl 8000bb4 <flash_erase_page>
  1524. 8000c10: e00f b.n 8000c32 <flash_erase_app+0x52>
  1525. }
  1526. else if(app_num == 2) {
  1527. 8000c12: 79fb ldrb r3, [r7, #7]
  1528. 8000c14: 2b02 cmp r3, #2
  1529. 8000c16: d10c bne.n 8000c32 <flash_erase_app+0x52>
  1530. app_status_set(2,false);
  1531. 8000c18: 2100 movs r1, #0
  1532. 8000c1a: 2002 movs r0, #2
  1533. 8000c1c: f000 f81c bl 8000c58 <app_status_set>
  1534. //total = 128+128+128=384k
  1535. flash_erase_page(ADDR_FLASH_SECTOR_7);//128k
  1536. 8000c20: 480a ldr r0, [pc, #40] @ (8000c4c <flash_erase_app+0x6c>)
  1537. 8000c22: f7ff ffc7 bl 8000bb4 <flash_erase_page>
  1538. flash_erase_page(ADDR_FLASH_SECTOR_8);//128k
  1539. 8000c26: 480a ldr r0, [pc, #40] @ (8000c50 <flash_erase_app+0x70>)
  1540. 8000c28: f7ff ffc4 bl 8000bb4 <flash_erase_page>
  1541. flash_erase_page(ADDR_FLASH_SECTOR_9);//128k
  1542. 8000c2c: 4809 ldr r0, [pc, #36] @ (8000c54 <flash_erase_app+0x74>)
  1543. 8000c2e: f7ff ffc1 bl 8000bb4 <flash_erase_page>
  1544. }
  1545. return 0;
  1546. 8000c32: 2300 movs r3, #0
  1547. }
  1548. 8000c34: 4618 mov r0, r3
  1549. 8000c36: 3708 adds r7, #8
  1550. 8000c38: 46bd mov sp, r7
  1551. 8000c3a: bd80 pop {r7, pc}
  1552. 8000c3c: 0800c000 .word 0x0800c000
  1553. 8000c40: 08010000 .word 0x08010000
  1554. 8000c44: 08020000 .word 0x08020000
  1555. 8000c48: 08040000 .word 0x08040000
  1556. 8000c4c: 08060000 .word 0x08060000
  1557. 8000c50: 08080000 .word 0x08080000
  1558. 8000c54: 080a0000 .word 0x080a0000
  1559. 08000c58 <app_status_set>:
  1560. void app_status_set(uint8_t app_num,bool status) {
  1561. 8000c58: b580 push {r7, lr}
  1562. 8000c5a: b084 sub sp, #16
  1563. 8000c5c: af00 add r7, sp, #0
  1564. 8000c5e: 4603 mov r3, r0
  1565. 8000c60: 460a mov r2, r1
  1566. 8000c62: 71fb strb r3, [r7, #7]
  1567. 8000c64: 4613 mov r3, r2
  1568. 8000c66: 71bb strb r3, [r7, #6]
  1569. uint8_t app_ok_flag[2];
  1570. if(app_num == 1) {
  1571. 8000c68: 79fb ldrb r3, [r7, #7]
  1572. 8000c6a: 2b01 cmp r3, #1
  1573. 8000c6c: d110 bne.n 8000c90 <app_status_set+0x38>
  1574. app_ok_flag[0] = status;
  1575. 8000c6e: 79bb ldrb r3, [r7, #6]
  1576. 8000c70: 733b strb r3, [r7, #12]
  1577. app_ok_flag[1] = *(volatile uint8_t*)(CONFIG_IAP_INFO_ADDR+1);
  1578. 8000c72: 4b13 ldr r3, [pc, #76] @ (8000cc0 <app_status_set+0x68>)
  1579. 8000c74: 781b ldrb r3, [r3, #0]
  1580. 8000c76: b2db uxtb r3, r3
  1581. 8000c78: 737b strb r3, [r7, #13]
  1582. flash_erase_page(CONFIG_IAP_INFO_ADDR);
  1583. 8000c7a: 4812 ldr r0, [pc, #72] @ (8000cc4 <app_status_set+0x6c>)
  1584. 8000c7c: f7ff ff9a bl 8000bb4 <flash_erase_page>
  1585. flash_write_page(CONFIG_IAP_INFO_ADDR, app_ok_flag, 2, false);
  1586. 8000c80: f107 010c add.w r1, r7, #12
  1587. 8000c84: 2300 movs r3, #0
  1588. 8000c86: 2202 movs r2, #2
  1589. 8000c88: 480e ldr r0, [pc, #56] @ (8000cc4 <app_status_set+0x6c>)
  1590. 8000c8a: f000 f81d bl 8000cc8 <flash_write_page>
  1591. app_ok_flag[0] = *(volatile uint8_t*)(CONFIG_IAP_INFO_ADDR);
  1592. app_ok_flag[1] = status;
  1593. flash_erase_page(CONFIG_IAP_INFO_ADDR);
  1594. flash_write_page(CONFIG_IAP_INFO_ADDR, app_ok_flag, 2, false);
  1595. }
  1596. }
  1597. 8000c8e: e012 b.n 8000cb6 <app_status_set+0x5e>
  1598. else if(app_num == 2) {
  1599. 8000c90: 79fb ldrb r3, [r7, #7]
  1600. 8000c92: 2b02 cmp r3, #2
  1601. 8000c94: d10f bne.n 8000cb6 <app_status_set+0x5e>
  1602. app_ok_flag[0] = *(volatile uint8_t*)(CONFIG_IAP_INFO_ADDR);
  1603. 8000c96: 4b0b ldr r3, [pc, #44] @ (8000cc4 <app_status_set+0x6c>)
  1604. 8000c98: 781b ldrb r3, [r3, #0]
  1605. 8000c9a: b2db uxtb r3, r3
  1606. 8000c9c: 733b strb r3, [r7, #12]
  1607. app_ok_flag[1] = status;
  1608. 8000c9e: 79bb ldrb r3, [r7, #6]
  1609. 8000ca0: 737b strb r3, [r7, #13]
  1610. flash_erase_page(CONFIG_IAP_INFO_ADDR);
  1611. 8000ca2: 4808 ldr r0, [pc, #32] @ (8000cc4 <app_status_set+0x6c>)
  1612. 8000ca4: f7ff ff86 bl 8000bb4 <flash_erase_page>
  1613. flash_write_page(CONFIG_IAP_INFO_ADDR, app_ok_flag, 2, false);
  1614. 8000ca8: f107 010c add.w r1, r7, #12
  1615. 8000cac: 2300 movs r3, #0
  1616. 8000cae: 2202 movs r2, #2
  1617. 8000cb0: 4804 ldr r0, [pc, #16] @ (8000cc4 <app_status_set+0x6c>)
  1618. 8000cb2: f000 f809 bl 8000cc8 <flash_write_page>
  1619. }
  1620. 8000cb6: bf00 nop
  1621. 8000cb8: 3710 adds r7, #16
  1622. 8000cba: 46bd mov sp, r7
  1623. 8000cbc: bd80 pop {r7, pc}
  1624. 8000cbe: bf00 nop
  1625. 8000cc0: 08008001 .word 0x08008001
  1626. 8000cc4: 08008000 .word 0x08008000
  1627. 08000cc8 <flash_write_page>:
  1628. int flash_write_page(uint32_t target_addr, uint8_t *data, uint32_t length, bool erase) {
  1629. 8000cc8: b580 push {r7, lr}
  1630. 8000cca: b086 sub sp, #24
  1631. 8000ccc: af00 add r7, sp, #0
  1632. 8000cce: 60f8 str r0, [r7, #12]
  1633. 8000cd0: 60b9 str r1, [r7, #8]
  1634. 8000cd2: 607a str r2, [r7, #4]
  1635. 8000cd4: 70fb strb r3, [r7, #3]
  1636. uint32_t offset = target_addr & 0x3;
  1637. 8000cd6: 68fb ldr r3, [r7, #12]
  1638. 8000cd8: f003 0303 and.w r3, r3, #3
  1639. 8000cdc: 617b str r3, [r7, #20]
  1640. target_addr -= offset;
  1641. 8000cde: 68fa ldr r2, [r7, #12]
  1642. 8000ce0: 697b ldr r3, [r7, #20]
  1643. 8000ce2: 1ad3 subs r3, r2, r3
  1644. 8000ce4: 60fb str r3, [r7, #12]
  1645. if (erase && flash_erase_page(target_addr) != 0) {
  1646. 8000ce6: 78fb ldrb r3, [r7, #3]
  1647. 8000ce8: 2b00 cmp r3, #0
  1648. 8000cea: d008 beq.n 8000cfe <flash_write_page+0x36>
  1649. 8000cec: 68f8 ldr r0, [r7, #12]
  1650. 8000cee: f7ff ff61 bl 8000bb4 <flash_erase_page>
  1651. 8000cf2: 4603 mov r3, r0
  1652. 8000cf4: 2b00 cmp r3, #0
  1653. 8000cf6: d002 beq.n 8000cfe <flash_write_page+0x36>
  1654. return -1;
  1655. 8000cf8: f04f 33ff mov.w r3, #4294967295
  1656. 8000cfc: e04d b.n 8000d9a <flash_write_page+0xd2>
  1657. }
  1658. // wdog_reload();
  1659. flash_unlock();
  1660. 8000cfe: f7ff fe5d bl 80009bc <flash_unlock>
  1661. HAL_FLASH_ClearError();
  1662. 8000d02: f7ff fdb1 bl 8000868 <HAL_FLASH_ClearError>
  1663. // handle unaligned start
  1664. for (; (offset & 0x3) && length; ++data, ++offset, --length) {
  1665. 8000d06: e011 b.n 8000d2c <flash_write_page+0x64>
  1666. flash_write_byte(target_addr + offset, *data);
  1667. 8000d08: 68fa ldr r2, [r7, #12]
  1668. 8000d0a: 697b ldr r3, [r7, #20]
  1669. 8000d0c: 441a add r2, r3
  1670. 8000d0e: 68bb ldr r3, [r7, #8]
  1671. 8000d10: 781b ldrb r3, [r3, #0]
  1672. 8000d12: 4619 mov r1, r3
  1673. 8000d14: 4610 mov r0, r2
  1674. 8000d16: f7ff ff25 bl 8000b64 <flash_write_byte>
  1675. for (; (offset & 0x3) && length; ++data, ++offset, --length) {
  1676. 8000d1a: 68bb ldr r3, [r7, #8]
  1677. 8000d1c: 3301 adds r3, #1
  1678. 8000d1e: 60bb str r3, [r7, #8]
  1679. 8000d20: 697b ldr r3, [r7, #20]
  1680. 8000d22: 3301 adds r3, #1
  1681. 8000d24: 617b str r3, [r7, #20]
  1682. 8000d26: 687b ldr r3, [r7, #4]
  1683. 8000d28: 3b01 subs r3, #1
  1684. 8000d2a: 607b str r3, [r7, #4]
  1685. 8000d2c: 697b ldr r3, [r7, #20]
  1686. 8000d2e: f003 0303 and.w r3, r3, #3
  1687. 8000d32: 2b00 cmp r3, #0
  1688. 8000d34: d015 beq.n 8000d62 <flash_write_page+0x9a>
  1689. 8000d36: 687b ldr r3, [r7, #4]
  1690. 8000d38: 2b00 cmp r3, #0
  1691. 8000d3a: d1e5 bne.n 8000d08 <flash_write_page+0x40>
  1692. }
  1693. // write 32-bit values (64-bit doesn't work)
  1694. for (; length >= 4; data += 4, offset += 4, length -=4) {
  1695. 8000d3c: e011 b.n 8000d62 <flash_write_page+0x9a>
  1696. flash_write_word(target_addr + offset, *(uint32_t *)data);
  1697. 8000d3e: 68fa ldr r2, [r7, #12]
  1698. 8000d40: 697b ldr r3, [r7, #20]
  1699. 8000d42: 441a add r2, r3
  1700. 8000d44: 68bb ldr r3, [r7, #8]
  1701. 8000d46: 681b ldr r3, [r3, #0]
  1702. 8000d48: 4619 mov r1, r3
  1703. 8000d4a: 4610 mov r0, r2
  1704. 8000d4c: f7ff fee0 bl 8000b10 <flash_write_word>
  1705. for (; length >= 4; data += 4, offset += 4, length -=4) {
  1706. 8000d50: 68bb ldr r3, [r7, #8]
  1707. 8000d52: 3304 adds r3, #4
  1708. 8000d54: 60bb str r3, [r7, #8]
  1709. 8000d56: 697b ldr r3, [r7, #20]
  1710. 8000d58: 3304 adds r3, #4
  1711. 8000d5a: 617b str r3, [r7, #20]
  1712. 8000d5c: 687b ldr r3, [r7, #4]
  1713. 8000d5e: 3b04 subs r3, #4
  1714. 8000d60: 607b str r3, [r7, #4]
  1715. 8000d62: 687b ldr r3, [r7, #4]
  1716. 8000d64: 2b03 cmp r3, #3
  1717. 8000d66: d8ea bhi.n 8000d3e <flash_write_page+0x76>
  1718. }
  1719. // handle unaligned end
  1720. for (; length; ++data, ++offset, --length) {
  1721. 8000d68: e011 b.n 8000d8e <flash_write_page+0xc6>
  1722. flash_write_byte(target_addr + offset, *data);
  1723. 8000d6a: 68fa ldr r2, [r7, #12]
  1724. 8000d6c: 697b ldr r3, [r7, #20]
  1725. 8000d6e: 441a add r2, r3
  1726. 8000d70: 68bb ldr r3, [r7, #8]
  1727. 8000d72: 781b ldrb r3, [r3, #0]
  1728. 8000d74: 4619 mov r1, r3
  1729. 8000d76: 4610 mov r0, r2
  1730. 8000d78: f7ff fef4 bl 8000b64 <flash_write_byte>
  1731. for (; length; ++data, ++offset, --length) {
  1732. 8000d7c: 68bb ldr r3, [r7, #8]
  1733. 8000d7e: 3301 adds r3, #1
  1734. 8000d80: 60bb str r3, [r7, #8]
  1735. 8000d82: 697b ldr r3, [r7, #20]
  1736. 8000d84: 3301 adds r3, #1
  1737. 8000d86: 617b str r3, [r7, #20]
  1738. 8000d88: 687b ldr r3, [r7, #4]
  1739. 8000d8a: 3b01 subs r3, #1
  1740. 8000d8c: 607b str r3, [r7, #4]
  1741. 8000d8e: 687b ldr r3, [r7, #4]
  1742. 8000d90: 2b00 cmp r3, #0
  1743. 8000d92: d1ea bne.n 8000d6a <flash_write_page+0xa2>
  1744. }
  1745. flash_lock();
  1746. 8000d94: f7ff fe26 bl 80009e4 <flash_lock>
  1747. return 0;
  1748. 8000d98: 2300 movs r3, #0
  1749. }
  1750. 8000d9a: 4618 mov r0, r3
  1751. 8000d9c: 3718 adds r7, #24
  1752. 8000d9e: 46bd mov sp, r7
  1753. 8000da0: bd80 pop {r7, pc}
  1754. 08000da2 <app2_copy_to_app1>:
  1755. for (uint32_t i = 0; i < APP2_ADDRESS - APP1_ADDRESS; i++) {
  1756. data[0] = *(volatile uint8_t*)(APP1_ADDRESS + i);
  1757. flash_write_page(APP2_ADDRESS + i, data, 1, false);
  1758. }
  1759. }
  1760. void app2_copy_to_app1(void) {
  1761. 8000da2: b580 push {r7, lr}
  1762. 8000da4: b082 sub sp, #8
  1763. 8000da6: af00 add r7, sp, #0
  1764. uint8_t data[1];
  1765. //1、擦除APP1的flash和完整性标志位
  1766. flash_erase_app(1);
  1767. 8000da8: 2001 movs r0, #1
  1768. 8000daa: f7ff ff19 bl 8000be0 <flash_erase_app>
  1769. //2、从APP2_ADDRESS读出APP2_ADDRESS - APP1_ADDRESS个数据,复制写入到APP1_ADDRESS
  1770. for (uint32_t i = 0; i < APP2_ADDRESS - APP1_ADDRESS; i++) {
  1771. 8000dae: 2300 movs r3, #0
  1772. 8000db0: 607b str r3, [r7, #4]
  1773. 8000db2: e014 b.n 8000dde <app2_copy_to_app1+0x3c>
  1774. data[0] = *(volatile uint8_t*)(APP2_ADDRESS + i);
  1775. 8000db4: 687b ldr r3, [r7, #4]
  1776. 8000db6: f103 6300 add.w r3, r3, #134217728 @ 0x8000000
  1777. 8000dba: f503 23c0 add.w r3, r3, #393216 @ 0x60000
  1778. 8000dbe: 781b ldrb r3, [r3, #0]
  1779. 8000dc0: b2db uxtb r3, r3
  1780. 8000dc2: 703b strb r3, [r7, #0]
  1781. flash_write_page(APP1_ADDRESS + i, data, 1, false);
  1782. 8000dc4: 687b ldr r3, [r7, #4]
  1783. 8000dc6: f103 6000 add.w r0, r3, #134217728 @ 0x8000000
  1784. 8000dca: f500 4040 add.w r0, r0, #49152 @ 0xc000
  1785. 8000dce: 4639 mov r1, r7
  1786. 8000dd0: 2300 movs r3, #0
  1787. 8000dd2: 2201 movs r2, #1
  1788. 8000dd4: f7ff ff78 bl 8000cc8 <flash_write_page>
  1789. for (uint32_t i = 0; i < APP2_ADDRESS - APP1_ADDRESS; i++) {
  1790. 8000dd8: 687b ldr r3, [r7, #4]
  1791. 8000dda: 3301 adds r3, #1
  1792. 8000ddc: 607b str r3, [r7, #4]
  1793. 8000dde: 687b ldr r3, [r7, #4]
  1794. 8000de0: f5b3 2fa8 cmp.w r3, #344064 @ 0x54000
  1795. 8000de4: d3e6 bcc.n 8000db4 <app2_copy_to_app1+0x12>
  1796. }
  1797. }
  1798. 8000de6: bf00 nop
  1799. 8000de8: bf00 nop
  1800. 8000dea: 3708 adds r7, #8
  1801. 8000dec: 46bd mov sp, r7
  1802. 8000dee: bd80 pop {r7, pc}
  1803. 08000df0 <jump_to_app>:
  1804. }
  1805. }
  1806. #endif
  1807. void jump_to_app(uint32_t app_addr)
  1808. {
  1809. 8000df0: b580 push {r7, lr}
  1810. 8000df2: b084 sub sp, #16
  1811. 8000df4: af00 add r7, sp, #0
  1812. 8000df6: 6078 str r0, [r7, #4]
  1813. \details Disables IRQ interrupts by setting special-purpose register PRIMASK.
  1814. Can only be executed in Privileged modes.
  1815. */
  1816. __STATIC_FORCEINLINE void __disable_irq(void)
  1817. {
  1818. __ASM volatile ("cpsid i" : : : "memory");
  1819. 8000df8: b672 cpsid i
  1820. }
  1821. 8000dfa: bf00 nop
  1822. __disable_irq();
  1823. // 3. 清除所有中断挂起位(非常重要!)
  1824. for (int i = 0; i < 8; i++) {
  1825. 8000dfc: 2300 movs r3, #0
  1826. 8000dfe: 60fb str r3, [r7, #12]
  1827. 8000e00: e010 b.n 8000e24 <jump_to_app+0x34>
  1828. NVIC->ICPR[i] = 0xFFFFFFFF; // 清除挂起
  1829. 8000e02: 4a15 ldr r2, [pc, #84] @ (8000e58 <jump_to_app+0x68>)
  1830. 8000e04: 68fb ldr r3, [r7, #12]
  1831. 8000e06: 3360 adds r3, #96 @ 0x60
  1832. 8000e08: f04f 31ff mov.w r1, #4294967295
  1833. 8000e0c: f842 1023 str.w r1, [r2, r3, lsl #2]
  1834. NVIC->ICER[i] = 0xFFFFFFFF; // 禁用中断
  1835. 8000e10: 4a11 ldr r2, [pc, #68] @ (8000e58 <jump_to_app+0x68>)
  1836. 8000e12: 68fb ldr r3, [r7, #12]
  1837. 8000e14: 3320 adds r3, #32
  1838. 8000e16: f04f 31ff mov.w r1, #4294967295
  1839. 8000e1a: f842 1023 str.w r1, [r2, r3, lsl #2]
  1840. for (int i = 0; i < 8; i++) {
  1841. 8000e1e: 68fb ldr r3, [r7, #12]
  1842. 8000e20: 3301 adds r3, #1
  1843. 8000e22: 60fb str r3, [r7, #12]
  1844. 8000e24: 68fb ldr r3, [r7, #12]
  1845. 8000e26: 2b07 cmp r3, #7
  1846. 8000e28: ddeb ble.n 8000e02 <jump_to_app+0x12>
  1847. }
  1848. SysTick->CTRL = 0;
  1849. 8000e2a: 4b0c ldr r3, [pc, #48] @ (8000e5c <jump_to_app+0x6c>)
  1850. 8000e2c: 2200 movs r2, #0
  1851. 8000e2e: 601a str r2, [r3, #0]
  1852. HAL_CAN_DeInit(&hcan1);
  1853. 8000e30: 480b ldr r0, [pc, #44] @ (8000e60 <jump_to_app+0x70>)
  1854. 8000e32: f002 fa90 bl 8003356 <HAL_CAN_DeInit>
  1855. HAL_DeInit();
  1856. 8000e36: f002 f90d bl 8003054 <HAL_DeInit>
  1857. __set_MSP(REG32(app_addr));
  1858. 8000e3a: 687b ldr r3, [r7, #4]
  1859. 8000e3c: 681b ldr r3, [r3, #0]
  1860. 8000e3e: 60bb str r3, [r7, #8]
  1861. \details Assigns the given value to the Main Stack Pointer (MSP).
  1862. \param [in] topOfMainStack Main Stack Pointer value to set
  1863. */
  1864. __STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack)
  1865. {
  1866. __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : );
  1867. 8000e40: 68bb ldr r3, [r7, #8]
  1868. 8000e42: f383 8808 msr MSP, r3
  1869. }
  1870. 8000e46: bf00 nop
  1871. // SCB->VTOR = app_addr;
  1872. ((void (*)(void))(REG32(app_addr + 4)))();
  1873. 8000e48: 687b ldr r3, [r7, #4]
  1874. 8000e4a: 3304 adds r3, #4
  1875. 8000e4c: 681b ldr r3, [r3, #0]
  1876. 8000e4e: 4798 blx r3
  1877. }
  1878. 8000e50: bf00 nop
  1879. 8000e52: 3710 adds r7, #16
  1880. 8000e54: 46bd mov sp, r7
  1881. 8000e56: bd80 pop {r7, pc}
  1882. 8000e58: e000e100 .word 0xe000e100
  1883. 8000e5c: e000e010 .word 0xe000e010
  1884. 8000e60: 20000064 .word 0x20000064
  1885. 08000e64 <MX_GPIO_Init>:
  1886. * Output
  1887. * EVENT_OUT
  1888. * EXTI
  1889. */
  1890. void MX_GPIO_Init(void)
  1891. {
  1892. 8000e64: b580 push {r7, lr}
  1893. 8000e66: b08a sub sp, #40 @ 0x28
  1894. 8000e68: af00 add r7, sp, #0
  1895. GPIO_InitTypeDef GPIO_InitStruct = {0};
  1896. 8000e6a: f107 0314 add.w r3, r7, #20
  1897. 8000e6e: 2200 movs r2, #0
  1898. 8000e70: 601a str r2, [r3, #0]
  1899. 8000e72: 605a str r2, [r3, #4]
  1900. 8000e74: 609a str r2, [r3, #8]
  1901. 8000e76: 60da str r2, [r3, #12]
  1902. 8000e78: 611a str r2, [r3, #16]
  1903. /* GPIO Ports Clock Enable */
  1904. __HAL_RCC_GPIOH_CLK_ENABLE();
  1905. 8000e7a: 2300 movs r3, #0
  1906. 8000e7c: 613b str r3, [r7, #16]
  1907. 8000e7e: 4b39 ldr r3, [pc, #228] @ (8000f64 <MX_GPIO_Init+0x100>)
  1908. 8000e80: 6b1b ldr r3, [r3, #48] @ 0x30
  1909. 8000e82: 4a38 ldr r2, [pc, #224] @ (8000f64 <MX_GPIO_Init+0x100>)
  1910. 8000e84: f043 0380 orr.w r3, r3, #128 @ 0x80
  1911. 8000e88: 6313 str r3, [r2, #48] @ 0x30
  1912. 8000e8a: 4b36 ldr r3, [pc, #216] @ (8000f64 <MX_GPIO_Init+0x100>)
  1913. 8000e8c: 6b1b ldr r3, [r3, #48] @ 0x30
  1914. 8000e8e: f003 0380 and.w r3, r3, #128 @ 0x80
  1915. 8000e92: 613b str r3, [r7, #16]
  1916. 8000e94: 693b ldr r3, [r7, #16]
  1917. __HAL_RCC_GPIOA_CLK_ENABLE();
  1918. 8000e96: 2300 movs r3, #0
  1919. 8000e98: 60fb str r3, [r7, #12]
  1920. 8000e9a: 4b32 ldr r3, [pc, #200] @ (8000f64 <MX_GPIO_Init+0x100>)
  1921. 8000e9c: 6b1b ldr r3, [r3, #48] @ 0x30
  1922. 8000e9e: 4a31 ldr r2, [pc, #196] @ (8000f64 <MX_GPIO_Init+0x100>)
  1923. 8000ea0: f043 0301 orr.w r3, r3, #1
  1924. 8000ea4: 6313 str r3, [r2, #48] @ 0x30
  1925. 8000ea6: 4b2f ldr r3, [pc, #188] @ (8000f64 <MX_GPIO_Init+0x100>)
  1926. 8000ea8: 6b1b ldr r3, [r3, #48] @ 0x30
  1927. 8000eaa: f003 0301 and.w r3, r3, #1
  1928. 8000eae: 60fb str r3, [r7, #12]
  1929. 8000eb0: 68fb ldr r3, [r7, #12]
  1930. __HAL_RCC_GPIOB_CLK_ENABLE();
  1931. 8000eb2: 2300 movs r3, #0
  1932. 8000eb4: 60bb str r3, [r7, #8]
  1933. 8000eb6: 4b2b ldr r3, [pc, #172] @ (8000f64 <MX_GPIO_Init+0x100>)
  1934. 8000eb8: 6b1b ldr r3, [r3, #48] @ 0x30
  1935. 8000eba: 4a2a ldr r2, [pc, #168] @ (8000f64 <MX_GPIO_Init+0x100>)
  1936. 8000ebc: f043 0302 orr.w r3, r3, #2
  1937. 8000ec0: 6313 str r3, [r2, #48] @ 0x30
  1938. 8000ec2: 4b28 ldr r3, [pc, #160] @ (8000f64 <MX_GPIO_Init+0x100>)
  1939. 8000ec4: 6b1b ldr r3, [r3, #48] @ 0x30
  1940. 8000ec6: f003 0302 and.w r3, r3, #2
  1941. 8000eca: 60bb str r3, [r7, #8]
  1942. 8000ecc: 68bb ldr r3, [r7, #8]
  1943. __HAL_RCC_GPIOC_CLK_ENABLE();
  1944. 8000ece: 2300 movs r3, #0
  1945. 8000ed0: 607b str r3, [r7, #4]
  1946. 8000ed2: 4b24 ldr r3, [pc, #144] @ (8000f64 <MX_GPIO_Init+0x100>)
  1947. 8000ed4: 6b1b ldr r3, [r3, #48] @ 0x30
  1948. 8000ed6: 4a23 ldr r2, [pc, #140] @ (8000f64 <MX_GPIO_Init+0x100>)
  1949. 8000ed8: f043 0304 orr.w r3, r3, #4
  1950. 8000edc: 6313 str r3, [r2, #48] @ 0x30
  1951. 8000ede: 4b21 ldr r3, [pc, #132] @ (8000f64 <MX_GPIO_Init+0x100>)
  1952. 8000ee0: 6b1b ldr r3, [r3, #48] @ 0x30
  1953. 8000ee2: f003 0304 and.w r3, r3, #4
  1954. 8000ee6: 607b str r3, [r7, #4]
  1955. 8000ee8: 687b ldr r3, [r7, #4]
  1956. /*Configure GPIO pin Output Level */
  1957. /*Configure GPIO pin : PC4 抱闸输出 */
  1958. GPIO_InitStruct.Pin = GPIO_PIN_4;
  1959. 8000eea: 2310 movs r3, #16
  1960. 8000eec: 617b str r3, [r7, #20]
  1961. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  1962. 8000eee: 2301 movs r3, #1
  1963. 8000ef0: 61bb str r3, [r7, #24]
  1964. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1965. 8000ef2: 2300 movs r3, #0
  1966. 8000ef4: 61fb str r3, [r7, #28]
  1967. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1968. 8000ef6: 2300 movs r3, #0
  1969. 8000ef8: 623b str r3, [r7, #32]
  1970. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  1971. 8000efa: f107 0314 add.w r3, r7, #20
  1972. 8000efe: 4619 mov r1, r3
  1973. 8000f00: 4819 ldr r0, [pc, #100] @ (8000f68 <MX_GPIO_Init+0x104>)
  1974. 8000f02: f003 f9ab bl 800425c <HAL_GPIO_Init>
  1975. /*Configure GPIO pin : PB3 抱闸输出*/
  1976. GPIO_InitStruct.Pin = GPIO_PIN_3;
  1977. 8000f06: 2308 movs r3, #8
  1978. 8000f08: 617b str r3, [r7, #20]
  1979. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  1980. 8000f0a: 2301 movs r3, #1
  1981. 8000f0c: 61bb str r3, [r7, #24]
  1982. GPIO_InitStruct.Pull = GPIO_NOPULL;
  1983. 8000f0e: 2300 movs r3, #0
  1984. 8000f10: 61fb str r3, [r7, #28]
  1985. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  1986. 8000f12: 2300 movs r3, #0
  1987. 8000f14: 623b str r3, [r7, #32]
  1988. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  1989. 8000f16: f107 0314 add.w r3, r7, #20
  1990. 8000f1a: 4619 mov r1, r3
  1991. 8000f1c: 4813 ldr r0, [pc, #76] @ (8000f6c <MX_GPIO_Init+0x108>)
  1992. 8000f1e: f003 f99d bl 800425c <HAL_GPIO_Init>
  1993. /*Configure GPIO pin : PA2 抱闸状态读取 */
  1994. GPIO_InitStruct.Pin = GPIO_PIN_2;
  1995. 8000f22: 2304 movs r3, #4
  1996. 8000f24: 617b str r3, [r7, #20]
  1997. GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  1998. 8000f26: 2300 movs r3, #0
  1999. 8000f28: 61bb str r3, [r7, #24]
  2000. GPIO_InitStruct.Pull = GPIO_NOPULL;
  2001. 8000f2a: 2300 movs r3, #0
  2002. 8000f2c: 61fb str r3, [r7, #28]
  2003. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  2004. 8000f2e: 2300 movs r3, #0
  2005. 8000f30: 623b str r3, [r7, #32]
  2006. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  2007. 8000f32: f107 0314 add.w r3, r7, #20
  2008. 8000f36: 4619 mov r1, r3
  2009. 8000f38: 480d ldr r0, [pc, #52] @ (8000f70 <MX_GPIO_Init+0x10c>)
  2010. 8000f3a: f003 f98f bl 800425c <HAL_GPIO_Init>
  2011. /*Configure GPIO pin : PA3 抱闸状态读取*/
  2012. GPIO_InitStruct.Pin = GPIO_PIN_3;
  2013. 8000f3e: 2308 movs r3, #8
  2014. 8000f40: 617b str r3, [r7, #20]
  2015. GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  2016. 8000f42: 2300 movs r3, #0
  2017. 8000f44: 61bb str r3, [r7, #24]
  2018. GPIO_InitStruct.Pull = GPIO_NOPULL;
  2019. 8000f46: 2300 movs r3, #0
  2020. 8000f48: 61fb str r3, [r7, #28]
  2021. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  2022. 8000f4a: 2300 movs r3, #0
  2023. 8000f4c: 623b str r3, [r7, #32]
  2024. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  2025. 8000f4e: f107 0314 add.w r3, r7, #20
  2026. 8000f52: 4619 mov r1, r3
  2027. 8000f54: 4806 ldr r0, [pc, #24] @ (8000f70 <MX_GPIO_Init+0x10c>)
  2028. 8000f56: f003 f981 bl 800425c <HAL_GPIO_Init>
  2029. }
  2030. 8000f5a: bf00 nop
  2031. 8000f5c: 3728 adds r7, #40 @ 0x28
  2032. 8000f5e: 46bd mov sp, r7
  2033. 8000f60: bd80 pop {r7, pc}
  2034. 8000f62: bf00 nop
  2035. 8000f64: 40023800 .word 0x40023800
  2036. 8000f68: 40020800 .word 0x40020800
  2037. 8000f6c: 40020400 .word 0x40020400
  2038. 8000f70: 40020000 .word 0x40020000
  2039. 08000f74 <get_app_version>:
  2040. .software_version = 0x0100, // 示例:V1.01
  2041. };
  2042. // 获取版本信息的函数
  2043. uint32_t get_app_version(uint8_t soft)
  2044. {
  2045. 8000f74: b480 push {r7}
  2046. 8000f76: b085 sub sp, #20
  2047. 8000f78: af00 add r7, sp, #0
  2048. 8000f7a: 4603 mov r3, r0
  2049. 8000f7c: 71fb strb r3, [r7, #7]
  2050. uint32_t app1_version = *(volatile uint32_t*)0x0800C188;
  2051. 8000f7e: 4b11 ldr r3, [pc, #68] @ (8000fc4 <get_app_version+0x50>)
  2052. 8000f80: 681b ldr r3, [r3, #0]
  2053. 8000f82: 60fb str r3, [r7, #12]
  2054. uint32_t app2_version = *(volatile uint32_t*)0x08060188;
  2055. 8000f84: 4b10 ldr r3, [pc, #64] @ (8000fc8 <get_app_version+0x54>)
  2056. 8000f86: 681b ldr r3, [r3, #0]
  2057. 8000f88: 60bb str r3, [r7, #8]
  2058. if(app1_version == 0xFFFFFFFF)
  2059. 8000f8a: 68fb ldr r3, [r7, #12]
  2060. 8000f8c: f1b3 3fff cmp.w r3, #4294967295
  2061. 8000f90: d101 bne.n 8000f96 <get_app_version+0x22>
  2062. {
  2063. app1_version = 0;
  2064. 8000f92: 2300 movs r3, #0
  2065. 8000f94: 60fb str r3, [r7, #12]
  2066. }
  2067. if(app2_version == 0xFFFFFFFF)
  2068. 8000f96: 68bb ldr r3, [r7, #8]
  2069. 8000f98: f1b3 3fff cmp.w r3, #4294967295
  2070. 8000f9c: d101 bne.n 8000fa2 <get_app_version+0x2e>
  2071. {
  2072. app2_version = 0;
  2073. 8000f9e: 2300 movs r3, #0
  2074. 8000fa0: 60bb str r3, [r7, #8]
  2075. }
  2076. if(soft == 1)//app1
  2077. 8000fa2: 79fb ldrb r3, [r7, #7]
  2078. 8000fa4: 2b01 cmp r3, #1
  2079. 8000fa6: d101 bne.n 8000fac <get_app_version+0x38>
  2080. {
  2081. return app1_version;
  2082. 8000fa8: 68fb ldr r3, [r7, #12]
  2083. 8000faa: e005 b.n 8000fb8 <get_app_version+0x44>
  2084. }
  2085. else if(soft == 2)//app2
  2086. 8000fac: 79fb ldrb r3, [r7, #7]
  2087. 8000fae: 2b02 cmp r3, #2
  2088. 8000fb0: d101 bne.n 8000fb6 <get_app_version+0x42>
  2089. {
  2090. return app2_version;
  2091. 8000fb2: 68bb ldr r3, [r7, #8]
  2092. 8000fb4: e000 b.n 8000fb8 <get_app_version+0x44>
  2093. }
  2094. else
  2095. {
  2096. return 0;
  2097. 8000fb6: 2300 movs r3, #0
  2098. }
  2099. }
  2100. 8000fb8: 4618 mov r0, r3
  2101. 8000fba: 3714 adds r7, #20
  2102. 8000fbc: 46bd mov sp, r7
  2103. 8000fbe: f85d 7b04 ldr.w r7, [sp], #4
  2104. 8000fc2: 4770 bx lr
  2105. 8000fc4: 0800c188 .word 0x0800c188
  2106. 8000fc8: 08060188 .word 0x08060188
  2107. 08000fcc <main>:
  2108. /**
  2109. * @brief The application entry point.
  2110. * @retval int
  2111. */
  2112. int main(void)
  2113. {
  2114. 8000fcc: b580 push {r7, lr}
  2115. 8000fce: b082 sub sp, #8
  2116. 8000fd0: af00 add r7, sp, #0
  2117. /* USER CODE END 1 */
  2118. /* MCU Configuration--------------------------------------------------------*/
  2119. /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  2120. HAL_Init();
  2121. 8000fd2: f002 f81d bl 8003010 <HAL_Init>
  2122. /* USER CODE BEGIN Init */
  2123. /* USER CODE END Init */
  2124. /* Configure the system clock */
  2125. SystemClock_Config();
  2126. 8000fd6: f000 f84b bl 8001070 <SystemClock_Config>
  2127. /* USER CODE BEGIN SysInit */
  2128. /* USER CODE END SysInit */
  2129. /* Initialize all configured peripherals */
  2130. MX_GPIO_Init();
  2131. 8000fda: f7ff ff43 bl 8000e64 <MX_GPIO_Init>
  2132. MX_CAN1_Init();
  2133. 8000fde: f7ff fa8b bl 80004f8 <MX_CAN1_Init>
  2134. MX_TIM2_Init();
  2135. 8000fe2: f000 f933 bl 800124c <MX_TIM2_Init>
  2136. /* USER CODE BEGIN 2 */
  2137. HAL_TIM_Base_Start_IT(&htim2); // 启动定时器中断
  2138. 8000fe6: 481c ldr r0, [pc, #112] @ (8001058 <main+0x8c>)
  2139. 8000fe8: f004 f884 bl 80050f4 <HAL_TIM_Base_Start_IT>
  2140. CAN_Filter_config();
  2141. 8000fec: f7ff fb4e bl 800068c <CAN_Filter_config>
  2142. i15765_init();
  2143. 8000ff0: f000 fb32 bl 8001658 <i15765_init>
  2144. i15765app_init();
  2145. 8000ff4: f001 f9aa bl 800234c <i15765app_init>
  2146. // app1_copy_to_app2();
  2147. // app_status_set(2,true);
  2148. // }
  2149. #endif
  2150. uint32_t app1_version = get_app_version(1);
  2151. 8000ff8: 2001 movs r0, #1
  2152. 8000ffa: f7ff ffbb bl 8000f74 <get_app_version>
  2153. 8000ffe: 6078 str r0, [r7, #4]
  2154. uint32_t app2_version = get_app_version(2);
  2155. 8001000: 2002 movs r0, #2
  2156. 8001002: f7ff ffb7 bl 8000f74 <get_app_version>
  2157. 8001006: 6038 str r0, [r7, #0]
  2158. if(1 == *(volatile uint8_t*)(CONFIG_IAP_INFO_ADDR+1))//APP_B is ok
  2159. 8001008: 4b14 ldr r3, [pc, #80] @ (800105c <main+0x90>)
  2160. 800100a: 781b ldrb r3, [r3, #0]
  2161. 800100c: b2db uxtb r3, r3
  2162. 800100e: 2b01 cmp r3, #1
  2163. 8001010: d109 bne.n 8001026 <main+0x5a>
  2164. {
  2165. if(app1_version < app2_version)
  2166. 8001012: 687a ldr r2, [r7, #4]
  2167. 8001014: 683b ldr r3, [r7, #0]
  2168. 8001016: 429a cmp r2, r3
  2169. 8001018: d205 bcs.n 8001026 <main+0x5a>
  2170. {
  2171. app2_copy_to_app1();
  2172. 800101a: f7ff fec2 bl 8000da2 <app2_copy_to_app1>
  2173. //flash_erase_app(1);
  2174. app_status_set(1,true);
  2175. 800101e: 2101 movs r1, #1
  2176. 8001020: 2001 movs r0, #1
  2177. 8001022: f7ff fe19 bl 8000c58 <app_status_set>
  2178. while (1)
  2179. {
  2180. /* USER CODE END WHILE */
  2181. /* USER CODE BEGIN 3 */
  2182. check_SID_run();
  2183. 8001026: f001 fa43 bl 80024b0 <check_SID_run>
  2184. //if((system_time_ms == WAIT_OTA_TIME_MS)&&(1))//复位后判断是否从APP跳转过来,不是的话直接跳到APP
  2185. if(system_time_ms == WAIT_OTA_TIME_MS)
  2186. 800102a: 4b0d ldr r3, [pc, #52] @ (8001060 <main+0x94>)
  2187. 800102c: 681b ldr r3, [r3, #0]
  2188. 800102e: f240 52dc movw r2, #1500 @ 0x5dc
  2189. 8001032: 4293 cmp r3, r2
  2190. 8001034: d1f7 bne.n 8001026 <main+0x5a>
  2191. {
  2192. //APP_A is ok
  2193. if(1 == *(volatile uint8_t*)CONFIG_IAP_INFO_ADDR)
  2194. 8001036: 4b0b ldr r3, [pc, #44] @ (8001064 <main+0x98>)
  2195. 8001038: 781b ldrb r3, [r3, #0]
  2196. 800103a: b2db uxtb r3, r3
  2197. 800103c: 2b01 cmp r3, #1
  2198. 800103e: d107 bne.n 8001050 <main+0x84>
  2199. //if(0)
  2200. {
  2201. system_time_ms = WAIT_OTA_TIME_MS;
  2202. 8001040: 4b07 ldr r3, [pc, #28] @ (8001060 <main+0x94>)
  2203. 8001042: f240 52dc movw r2, #1500 @ 0x5dc
  2204. 8001046: 601a str r2, [r3, #0]
  2205. jump_to_app(APP1_ADDRESS);
  2206. 8001048: 4807 ldr r0, [pc, #28] @ (8001068 <main+0x9c>)
  2207. 800104a: f7ff fed1 bl 8000df0 <jump_to_app>
  2208. 800104e: e7ea b.n 8001026 <main+0x5a>
  2209. }
  2210. else
  2211. {
  2212. app_error_flag = 1;
  2213. 8001050: 4b06 ldr r3, [pc, #24] @ (800106c <main+0xa0>)
  2214. 8001052: 2201 movs r2, #1
  2215. 8001054: 701a strb r2, [r3, #0]
  2216. check_SID_run();
  2217. 8001056: e7e6 b.n 8001026 <main+0x5a>
  2218. 8001058: 2000008c .word 0x2000008c
  2219. 800105c: 08008001 .word 0x08008001
  2220. 8001060: 200000e0 .word 0x200000e0
  2221. 8001064: 08008000 .word 0x08008000
  2222. 8001068: 0800c000 .word 0x0800c000
  2223. 800106c: 200000e4 .word 0x200000e4
  2224. 08001070 <SystemClock_Config>:
  2225. /**
  2226. * @brief System Clock Configuration
  2227. * @retval None
  2228. */
  2229. void SystemClock_Config(void)
  2230. {
  2231. 8001070: b580 push {r7, lr}
  2232. 8001072: b094 sub sp, #80 @ 0x50
  2233. 8001074: af00 add r7, sp, #0
  2234. RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  2235. 8001076: f107 0320 add.w r3, r7, #32
  2236. 800107a: 2230 movs r2, #48 @ 0x30
  2237. 800107c: 2100 movs r1, #0
  2238. 800107e: 4618 mov r0, r3
  2239. 8001080: f004 fc58 bl 8005934 <memset>
  2240. RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  2241. 8001084: f107 030c add.w r3, r7, #12
  2242. 8001088: 2200 movs r2, #0
  2243. 800108a: 601a str r2, [r3, #0]
  2244. 800108c: 605a str r2, [r3, #4]
  2245. 800108e: 609a str r2, [r3, #8]
  2246. 8001090: 60da str r2, [r3, #12]
  2247. 8001092: 611a str r2, [r3, #16]
  2248. /** Configure the main internal regulator output voltage
  2249. */
  2250. __HAL_RCC_PWR_CLK_ENABLE();
  2251. 8001094: 2300 movs r3, #0
  2252. 8001096: 60bb str r3, [r7, #8]
  2253. 8001098: 4b28 ldr r3, [pc, #160] @ (800113c <SystemClock_Config+0xcc>)
  2254. 800109a: 6c1b ldr r3, [r3, #64] @ 0x40
  2255. 800109c: 4a27 ldr r2, [pc, #156] @ (800113c <SystemClock_Config+0xcc>)
  2256. 800109e: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
  2257. 80010a2: 6413 str r3, [r2, #64] @ 0x40
  2258. 80010a4: 4b25 ldr r3, [pc, #148] @ (800113c <SystemClock_Config+0xcc>)
  2259. 80010a6: 6c1b ldr r3, [r3, #64] @ 0x40
  2260. 80010a8: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
  2261. 80010ac: 60bb str r3, [r7, #8]
  2262. 80010ae: 68bb ldr r3, [r7, #8]
  2263. __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
  2264. 80010b0: 2300 movs r3, #0
  2265. 80010b2: 607b str r3, [r7, #4]
  2266. 80010b4: 4b22 ldr r3, [pc, #136] @ (8001140 <SystemClock_Config+0xd0>)
  2267. 80010b6: 681b ldr r3, [r3, #0]
  2268. 80010b8: 4a21 ldr r2, [pc, #132] @ (8001140 <SystemClock_Config+0xd0>)
  2269. 80010ba: f443 4380 orr.w r3, r3, #16384 @ 0x4000
  2270. 80010be: 6013 str r3, [r2, #0]
  2271. 80010c0: 4b1f ldr r3, [pc, #124] @ (8001140 <SystemClock_Config+0xd0>)
  2272. 80010c2: 681b ldr r3, [r3, #0]
  2273. 80010c4: f403 4380 and.w r3, r3, #16384 @ 0x4000
  2274. 80010c8: 607b str r3, [r7, #4]
  2275. 80010ca: 687b ldr r3, [r7, #4]
  2276. /** Initializes the RCC Oscillators according to the specified parameters
  2277. * in the RCC_OscInitTypeDef structure.
  2278. */
  2279. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  2280. 80010cc: 2301 movs r3, #1
  2281. 80010ce: 623b str r3, [r7, #32]
  2282. RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  2283. 80010d0: f44f 3380 mov.w r3, #65536 @ 0x10000
  2284. 80010d4: 627b str r3, [r7, #36] @ 0x24
  2285. RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  2286. 80010d6: 2302 movs r3, #2
  2287. 80010d8: 63bb str r3, [r7, #56] @ 0x38
  2288. RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  2289. 80010da: f44f 0380 mov.w r3, #4194304 @ 0x400000
  2290. 80010de: 63fb str r3, [r7, #60] @ 0x3c
  2291. RCC_OscInitStruct.PLL.PLLM = 4;
  2292. 80010e0: 2304 movs r3, #4
  2293. 80010e2: 643b str r3, [r7, #64] @ 0x40
  2294. RCC_OscInitStruct.PLL.PLLN = 168;
  2295. 80010e4: 23a8 movs r3, #168 @ 0xa8
  2296. 80010e6: 647b str r3, [r7, #68] @ 0x44
  2297. RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  2298. 80010e8: 2302 movs r3, #2
  2299. 80010ea: 64bb str r3, [r7, #72] @ 0x48
  2300. RCC_OscInitStruct.PLL.PLLQ = 4;
  2301. 80010ec: 2304 movs r3, #4
  2302. 80010ee: 64fb str r3, [r7, #76] @ 0x4c
  2303. if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  2304. 80010f0: f107 0320 add.w r3, r7, #32
  2305. 80010f4: 4618 mov r0, r3
  2306. 80010f6: f003 fb49 bl 800478c <HAL_RCC_OscConfig>
  2307. 80010fa: 4603 mov r3, r0
  2308. 80010fc: 2b00 cmp r3, #0
  2309. 80010fe: d001 beq.n 8001104 <SystemClock_Config+0x94>
  2310. {
  2311. Error_Handler();
  2312. 8001100: f000 f820 bl 8001144 <Error_Handler>
  2313. }
  2314. /** Initializes the CPU, AHB and APB buses clocks
  2315. */
  2316. RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
  2317. 8001104: 230f movs r3, #15
  2318. 8001106: 60fb str r3, [r7, #12]
  2319. |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
  2320. RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  2321. 8001108: 2302 movs r3, #2
  2322. 800110a: 613b str r3, [r7, #16]
  2323. RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  2324. 800110c: 2300 movs r3, #0
  2325. 800110e: 617b str r3, [r7, #20]
  2326. RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
  2327. 8001110: f44f 53a0 mov.w r3, #5120 @ 0x1400
  2328. 8001114: 61bb str r3, [r7, #24]
  2329. RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
  2330. 8001116: f44f 5380 mov.w r3, #4096 @ 0x1000
  2331. 800111a: 61fb str r3, [r7, #28]
  2332. if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
  2333. 800111c: f107 030c add.w r3, r7, #12
  2334. 8001120: 2105 movs r1, #5
  2335. 8001122: 4618 mov r0, r3
  2336. 8001124: f003 fdaa bl 8004c7c <HAL_RCC_ClockConfig>
  2337. 8001128: 4603 mov r3, r0
  2338. 800112a: 2b00 cmp r3, #0
  2339. 800112c: d001 beq.n 8001132 <SystemClock_Config+0xc2>
  2340. {
  2341. Error_Handler();
  2342. 800112e: f000 f809 bl 8001144 <Error_Handler>
  2343. }
  2344. }
  2345. 8001132: bf00 nop
  2346. 8001134: 3750 adds r7, #80 @ 0x50
  2347. 8001136: 46bd mov sp, r7
  2348. 8001138: bd80 pop {r7, pc}
  2349. 800113a: bf00 nop
  2350. 800113c: 40023800 .word 0x40023800
  2351. 8001140: 40007000 .word 0x40007000
  2352. 08001144 <Error_Handler>:
  2353. /**
  2354. * @brief This function is executed in case of error occurrence.
  2355. * @retval None
  2356. */
  2357. void Error_Handler(void)
  2358. {
  2359. 8001144: b480 push {r7}
  2360. 8001146: af00 add r7, sp, #0
  2361. __ASM volatile ("cpsid i" : : : "memory");
  2362. 8001148: b672 cpsid i
  2363. }
  2364. 800114a: bf00 nop
  2365. /* USER CODE BEGIN Error_Handler_Debug */
  2366. /* User can add his own implementation to report the HAL error return state */
  2367. __disable_irq();
  2368. while (1)
  2369. 800114c: bf00 nop
  2370. 800114e: e7fd b.n 800114c <Error_Handler+0x8>
  2371. 08001150 <HAL_MspInit>:
  2372. /* USER CODE END 0 */
  2373. /**
  2374. * Initializes the Global MSP.
  2375. */
  2376. void HAL_MspInit(void)
  2377. {
  2378. 8001150: b480 push {r7}
  2379. 8001152: b083 sub sp, #12
  2380. 8001154: af00 add r7, sp, #0
  2381. /* USER CODE BEGIN MspInit 0 */
  2382. /* USER CODE END MspInit 0 */
  2383. __HAL_RCC_SYSCFG_CLK_ENABLE();
  2384. 8001156: 2300 movs r3, #0
  2385. 8001158: 607b str r3, [r7, #4]
  2386. 800115a: 4b10 ldr r3, [pc, #64] @ (800119c <HAL_MspInit+0x4c>)
  2387. 800115c: 6c5b ldr r3, [r3, #68] @ 0x44
  2388. 800115e: 4a0f ldr r2, [pc, #60] @ (800119c <HAL_MspInit+0x4c>)
  2389. 8001160: f443 4380 orr.w r3, r3, #16384 @ 0x4000
  2390. 8001164: 6453 str r3, [r2, #68] @ 0x44
  2391. 8001166: 4b0d ldr r3, [pc, #52] @ (800119c <HAL_MspInit+0x4c>)
  2392. 8001168: 6c5b ldr r3, [r3, #68] @ 0x44
  2393. 800116a: f403 4380 and.w r3, r3, #16384 @ 0x4000
  2394. 800116e: 607b str r3, [r7, #4]
  2395. 8001170: 687b ldr r3, [r7, #4]
  2396. __HAL_RCC_PWR_CLK_ENABLE();
  2397. 8001172: 2300 movs r3, #0
  2398. 8001174: 603b str r3, [r7, #0]
  2399. 8001176: 4b09 ldr r3, [pc, #36] @ (800119c <HAL_MspInit+0x4c>)
  2400. 8001178: 6c1b ldr r3, [r3, #64] @ 0x40
  2401. 800117a: 4a08 ldr r2, [pc, #32] @ (800119c <HAL_MspInit+0x4c>)
  2402. 800117c: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
  2403. 8001180: 6413 str r3, [r2, #64] @ 0x40
  2404. 8001182: 4b06 ldr r3, [pc, #24] @ (800119c <HAL_MspInit+0x4c>)
  2405. 8001184: 6c1b ldr r3, [r3, #64] @ 0x40
  2406. 8001186: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
  2407. 800118a: 603b str r3, [r7, #0]
  2408. 800118c: 683b ldr r3, [r7, #0]
  2409. /* System interrupt init*/
  2410. /* USER CODE BEGIN MspInit 1 */
  2411. /* USER CODE END MspInit 1 */
  2412. }
  2413. 800118e: bf00 nop
  2414. 8001190: 370c adds r7, #12
  2415. 8001192: 46bd mov sp, r7
  2416. 8001194: f85d 7b04 ldr.w r7, [sp], #4
  2417. 8001198: 4770 bx lr
  2418. 800119a: bf00 nop
  2419. 800119c: 40023800 .word 0x40023800
  2420. 080011a0 <NMI_Handler>:
  2421. /******************************************************************************/
  2422. /**
  2423. * @brief This function handles Non maskable interrupt.
  2424. */
  2425. void NMI_Handler(void)
  2426. {
  2427. 80011a0: b480 push {r7}
  2428. 80011a2: af00 add r7, sp, #0
  2429. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  2430. /* USER CODE END NonMaskableInt_IRQn 0 */
  2431. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  2432. while (1)
  2433. 80011a4: bf00 nop
  2434. 80011a6: e7fd b.n 80011a4 <NMI_Handler+0x4>
  2435. 080011a8 <HardFault_Handler>:
  2436. /**
  2437. * @brief This function handles Hard fault interrupt.
  2438. */
  2439. void HardFault_Handler(void)
  2440. {
  2441. 80011a8: b480 push {r7}
  2442. 80011aa: af00 add r7, sp, #0
  2443. /* USER CODE BEGIN HardFault_IRQn 0 */
  2444. /* USER CODE END HardFault_IRQn 0 */
  2445. while (1)
  2446. 80011ac: bf00 nop
  2447. 80011ae: e7fd b.n 80011ac <HardFault_Handler+0x4>
  2448. 080011b0 <MemManage_Handler>:
  2449. /**
  2450. * @brief This function handles Memory management fault.
  2451. */
  2452. void MemManage_Handler(void)
  2453. {
  2454. 80011b0: b480 push {r7}
  2455. 80011b2: af00 add r7, sp, #0
  2456. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  2457. /* USER CODE END MemoryManagement_IRQn 0 */
  2458. while (1)
  2459. 80011b4: bf00 nop
  2460. 80011b6: e7fd b.n 80011b4 <MemManage_Handler+0x4>
  2461. 080011b8 <BusFault_Handler>:
  2462. /**
  2463. * @brief This function handles Pre-fetch fault, memory access fault.
  2464. */
  2465. void BusFault_Handler(void)
  2466. {
  2467. 80011b8: b480 push {r7}
  2468. 80011ba: af00 add r7, sp, #0
  2469. /* USER CODE BEGIN BusFault_IRQn 0 */
  2470. /* USER CODE END BusFault_IRQn 0 */
  2471. while (1)
  2472. 80011bc: bf00 nop
  2473. 80011be: e7fd b.n 80011bc <BusFault_Handler+0x4>
  2474. 080011c0 <UsageFault_Handler>:
  2475. /**
  2476. * @brief This function handles Undefined instruction or illegal state.
  2477. */
  2478. void UsageFault_Handler(void)
  2479. {
  2480. 80011c0: b480 push {r7}
  2481. 80011c2: af00 add r7, sp, #0
  2482. /* USER CODE BEGIN UsageFault_IRQn 0 */
  2483. /* USER CODE END UsageFault_IRQn 0 */
  2484. while (1)
  2485. 80011c4: bf00 nop
  2486. 80011c6: e7fd b.n 80011c4 <UsageFault_Handler+0x4>
  2487. 080011c8 <SVC_Handler>:
  2488. /**
  2489. * @brief This function handles System service call via SWI instruction.
  2490. */
  2491. void SVC_Handler(void)
  2492. {
  2493. 80011c8: b480 push {r7}
  2494. 80011ca: af00 add r7, sp, #0
  2495. /* USER CODE END SVCall_IRQn 0 */
  2496. /* USER CODE BEGIN SVCall_IRQn 1 */
  2497. /* USER CODE END SVCall_IRQn 1 */
  2498. }
  2499. 80011cc: bf00 nop
  2500. 80011ce: 46bd mov sp, r7
  2501. 80011d0: f85d 7b04 ldr.w r7, [sp], #4
  2502. 80011d4: 4770 bx lr
  2503. 080011d6 <DebugMon_Handler>:
  2504. /**
  2505. * @brief This function handles Debug monitor.
  2506. */
  2507. void DebugMon_Handler(void)
  2508. {
  2509. 80011d6: b480 push {r7}
  2510. 80011d8: af00 add r7, sp, #0
  2511. /* USER CODE END DebugMonitor_IRQn 0 */
  2512. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  2513. /* USER CODE END DebugMonitor_IRQn 1 */
  2514. }
  2515. 80011da: bf00 nop
  2516. 80011dc: 46bd mov sp, r7
  2517. 80011de: f85d 7b04 ldr.w r7, [sp], #4
  2518. 80011e2: 4770 bx lr
  2519. 080011e4 <PendSV_Handler>:
  2520. /**
  2521. * @brief This function handles Pendable request for system service.
  2522. */
  2523. void PendSV_Handler(void)
  2524. {
  2525. 80011e4: b480 push {r7}
  2526. 80011e6: af00 add r7, sp, #0
  2527. /* USER CODE END PendSV_IRQn 0 */
  2528. /* USER CODE BEGIN PendSV_IRQn 1 */
  2529. /* USER CODE END PendSV_IRQn 1 */
  2530. }
  2531. 80011e8: bf00 nop
  2532. 80011ea: 46bd mov sp, r7
  2533. 80011ec: f85d 7b04 ldr.w r7, [sp], #4
  2534. 80011f0: 4770 bx lr
  2535. 080011f2 <SysTick_Handler>:
  2536. /**
  2537. * @brief This function handles System tick timer.
  2538. */
  2539. void SysTick_Handler(void)
  2540. {
  2541. 80011f2: b580 push {r7, lr}
  2542. 80011f4: af00 add r7, sp, #0
  2543. /* USER CODE BEGIN SysTick_IRQn 0 */
  2544. /* USER CODE END SysTick_IRQn 0 */
  2545. HAL_IncTick();
  2546. 80011f6: f001 ff93 bl 8003120 <HAL_IncTick>
  2547. /* USER CODE BEGIN SysTick_IRQn 1 */
  2548. /* USER CODE END SysTick_IRQn 1 */
  2549. }
  2550. 80011fa: bf00 nop
  2551. 80011fc: bd80 pop {r7, pc}
  2552. ...
  2553. 08001200 <CAN1_RX0_IRQHandler>:
  2554. /**
  2555. * @brief This function handles CAN1 RX0 interrupts.
  2556. */
  2557. void CAN1_RX0_IRQHandler(void)
  2558. {
  2559. 8001200: b580 push {r7, lr}
  2560. 8001202: af00 add r7, sp, #0
  2561. /* USER CODE BEGIN CAN1_RX0_IRQn 0 */
  2562. /* USER CODE END CAN1_RX0_IRQn 0 */
  2563. HAL_CAN_IRQHandler(&hcan1);
  2564. 8001204: 4802 ldr r0, [pc, #8] @ (8001210 <CAN1_RX0_IRQHandler+0x10>)
  2565. 8001206: f002 fcb5 bl 8003b74 <HAL_CAN_IRQHandler>
  2566. /* USER CODE BEGIN CAN1_RX0_IRQn 1 */
  2567. /* USER CODE END CAN1_RX0_IRQn 1 */
  2568. }
  2569. 800120a: bf00 nop
  2570. 800120c: bd80 pop {r7, pc}
  2571. 800120e: bf00 nop
  2572. 8001210: 20000064 .word 0x20000064
  2573. 08001214 <TIM2_IRQHandler>:
  2574. /**
  2575. * @brief This function handles TIM2 global interrupt.
  2576. */
  2577. void TIM2_IRQHandler(void)
  2578. {
  2579. 8001214: b580 push {r7, lr}
  2580. 8001216: af00 add r7, sp, #0
  2581. /* USER CODE BEGIN TIM2_IRQn 0 */
  2582. /* USER CODE END TIM2_IRQn 0 */
  2583. HAL_TIM_IRQHandler(&htim2);
  2584. 8001218: 4802 ldr r0, [pc, #8] @ (8001224 <TIM2_IRQHandler+0x10>)
  2585. 800121a: f003 ffdb bl 80051d4 <HAL_TIM_IRQHandler>
  2586. /* USER CODE BEGIN TIM2_IRQn 1 */
  2587. /* USER CODE END TIM2_IRQn 1 */
  2588. }
  2589. 800121e: bf00 nop
  2590. 8001220: bd80 pop {r7, pc}
  2591. 8001222: bf00 nop
  2592. 8001224: 2000008c .word 0x2000008c
  2593. 08001228 <SystemInit>:
  2594. * configuration.
  2595. * @param None
  2596. * @retval None
  2597. */
  2598. void SystemInit(void)
  2599. {
  2600. 8001228: b480 push {r7}
  2601. 800122a: af00 add r7, sp, #0
  2602. /* FPU settings ------------------------------------------------------------*/
  2603. #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
  2604. SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
  2605. 800122c: 4b06 ldr r3, [pc, #24] @ (8001248 <SystemInit+0x20>)
  2606. 800122e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
  2607. 8001232: 4a05 ldr r2, [pc, #20] @ (8001248 <SystemInit+0x20>)
  2608. 8001234: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000
  2609. 8001238: f8c2 3088 str.w r3, [r2, #136] @ 0x88
  2610. /* Configure the Vector Table location -------------------------------------*/
  2611. #if defined(USER_VECT_TAB_ADDRESS)
  2612. SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
  2613. #endif /* USER_VECT_TAB_ADDRESS */
  2614. }
  2615. 800123c: bf00 nop
  2616. 800123e: 46bd mov sp, r7
  2617. 8001240: f85d 7b04 ldr.w r7, [sp], #4
  2618. 8001244: 4770 bx lr
  2619. 8001246: bf00 nop
  2620. 8001248: e000ed00 .word 0xe000ed00
  2621. 0800124c <MX_TIM2_Init>:
  2622. TIM_HandleTypeDef htim2;
  2623. /* TIM2 init function */
  2624. void MX_TIM2_Init(void)
  2625. {
  2626. 800124c: b580 push {r7, lr}
  2627. 800124e: b086 sub sp, #24
  2628. 8001250: af00 add r7, sp, #0
  2629. /* USER CODE BEGIN TIM2_Init 0 */
  2630. /* USER CODE END TIM2_Init 0 */
  2631. TIM_ClockConfigTypeDef sClockSourceConfig = {0};
  2632. 8001252: f107 0308 add.w r3, r7, #8
  2633. 8001256: 2200 movs r2, #0
  2634. 8001258: 601a str r2, [r3, #0]
  2635. 800125a: 605a str r2, [r3, #4]
  2636. 800125c: 609a str r2, [r3, #8]
  2637. 800125e: 60da str r2, [r3, #12]
  2638. TIM_MasterConfigTypeDef sMasterConfig = {0};
  2639. 8001260: 463b mov r3, r7
  2640. 8001262: 2200 movs r2, #0
  2641. 8001264: 601a str r2, [r3, #0]
  2642. 8001266: 605a str r2, [r3, #4]
  2643. /* USER CODE BEGIN TIM2_Init 1 */
  2644. /* USER CODE END TIM2_Init 1 */
  2645. htim2.Instance = TIM2;
  2646. 8001268: 4b1d ldr r3, [pc, #116] @ (80012e0 <MX_TIM2_Init+0x94>)
  2647. 800126a: f04f 4280 mov.w r2, #1073741824 @ 0x40000000
  2648. 800126e: 601a str r2, [r3, #0]
  2649. htim2.Init.Prescaler = 84-1;
  2650. 8001270: 4b1b ldr r3, [pc, #108] @ (80012e0 <MX_TIM2_Init+0x94>)
  2651. 8001272: 2253 movs r2, #83 @ 0x53
  2652. 8001274: 605a str r2, [r3, #4]
  2653. htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
  2654. 8001276: 4b1a ldr r3, [pc, #104] @ (80012e0 <MX_TIM2_Init+0x94>)
  2655. 8001278: 2200 movs r2, #0
  2656. 800127a: 609a str r2, [r3, #8]
  2657. htim2.Init.Period = 1000;
  2658. 800127c: 4b18 ldr r3, [pc, #96] @ (80012e0 <MX_TIM2_Init+0x94>)
  2659. 800127e: f44f 727a mov.w r2, #1000 @ 0x3e8
  2660. 8001282: 60da str r2, [r3, #12]
  2661. htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
  2662. 8001284: 4b16 ldr r3, [pc, #88] @ (80012e0 <MX_TIM2_Init+0x94>)
  2663. 8001286: 2200 movs r2, #0
  2664. 8001288: 611a str r2, [r3, #16]
  2665. htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
  2666. 800128a: 4b15 ldr r3, [pc, #84] @ (80012e0 <MX_TIM2_Init+0x94>)
  2667. 800128c: 2200 movs r2, #0
  2668. 800128e: 619a str r2, [r3, #24]
  2669. if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
  2670. 8001290: 4813 ldr r0, [pc, #76] @ (80012e0 <MX_TIM2_Init+0x94>)
  2671. 8001292: f003 fedf bl 8005054 <HAL_TIM_Base_Init>
  2672. 8001296: 4603 mov r3, r0
  2673. 8001298: 2b00 cmp r3, #0
  2674. 800129a: d001 beq.n 80012a0 <MX_TIM2_Init+0x54>
  2675. {
  2676. Error_Handler();
  2677. 800129c: f7ff ff52 bl 8001144 <Error_Handler>
  2678. }
  2679. sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
  2680. 80012a0: f44f 5380 mov.w r3, #4096 @ 0x1000
  2681. 80012a4: 60bb str r3, [r7, #8]
  2682. if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
  2683. 80012a6: f107 0308 add.w r3, r7, #8
  2684. 80012aa: 4619 mov r1, r3
  2685. 80012ac: 480c ldr r0, [pc, #48] @ (80012e0 <MX_TIM2_Init+0x94>)
  2686. 80012ae: f004 f881 bl 80053b4 <HAL_TIM_ConfigClockSource>
  2687. 80012b2: 4603 mov r3, r0
  2688. 80012b4: 2b00 cmp r3, #0
  2689. 80012b6: d001 beq.n 80012bc <MX_TIM2_Init+0x70>
  2690. {
  2691. Error_Handler();
  2692. 80012b8: f7ff ff44 bl 8001144 <Error_Handler>
  2693. }
  2694. sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
  2695. 80012bc: 2300 movs r3, #0
  2696. 80012be: 603b str r3, [r7, #0]
  2697. sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  2698. 80012c0: 2300 movs r3, #0
  2699. 80012c2: 607b str r3, [r7, #4]
  2700. if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
  2701. 80012c4: 463b mov r3, r7
  2702. 80012c6: 4619 mov r1, r3
  2703. 80012c8: 4805 ldr r0, [pc, #20] @ (80012e0 <MX_TIM2_Init+0x94>)
  2704. 80012ca: f004 faa3 bl 8005814 <HAL_TIMEx_MasterConfigSynchronization>
  2705. 80012ce: 4603 mov r3, r0
  2706. 80012d0: 2b00 cmp r3, #0
  2707. 80012d2: d001 beq.n 80012d8 <MX_TIM2_Init+0x8c>
  2708. {
  2709. Error_Handler();
  2710. 80012d4: f7ff ff36 bl 8001144 <Error_Handler>
  2711. }
  2712. /* USER CODE BEGIN TIM2_Init 2 */
  2713. /* USER CODE END TIM2_Init 2 */
  2714. }
  2715. 80012d8: bf00 nop
  2716. 80012da: 3718 adds r7, #24
  2717. 80012dc: 46bd mov sp, r7
  2718. 80012de: bd80 pop {r7, pc}
  2719. 80012e0: 2000008c .word 0x2000008c
  2720. 080012e4 <HAL_TIM_Base_MspInit>:
  2721. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
  2722. {
  2723. 80012e4: b580 push {r7, lr}
  2724. 80012e6: b084 sub sp, #16
  2725. 80012e8: af00 add r7, sp, #0
  2726. 80012ea: 6078 str r0, [r7, #4]
  2727. if(tim_baseHandle->Instance==TIM2)
  2728. 80012ec: 687b ldr r3, [r7, #4]
  2729. 80012ee: 681b ldr r3, [r3, #0]
  2730. 80012f0: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
  2731. 80012f4: d115 bne.n 8001322 <HAL_TIM_Base_MspInit+0x3e>
  2732. {
  2733. /* USER CODE BEGIN TIM2_MspInit 0 */
  2734. /* USER CODE END TIM2_MspInit 0 */
  2735. /* TIM2 clock enable */
  2736. __HAL_RCC_TIM2_CLK_ENABLE();
  2737. 80012f6: 2300 movs r3, #0
  2738. 80012f8: 60fb str r3, [r7, #12]
  2739. 80012fa: 4b0c ldr r3, [pc, #48] @ (800132c <HAL_TIM_Base_MspInit+0x48>)
  2740. 80012fc: 6c1b ldr r3, [r3, #64] @ 0x40
  2741. 80012fe: 4a0b ldr r2, [pc, #44] @ (800132c <HAL_TIM_Base_MspInit+0x48>)
  2742. 8001300: f043 0301 orr.w r3, r3, #1
  2743. 8001304: 6413 str r3, [r2, #64] @ 0x40
  2744. 8001306: 4b09 ldr r3, [pc, #36] @ (800132c <HAL_TIM_Base_MspInit+0x48>)
  2745. 8001308: 6c1b ldr r3, [r3, #64] @ 0x40
  2746. 800130a: f003 0301 and.w r3, r3, #1
  2747. 800130e: 60fb str r3, [r7, #12]
  2748. 8001310: 68fb ldr r3, [r7, #12]
  2749. /* TIM2 interrupt Init */
  2750. HAL_NVIC_SetPriority(TIM2_IRQn, 0, 0);
  2751. 8001312: 2200 movs r2, #0
  2752. 8001314: 2100 movs r1, #0
  2753. 8001316: 201c movs r0, #28
  2754. 8001318: f002 ff5b bl 80041d2 <HAL_NVIC_SetPriority>
  2755. HAL_NVIC_EnableIRQ(TIM2_IRQn);
  2756. 800131c: 201c movs r0, #28
  2757. 800131e: f002 ff74 bl 800420a <HAL_NVIC_EnableIRQ>
  2758. /* USER CODE BEGIN TIM2_MspInit 1 */
  2759. /* USER CODE END TIM2_MspInit 1 */
  2760. }
  2761. }
  2762. 8001322: bf00 nop
  2763. 8001324: 3710 adds r7, #16
  2764. 8001326: 46bd mov sp, r7
  2765. 8001328: bd80 pop {r7, pc}
  2766. 800132a: bf00 nop
  2767. 800132c: 40023800 .word 0x40023800
  2768. 08001330 <HAL_TIM_PeriodElapsedCallback>:
  2769. uint8_t ota_start_flag = 0;
  2770. uint32_t system_time_ms = 0; // 系统运行时间,用于判断上电等待接收升级指令
  2771. uint8_t app_error_flag = 0;
  2772. uint32_t app_error_counter = 0;
  2773. void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
  2774. {
  2775. 8001330: b580 push {r7, lr}
  2776. 8001332: b086 sub sp, #24
  2777. 8001334: af02 add r7, sp, #8
  2778. 8001336: 6078 str r0, [r7, #4]
  2779. if (htim->Instance == TIM2)
  2780. 8001338: 687b ldr r3, [r7, #4]
  2781. 800133a: 681b ldr r3, [r3, #0]
  2782. 800133c: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
  2783. 8001340: d151 bne.n 80013e6 <HAL_TIM_PeriodElapsedCallback+0xb6>
  2784. {
  2785. i15765_update();
  2786. 8001342: f000 fffb bl 800233c <i15765_update>
  2787. if(ota_start_flag == 0)
  2788. 8001346: 4b2a ldr r3, [pc, #168] @ (80013f0 <HAL_TIM_PeriodElapsedCallback+0xc0>)
  2789. 8001348: 781b ldrb r3, [r3, #0]
  2790. 800134a: 2b00 cmp r3, #0
  2791. 800134c: d10f bne.n 800136e <HAL_TIM_PeriodElapsedCallback+0x3e>
  2792. {
  2793. system_time_ms++; // 系统时间加1ms
  2794. 800134e: 4b29 ldr r3, [pc, #164] @ (80013f4 <HAL_TIM_PeriodElapsedCallback+0xc4>)
  2795. 8001350: 681b ldr r3, [r3, #0]
  2796. 8001352: 3301 adds r3, #1
  2797. 8001354: 4a27 ldr r2, [pc, #156] @ (80013f4 <HAL_TIM_PeriodElapsedCallback+0xc4>)
  2798. 8001356: 6013 str r3, [r2, #0]
  2799. if(system_time_ms >= WAIT_OTA_TIME_MS)
  2800. 8001358: 4b26 ldr r3, [pc, #152] @ (80013f4 <HAL_TIM_PeriodElapsedCallback+0xc4>)
  2801. 800135a: 681b ldr r3, [r3, #0]
  2802. 800135c: f240 52db movw r2, #1499 @ 0x5db
  2803. 8001360: 4293 cmp r3, r2
  2804. 8001362: d907 bls.n 8001374 <HAL_TIM_PeriodElapsedCallback+0x44>
  2805. {
  2806. system_time_ms = WAIT_OTA_TIME_MS;
  2807. 8001364: 4b23 ldr r3, [pc, #140] @ (80013f4 <HAL_TIM_PeriodElapsedCallback+0xc4>)
  2808. 8001366: f240 52dc movw r2, #1500 @ 0x5dc
  2809. 800136a: 601a str r2, [r3, #0]
  2810. 800136c: e002 b.n 8001374 <HAL_TIM_PeriodElapsedCallback+0x44>
  2811. }
  2812. }
  2813. else
  2814. {
  2815. system_time_ms = 0;
  2816. 800136e: 4b21 ldr r3, [pc, #132] @ (80013f4 <HAL_TIM_PeriodElapsedCallback+0xc4>)
  2817. 8001370: 2200 movs r2, #0
  2818. 8001372: 601a str r2, [r3, #0]
  2819. }
  2820. if(app_error_flag == 1)
  2821. 8001374: 4b20 ldr r3, [pc, #128] @ (80013f8 <HAL_TIM_PeriodElapsedCallback+0xc8>)
  2822. 8001376: 781b ldrb r3, [r3, #0]
  2823. 8001378: 2b01 cmp r3, #1
  2824. 800137a: d134 bne.n 80013e6 <HAL_TIM_PeriodElapsedCallback+0xb6>
  2825. {
  2826. app_error_counter++;
  2827. 800137c: 4b1f ldr r3, [pc, #124] @ (80013fc <HAL_TIM_PeriodElapsedCallback+0xcc>)
  2828. 800137e: 681b ldr r3, [r3, #0]
  2829. 8001380: 3301 adds r3, #1
  2830. 8001382: 4a1e ldr r2, [pc, #120] @ (80013fc <HAL_TIM_PeriodElapsedCallback+0xcc>)
  2831. 8001384: 6013 str r3, [r2, #0]
  2832. if(app_error_counter >= 1000)
  2833. 8001386: 4b1d ldr r3, [pc, #116] @ (80013fc <HAL_TIM_PeriodElapsedCallback+0xcc>)
  2834. 8001388: 681b ldr r3, [r3, #0]
  2835. 800138a: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8
  2836. 800138e: d32a bcc.n 80013e6 <HAL_TIM_PeriodElapsedCallback+0xb6>
  2837. {
  2838. app_error_counter = 0;
  2839. 8001390: 4b1a ldr r3, [pc, #104] @ (80013fc <HAL_TIM_PeriodElapsedCallback+0xcc>)
  2840. 8001392: 2200 movs r2, #0
  2841. 8001394: 601a str r2, [r3, #0]
  2842. uint16_t hardware_version = *(volatile uint32_t*)0x08000188;
  2843. 8001396: 4b1a ldr r3, [pc, #104] @ (8001400 <HAL_TIM_PeriodElapsedCallback+0xd0>)
  2844. 8001398: 681b ldr r3, [r3, #0]
  2845. 800139a: 81fb strh r3, [r7, #14]
  2846. TxBuf[0] = 0x04;
  2847. 800139c: 4b19 ldr r3, [pc, #100] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2848. 800139e: 2204 movs r2, #4
  2849. 80013a0: 701a strb r2, [r3, #0]
  2850. TxBuf[1] = 0x50;
  2851. 80013a2: 4b18 ldr r3, [pc, #96] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2852. 80013a4: 2250 movs r2, #80 @ 0x50
  2853. 80013a6: 705a strb r2, [r3, #1]
  2854. TxBuf[2] = 0x02;
  2855. 80013a8: 4b16 ldr r3, [pc, #88] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2856. 80013aa: 2202 movs r2, #2
  2857. 80013ac: 709a strb r2, [r3, #2]
  2858. TxBuf[3] = hardware_version >> 8;
  2859. 80013ae: 89fb ldrh r3, [r7, #14]
  2860. 80013b0: 0a1b lsrs r3, r3, #8
  2861. 80013b2: b29b uxth r3, r3
  2862. 80013b4: b2da uxtb r2, r3
  2863. 80013b6: 4b13 ldr r3, [pc, #76] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2864. 80013b8: 70da strb r2, [r3, #3]
  2865. TxBuf[4] = hardware_version & 0xFF;;
  2866. 80013ba: 89fb ldrh r3, [r7, #14]
  2867. 80013bc: b2da uxtb r2, r3
  2868. 80013be: 4b11 ldr r3, [pc, #68] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2869. 80013c0: 711a strb r2, [r3, #4]
  2870. TxBuf[5] = 0x55;
  2871. 80013c2: 4b10 ldr r3, [pc, #64] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2872. 80013c4: 2255 movs r2, #85 @ 0x55
  2873. 80013c6: 715a strb r2, [r3, #5]
  2874. TxBuf[6] = 0x55;
  2875. 80013c8: 4b0e ldr r3, [pc, #56] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2876. 80013ca: 2255 movs r2, #85 @ 0x55
  2877. 80013cc: 719a strb r2, [r3, #6]
  2878. TxBuf[7] = 0x55;
  2879. 80013ce: 4b0d ldr r3, [pc, #52] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2880. 80013d0: 2255 movs r2, #85 @ 0x55
  2881. 80013d2: 71da strb r2, [r3, #7]
  2882. CAN_SendData(1, 2, 0x709, TxBuf,8);
  2883. 80013d4: 2308 movs r3, #8
  2884. 80013d6: 9300 str r3, [sp, #0]
  2885. 80013d8: 4b0a ldr r3, [pc, #40] @ (8001404 <HAL_TIM_PeriodElapsedCallback+0xd4>)
  2886. 80013da: f240 7209 movw r2, #1801 @ 0x709
  2887. 80013de: 2102 movs r1, #2
  2888. 80013e0: 2001 movs r0, #1
  2889. 80013e2: f7ff f981 bl 80006e8 <CAN_SendData>
  2890. }
  2891. }
  2892. }
  2893. }
  2894. 80013e6: bf00 nop
  2895. 80013e8: 3710 adds r7, #16
  2896. 80013ea: 46bd mov sp, r7
  2897. 80013ec: bd80 pop {r7, pc}
  2898. 80013ee: bf00 nop
  2899. 80013f0: 200000dc .word 0x200000dc
  2900. 80013f4: 200000e0 .word 0x200000e0
  2901. 80013f8: 200000e4 .word 0x200000e4
  2902. 80013fc: 200000e8 .word 0x200000e8
  2903. 8001400: 08000188 .word 0x08000188
  2904. 8001404: 200000d4 .word 0x200000d4
  2905. 08001408 <Reset_Handler>:
  2906. .section .text.Reset_Handler
  2907. .weak Reset_Handler
  2908. .type Reset_Handler, %function
  2909. Reset_Handler:
  2910. ldr sp, =_estack /* set stack pointer */
  2911. 8001408: f8df d034 ldr.w sp, [pc, #52] @ 8001440 <LoopFillZerobss+0xe>
  2912. /* Call the clock system initialization function.*/
  2913. bl SystemInit
  2914. 800140c: f7ff ff0c bl 8001228 <SystemInit>
  2915. /* Copy the data segment initializers from flash to SRAM */
  2916. ldr r0, =_sdata
  2917. 8001410: 480c ldr r0, [pc, #48] @ (8001444 <LoopFillZerobss+0x12>)
  2918. ldr r1, =_edata
  2919. 8001412: 490d ldr r1, [pc, #52] @ (8001448 <LoopFillZerobss+0x16>)
  2920. ldr r2, =_sidata
  2921. 8001414: 4a0d ldr r2, [pc, #52] @ (800144c <LoopFillZerobss+0x1a>)
  2922. movs r3, #0
  2923. 8001416: 2300 movs r3, #0
  2924. b LoopCopyDataInit
  2925. 8001418: e002 b.n 8001420 <LoopCopyDataInit>
  2926. 0800141a <CopyDataInit>:
  2927. CopyDataInit:
  2928. ldr r4, [r2, r3]
  2929. 800141a: 58d4 ldr r4, [r2, r3]
  2930. str r4, [r0, r3]
  2931. 800141c: 50c4 str r4, [r0, r3]
  2932. adds r3, r3, #4
  2933. 800141e: 3304 adds r3, #4
  2934. 08001420 <LoopCopyDataInit>:
  2935. LoopCopyDataInit:
  2936. adds r4, r0, r3
  2937. 8001420: 18c4 adds r4, r0, r3
  2938. cmp r4, r1
  2939. 8001422: 428c cmp r4, r1
  2940. bcc CopyDataInit
  2941. 8001424: d3f9 bcc.n 800141a <CopyDataInit>
  2942. /* Zero fill the bss segment. */
  2943. ldr r2, =_sbss
  2944. 8001426: 4a0a ldr r2, [pc, #40] @ (8001450 <LoopFillZerobss+0x1e>)
  2945. ldr r4, =_ebss
  2946. 8001428: 4c0a ldr r4, [pc, #40] @ (8001454 <LoopFillZerobss+0x22>)
  2947. movs r3, #0
  2948. 800142a: 2300 movs r3, #0
  2949. b LoopFillZerobss
  2950. 800142c: e001 b.n 8001432 <LoopFillZerobss>
  2951. 0800142e <FillZerobss>:
  2952. FillZerobss:
  2953. str r3, [r2]
  2954. 800142e: 6013 str r3, [r2, #0]
  2955. adds r2, r2, #4
  2956. 8001430: 3204 adds r2, #4
  2957. 08001432 <LoopFillZerobss>:
  2958. LoopFillZerobss:
  2959. cmp r2, r4
  2960. 8001432: 42a2 cmp r2, r4
  2961. bcc FillZerobss
  2962. 8001434: d3fb bcc.n 800142e <FillZerobss>
  2963. /* Call static constructors */
  2964. bl __libc_init_array
  2965. 8001436: f004 fa85 bl 8005944 <__libc_init_array>
  2966. /* Call the application's entry point.*/
  2967. bl main
  2968. 800143a: f7ff fdc7 bl 8000fcc <main>
  2969. bx lr
  2970. 800143e: 4770 bx lr
  2971. ldr sp, =_estack /* set stack pointer */
  2972. 8001440: 20020000 .word 0x20020000
  2973. ldr r0, =_sdata
  2974. 8001444: 20000000 .word 0x20000000
  2975. ldr r1, =_edata
  2976. 8001448: 20000014 .word 0x20000014
  2977. ldr r2, =_sidata
  2978. 800144c: 08005e00 .word 0x08005e00
  2979. ldr r2, =_sbss
  2980. 8001450: 20000014 .word 0x20000014
  2981. ldr r4, =_ebss
  2982. 8001454: 20001ec0 .word 0x20001ec0
  2983. 08001458 <ADC_IRQHandler>:
  2984. * @retval None
  2985. */
  2986. .section .text.Default_Handler,"ax",%progbits
  2987. Default_Handler:
  2988. Infinite_Loop:
  2989. b Infinite_Loop
  2990. 8001458: e7fe b.n 8001458 <ADC_IRQHandler>
  2991. ...
  2992. 0800145c <crc32>:
  2993. 0xCDD70693,0x54DE5729,0x23D967BF,0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,
  2994. 0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D
  2995. };
  2996. unsigned int crc32(unsigned int crc32val, unsigned char *s, unsigned int len)
  2997. {
  2998. 800145c: b480 push {r7}
  2999. 800145e: b087 sub sp, #28
  3000. 8001460: af00 add r7, sp, #0
  3001. 8001462: 60f8 str r0, [r7, #12]
  3002. 8001464: 60b9 str r1, [r7, #8]
  3003. 8001466: 607a str r2, [r7, #4]
  3004. unsigned i;
  3005. for (i = 0; i < len; i++)
  3006. 8001468: 2300 movs r3, #0
  3007. 800146a: 617b str r3, [r7, #20]
  3008. 800146c: e011 b.n 8001492 <crc32+0x36>
  3009. {
  3010. crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8);
  3011. 800146e: 68ba ldr r2, [r7, #8]
  3012. 8001470: 697b ldr r3, [r7, #20]
  3013. 8001472: 4413 add r3, r2
  3014. 8001474: 781b ldrb r3, [r3, #0]
  3015. 8001476: 461a mov r2, r3
  3016. 8001478: 68fb ldr r3, [r7, #12]
  3017. 800147a: 4053 eors r3, r2
  3018. 800147c: b2db uxtb r3, r3
  3019. 800147e: 4a0a ldr r2, [pc, #40] @ (80014a8 <crc32+0x4c>)
  3020. 8001480: f852 2023 ldr.w r2, [r2, r3, lsl #2]
  3021. 8001484: 68fb ldr r3, [r7, #12]
  3022. 8001486: 0a1b lsrs r3, r3, #8
  3023. 8001488: 4053 eors r3, r2
  3024. 800148a: 60fb str r3, [r7, #12]
  3025. for (i = 0; i < len; i++)
  3026. 800148c: 697b ldr r3, [r7, #20]
  3027. 800148e: 3301 adds r3, #1
  3028. 8001490: 617b str r3, [r7, #20]
  3029. 8001492: 697a ldr r2, [r7, #20]
  3030. 8001494: 687b ldr r3, [r7, #4]
  3031. 8001496: 429a cmp r2, r3
  3032. 8001498: d3e9 bcc.n 800146e <crc32+0x12>
  3033. }
  3034. return crc32val;
  3035. 800149a: 68fb ldr r3, [r7, #12]
  3036. }
  3037. 800149c: 4618 mov r0, r3
  3038. 800149e: 371c adds r7, #28
  3039. 80014a0: 46bd mov sp, r7
  3040. 80014a2: f85d 7b04 ldr.w r7, [sp], #4
  3041. 80014a6: 4770 bx lr
  3042. 80014a8: 080059d0 .word 0x080059d0
  3043. 080014ac <can_rx>:
  3044. ** Called by application layer to receive a CAN message.
  3045. ** RETURN 0: for success
  3046. ** 1: for failure
  3047. */
  3048. uint8_t can_rx(uint8_t p, can_t *frame)
  3049. {
  3050. 80014ac: b490 push {r4, r7}
  3051. 80014ae: b084 sub sp, #16
  3052. 80014b0: af00 add r7, sp, #0
  3053. 80014b2: 4603 mov r3, r0
  3054. 80014b4: 6039 str r1, [r7, #0]
  3055. 80014b6: 71fb strb r3, [r7, #7]
  3056. uint8_t ret = 1;
  3057. 80014b8: 2301 movs r3, #1
  3058. 80014ba: 73fb strb r3, [r7, #15]
  3059. /* since the below global memory is shared with the rx isr, disable isrs */
  3060. // CAN_LOCK();
  3061. /* if there is something in the buffer, return it */
  3062. if(can_buf_rx_cnt[p])
  3063. 80014bc: 79fb ldrb r3, [r7, #7]
  3064. 80014be: 4a1b ldr r2, [pc, #108] @ (800152c <can_rx+0x80>)
  3065. 80014c0: 5cd3 ldrb r3, [r2, r3]
  3066. 80014c2: b2db uxtb r3, r3
  3067. 80014c4: 2b00 cmp r3, #0
  3068. 80014c6: d02a beq.n 800151e <can_rx+0x72>
  3069. {
  3070. /* update buffer size */
  3071. can_buf_rx_cnt[p]--;
  3072. 80014c8: 79fb ldrb r3, [r7, #7]
  3073. 80014ca: 4a18 ldr r2, [pc, #96] @ (800152c <can_rx+0x80>)
  3074. 80014cc: 5cd2 ldrb r2, [r2, r3]
  3075. 80014ce: b2d2 uxtb r2, r2
  3076. 80014d0: 3a01 subs r2, #1
  3077. 80014d2: b2d1 uxtb r1, r2
  3078. 80014d4: 4a15 ldr r2, [pc, #84] @ (800152c <can_rx+0x80>)
  3079. 80014d6: 54d1 strb r1, [r2, r3]
  3080. /* copy over the new can frame from current buffer location */
  3081. *frame = can_buf_rx[p][can_buf_rx_tail[p]];
  3082. 80014d8: 79fa ldrb r2, [r7, #7]
  3083. 80014da: 79fb ldrb r3, [r7, #7]
  3084. 80014dc: 4914 ldr r1, [pc, #80] @ (8001530 <can_rx+0x84>)
  3085. 80014de: 5ccb ldrb r3, [r1, r3]
  3086. 80014e0: 461c mov r4, r3
  3087. 80014e2: 6838 ldr r0, [r7, #0]
  3088. 80014e4: 4913 ldr r1, [pc, #76] @ (8001534 <can_rx+0x88>)
  3089. 80014e6: 4613 mov r3, r2
  3090. 80014e8: 009b lsls r3, r3, #2
  3091. 80014ea: 4413 add r3, r2
  3092. 80014ec: 005b lsls r3, r3, #1
  3093. 80014ee: 4423 add r3, r4
  3094. 80014f0: 011b lsls r3, r3, #4
  3095. 80014f2: 440b add r3, r1
  3096. 80014f4: 4604 mov r4, r0
  3097. 80014f6: cb0f ldmia r3, {r0, r1, r2, r3}
  3098. 80014f8: e884 000f stmia.w r4, {r0, r1, r2, r3}
  3099. /* move on to next index in buffer */
  3100. if(++can_buf_rx_tail[p] >= CAN_BUF_RX_SIZE)
  3101. 80014fc: 79fb ldrb r3, [r7, #7]
  3102. 80014fe: 4a0c ldr r2, [pc, #48] @ (8001530 <can_rx+0x84>)
  3103. 8001500: 5cd2 ldrb r2, [r2, r3]
  3104. 8001502: 3201 adds r2, #1
  3105. 8001504: b2d1 uxtb r1, r2
  3106. 8001506: 4a0a ldr r2, [pc, #40] @ (8001530 <can_rx+0x84>)
  3107. 8001508: 54d1 strb r1, [r2, r3]
  3108. 800150a: 4a09 ldr r2, [pc, #36] @ (8001530 <can_rx+0x84>)
  3109. 800150c: 5cd3 ldrb r3, [r2, r3]
  3110. 800150e: 2b09 cmp r3, #9
  3111. 8001510: d903 bls.n 800151a <can_rx+0x6e>
  3112. can_buf_rx_tail[p] = 0;
  3113. 8001512: 79fb ldrb r3, [r7, #7]
  3114. 8001514: 4a06 ldr r2, [pc, #24] @ (8001530 <can_rx+0x84>)
  3115. 8001516: 2100 movs r1, #0
  3116. 8001518: 54d1 strb r1, [r2, r3]
  3117. ret = 0;
  3118. 800151a: 2300 movs r3, #0
  3119. 800151c: 73fb strb r3, [r7, #15]
  3120. }
  3121. // CAN_UNLOCK();
  3122. return ret;
  3123. 800151e: 7bfb ldrb r3, [r7, #15]
  3124. }
  3125. 8001520: 4618 mov r0, r3
  3126. 8001522: 3710 adds r7, #16
  3127. 8001524: 46bd mov sp, r7
  3128. 8001526: bc90 pop {r4, r7}
  3129. 8001528: 4770 bx lr
  3130. 800152a: bf00 nop
  3131. 800152c: 20000230 .word 0x20000230
  3132. 8001530: 20000234 .word 0x20000234
  3133. 8001534: 200000ec .word 0x200000ec
  3134. 08001538 <can_rx_isr_i>:
  3135. /*
  3136. ** Internal receive interrupt.
  3137. */
  3138. void can_rx_isr_i(uint8_t p,uint32_t msgId,uint8_t * data, uint8_t len)
  3139. {
  3140. 8001538: b480 push {r7}
  3141. 800153a: b08b sub sp, #44 @ 0x2c
  3142. 800153c: af00 add r7, sp, #0
  3143. 800153e: 60b9 str r1, [r7, #8]
  3144. 8001540: 607a str r2, [r7, #4]
  3145. 8001542: 461a mov r2, r3
  3146. 8001544: 4603 mov r3, r0
  3147. 8001546: 73fb strb r3, [r7, #15]
  3148. 8001548: 4613 mov r3, r2
  3149. 800154a: 73bb strb r3, [r7, #14]
  3150. can_t *frame;
  3151. can_t tmp_frame;
  3152. /* is there room in the buffer and is it extended? */
  3153. if(can_buf_rx_cnt[p] < CAN_BUF_RX_SIZE)
  3154. 800154c: 7bfb ldrb r3, [r7, #15]
  3155. 800154e: 4a2f ldr r2, [pc, #188] @ (800160c <can_rx_isr_i+0xd4>)
  3156. 8001550: 5cd3 ldrb r3, [r2, r3]
  3157. 8001552: b2db uxtb r3, r3
  3158. 8001554: 2b09 cmp r3, #9
  3159. 8001556: d826 bhi.n 80015a6 <can_rx_isr_i+0x6e>
  3160. {
  3161. /* mark we have one more in the buffer */
  3162. can_buf_rx_cnt[p]++;
  3163. 8001558: 7bfb ldrb r3, [r7, #15]
  3164. 800155a: 4a2c ldr r2, [pc, #176] @ (800160c <can_rx_isr_i+0xd4>)
  3165. 800155c: 5cd2 ldrb r2, [r2, r3]
  3166. 800155e: b2d2 uxtb r2, r2
  3167. 8001560: 3201 adds r2, #1
  3168. 8001562: b2d1 uxtb r1, r2
  3169. 8001564: 4a29 ldr r2, [pc, #164] @ (800160c <can_rx_isr_i+0xd4>)
  3170. 8001566: 54d1 strb r1, [r2, r3]
  3171. /* get pointer to the next open index */
  3172. frame = (can_t *)&can_buf_rx[p][ can_buf_rx_head[p] ];
  3173. 8001568: 7bfa ldrb r2, [r7, #15]
  3174. 800156a: 7bfb ldrb r3, [r7, #15]
  3175. 800156c: 4928 ldr r1, [pc, #160] @ (8001610 <can_rx_isr_i+0xd8>)
  3176. 800156e: 5ccb ldrb r3, [r1, r3]
  3177. 8001570: b2db uxtb r3, r3
  3178. 8001572: 4619 mov r1, r3
  3179. 8001574: 4613 mov r3, r2
  3180. 8001576: 009b lsls r3, r3, #2
  3181. 8001578: 4413 add r3, r2
  3182. 800157a: 005b lsls r3, r3, #1
  3183. 800157c: 440b add r3, r1
  3184. 800157e: 011b lsls r3, r3, #4
  3185. 8001580: 4a24 ldr r2, [pc, #144] @ (8001614 <can_rx_isr_i+0xdc>)
  3186. 8001582: 4413 add r3, r2
  3187. 8001584: 627b str r3, [r7, #36] @ 0x24
  3188. /* move on to next index in buffer */
  3189. if(++can_buf_rx_head[p] >= CAN_BUF_RX_SIZE)
  3190. 8001586: 7bfb ldrb r3, [r7, #15]
  3191. 8001588: 4a21 ldr r2, [pc, #132] @ (8001610 <can_rx_isr_i+0xd8>)
  3192. 800158a: 5cd2 ldrb r2, [r2, r3]
  3193. 800158c: b2d2 uxtb r2, r2
  3194. 800158e: 3201 adds r2, #1
  3195. 8001590: b2d2 uxtb r2, r2
  3196. 8001592: 491f ldr r1, [pc, #124] @ (8001610 <can_rx_isr_i+0xd8>)
  3197. 8001594: 4610 mov r0, r2
  3198. 8001596: 54c8 strb r0, [r1, r3]
  3199. 8001598: 2a09 cmp r2, #9
  3200. 800159a: d907 bls.n 80015ac <can_rx_isr_i+0x74>
  3201. can_buf_rx_head[p] = 0;
  3202. 800159c: 7bfb ldrb r3, [r7, #15]
  3203. 800159e: 4a1c ldr r2, [pc, #112] @ (8001610 <can_rx_isr_i+0xd8>)
  3204. 80015a0: 2100 movs r1, #0
  3205. 80015a2: 54d1 strb r1, [r2, r3]
  3206. 80015a4: e002 b.n 80015ac <can_rx_isr_i+0x74>
  3207. }
  3208. else
  3209. {
  3210. /* point to empty location because our rx buffer is full (always do a read) */
  3211. frame = (can_t *)&tmp_frame;
  3212. 80015a6: f107 0314 add.w r3, r7, #20
  3213. 80015aa: 627b str r3, [r7, #36] @ 0x24
  3214. }
  3215. //qiaoxu Get ID �� data lenth and data
  3216. //ID
  3217. frame->id = msgId;
  3218. 80015ac: 6a7b ldr r3, [r7, #36] @ 0x24
  3219. 80015ae: 68ba ldr r2, [r7, #8]
  3220. 80015b0: 601a str r2, [r3, #0]
  3221. /* get dlc */
  3222. frame->buf_len = len;
  3223. 80015b2: 6a7b ldr r3, [r7, #36] @ 0x24
  3224. 80015b4: 7bba ldrb r2, [r7, #14]
  3225. 80015b6: 731a strb r2, [r3, #12]
  3226. * @return The function will return:
  3227. * - 0: When RX message box hasn't received new data
  3228. * - 1: When RX data are stored in the data buffer
  3229. * - 3: When RX data are stored in the data buffer and a message was lost
  3230. */
  3231. if(frame->buf_len > 0)
  3232. 80015b8: 6a7b ldr r3, [r7, #36] @ 0x24
  3233. 80015ba: 7b1b ldrb r3, [r3, #12]
  3234. 80015bc: 2b00 cmp r3, #0
  3235. 80015be: d01f beq.n 8001600 <can_rx_isr_i+0xc8>
  3236. {
  3237. frame->buf[0] = data[0];
  3238. 80015c0: 687b ldr r3, [r7, #4]
  3239. 80015c2: 781a ldrb r2, [r3, #0]
  3240. 80015c4: 6a7b ldr r3, [r7, #36] @ 0x24
  3241. 80015c6: 711a strb r2, [r3, #4]
  3242. frame->buf[1] = data[1];
  3243. 80015c8: 687b ldr r3, [r7, #4]
  3244. 80015ca: 785a ldrb r2, [r3, #1]
  3245. 80015cc: 6a7b ldr r3, [r7, #36] @ 0x24
  3246. 80015ce: 715a strb r2, [r3, #5]
  3247. frame->buf[2] = data[2];
  3248. 80015d0: 687b ldr r3, [r7, #4]
  3249. 80015d2: 789a ldrb r2, [r3, #2]
  3250. 80015d4: 6a7b ldr r3, [r7, #36] @ 0x24
  3251. 80015d6: 719a strb r2, [r3, #6]
  3252. frame->buf[3] = data[3];
  3253. 80015d8: 687b ldr r3, [r7, #4]
  3254. 80015da: 78da ldrb r2, [r3, #3]
  3255. 80015dc: 6a7b ldr r3, [r7, #36] @ 0x24
  3256. 80015de: 71da strb r2, [r3, #7]
  3257. frame->buf[4] = data[4];
  3258. 80015e0: 687b ldr r3, [r7, #4]
  3259. 80015e2: 791a ldrb r2, [r3, #4]
  3260. 80015e4: 6a7b ldr r3, [r7, #36] @ 0x24
  3261. 80015e6: 721a strb r2, [r3, #8]
  3262. frame->buf[5] = data[5];
  3263. 80015e8: 687b ldr r3, [r7, #4]
  3264. 80015ea: 795a ldrb r2, [r3, #5]
  3265. 80015ec: 6a7b ldr r3, [r7, #36] @ 0x24
  3266. 80015ee: 725a strb r2, [r3, #9]
  3267. frame->buf[6] = data[6];
  3268. 80015f0: 687b ldr r3, [r7, #4]
  3269. 80015f2: 799a ldrb r2, [r3, #6]
  3270. 80015f4: 6a7b ldr r3, [r7, #36] @ 0x24
  3271. 80015f6: 729a strb r2, [r3, #10]
  3272. frame->buf[7] = data[7];
  3273. 80015f8: 687b ldr r3, [r7, #4]
  3274. 80015fa: 79da ldrb r2, [r3, #7]
  3275. 80015fc: 6a7b ldr r3, [r7, #36] @ 0x24
  3276. 80015fe: 72da strb r2, [r3, #11]
  3277. }
  3278. }
  3279. 8001600: bf00 nop
  3280. 8001602: 372c adds r7, #44 @ 0x2c
  3281. 8001604: 46bd mov sp, r7
  3282. 8001606: f85d 7b04 ldr.w r7, [sp], #4
  3283. 800160a: 4770 bx lr
  3284. 800160c: 20000230 .word 0x20000230
  3285. 8001610: 2000022c .word 0x2000022c
  3286. 8001614: 200000ec .word 0x200000ec
  3287. 08001618 <i15765_ai_cmp>:
  3288. **
  3289. ** RETURN: 1: if the ai's match
  3290. ** 0: otherwise
  3291. */
  3292. uint8_t i15765_ai_cmp(i15765_t *msg1, i15765_t *msg2)
  3293. {
  3294. 8001618: b480 push {r7}
  3295. 800161a: b083 sub sp, #12
  3296. 800161c: af00 add r7, sp, #0
  3297. 800161e: 6078 str r0, [r7, #4]
  3298. 8001620: 6039 str r1, [r7, #0]
  3299. if((msg1->sa != msg2->sa)
  3300. 8001622: 687b ldr r3, [r7, #4]
  3301. 8001624: 781a ldrb r2, [r3, #0]
  3302. 8001626: 683b ldr r3, [r7, #0]
  3303. 8001628: 781b ldrb r3, [r3, #0]
  3304. 800162a: 429a cmp r2, r3
  3305. 800162c: d10b bne.n 8001646 <i15765_ai_cmp+0x2e>
  3306. || (msg1->ta != msg2->ta)
  3307. 800162e: 687b ldr r3, [r7, #4]
  3308. 8001630: 785a ldrb r2, [r3, #1]
  3309. 8001632: 683b ldr r3, [r7, #0]
  3310. 8001634: 785b ldrb r3, [r3, #1]
  3311. 8001636: 429a cmp r2, r3
  3312. 8001638: d105 bne.n 8001646 <i15765_ai_cmp+0x2e>
  3313. || (msg1->tat != msg2->tat))
  3314. 800163a: 687b ldr r3, [r7, #4]
  3315. 800163c: 78da ldrb r2, [r3, #3]
  3316. 800163e: 683b ldr r3, [r7, #0]
  3317. 8001640: 78db ldrb r3, [r3, #3]
  3318. 8001642: 429a cmp r2, r3
  3319. 8001644: d001 beq.n 800164a <i15765_ai_cmp+0x32>
  3320. return 0;
  3321. 8001646: 2300 movs r3, #0
  3322. 8001648: e000 b.n 800164c <i15765_ai_cmp+0x34>
  3323. return 1;
  3324. 800164a: 2301 movs r3, #1
  3325. }
  3326. 800164c: 4618 mov r0, r3
  3327. 800164e: 370c adds r7, #12
  3328. 8001650: 46bd mov sp, r7
  3329. 8001652: f85d 7b04 ldr.w r7, [sp], #4
  3330. 8001656: 4770 bx lr
  3331. 08001658 <i15765_init>:
  3332. /*
  3333. ** Initialize the receive and transmit buffers.
  3334. */
  3335. void i15765_init(void)
  3336. {
  3337. 8001658: b480 push {r7}
  3338. 800165a: b083 sub sp, #12
  3339. 800165c: af00 add r7, sp, #0
  3340. uint8_t i;
  3341. /* clear the rx buffers */
  3342. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3343. 800165e: 2300 movs r3, #0
  3344. 8001660: 71fb strb r3, [r7, #7]
  3345. 8001662: e00c b.n 800167e <i15765_init+0x26>
  3346. i15765_mfrb[i].state = STATE_IDLE;
  3347. 8001664: 79fb ldrb r3, [r7, #7]
  3348. 8001666: 4a19 ldr r2, [pc, #100] @ (80016cc <i15765_init+0x74>)
  3349. 8001668: f640 0118 movw r1, #2072 @ 0x818
  3350. 800166c: fb01 f303 mul.w r3, r1, r3
  3351. 8001670: 4413 add r3, r2
  3352. 8001672: 3314 adds r3, #20
  3353. 8001674: 2200 movs r2, #0
  3354. 8001676: 701a strb r2, [r3, #0]
  3355. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3356. 8001678: 79fb ldrb r3, [r7, #7]
  3357. 800167a: 3301 adds r3, #1
  3358. 800167c: 71fb strb r3, [r7, #7]
  3359. 800167e: 79fb ldrb r3, [r7, #7]
  3360. 8001680: 2b00 cmp r3, #0
  3361. 8001682: d0ef beq.n 8001664 <i15765_init+0xc>
  3362. /* clear the tx buffers */
  3363. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  3364. 8001684: 2300 movs r3, #0
  3365. 8001686: 71fb strb r3, [r7, #7]
  3366. 8001688: e016 b.n 80016b8 <i15765_init+0x60>
  3367. {
  3368. i15765_mftb[i].state = STATE_IDLE;
  3369. 800168a: 79fb ldrb r3, [r7, #7]
  3370. 800168c: 4a10 ldr r2, [pc, #64] @ (80016d0 <i15765_init+0x78>)
  3371. 800168e: f240 4124 movw r1, #1060 @ 0x424
  3372. 8001692: fb01 f303 mul.w r3, r1, r3
  3373. 8001696: 4413 add r3, r2
  3374. 8001698: 3318 adds r3, #24
  3375. 800169a: 2200 movs r2, #0
  3376. 800169c: 701a strb r2, [r3, #0]
  3377. i15765_mftb[i].status = 0;//&i15765_tmp;
  3378. 800169e: 79fb ldrb r3, [r7, #7]
  3379. 80016a0: 4a0b ldr r2, [pc, #44] @ (80016d0 <i15765_init+0x78>)
  3380. 80016a2: f240 4124 movw r1, #1060 @ 0x424
  3381. 80016a6: fb01 f303 mul.w r3, r1, r3
  3382. 80016aa: 4413 add r3, r2
  3383. 80016ac: 331c adds r3, #28
  3384. 80016ae: 2200 movs r2, #0
  3385. 80016b0: 601a str r2, [r3, #0]
  3386. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  3387. 80016b2: 79fb ldrb r3, [r7, #7]
  3388. 80016b4: 3301 adds r3, #1
  3389. 80016b6: 71fb strb r3, [r7, #7]
  3390. 80016b8: 79fb ldrb r3, [r7, #7]
  3391. 80016ba: 2b00 cmp r3, #0
  3392. 80016bc: d0e5 beq.n 800168a <i15765_init+0x32>
  3393. }
  3394. // i15765app_init();
  3395. }
  3396. 80016be: bf00 nop
  3397. 80016c0: bf00 nop
  3398. 80016c2: 370c adds r7, #12
  3399. 80016c4: 46bd mov sp, r7
  3400. 80016c6: f85d 7b04 ldr.w r7, [sp], #4
  3401. 80016ca: 4770 bx lr
  3402. 80016cc: 20000238 .word 0x20000238
  3403. 80016d0: 20000a50 .word 0x20000a50
  3404. 080016d4 <i15765_mfrb_get>:
  3405. **
  3406. ** RETURN: 0: success, index found
  3407. ** 1: failure, buf is full
  3408. */
  3409. uint8_t i15765_mfrb_get(i15765_mfr_t **mfrb)
  3410. {
  3411. 80016d4: b480 push {r7}
  3412. 80016d6: b085 sub sp, #20
  3413. 80016d8: af00 add r7, sp, #0
  3414. 80016da: 6078 str r0, [r7, #4]
  3415. uint8_t i;
  3416. /* find first available index */
  3417. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3418. 80016dc: 2300 movs r3, #0
  3419. 80016de: 73fb strb r3, [r7, #15]
  3420. 80016e0: e018 b.n 8001714 <i15765_mfrb_get+0x40>
  3421. {
  3422. if(i15765_mfrb[i].state == STATE_IDLE)
  3423. 80016e2: 7bfb ldrb r3, [r7, #15]
  3424. 80016e4: 4a10 ldr r2, [pc, #64] @ (8001728 <i15765_mfrb_get+0x54>)
  3425. 80016e6: f640 0118 movw r1, #2072 @ 0x818
  3426. 80016ea: fb01 f303 mul.w r3, r1, r3
  3427. 80016ee: 4413 add r3, r2
  3428. 80016f0: 3314 adds r3, #20
  3429. 80016f2: 781b ldrb r3, [r3, #0]
  3430. 80016f4: 2b00 cmp r3, #0
  3431. 80016f6: d10a bne.n 800170e <i15765_mfrb_get+0x3a>
  3432. {
  3433. *mfrb = &i15765_mfrb[i];
  3434. 80016f8: 7bfb ldrb r3, [r7, #15]
  3435. 80016fa: f640 0218 movw r2, #2072 @ 0x818
  3436. 80016fe: fb02 f303 mul.w r3, r2, r3
  3437. 8001702: 4a09 ldr r2, [pc, #36] @ (8001728 <i15765_mfrb_get+0x54>)
  3438. 8001704: 441a add r2, r3
  3439. 8001706: 687b ldr r3, [r7, #4]
  3440. 8001708: 601a str r2, [r3, #0]
  3441. return 0;
  3442. 800170a: 2300 movs r3, #0
  3443. 800170c: e006 b.n 800171c <i15765_mfrb_get+0x48>
  3444. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3445. 800170e: 7bfb ldrb r3, [r7, #15]
  3446. 8001710: 3301 adds r3, #1
  3447. 8001712: 73fb strb r3, [r7, #15]
  3448. 8001714: 7bfb ldrb r3, [r7, #15]
  3449. 8001716: 2b00 cmp r3, #0
  3450. 8001718: d0e3 beq.n 80016e2 <i15765_mfrb_get+0xe>
  3451. }
  3452. }
  3453. return 1;
  3454. 800171a: 2301 movs r3, #1
  3455. }
  3456. 800171c: 4618 mov r0, r3
  3457. 800171e: 3714 adds r7, #20
  3458. 8001720: 46bd mov sp, r7
  3459. 8001722: f85d 7b04 ldr.w r7, [sp], #4
  3460. 8001726: 4770 bx lr
  3461. 8001728: 20000238 .word 0x20000238
  3462. 0800172c <i15765_mftb_get>:
  3463. **
  3464. ** RETURN: 0: success, index found
  3465. ** 1: failure, buf is full
  3466. */
  3467. uint8_t i15765_mftb_get(i15765_mft_t **mftb)
  3468. {
  3469. 800172c: b480 push {r7}
  3470. 800172e: b085 sub sp, #20
  3471. 8001730: af00 add r7, sp, #0
  3472. 8001732: 6078 str r0, [r7, #4]
  3473. uint8_t i;
  3474. /* find first available index */
  3475. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  3476. 8001734: 2300 movs r3, #0
  3477. 8001736: 73fb strb r3, [r7, #15]
  3478. 8001738: e018 b.n 800176c <i15765_mftb_get+0x40>
  3479. {
  3480. if(i15765_mftb[i].state == STATE_IDLE)
  3481. 800173a: 7bfb ldrb r3, [r7, #15]
  3482. 800173c: 4a10 ldr r2, [pc, #64] @ (8001780 <i15765_mftb_get+0x54>)
  3483. 800173e: f240 4124 movw r1, #1060 @ 0x424
  3484. 8001742: fb01 f303 mul.w r3, r1, r3
  3485. 8001746: 4413 add r3, r2
  3486. 8001748: 3318 adds r3, #24
  3487. 800174a: 781b ldrb r3, [r3, #0]
  3488. 800174c: 2b00 cmp r3, #0
  3489. 800174e: d10a bne.n 8001766 <i15765_mftb_get+0x3a>
  3490. {
  3491. *mftb = &i15765_mftb[i];
  3492. 8001750: 7bfb ldrb r3, [r7, #15]
  3493. 8001752: f240 4224 movw r2, #1060 @ 0x424
  3494. 8001756: fb02 f303 mul.w r3, r2, r3
  3495. 800175a: 4a09 ldr r2, [pc, #36] @ (8001780 <i15765_mftb_get+0x54>)
  3496. 800175c: 441a add r2, r3
  3497. 800175e: 687b ldr r3, [r7, #4]
  3498. 8001760: 601a str r2, [r3, #0]
  3499. return 0;
  3500. 8001762: 2300 movs r3, #0
  3501. 8001764: e006 b.n 8001774 <i15765_mftb_get+0x48>
  3502. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  3503. 8001766: 7bfb ldrb r3, [r7, #15]
  3504. 8001768: 3301 adds r3, #1
  3505. 800176a: 73fb strb r3, [r7, #15]
  3506. 800176c: 7bfb ldrb r3, [r7, #15]
  3507. 800176e: 2b00 cmp r3, #0
  3508. 8001770: d0e3 beq.n 800173a <i15765_mftb_get+0xe>
  3509. }
  3510. }
  3511. return 1;
  3512. 8001772: 2301 movs r3, #1
  3513. }
  3514. 8001774: 4618 mov r0, r3
  3515. 8001776: 3714 adds r7, #20
  3516. 8001778: 46bd mov sp, r7
  3517. 800177a: f85d 7b04 ldr.w r7, [sp], #4
  3518. 800177e: 4770 bx lr
  3519. 8001780: 20000a50 .word 0x20000a50
  3520. 08001784 <i15765_mfrb_del>:
  3521. /*
  3522. ** Delete all receive mf buffers with matching AE info
  3523. */
  3524. void i15765_mfrb_del(i15765_t *msg)
  3525. {
  3526. 8001784: b580 push {r7, lr}
  3527. 8001786: b084 sub sp, #16
  3528. 8001788: af00 add r7, sp, #0
  3529. 800178a: 6078 str r0, [r7, #4]
  3530. uint8_t i;
  3531. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3532. 800178c: 2300 movs r3, #0
  3533. 800178e: 73fb strb r3, [r7, #15]
  3534. 8001790: e01b b.n 80017ca <i15765_mfrb_del+0x46>
  3535. {
  3536. if(i15765_ai_cmp(&i15765_mfrb[i].msg, msg))
  3537. 8001792: 7bfb ldrb r3, [r7, #15]
  3538. 8001794: f640 0218 movw r2, #2072 @ 0x818
  3539. 8001798: fb02 f303 mul.w r3, r2, r3
  3540. 800179c: 4a0e ldr r2, [pc, #56] @ (80017d8 <i15765_mfrb_del+0x54>)
  3541. 800179e: 4413 add r3, r2
  3542. 80017a0: 3304 adds r3, #4
  3543. 80017a2: 6879 ldr r1, [r7, #4]
  3544. 80017a4: 4618 mov r0, r3
  3545. 80017a6: f7ff ff37 bl 8001618 <i15765_ai_cmp>
  3546. 80017aa: 4603 mov r3, r0
  3547. 80017ac: 2b00 cmp r3, #0
  3548. 80017ae: d009 beq.n 80017c4 <i15765_mfrb_del+0x40>
  3549. {
  3550. i15765_mfrb[i].state = STATE_IDLE;
  3551. 80017b0: 7bfb ldrb r3, [r7, #15]
  3552. 80017b2: 4a09 ldr r2, [pc, #36] @ (80017d8 <i15765_mfrb_del+0x54>)
  3553. 80017b4: f640 0118 movw r1, #2072 @ 0x818
  3554. 80017b8: fb01 f303 mul.w r3, r1, r3
  3555. 80017bc: 4413 add r3, r2
  3556. 80017be: 3314 adds r3, #20
  3557. 80017c0: 2200 movs r2, #0
  3558. 80017c2: 701a strb r2, [r3, #0]
  3559. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3560. 80017c4: 7bfb ldrb r3, [r7, #15]
  3561. 80017c6: 3301 adds r3, #1
  3562. 80017c8: 73fb strb r3, [r7, #15]
  3563. 80017ca: 7bfb ldrb r3, [r7, #15]
  3564. 80017cc: 2b00 cmp r3, #0
  3565. 80017ce: d0e0 beq.n 8001792 <i15765_mfrb_del+0xe>
  3566. }
  3567. }
  3568. return;
  3569. 80017d0: bf00 nop
  3570. }
  3571. 80017d2: 3710 adds r7, #16
  3572. 80017d4: 46bd mov sp, r7
  3573. 80017d6: bd80 pop {r7, pc}
  3574. 80017d8: 20000238 .word 0x20000238
  3575. 080017dc <i15765_mftb_seek>:
  3576. **
  3577. ** RETURN: 0 - match found
  3578. ** 1 - no match
  3579. */
  3580. uint8_t i15765_mftb_seek(i15765_t *msg, i15765_mft_t **ptr)
  3581. {
  3582. 80017dc: b480 push {r7}
  3583. 80017de: b085 sub sp, #20
  3584. 80017e0: af00 add r7, sp, #0
  3585. 80017e2: 6078 str r0, [r7, #4]
  3586. 80017e4: 6039 str r1, [r7, #0]
  3587. uint8_t i;
  3588. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  3589. 80017e6: 2300 movs r3, #0
  3590. 80017e8: 73fb strb r3, [r7, #15]
  3591. 80017ea: e018 b.n 800181e <i15765_mftb_seek+0x42>
  3592. {
  3593. if(i15765_mftb[i].state != STATE_IDLE)
  3594. 80017ec: 7bfb ldrb r3, [r7, #15]
  3595. 80017ee: 4a11 ldr r2, [pc, #68] @ (8001834 <i15765_mftb_seek+0x58>)
  3596. 80017f0: f240 4124 movw r1, #1060 @ 0x424
  3597. 80017f4: fb01 f303 mul.w r3, r1, r3
  3598. 80017f8: 4413 add r3, r2
  3599. 80017fa: 3318 adds r3, #24
  3600. 80017fc: 781b ldrb r3, [r3, #0]
  3601. 80017fe: 2b00 cmp r3, #0
  3602. 8001800: d00a beq.n 8001818 <i15765_mftb_seek+0x3c>
  3603. {
  3604. *ptr = &i15765_mftb[i];
  3605. 8001802: 7bfb ldrb r3, [r7, #15]
  3606. 8001804: f240 4224 movw r2, #1060 @ 0x424
  3607. 8001808: fb02 f303 mul.w r3, r2, r3
  3608. 800180c: 4a09 ldr r2, [pc, #36] @ (8001834 <i15765_mftb_seek+0x58>)
  3609. 800180e: 441a add r2, r3
  3610. 8001810: 683b ldr r3, [r7, #0]
  3611. 8001812: 601a str r2, [r3, #0]
  3612. return 0;
  3613. 8001814: 2300 movs r3, #0
  3614. 8001816: e006 b.n 8001826 <i15765_mftb_seek+0x4a>
  3615. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  3616. 8001818: 7bfb ldrb r3, [r7, #15]
  3617. 800181a: 3301 adds r3, #1
  3618. 800181c: 73fb strb r3, [r7, #15]
  3619. 800181e: 7bfb ldrb r3, [r7, #15]
  3620. 8001820: 2b00 cmp r3, #0
  3621. 8001822: d0e3 beq.n 80017ec <i15765_mftb_seek+0x10>
  3622. }
  3623. }
  3624. return 1;
  3625. 8001824: 2301 movs r3, #1
  3626. }
  3627. 8001826: 4618 mov r0, r3
  3628. 8001828: 3714 adds r7, #20
  3629. 800182a: 46bd mov sp, r7
  3630. 800182c: f85d 7b04 ldr.w r7, [sp], #4
  3631. 8001830: 4770 bx lr
  3632. 8001832: bf00 nop
  3633. 8001834: 20000a50 .word 0x20000a50
  3634. 08001838 <i15765_mfrb_seek>:
  3635. **
  3636. ** RETURN: 0 - match found
  3637. ** 1 - no match
  3638. */
  3639. uint8_t i15765_mfrb_seek(i15765_t *msg, i15765_mfr_t **ptr)
  3640. {
  3641. 8001838: b480 push {r7}
  3642. 800183a: b085 sub sp, #20
  3643. 800183c: af00 add r7, sp, #0
  3644. 800183e: 6078 str r0, [r7, #4]
  3645. 8001840: 6039 str r1, [r7, #0]
  3646. uint8_t i;
  3647. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3648. 8001842: 2300 movs r3, #0
  3649. 8001844: 73fb strb r3, [r7, #15]
  3650. 8001846: e018 b.n 800187a <i15765_mfrb_seek+0x42>
  3651. {
  3652. if(i15765_mfrb[i].state != STATE_IDLE)
  3653. 8001848: 7bfb ldrb r3, [r7, #15]
  3654. 800184a: 4a11 ldr r2, [pc, #68] @ (8001890 <i15765_mfrb_seek+0x58>)
  3655. 800184c: f640 0118 movw r1, #2072 @ 0x818
  3656. 8001850: fb01 f303 mul.w r3, r1, r3
  3657. 8001854: 4413 add r3, r2
  3658. 8001856: 3314 adds r3, #20
  3659. 8001858: 781b ldrb r3, [r3, #0]
  3660. 800185a: 2b00 cmp r3, #0
  3661. 800185c: d00a beq.n 8001874 <i15765_mfrb_seek+0x3c>
  3662. {
  3663. *ptr = &i15765_mfrb[i];
  3664. 800185e: 7bfb ldrb r3, [r7, #15]
  3665. 8001860: f640 0218 movw r2, #2072 @ 0x818
  3666. 8001864: fb02 f303 mul.w r3, r2, r3
  3667. 8001868: 4a09 ldr r2, [pc, #36] @ (8001890 <i15765_mfrb_seek+0x58>)
  3668. 800186a: 441a add r2, r3
  3669. 800186c: 683b ldr r3, [r7, #0]
  3670. 800186e: 601a str r2, [r3, #0]
  3671. return 0;
  3672. 8001870: 2300 movs r3, #0
  3673. 8001872: e006 b.n 8001882 <i15765_mfrb_seek+0x4a>
  3674. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  3675. 8001874: 7bfb ldrb r3, [r7, #15]
  3676. 8001876: 3301 adds r3, #1
  3677. 8001878: 73fb strb r3, [r7, #15]
  3678. 800187a: 7bfb ldrb r3, [r7, #15]
  3679. 800187c: 2b00 cmp r3, #0
  3680. 800187e: d0e3 beq.n 8001848 <i15765_mfrb_seek+0x10>
  3681. }
  3682. }
  3683. return 1;
  3684. 8001880: 2301 movs r3, #1
  3685. }
  3686. 8001882: 4618 mov r0, r3
  3687. 8001884: 3714 adds r7, #20
  3688. 8001886: 46bd mov sp, r7
  3689. 8001888: f85d 7b04 ldr.w r7, [sp], #4
  3690. 800188c: 4770 bx lr
  3691. 800188e: bf00 nop
  3692. 8001890: 20000238 .word 0x20000238
  3693. 08001894 <i15765_tx>:
  3694. ** RETURN: 0 - success
  3695. ** 1 - failure
  3696. **
  3697. */
  3698. uint8_t i15765_tx(i15765_t *msg)
  3699. {
  3700. 8001894: b590 push {r4, r7, lr}
  3701. 8001896: b08b sub sp, #44 @ 0x2c
  3702. 8001898: af02 add r7, sp, #8
  3703. 800189a: 6078 str r0, [r7, #4]
  3704. can_t can;
  3705. uint8_t i = 0;
  3706. 800189c: 2300 movs r3, #0
  3707. 800189e: 77fb strb r3, [r7, #31]
  3708. // 11bit ��׼֡ ֱ�Ӹ�ֵID��
  3709. /* physical response */
  3710. can.id = UDS_TX_ID;
  3711. 80018a0: 4b19 ldr r3, [pc, #100] @ (8001908 <i15765_tx+0x74>)
  3712. 80018a2: 681b ldr r3, [r3, #0]
  3713. 80018a4: 60fb str r3, [r7, #12]
  3714. // can.id = msg->ID;
  3715. /* pack the data, garbage will be packed when we overflow so it is the
  3716. receiver's responsibility to only read as much as was valid */
  3717. for(i = 0; i < 8; i++)
  3718. 80018a6: 2300 movs r3, #0
  3719. 80018a8: 77fb strb r3, [r7, #31]
  3720. 80018aa: e015 b.n 80018d8 <i15765_tx+0x44>
  3721. can.buf[i] = (i < msg->buf_len) ? msg->buf[i] : BUFFER_DATA_LAST;
  3722. 80018ac: 7ffb ldrb r3, [r7, #31]
  3723. 80018ae: b29a uxth r2, r3
  3724. 80018b0: 687b ldr r3, [r7, #4]
  3725. 80018b2: 891b ldrh r3, [r3, #8]
  3726. 80018b4: 429a cmp r2, r3
  3727. 80018b6: d205 bcs.n 80018c4 <i15765_tx+0x30>
  3728. 80018b8: 687b ldr r3, [r7, #4]
  3729. 80018ba: 685a ldr r2, [r3, #4]
  3730. 80018bc: 7ffb ldrb r3, [r7, #31]
  3731. 80018be: 4413 add r3, r2
  3732. 80018c0: 781b ldrb r3, [r3, #0]
  3733. 80018c2: e001 b.n 80018c8 <i15765_tx+0x34>
  3734. 80018c4: 4b11 ldr r3, [pc, #68] @ (800190c <i15765_tx+0x78>)
  3735. 80018c6: 781b ldrb r3, [r3, #0]
  3736. 80018c8: 7ffa ldrb r2, [r7, #31]
  3737. 80018ca: 3220 adds r2, #32
  3738. 80018cc: 443a add r2, r7
  3739. 80018ce: f802 3c10 strb.w r3, [r2, #-16]
  3740. for(i = 0; i < 8; i++)
  3741. 80018d2: 7ffb ldrb r3, [r7, #31]
  3742. 80018d4: 3301 adds r3, #1
  3743. 80018d6: 77fb strb r3, [r7, #31]
  3744. 80018d8: 7ffb ldrb r3, [r7, #31]
  3745. 80018da: 2b07 cmp r3, #7
  3746. 80018dc: d9e6 bls.n 80018ac <i15765_tx+0x18>
  3747. /* fix all packets to 8 bytes per 15765-4 */
  3748. can.buf_len = 8;
  3749. 80018de: 2308 movs r3, #8
  3750. 80018e0: 763b strb r3, [r7, #24]
  3751. /* Send message */
  3752. // return can_tx(0, &can);
  3753. CAN_SendData(UDS_CAN_COM, UDS_TX_MAILBOX, can.id, can.buf, can.buf_len);
  3754. 80018e2: 4b0b ldr r3, [pc, #44] @ (8001910 <i15765_tx+0x7c>)
  3755. 80018e4: 7818 ldrb r0, [r3, #0]
  3756. 80018e6: 4b0b ldr r3, [pc, #44] @ (8001914 <i15765_tx+0x80>)
  3757. 80018e8: 6819 ldr r1, [r3, #0]
  3758. 80018ea: 68fa ldr r2, [r7, #12]
  3759. 80018ec: 7e3b ldrb r3, [r7, #24]
  3760. 80018ee: 461c mov r4, r3
  3761. 80018f0: f107 030c add.w r3, r7, #12
  3762. 80018f4: 3304 adds r3, #4
  3763. 80018f6: 9400 str r4, [sp, #0]
  3764. 80018f8: f7fe fef6 bl 80006e8 <CAN_SendData>
  3765. return 0;
  3766. 80018fc: 2300 movs r3, #0
  3767. }
  3768. 80018fe: 4618 mov r0, r3
  3769. 8001900: 3724 adds r7, #36 @ 0x24
  3770. 8001902: 46bd mov sp, r7
  3771. 8001904: bd90 pop {r4, r7, pc}
  3772. 8001906: bf00 nop
  3773. 8001908: 08005de8 .word 0x08005de8
  3774. 800190c: 08005dec .word 0x08005dec
  3775. 8001910: 08005ddc .word 0x08005ddc
  3776. 8001914: 08005de0 .word 0x08005de0
  3777. 08001918 <i15765_tx_sf>:
  3778. ** INPUT: frame - pointer to the i15765 frame to be transmitted
  3779. ** RETURN: 0 - success
  3780. ** 1 - failure
  3781. */
  3782. uint8_t i15765_tx_sf(i15765_t *msg)
  3783. {
  3784. 8001918: b590 push {r4, r7, lr}
  3785. 800191a: b08b sub sp, #44 @ 0x2c
  3786. 800191c: af00 add r7, sp, #0
  3787. 800191e: 6078 str r0, [r7, #4]
  3788. uint8_t cnt;
  3789. i15765_t sf;
  3790. uint8_t buf[8];
  3791. /* copy over the old message */
  3792. sf = *msg;
  3793. 8001920: 687b ldr r3, [r7, #4]
  3794. 8001922: f107 0414 add.w r4, r7, #20
  3795. 8001926: cb0f ldmia r3, {r0, r1, r2, r3}
  3796. 8001928: e884 000f stmia.w r4, {r0, r1, r2, r3}
  3797. /* start writing at the beginning */
  3798. i = 0;
  3799. 800192c: 2300 movs r3, #0
  3800. 800192e: f887 3027 strb.w r3, [r7, #39] @ 0x27
  3801. /* construct SF N_PDU and pack it into a CAN frame */
  3802. buf[i++] = (I15765_PDU_SF << 4) | (uint8_t)msg->buf_len;
  3803. 8001932: 687b ldr r3, [r7, #4]
  3804. 8001934: 891a ldrh r2, [r3, #8]
  3805. 8001936: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
  3806. 800193a: 1c59 adds r1, r3, #1
  3807. 800193c: f887 1027 strb.w r1, [r7, #39] @ 0x27
  3808. 8001940: b2d2 uxtb r2, r2
  3809. 8001942: 3328 adds r3, #40 @ 0x28
  3810. 8001944: 443b add r3, r7
  3811. 8001946: f803 2c1c strb.w r2, [r3, #-28]
  3812. for(cnt = 0; cnt < msg->buf_len; cnt++)
  3813. 800194a: 2300 movs r3, #0
  3814. 800194c: f887 3026 strb.w r3, [r7, #38] @ 0x26
  3815. 8001950: e013 b.n 800197a <i15765_tx_sf+0x62>
  3816. buf[i++] = msg->buf[cnt];
  3817. 8001952: 687b ldr r3, [r7, #4]
  3818. 8001954: 685a ldr r2, [r3, #4]
  3819. 8001956: f897 3026 ldrb.w r3, [r7, #38] @ 0x26
  3820. 800195a: 441a add r2, r3
  3821. 800195c: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
  3822. 8001960: 1c59 adds r1, r3, #1
  3823. 8001962: f887 1027 strb.w r1, [r7, #39] @ 0x27
  3824. 8001966: 7812 ldrb r2, [r2, #0]
  3825. 8001968: 3328 adds r3, #40 @ 0x28
  3826. 800196a: 443b add r3, r7
  3827. 800196c: f803 2c1c strb.w r2, [r3, #-28]
  3828. for(cnt = 0; cnt < msg->buf_len; cnt++)
  3829. 8001970: f897 3026 ldrb.w r3, [r7, #38] @ 0x26
  3830. 8001974: 3301 adds r3, #1
  3831. 8001976: f887 3026 strb.w r3, [r7, #38] @ 0x26
  3832. 800197a: f897 3026 ldrb.w r3, [r7, #38] @ 0x26
  3833. 800197e: b29a uxth r2, r3
  3834. 8001980: 687b ldr r3, [r7, #4]
  3835. 8001982: 891b ldrh r3, [r3, #8]
  3836. 8001984: 429a cmp r2, r3
  3837. 8001986: d3e4 bcc.n 8001952 <i15765_tx_sf+0x3a>
  3838. sf.buf = buf;
  3839. 8001988: f107 030c add.w r3, r7, #12
  3840. 800198c: 61bb str r3, [r7, #24]
  3841. sf.buf_len = i;
  3842. 800198e: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
  3843. 8001992: b29b uxth r3, r3
  3844. 8001994: 83bb strh r3, [r7, #28]
  3845. /* attempt to buffer the CAN frame */
  3846. return i15765_tx(&sf);
  3847. 8001996: f107 0314 add.w r3, r7, #20
  3848. 800199a: 4618 mov r0, r3
  3849. 800199c: f7ff ff7a bl 8001894 <i15765_tx>
  3850. 80019a0: 4603 mov r3, r0
  3851. }
  3852. 80019a2: 4618 mov r0, r3
  3853. 80019a4: 372c adds r7, #44 @ 0x2c
  3854. 80019a6: 46bd mov sp, r7
  3855. 80019a8: bd90 pop {r4, r7, pc}
  3856. ...
  3857. 080019ac <i15765_tx_ff>:
  3858. /*
  3859. ** Transmit a first frame.
  3860. ** INPUT: frame - pointer to the i15765 multiframe buffer
  3861. */
  3862. void i15765_tx_ff(i15765_mft_t *mftb)
  3863. {
  3864. 80019ac: b590 push {r4, r7, lr}
  3865. 80019ae: b08b sub sp, #44 @ 0x2c
  3866. 80019b0: af00 add r7, sp, #0
  3867. 80019b2: 6078 str r0, [r7, #4]
  3868. uint8_t i = 0;
  3869. 80019b4: 2300 movs r3, #0
  3870. 80019b6: f887 3027 strb.w r3, [r7, #39] @ 0x27
  3871. uint8_t *ptr;
  3872. uint8_t buf[8];
  3873. i15765_t frame;
  3874. /* copy over message */
  3875. frame = mftb->msg;
  3876. 80019ba: 687b ldr r3, [r7, #4]
  3877. 80019bc: f107 0408 add.w r4, r7, #8
  3878. 80019c0: 3308 adds r3, #8
  3879. 80019c2: cb0f ldmia r3, {r0, r1, r2, r3}
  3880. 80019c4: e884 000f stmia.w r4, {r0, r1, r2, r3}
  3881. frame.buf = buf;
  3882. 80019c8: f107 0318 add.w r3, r7, #24
  3883. 80019cc: 60fb str r3, [r7, #12]
  3884. ptr = mftb->buf;
  3885. 80019ce: 687b ldr r3, [r7, #4]
  3886. 80019d0: 3322 adds r3, #34 @ 0x22
  3887. 80019d2: 623b str r3, [r7, #32]
  3888. /* construct FF N_PDU and pack it into a CAN frame */
  3889. frame.buf[i++] = (I15765_PDU_FF << 4) | (mftb->msg.buf_len >> 8);
  3890. 80019d4: 687b ldr r3, [r7, #4]
  3891. 80019d6: 8a1b ldrh r3, [r3, #16]
  3892. 80019d8: 0a1b lsrs r3, r3, #8
  3893. 80019da: b29b uxth r3, r3
  3894. 80019dc: b2da uxtb r2, r3
  3895. 80019de: 68f9 ldr r1, [r7, #12]
  3896. 80019e0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
  3897. 80019e4: 1c58 adds r0, r3, #1
  3898. 80019e6: f887 0027 strb.w r0, [r7, #39] @ 0x27
  3899. 80019ea: 440b add r3, r1
  3900. 80019ec: f042 0210 orr.w r2, r2, #16
  3901. 80019f0: b2d2 uxtb r2, r2
  3902. 80019f2: 701a strb r2, [r3, #0]
  3903. frame.buf[i++] = (uint8_t)mftb->msg.buf_len;
  3904. 80019f4: 687b ldr r3, [r7, #4]
  3905. 80019f6: 8a19 ldrh r1, [r3, #16]
  3906. 80019f8: 68fa ldr r2, [r7, #12]
  3907. 80019fa: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
  3908. 80019fe: 1c58 adds r0, r3, #1
  3909. 8001a00: f887 0027 strb.w r0, [r7, #39] @ 0x27
  3910. 8001a04: 4413 add r3, r2
  3911. 8001a06: b2ca uxtb r2, r1
  3912. 8001a08: 701a strb r2, [r3, #0]
  3913. /* copy over the data */
  3914. while(i < 8)
  3915. 8001a0a: e00b b.n 8001a24 <i15765_tx_ff+0x78>
  3916. frame.buf[i++] = *ptr++;
  3917. 8001a0c: 6a3b ldr r3, [r7, #32]
  3918. 8001a0e: 1c5a adds r2, r3, #1
  3919. 8001a10: 623a str r2, [r7, #32]
  3920. 8001a12: 68f9 ldr r1, [r7, #12]
  3921. 8001a14: f897 2027 ldrb.w r2, [r7, #39] @ 0x27
  3922. 8001a18: 1c50 adds r0, r2, #1
  3923. 8001a1a: f887 0027 strb.w r0, [r7, #39] @ 0x27
  3924. 8001a1e: 440a add r2, r1
  3925. 8001a20: 781b ldrb r3, [r3, #0]
  3926. 8001a22: 7013 strb r3, [r2, #0]
  3927. while(i < 8)
  3928. 8001a24: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
  3929. 8001a28: 2b07 cmp r3, #7
  3930. 8001a2a: d9ef bls.n 8001a0c <i15765_tx_ff+0x60>
  3931. /* FF's are always 8 bytes long */
  3932. frame.buf_len = 8;
  3933. 8001a2c: 2308 movs r3, #8
  3934. 8001a2e: 823b strh r3, [r7, #16]
  3935. /* transmit the CAN frame, testing to see if it was sent correctly */
  3936. if(i15765_tx(&frame) == 0)
  3937. 8001a30: f107 0308 add.w r3, r7, #8
  3938. 8001a34: 4618 mov r0, r3
  3939. 8001a36: f7ff ff2d bl 8001894 <i15765_tx>
  3940. 8001a3a: 4603 mov r3, r0
  3941. 8001a3c: 2b00 cmp r3, #0
  3942. 8001a3e: d10a bne.n 8001a56 <i15765_tx_ff+0xaa>
  3943. {
  3944. mftb->state = STATE_WT_FC;
  3945. 8001a40: 687b ldr r3, [r7, #4]
  3946. 8001a42: 2204 movs r2, #4
  3947. 8001a44: 761a strb r2, [r3, #24]
  3948. mftb->timeout = TIMEOUT_FC_S;
  3949. 8001a46: 4b06 ldr r3, [pc, #24] @ (8001a60 <i15765_tx_ff+0xb4>)
  3950. 8001a48: 881a ldrh r2, [r3, #0]
  3951. 8001a4a: 687b ldr r3, [r7, #4]
  3952. 8001a4c: 841a strh r2, [r3, #32]
  3953. mftb->msg.buf = ptr;
  3954. 8001a4e: 687b ldr r3, [r7, #4]
  3955. 8001a50: 6a3a ldr r2, [r7, #32]
  3956. 8001a52: 60da str r2, [r3, #12]
  3957. }
  3958. return;
  3959. 8001a54: bf00 nop
  3960. 8001a56: bf00 nop
  3961. }
  3962. 8001a58: 372c adds r7, #44 @ 0x2c
  3963. 8001a5a: 46bd mov sp, r7
  3964. 8001a5c: bd90 pop {r4, r7, pc}
  3965. 8001a5e: bf00 nop
  3966. 8001a60: 08005dd4 .word 0x08005dd4
  3967. 08001a64 <i15765_tx_cf>:
  3968. /*
  3969. ** Transmit a consecutive frame.
  3970. ** INPUT: mftb - pointer to the i15765 multiframe buffer
  3971. */
  3972. void i15765_tx_cf(i15765_mft_t *mftb)
  3973. {
  3974. 8001a64: b590 push {r4, r7, lr}
  3975. 8001a66: b08d sub sp, #52 @ 0x34
  3976. 8001a68: af00 add r7, sp, #0
  3977. 8001a6a: 6078 str r0, [r7, #4]
  3978. uint8_t min;
  3979. uint8_t i = 0;
  3980. 8001a6c: 2300 movs r3, #0
  3981. 8001a6e: f887 302f strb.w r3, [r7, #47] @ 0x2f
  3982. uint16_t rem;
  3983. uint8_t buf[8];
  3984. i15765_t frame;
  3985. /* copy over message */
  3986. frame = mftb->msg;
  3987. 8001a72: 687b ldr r3, [r7, #4]
  3988. 8001a74: f107 040c add.w r4, r7, #12
  3989. 8001a78: 3308 adds r3, #8
  3990. 8001a7a: cb0f ldmia r3, {r0, r1, r2, r3}
  3991. 8001a7c: e884 000f stmia.w r4, {r0, r1, r2, r3}
  3992. frame.buf = buf;
  3993. 8001a80: f107 031c add.w r3, r7, #28
  3994. 8001a84: 613b str r3, [r7, #16]
  3995. ptr = mftb->msg.buf;
  3996. 8001a86: 687b ldr r3, [r7, #4]
  3997. 8001a88: 68db ldr r3, [r3, #12]
  3998. 8001a8a: 62bb str r3, [r7, #40] @ 0x28
  3999. /* update separation time */
  4000. if(mftb->st_cnt)
  4001. 8001a8c: 687b ldr r3, [r7, #4]
  4002. 8001a8e: 889b ldrh r3, [r3, #4]
  4003. 8001a90: 2b00 cmp r3, #0
  4004. 8001a92: d006 beq.n 8001aa2 <i15765_tx_cf+0x3e>
  4005. {
  4006. /* delay */
  4007. mftb->st_cnt--;
  4008. 8001a94: 687b ldr r3, [r7, #4]
  4009. 8001a96: 889b ldrh r3, [r3, #4]
  4010. 8001a98: 3b01 subs r3, #1
  4011. 8001a9a: b29a uxth r2, r3
  4012. 8001a9c: 687b ldr r3, [r7, #4]
  4013. 8001a9e: 809a strh r2, [r3, #4]
  4014. return;
  4015. 8001aa0: e082 b.n 8001ba8 <i15765_tx_cf+0x144>
  4016. }
  4017. else
  4018. {
  4019. /* transmit */
  4020. mftb->st_cnt = mftb->st;
  4021. 8001aa2: 687b ldr r3, [r7, #4]
  4022. 8001aa4: 885a ldrh r2, [r3, #2]
  4023. 8001aa6: 687b ldr r3, [r7, #4]
  4024. 8001aa8: 809a strh r2, [r3, #4]
  4025. }
  4026. /* load PDU type */
  4027. frame.buf[i++] = (I15765_PDU_CF << 4) | (mftb->sn++ & 0xf);
  4028. 8001aaa: 687b ldr r3, [r7, #4]
  4029. 8001aac: 799b ldrb r3, [r3, #6]
  4030. 8001aae: 1c5a adds r2, r3, #1
  4031. 8001ab0: b2d1 uxtb r1, r2
  4032. 8001ab2: 687a ldr r2, [r7, #4]
  4033. 8001ab4: 7191 strb r1, [r2, #6]
  4034. 8001ab6: b25b sxtb r3, r3
  4035. 8001ab8: f003 030f and.w r3, r3, #15
  4036. 8001abc: b25b sxtb r3, r3
  4037. 8001abe: f043 0320 orr.w r3, r3, #32
  4038. 8001ac2: b259 sxtb r1, r3
  4039. 8001ac4: 693a ldr r2, [r7, #16]
  4040. 8001ac6: f897 302f ldrb.w r3, [r7, #47] @ 0x2f
  4041. 8001aca: 1c58 adds r0, r3, #1
  4042. 8001acc: f887 002f strb.w r0, [r7, #47] @ 0x2f
  4043. 8001ad0: 4413 add r3, r2
  4044. 8001ad2: b2ca uxtb r2, r1
  4045. 8001ad4: 701a strb r2, [r3, #0]
  4046. /* how much data can we (or need we) copy over? */
  4047. rem = mftb->msg.buf_len - (mftb->msg.buf - mftb->buf);
  4048. 8001ad6: 687b ldr r3, [r7, #4]
  4049. 8001ad8: 8a1a ldrh r2, [r3, #16]
  4050. 8001ada: 687b ldr r3, [r7, #4]
  4051. 8001adc: 68d9 ldr r1, [r3, #12]
  4052. 8001ade: 687b ldr r3, [r7, #4]
  4053. 8001ae0: 3322 adds r3, #34 @ 0x22
  4054. 8001ae2: 1acb subs r3, r1, r3
  4055. 8001ae4: b29b uxth r3, r3
  4056. 8001ae6: 1ad3 subs r3, r2, r3
  4057. 8001ae8: 84fb strh r3, [r7, #38] @ 0x26
  4058. min = (uint8_t)MIN(rem, 8 - i);
  4059. 8001aea: 8cfa ldrh r2, [r7, #38] @ 0x26
  4060. 8001aec: f897 302f ldrb.w r3, [r7, #47] @ 0x2f
  4061. 8001af0: f1c3 0308 rsb r3, r3, #8
  4062. 8001af4: 429a cmp r2, r3
  4063. 8001af6: da02 bge.n 8001afe <i15765_tx_cf+0x9a>
  4064. 8001af8: 8cfb ldrh r3, [r7, #38] @ 0x26
  4065. 8001afa: b2db uxtb r3, r3
  4066. 8001afc: e004 b.n 8001b08 <i15765_tx_cf+0xa4>
  4067. 8001afe: f897 302f ldrb.w r3, [r7, #47] @ 0x2f
  4068. 8001b02: f1c3 0308 rsb r3, r3, #8
  4069. 8001b06: b2db uxtb r3, r3
  4070. 8001b08: f887 3025 strb.w r3, [r7, #37] @ 0x25
  4071. /* add in the PDU field (and maybe AE) */
  4072. min += i;
  4073. 8001b0c: f897 2025 ldrb.w r2, [r7, #37] @ 0x25
  4074. 8001b10: f897 302f ldrb.w r3, [r7, #47] @ 0x2f
  4075. 8001b14: 4413 add r3, r2
  4076. 8001b16: f887 3025 strb.w r3, [r7, #37] @ 0x25
  4077. /* copy over the data */
  4078. while(i < min)
  4079. 8001b1a: e00b b.n 8001b34 <i15765_tx_cf+0xd0>
  4080. frame.buf[i++] = *ptr++;
  4081. 8001b1c: 6abb ldr r3, [r7, #40] @ 0x28
  4082. 8001b1e: 1c5a adds r2, r3, #1
  4083. 8001b20: 62ba str r2, [r7, #40] @ 0x28
  4084. 8001b22: 6939 ldr r1, [r7, #16]
  4085. 8001b24: f897 202f ldrb.w r2, [r7, #47] @ 0x2f
  4086. 8001b28: 1c50 adds r0, r2, #1
  4087. 8001b2a: f887 002f strb.w r0, [r7, #47] @ 0x2f
  4088. 8001b2e: 440a add r2, r1
  4089. 8001b30: 781b ldrb r3, [r3, #0]
  4090. 8001b32: 7013 strb r3, [r2, #0]
  4091. while(i < min)
  4092. 8001b34: f897 202f ldrb.w r2, [r7, #47] @ 0x2f
  4093. 8001b38: f897 3025 ldrb.w r3, [r7, #37] @ 0x25
  4094. 8001b3c: 429a cmp r2, r3
  4095. 8001b3e: d3ed bcc.n 8001b1c <i15765_tx_cf+0xb8>
  4096. /* FF's are always 8 bytes long */
  4097. frame.buf_len = min;
  4098. 8001b40: f897 3025 ldrb.w r3, [r7, #37] @ 0x25
  4099. 8001b44: b29b uxth r3, r3
  4100. 8001b46: 82bb strh r3, [r7, #20]
  4101. /* transmit the CAN frame, testing to see if it was sent correctly */
  4102. if(i15765_tx(&frame) == 0)
  4103. 8001b48: f107 030c add.w r3, r7, #12
  4104. 8001b4c: 4618 mov r0, r3
  4105. 8001b4e: f7ff fea1 bl 8001894 <i15765_tx>
  4106. 8001b52: 4603 mov r3, r0
  4107. 8001b54: 2b00 cmp r3, #0
  4108. 8001b56: d10f bne.n 8001b78 <i15765_tx_cf+0x114>
  4109. {
  4110. mftb->timeout = TIMEOUT_CF_S;
  4111. 8001b58: 4b15 ldr r3, [pc, #84] @ (8001bb0 <i15765_tx_cf+0x14c>)
  4112. 8001b5a: 881a ldrh r2, [r3, #0]
  4113. 8001b5c: 687b ldr r3, [r7, #4]
  4114. 8001b5e: 841a strh r2, [r3, #32]
  4115. mftb->msg.buf = ptr;
  4116. 8001b60: 687b ldr r3, [r7, #4]
  4117. 8001b62: 6aba ldr r2, [r7, #40] @ 0x28
  4118. 8001b64: 60da str r2, [r3, #12]
  4119. /* if bs is zero, then transmit away, else check how many we have left */
  4120. mftb->bs_cnt--;
  4121. 8001b66: 687b ldr r3, [r7, #4]
  4122. 8001b68: 785b ldrb r3, [r3, #1]
  4123. 8001b6a: 3b01 subs r3, #1
  4124. 8001b6c: b2da uxtb r2, r3
  4125. 8001b6e: 687b ldr r3, [r7, #4]
  4126. 8001b70: 705a strb r2, [r3, #1]
  4127. if(mftb->bs && (mftb->bs_cnt == 0))
  4128. 8001b72: 687b ldr r3, [r7, #4]
  4129. 8001b74: 781b ldrb r3, [r3, #0]
  4130. 8001b76: 2b00 cmp r3, #0
  4131. {
  4132. // mftb->state = STATE_WT_FC;//qiaoxu Ϊ���ó����ķ��ʹ���8֡
  4133. }
  4134. }
  4135. rem = mftb->msg.buf_len - (mftb->msg.buf - mftb->buf);
  4136. 8001b78: 687b ldr r3, [r7, #4]
  4137. 8001b7a: 8a1a ldrh r2, [r3, #16]
  4138. 8001b7c: 687b ldr r3, [r7, #4]
  4139. 8001b7e: 68d9 ldr r1, [r3, #12]
  4140. 8001b80: 687b ldr r3, [r7, #4]
  4141. 8001b82: 3322 adds r3, #34 @ 0x22
  4142. 8001b84: 1acb subs r3, r1, r3
  4143. 8001b86: b29b uxth r3, r3
  4144. 8001b88: 1ad3 subs r3, r2, r3
  4145. 8001b8a: 84fb strh r3, [r7, #38] @ 0x26
  4146. if(rem == 0)
  4147. 8001b8c: 8cfb ldrh r3, [r7, #38] @ 0x26
  4148. 8001b8e: 2b00 cmp r3, #0
  4149. 8001b90: d109 bne.n 8001ba6 <i15765_tx_cf+0x142>
  4150. {
  4151. *mftb->status = I15765_SENT;
  4152. 8001b92: 687b ldr r3, [r7, #4]
  4153. 8001b94: 69db ldr r3, [r3, #28]
  4154. 8001b96: 2200 movs r2, #0
  4155. 8001b98: 701a strb r2, [r3, #0]
  4156. mftb->status = &i15765_tmp;
  4157. 8001b9a: 687b ldr r3, [r7, #4]
  4158. 8001b9c: 4a05 ldr r2, [pc, #20] @ (8001bb4 <i15765_tx_cf+0x150>)
  4159. 8001b9e: 61da str r2, [r3, #28]
  4160. mftb->state = STATE_IDLE;
  4161. 8001ba0: 687b ldr r3, [r7, #4]
  4162. 8001ba2: 2200 movs r2, #0
  4163. 8001ba4: 761a strb r2, [r3, #24]
  4164. }
  4165. return;
  4166. 8001ba6: bf00 nop
  4167. }
  4168. 8001ba8: 3734 adds r7, #52 @ 0x34
  4169. 8001baa: 46bd mov sp, r7
  4170. 8001bac: bd90 pop {r4, r7, pc}
  4171. 8001bae: bf00 nop
  4172. 8001bb0: 08005dd6 .word 0x08005dd6
  4173. 8001bb4: 20000e74 .word 0x20000e74
  4174. 08001bb8 <i15765_tx_mf>:
  4175. ** INPUT: msg - pointer to the i15765 message to be transmitted
  4176. ** status - pointer to user RAM location for status feedback
  4177. **
  4178. */
  4179. void i15765_tx_mf(i15765_t *msg, uint8_t *status)
  4180. {
  4181. 8001bb8: b590 push {r4, r7, lr}
  4182. 8001bba: b085 sub sp, #20
  4183. 8001bbc: af00 add r7, sp, #0
  4184. 8001bbe: 6078 str r0, [r7, #4]
  4185. 8001bc0: 6039 str r1, [r7, #0]
  4186. /* delete any mf buffers with matching address information */
  4187. // i15765_mftb_del(msg);
  4188. /* assume failure */
  4189. *status = I15765_FAILED;
  4190. 8001bc2: 683b ldr r3, [r7, #0]
  4191. 8001bc4: 2202 movs r2, #2
  4192. 8001bc6: 701a strb r2, [r3, #0]
  4193. /* find an available spot for this message */
  4194. if(i15765_mftb_get(&mftb))
  4195. 8001bc8: f107 0308 add.w r3, r7, #8
  4196. 8001bcc: 4618 mov r0, r3
  4197. 8001bce: f7ff fdad bl 800172c <i15765_mftb_get>
  4198. 8001bd2: 4603 mov r3, r0
  4199. 8001bd4: 2b00 cmp r3, #0
  4200. 8001bd6: d136 bne.n 8001c46 <i15765_tx_mf+0x8e>
  4201. return;
  4202. /* there was room, so update status */
  4203. *status = I15765_SENDING;
  4204. 8001bd8: 683b ldr r3, [r7, #0]
  4205. 8001bda: 2201 movs r2, #1
  4206. 8001bdc: 701a strb r2, [r3, #0]
  4207. /* copy over the data */
  4208. for(i = 0; i < msg->buf_len; i++)
  4209. 8001bde: 2300 movs r3, #0
  4210. 8001be0: 81fb strh r3, [r7, #14]
  4211. 8001be2: e00d b.n 8001c00 <i15765_tx_mf+0x48>
  4212. mftb->buf[i] = msg->buf[i];
  4213. 8001be4: 687b ldr r3, [r7, #4]
  4214. 8001be6: 685a ldr r2, [r3, #4]
  4215. 8001be8: 89fb ldrh r3, [r7, #14]
  4216. 8001bea: 18d1 adds r1, r2, r3
  4217. 8001bec: 68ba ldr r2, [r7, #8]
  4218. 8001bee: 89fb ldrh r3, [r7, #14]
  4219. 8001bf0: 7809 ldrb r1, [r1, #0]
  4220. 8001bf2: 4413 add r3, r2
  4221. 8001bf4: 460a mov r2, r1
  4222. 8001bf6: f883 2022 strb.w r2, [r3, #34] @ 0x22
  4223. for(i = 0; i < msg->buf_len; i++)
  4224. 8001bfa: 89fb ldrh r3, [r7, #14]
  4225. 8001bfc: 3301 adds r3, #1
  4226. 8001bfe: 81fb strh r3, [r7, #14]
  4227. 8001c00: 687b ldr r3, [r7, #4]
  4228. 8001c02: 891b ldrh r3, [r3, #8]
  4229. 8001c04: 89fa ldrh r2, [r7, #14]
  4230. 8001c06: 429a cmp r2, r3
  4231. 8001c08: d3ec bcc.n 8001be4 <i15765_tx_mf+0x2c>
  4232. /* copy over message */
  4233. mftb->msg = *msg;
  4234. 8001c0a: 68bb ldr r3, [r7, #8]
  4235. 8001c0c: 687a ldr r2, [r7, #4]
  4236. 8001c0e: f103 0408 add.w r4, r3, #8
  4237. 8001c12: 4613 mov r3, r2
  4238. 8001c14: cb0f ldmia r3, {r0, r1, r2, r3}
  4239. 8001c16: e884 000f stmia.w r4, {r0, r1, r2, r3}
  4240. mftb->msg.buf = mftb->buf;
  4241. 8001c1a: 68ba ldr r2, [r7, #8]
  4242. 8001c1c: 68bb ldr r3, [r7, #8]
  4243. 8001c1e: 3222 adds r2, #34 @ 0x22
  4244. 8001c20: 60da str r2, [r3, #12]
  4245. /* set state to wait for a flow control PDU */
  4246. mftb->state = STATE_TX_FF;
  4247. 8001c22: 68bb ldr r3, [r7, #8]
  4248. 8001c24: 2201 movs r2, #1
  4249. 8001c26: 761a strb r2, [r3, #24]
  4250. mftb->sn = 1;
  4251. 8001c28: 68bb ldr r3, [r7, #8]
  4252. 8001c2a: 2201 movs r2, #1
  4253. 8001c2c: 719a strb r2, [r3, #6]
  4254. mftb->status = status;
  4255. 8001c2e: 68bb ldr r3, [r7, #8]
  4256. 8001c30: 683a ldr r2, [r7, #0]
  4257. 8001c32: 61da str r2, [r3, #28]
  4258. /* transmit the CAN frame, testing to see if it was sent correctly */
  4259. mftb->timeout = TIMEOUT_TX_S;
  4260. 8001c34: 68bb ldr r3, [r7, #8]
  4261. 8001c36: 4a06 ldr r2, [pc, #24] @ (8001c50 <i15765_tx_mf+0x98>)
  4262. 8001c38: 8812 ldrh r2, [r2, #0]
  4263. 8001c3a: 841a strh r2, [r3, #32]
  4264. i15765_tx_ff(mftb);
  4265. 8001c3c: 68bb ldr r3, [r7, #8]
  4266. 8001c3e: 4618 mov r0, r3
  4267. 8001c40: f7ff feb4 bl 80019ac <i15765_tx_ff>
  4268. 8001c44: e000 b.n 8001c48 <i15765_tx_mf+0x90>
  4269. return;
  4270. 8001c46: bf00 nop
  4271. }
  4272. 8001c48: 3714 adds r7, #20
  4273. 8001c4a: 46bd mov sp, r7
  4274. 8001c4c: bd90 pop {r4, r7, pc}
  4275. 8001c4e: bf00 nop
  4276. 8001c50: 08005dd0 .word 0x08005dd0
  4277. 08001c54 <i15765_tx_fc>:
  4278. ** Transmit a flow control frame and updates the status of mfrb. Reception
  4279. ** will be paused until the FC has been transmitted.
  4280. ** INPUT: mfrb - pointer multiframe receive buffer
  4281. */
  4282. void i15765_tx_fc(i15765_mfr_t *mfrb)
  4283. {
  4284. 8001c54: b580 push {r7, lr}
  4285. 8001c56: b08a sub sp, #40 @ 0x28
  4286. 8001c58: af00 add r7, sp, #0
  4287. 8001c5a: 6078 str r0, [r7, #4]
  4288. uint8_t fs;
  4289. i15765_t msg;
  4290. uint8_t buf[8];
  4291. /* get the FF_DL and check for potential buffer overflow */
  4292. if(mfrb->msg.buf_len > I15765CFG_MF_RX_BUF_SIZE)
  4293. 8001c5c: 687b ldr r3, [r7, #4]
  4294. 8001c5e: 899b ldrh r3, [r3, #12]
  4295. 8001c60: f5b3 6f00 cmp.w r3, #2048 @ 0x800
  4296. 8001c64: d906 bls.n 8001c74 <i15765_tx_fc+0x20>
  4297. {
  4298. fs = I15765_FS_OVFLW;
  4299. 8001c66: 2302 movs r3, #2
  4300. 8001c68: f887 3027 strb.w r3, [r7, #39] @ 0x27
  4301. mfrb->state = STATE_TX_OVFLW;
  4302. 8001c6c: 687b ldr r3, [r7, #4]
  4303. 8001c6e: 2207 movs r2, #7
  4304. 8001c70: 751a strb r2, [r3, #20]
  4305. 8001c72: e005 b.n 8001c80 <i15765_tx_fc+0x2c>
  4306. }
  4307. else
  4308. {
  4309. fs = I15765_FS_CTS; //
  4310. 8001c74: 2300 movs r3, #0
  4311. 8001c76: f887 3027 strb.w r3, [r7, #39] @ 0x27
  4312. // fs = I15765_FS_WT; //wait
  4313. mfrb->state = STATE_TX_CTS;
  4314. 8001c7a: 687b ldr r3, [r7, #4]
  4315. 8001c7c: 2206 movs r2, #6
  4316. 8001c7e: 751a strb r2, [r3, #20]
  4317. }
  4318. /* pack the pci */
  4319. msg.buf = buf;
  4320. 8001c80: f107 030c add.w r3, r7, #12
  4321. 8001c84: 61bb str r3, [r7, #24]
  4322. msg.buf[0] = (I15765_PDU_FC << 4) | fs;
  4323. 8001c86: 69bb ldr r3, [r7, #24]
  4324. 8001c88: f897 2027 ldrb.w r2, [r7, #39] @ 0x27
  4325. 8001c8c: f042 0230 orr.w r2, r2, #48 @ 0x30
  4326. 8001c90: b2d2 uxtb r2, r2
  4327. 8001c92: 701a strb r2, [r3, #0]
  4328. msg.buf[1] = BS; //qiaoxu modify
  4329. 8001c94: 69bb ldr r3, [r7, #24]
  4330. 8001c96: 3301 adds r3, #1
  4331. 8001c98: 4a17 ldr r2, [pc, #92] @ (8001cf8 <i15765_tx_fc+0xa4>)
  4332. 8001c9a: 7812 ldrb r2, [r2, #0]
  4333. 8001c9c: 701a strb r2, [r3, #0]
  4334. msg.buf[2] = STmin; //qiaoxu modify
  4335. 8001c9e: 69bb ldr r3, [r7, #24]
  4336. 8001ca0: 3302 adds r3, #2
  4337. 8001ca2: 4a16 ldr r2, [pc, #88] @ (8001cfc <i15765_tx_fc+0xa8>)
  4338. 8001ca4: 7812 ldrb r2, [r2, #0]
  4339. 8001ca6: 701a strb r2, [r3, #0]
  4340. msg.buf_len = 3;
  4341. 8001ca8: 2303 movs r3, #3
  4342. 8001caa: 83bb strh r3, [r7, #28]
  4343. msg.sa = i15765_sa;
  4344. 8001cac: 4b14 ldr r3, [pc, #80] @ (8001d00 <i15765_tx_fc+0xac>)
  4345. 8001cae: 781b ldrb r3, [r3, #0]
  4346. 8001cb0: 753b strb r3, [r7, #20]
  4347. msg.ta = mfrb->msg.sa;
  4348. 8001cb2: 687b ldr r3, [r7, #4]
  4349. 8001cb4: 791b ldrb r3, [r3, #4]
  4350. 8001cb6: 757b strb r3, [r7, #21]
  4351. msg.tat = mfrb->msg.tat;
  4352. 8001cb8: 687b ldr r3, [r7, #4]
  4353. 8001cba: 79db ldrb r3, [r3, #7]
  4354. 8001cbc: 75fb strb r3, [r7, #23]
  4355. /* set pri same as received FF */
  4356. msg.pri = mfrb->msg.pri;
  4357. 8001cbe: 687b ldr r3, [r7, #4]
  4358. 8001cc0: 799b ldrb r3, [r3, #6]
  4359. 8001cc2: 75bb strb r3, [r7, #22]
  4360. /* send the message */
  4361. if(i15765_tx(&msg) == 0)
  4362. 8001cc4: f107 0314 add.w r3, r7, #20
  4363. 8001cc8: 4618 mov r0, r3
  4364. 8001cca: f7ff fde3 bl 8001894 <i15765_tx>
  4365. 8001cce: 4603 mov r3, r0
  4366. 8001cd0: 2b00 cmp r3, #0
  4367. 8001cd2: d10c bne.n 8001cee <i15765_tx_fc+0x9a>
  4368. {
  4369. /* transmission successful */
  4370. mfrb->timeout = TIMEOUT_CF_R;
  4371. 8001cd4: 4b0b ldr r3, [pc, #44] @ (8001d04 <i15765_tx_fc+0xb0>)
  4372. 8001cd6: 881a ldrh r2, [r3, #0]
  4373. 8001cd8: 687b ldr r3, [r7, #4]
  4374. 8001cda: 82da strh r2, [r3, #22]
  4375. mfrb->state = (mfrb->state == STATE_TX_CTS) ? STATE_WT_CF : STATE_IDLE;
  4376. 8001cdc: 687b ldr r3, [r7, #4]
  4377. 8001cde: 7d1b ldrb r3, [r3, #20]
  4378. 8001ce0: 2b06 cmp r3, #6
  4379. 8001ce2: d101 bne.n 8001ce8 <i15765_tx_fc+0x94>
  4380. 8001ce4: 2205 movs r2, #5
  4381. 8001ce6: e000 b.n 8001cea <i15765_tx_fc+0x96>
  4382. 8001ce8: 2200 movs r2, #0
  4383. 8001cea: 687b ldr r3, [r7, #4]
  4384. 8001cec: 751a strb r2, [r3, #20]
  4385. }
  4386. }
  4387. 8001cee: bf00 nop
  4388. 8001cf0: 3728 adds r7, #40 @ 0x28
  4389. 8001cf2: 46bd mov sp, r7
  4390. 8001cf4: bd80 pop {r7, pc}
  4391. 8001cf6: bf00 nop
  4392. 8001cf8: 08005ded .word 0x08005ded
  4393. 8001cfc: 08005dee .word 0x08005dee
  4394. 8001d00: 20000008 .word 0x20000008
  4395. 8001d04: 08005dd8 .word 0x08005dd8
  4396. 08001d08 <i15765_rx_sf>:
  4397. /*
  4398. ** Handles a recieved single frame
  4399. ** INPUT: msg - pointer to the received message
  4400. */
  4401. void i15765_rx_sf(i15765_t *msg)
  4402. {
  4403. 8001d08: b580 push {r7, lr}
  4404. 8001d0a: b082 sub sp, #8
  4405. 8001d0c: af00 add r7, sp, #0
  4406. 8001d0e: 6078 str r0, [r7, #4]
  4407. /* ignore message if errors are present */
  4408. if((msg->buf[0] == 0) || (msg->buf[0] > (msg->buf_len - 1)))
  4409. 8001d10: 687b ldr r3, [r7, #4]
  4410. 8001d12: 685b ldr r3, [r3, #4]
  4411. 8001d14: 781b ldrb r3, [r3, #0]
  4412. 8001d16: 2b00 cmp r3, #0
  4413. 8001d18: d015 beq.n 8001d46 <i15765_rx_sf+0x3e>
  4414. 8001d1a: 687b ldr r3, [r7, #4]
  4415. 8001d1c: 891b ldrh r3, [r3, #8]
  4416. 8001d1e: 687a ldr r2, [r7, #4]
  4417. 8001d20: 6852 ldr r2, [r2, #4]
  4418. 8001d22: 7812 ldrb r2, [r2, #0]
  4419. 8001d24: 4293 cmp r3, r2
  4420. 8001d26: d90e bls.n 8001d46 <i15765_rx_sf+0x3e>
  4421. {
  4422. return;
  4423. }
  4424. /* message length */
  4425. msg->buf_len = msg->buf[0];
  4426. 8001d28: 687b ldr r3, [r7, #4]
  4427. 8001d2a: 685b ldr r3, [r3, #4]
  4428. 8001d2c: 781b ldrb r3, [r3, #0]
  4429. 8001d2e: 461a mov r2, r3
  4430. 8001d30: 687b ldr r3, [r7, #4]
  4431. 8001d32: 811a strh r2, [r3, #8]
  4432. /* skip PCI field */
  4433. msg->buf++;
  4434. 8001d34: 687b ldr r3, [r7, #4]
  4435. 8001d36: 685b ldr r3, [r3, #4]
  4436. 8001d38: 1c5a adds r2, r3, #1
  4437. 8001d3a: 687b ldr r3, [r7, #4]
  4438. 8001d3c: 605a str r2, [r3, #4]
  4439. i15765app_process(msg);
  4440. 8001d3e: 6878 ldr r0, [r7, #4]
  4441. 8001d40: f000 fb10 bl 8002364 <i15765app_process>
  4442. 8001d44: e000 b.n 8001d48 <i15765_rx_sf+0x40>
  4443. return;
  4444. 8001d46: bf00 nop
  4445. }
  4446. 8001d48: 3708 adds r7, #8
  4447. 8001d4a: 46bd mov sp, r7
  4448. 8001d4c: bd80 pop {r7, pc}
  4449. ...
  4450. 08001d50 <i15765_rx_ff>:
  4451. /*
  4452. ** Handles a recieved first frame.
  4453. ** INPUT: msg - pointer to the received message segment
  4454. */
  4455. void i15765_rx_ff(i15765_t *msg)
  4456. {
  4457. 8001d50: b590 push {r4, r7, lr}
  4458. 8001d52: b085 sub sp, #20
  4459. 8001d54: af00 add r7, sp, #0
  4460. 8001d56: 6078 str r0, [r7, #4]
  4461. uint16_t ff_dl;
  4462. i15765_mfr_t *mfrb;
  4463. //qiaoxu ɾ��
  4464. /* delete any mf buffers with matching address information */
  4465. i15765_mfrb_del(msg);
  4466. 8001d58: 6878 ldr r0, [r7, #4]
  4467. 8001d5a: f7ff fd13 bl 8001784 <i15765_mfrb_del>
  4468. /* find an available spot for this message */
  4469. if(i15765_mfrb_get(&mfrb))
  4470. 8001d5e: f107 0308 add.w r3, r7, #8
  4471. 8001d62: 4618 mov r0, r3
  4472. 8001d64: f7ff fcb6 bl 80016d4 <i15765_mfrb_get>
  4473. 8001d68: 4603 mov r3, r0
  4474. 8001d6a: 2b00 cmp r3, #0
  4475. 8001d6c: d14e bne.n 8001e0c <i15765_rx_ff+0xbc>
  4476. return;
  4477. /* first frame data length */
  4478. ff_dl = ((msg->buf[0] & 0xf) << 8) | msg->buf[1];
  4479. 8001d6e: 687b ldr r3, [r7, #4]
  4480. 8001d70: 685b ldr r3, [r3, #4]
  4481. 8001d72: 781b ldrb r3, [r3, #0]
  4482. 8001d74: b21b sxth r3, r3
  4483. 8001d76: 021b lsls r3, r3, #8
  4484. 8001d78: b21b sxth r3, r3
  4485. 8001d7a: f403 6370 and.w r3, r3, #3840 @ 0xf00
  4486. 8001d7e: b21a sxth r2, r3
  4487. 8001d80: 687b ldr r3, [r7, #4]
  4488. 8001d82: 685b ldr r3, [r3, #4]
  4489. 8001d84: 3301 adds r3, #1
  4490. 8001d86: 781b ldrb r3, [r3, #0]
  4491. 8001d88: b21b sxth r3, r3
  4492. 8001d8a: 4313 orrs r3, r2
  4493. 8001d8c: b21b sxth r3, r3
  4494. 8001d8e: 81bb strh r3, [r7, #12]
  4495. /* if the total size could fit in an SF PDU, ignore */
  4496. if(ff_dl <= 7)
  4497. 8001d90: 89bb ldrh r3, [r7, #12]
  4498. 8001d92: 2b07 cmp r3, #7
  4499. 8001d94: d93c bls.n 8001e10 <i15765_rx_ff+0xc0>
  4500. return;
  4501. /* skip PCI field */
  4502. msg->buf += 2;
  4503. 8001d96: 687b ldr r3, [r7, #4]
  4504. 8001d98: 685b ldr r3, [r3, #4]
  4505. 8001d9a: 1c9a adds r2, r3, #2
  4506. 8001d9c: 687b ldr r3, [r7, #4]
  4507. 8001d9e: 605a str r2, [r3, #4]
  4508. msg->buf_len -= 2;
  4509. 8001da0: 687b ldr r3, [r7, #4]
  4510. 8001da2: 891b ldrh r3, [r3, #8]
  4511. 8001da4: 3b02 subs r3, #2
  4512. 8001da6: b29a uxth r2, r3
  4513. 8001da8: 687b ldr r3, [r7, #4]
  4514. 8001daa: 811a strh r2, [r3, #8]
  4515. /* buffer the necessary info */
  4516. mfrb->sn = 0;
  4517. 8001dac: 68bb ldr r3, [r7, #8]
  4518. 8001dae: 2200 movs r2, #0
  4519. 8001db0: 701a strb r2, [r3, #0]
  4520. mfrb->msg = *msg;
  4521. 8001db2: 68bb ldr r3, [r7, #8]
  4522. 8001db4: 687a ldr r2, [r7, #4]
  4523. 8001db6: 1d1c adds r4, r3, #4
  4524. 8001db8: 4613 mov r3, r2
  4525. 8001dba: cb0f ldmia r3, {r0, r1, r2, r3}
  4526. 8001dbc: e884 000f stmia.w r4, {r0, r1, r2, r3}
  4527. mfrb->msg.buf_len = ff_dl;
  4528. 8001dc0: 68bb ldr r3, [r7, #8]
  4529. 8001dc2: 89ba ldrh r2, [r7, #12]
  4530. 8001dc4: 819a strh r2, [r3, #12]
  4531. /* reset buf pointer and store data that was recieved with the FF */
  4532. mfrb->msg.buf = mfrb->buf;
  4533. 8001dc6: 68ba ldr r2, [r7, #8]
  4534. 8001dc8: 68bb ldr r3, [r7, #8]
  4535. 8001dca: 3218 adds r2, #24
  4536. 8001dcc: 609a str r2, [r3, #8]
  4537. for(i = 0; i < msg->buf_len; i++)
  4538. 8001dce: 2300 movs r3, #0
  4539. 8001dd0: 73fb strb r3, [r7, #15]
  4540. 8001dd2: e00c b.n 8001dee <i15765_rx_ff+0x9e>
  4541. *mfrb->msg.buf++ = msg->buf[i];
  4542. 8001dd4: 687b ldr r3, [r7, #4]
  4543. 8001dd6: 685a ldr r2, [r3, #4]
  4544. 8001dd8: 7bfb ldrb r3, [r7, #15]
  4545. 8001dda: 18d1 adds r1, r2, r3
  4546. 8001ddc: 68ba ldr r2, [r7, #8]
  4547. 8001dde: 6893 ldr r3, [r2, #8]
  4548. 8001de0: 1c58 adds r0, r3, #1
  4549. 8001de2: 6090 str r0, [r2, #8]
  4550. 8001de4: 780a ldrb r2, [r1, #0]
  4551. 8001de6: 701a strb r2, [r3, #0]
  4552. for(i = 0; i < msg->buf_len; i++)
  4553. 8001de8: 7bfb ldrb r3, [r7, #15]
  4554. 8001dea: 3301 adds r3, #1
  4555. 8001dec: 73fb strb r3, [r7, #15]
  4556. 8001dee: 7bfb ldrb r3, [r7, #15]
  4557. 8001df0: b29a uxth r2, r3
  4558. 8001df2: 687b ldr r3, [r7, #4]
  4559. 8001df4: 891b ldrh r3, [r3, #8]
  4560. 8001df6: 429a cmp r2, r3
  4561. 8001df8: d3ec bcc.n 8001dd4 <i15765_rx_ff+0x84>
  4562. /* transmit a flow control frame (the status will be updated based on FS) */
  4563. mfrb->timeout = TIMEOUT_TX_R;
  4564. 8001dfa: 68bb ldr r3, [r7, #8]
  4565. 8001dfc: 4a06 ldr r2, [pc, #24] @ (8001e18 <i15765_rx_ff+0xc8>)
  4566. 8001dfe: 8812 ldrh r2, [r2, #0]
  4567. 8001e00: 82da strh r2, [r3, #22]
  4568. i15765_tx_fc(mfrb);
  4569. 8001e02: 68bb ldr r3, [r7, #8]
  4570. 8001e04: 4618 mov r0, r3
  4571. 8001e06: f7ff ff25 bl 8001c54 <i15765_tx_fc>
  4572. 8001e0a: e002 b.n 8001e12 <i15765_rx_ff+0xc2>
  4573. return;
  4574. 8001e0c: bf00 nop
  4575. 8001e0e: e000 b.n 8001e12 <i15765_rx_ff+0xc2>
  4576. return;
  4577. 8001e10: bf00 nop
  4578. }
  4579. 8001e12: 3714 adds r7, #20
  4580. 8001e14: 46bd mov sp, r7
  4581. 8001e16: bd90 pop {r4, r7, pc}
  4582. 8001e18: 08005dd2 .word 0x08005dd2
  4583. 08001e1c <i15765_rx_cf>:
  4584. /*
  4585. ** Handles a recieved consecutive frame
  4586. ** INPUT: msg - pointer to the received message
  4587. */
  4588. void i15765_rx_cf(i15765_t *msg)
  4589. {
  4590. 8001e1c: b580 push {r7, lr}
  4591. 8001e1e: b086 sub sp, #24
  4592. 8001e20: af00 add r7, sp, #0
  4593. 8001e22: 6078 str r0, [r7, #4]
  4594. uint8_t min;
  4595. uint16_t rem;
  4596. i15765_mfr_t *mfrb;
  4597. /* find the matching index */ //qiaoxu
  4598. if(i15765_mfrb_seek(msg, &mfrb))
  4599. 8001e24: f107 030c add.w r3, r7, #12
  4600. 8001e28: 4619 mov r1, r3
  4601. 8001e2a: 6878 ldr r0, [r7, #4]
  4602. 8001e2c: f7ff fd04 bl 8001838 <i15765_mfrb_seek>
  4603. 8001e30: 4603 mov r3, r0
  4604. 8001e32: 2b00 cmp r3, #0
  4605. 8001e34: d168 bne.n 8001f08 <i15765_rx_cf+0xec>
  4606. return;
  4607. /* if the CF frame is not expected, ignore it */
  4608. if(mfrb->state != STATE_WT_CF)
  4609. 8001e36: 68fb ldr r3, [r7, #12]
  4610. 8001e38: 7d1b ldrb r3, [r3, #20]
  4611. 8001e3a: 2b05 cmp r3, #5
  4612. 8001e3c: d166 bne.n 8001f0c <i15765_rx_cf+0xf0>
  4613. return;
  4614. /* increment the sequence number and compare */
  4615. if((++mfrb->sn & 0xf) == (msg->buf[0] & 0xf))
  4616. 8001e3e: 68fb ldr r3, [r7, #12]
  4617. 8001e40: 781a ldrb r2, [r3, #0]
  4618. 8001e42: 3201 adds r2, #1
  4619. 8001e44: b2d2 uxtb r2, r2
  4620. 8001e46: 701a strb r2, [r3, #0]
  4621. 8001e48: 781a ldrb r2, [r3, #0]
  4622. 8001e4a: 687b ldr r3, [r7, #4]
  4623. 8001e4c: 685b ldr r3, [r3, #4]
  4624. 8001e4e: 781b ldrb r3, [r3, #0]
  4625. 8001e50: 4053 eors r3, r2
  4626. 8001e52: b2db uxtb r3, r3
  4627. 8001e54: f003 030f and.w r3, r3, #15
  4628. 8001e58: 2b00 cmp r3, #0
  4629. 8001e5a: d151 bne.n 8001f00 <i15765_rx_cf+0xe4>
  4630. {
  4631. /* skip PCI field */
  4632. msg->buf++;
  4633. 8001e5c: 687b ldr r3, [r7, #4]
  4634. 8001e5e: 685b ldr r3, [r3, #4]
  4635. 8001e60: 1c5a adds r2, r3, #1
  4636. 8001e62: 687b ldr r3, [r7, #4]
  4637. 8001e64: 605a str r2, [r3, #4]
  4638. msg->buf_len--;
  4639. 8001e66: 687b ldr r3, [r7, #4]
  4640. 8001e68: 891b ldrh r3, [r3, #8]
  4641. 8001e6a: 3b01 subs r3, #1
  4642. 8001e6c: b29a uxth r2, r3
  4643. 8001e6e: 687b ldr r3, [r7, #4]
  4644. 8001e70: 811a strh r2, [r3, #8]
  4645. /* if we are at the end of the message, stop early */
  4646. rem = (mfrb->buf + mfrb->msg.buf_len) - mfrb->msg.buf;
  4647. 8001e72: 68fb ldr r3, [r7, #12]
  4648. 8001e74: 3318 adds r3, #24
  4649. 8001e76: 68fa ldr r2, [r7, #12]
  4650. 8001e78: 8992 ldrh r2, [r2, #12]
  4651. 8001e7a: 441a add r2, r3
  4652. 8001e7c: 68fb ldr r3, [r7, #12]
  4653. 8001e7e: 689b ldr r3, [r3, #8]
  4654. 8001e80: 1ad3 subs r3, r2, r3
  4655. 8001e82: 82bb strh r3, [r7, #20]
  4656. min = (uint8_t) MIN(msg->buf_len, rem);
  4657. 8001e84: 687b ldr r3, [r7, #4]
  4658. 8001e86: 891b ldrh r3, [r3, #8]
  4659. 8001e88: 8aba ldrh r2, [r7, #20]
  4660. 8001e8a: 429a cmp r2, r3
  4661. 8001e8c: d903 bls.n 8001e96 <i15765_rx_cf+0x7a>
  4662. 8001e8e: 687b ldr r3, [r7, #4]
  4663. 8001e90: 891b ldrh r3, [r3, #8]
  4664. 8001e92: b2db uxtb r3, r3
  4665. 8001e94: e001 b.n 8001e9a <i15765_rx_cf+0x7e>
  4666. 8001e96: 8abb ldrh r3, [r7, #20]
  4667. 8001e98: b2db uxtb r3, r3
  4668. 8001e9a: 74fb strb r3, [r7, #19]
  4669. /* add the data to the buffer */
  4670. for(i = 0; i < min; i++)
  4671. 8001e9c: 2300 movs r3, #0
  4672. 8001e9e: 75fb strb r3, [r7, #23]
  4673. 8001ea0: e00c b.n 8001ebc <i15765_rx_cf+0xa0>
  4674. *mfrb->msg.buf++ = msg->buf[i];
  4675. 8001ea2: 687b ldr r3, [r7, #4]
  4676. 8001ea4: 685a ldr r2, [r3, #4]
  4677. 8001ea6: 7dfb ldrb r3, [r7, #23]
  4678. 8001ea8: 18d1 adds r1, r2, r3
  4679. 8001eaa: 68fa ldr r2, [r7, #12]
  4680. 8001eac: 6893 ldr r3, [r2, #8]
  4681. 8001eae: 1c58 adds r0, r3, #1
  4682. 8001eb0: 6090 str r0, [r2, #8]
  4683. 8001eb2: 780a ldrb r2, [r1, #0]
  4684. 8001eb4: 701a strb r2, [r3, #0]
  4685. for(i = 0; i < min; i++)
  4686. 8001eb6: 7dfb ldrb r3, [r7, #23]
  4687. 8001eb8: 3301 adds r3, #1
  4688. 8001eba: 75fb strb r3, [r7, #23]
  4689. 8001ebc: 7dfa ldrb r2, [r7, #23]
  4690. 8001ebe: 7cfb ldrb r3, [r7, #19]
  4691. 8001ec0: 429a cmp r2, r3
  4692. 8001ec2: d3ee bcc.n 8001ea2 <i15765_rx_cf+0x86>
  4693. rem = (mfrb->buf + mfrb->msg.buf_len) - mfrb->msg.buf;
  4694. 8001ec4: 68fb ldr r3, [r7, #12]
  4695. 8001ec6: 3318 adds r3, #24
  4696. 8001ec8: 68fa ldr r2, [r7, #12]
  4697. 8001eca: 8992 ldrh r2, [r2, #12]
  4698. 8001ecc: 441a add r2, r3
  4699. 8001ece: 68fb ldr r3, [r7, #12]
  4700. 8001ed0: 689b ldr r3, [r3, #8]
  4701. 8001ed2: 1ad3 subs r3, r2, r3
  4702. 8001ed4: 82bb strh r3, [r7, #20]
  4703. /* if we stopped early, the reception is complete */
  4704. if(rem == 0)
  4705. 8001ed6: 8abb ldrh r3, [r7, #20]
  4706. 8001ed8: 2b00 cmp r3, #0
  4707. 8001eda: d10c bne.n 8001ef6 <i15765_rx_cf+0xda>
  4708. {
  4709. mfrb->msg.buf = mfrb->buf;
  4710. 8001edc: 68fa ldr r2, [r7, #12]
  4711. 8001ede: 68fb ldr r3, [r7, #12]
  4712. 8001ee0: 3218 adds r2, #24
  4713. 8001ee2: 609a str r2, [r3, #8]
  4714. i15765app_process(&mfrb->msg);
  4715. 8001ee4: 68fb ldr r3, [r7, #12]
  4716. 8001ee6: 3304 adds r3, #4
  4717. 8001ee8: 4618 mov r0, r3
  4718. 8001eea: f000 fa3b bl 8002364 <i15765app_process>
  4719. mfrb->state = STATE_IDLE;
  4720. 8001eee: 68fb ldr r3, [r7, #12]
  4721. 8001ef0: 2200 movs r2, #0
  4722. 8001ef2: 751a strb r2, [r3, #20]
  4723. 8001ef4: e00b b.n 8001f0e <i15765_rx_cf+0xf2>
  4724. }
  4725. else
  4726. {
  4727. mfrb->timeout = TIMEOUT_CF_R;
  4728. 8001ef6: 68fb ldr r3, [r7, #12]
  4729. 8001ef8: 4a06 ldr r2, [pc, #24] @ (8001f14 <i15765_rx_cf+0xf8>)
  4730. 8001efa: 8812 ldrh r2, [r2, #0]
  4731. 8001efc: 82da strh r2, [r3, #22]
  4732. 8001efe: e006 b.n 8001f0e <i15765_rx_cf+0xf2>
  4733. }
  4734. }
  4735. else
  4736. {
  4737. /* abort the reception */
  4738. mfrb->state = STATE_IDLE;
  4739. 8001f00: 68fb ldr r3, [r7, #12]
  4740. 8001f02: 2200 movs r2, #0
  4741. 8001f04: 751a strb r2, [r3, #20]
  4742. 8001f06: e002 b.n 8001f0e <i15765_rx_cf+0xf2>
  4743. return;
  4744. 8001f08: bf00 nop
  4745. 8001f0a: e000 b.n 8001f0e <i15765_rx_cf+0xf2>
  4746. return;
  4747. 8001f0c: bf00 nop
  4748. }
  4749. }
  4750. 8001f0e: 3718 adds r7, #24
  4751. 8001f10: 46bd mov sp, r7
  4752. 8001f12: bd80 pop {r7, pc}
  4753. 8001f14: 08005dd8 .word 0x08005dd8
  4754. 08001f18 <i15765_rx_fc>:
  4755. /*
  4756. ** Handle a recieved flow control frame
  4757. ** INPUT: msg - pointer to the received message
  4758. */
  4759. void i15765_rx_fc(i15765_t *msg)
  4760. {
  4761. 8001f18: b580 push {r7, lr}
  4762. 8001f1a: b084 sub sp, #16
  4763. 8001f1c: af00 add r7, sp, #0
  4764. 8001f1e: 6078 str r0, [r7, #4]
  4765. i15765_mft_t *mftb;
  4766. /* find matching multiframe transmit buffer */
  4767. if(i15765_mftb_seek(msg, &mftb))//qiaoxu
  4768. 8001f20: f107 030c add.w r3, r7, #12
  4769. 8001f24: 4619 mov r1, r3
  4770. 8001f26: 6878 ldr r0, [r7, #4]
  4771. 8001f28: f7ff fc58 bl 80017dc <i15765_mftb_seek>
  4772. 8001f2c: 4603 mov r3, r0
  4773. 8001f2e: 2b00 cmp r3, #0
  4774. 8001f30: d173 bne.n 800201a <i15765_rx_fc+0x102>
  4775. return;
  4776. /* if the FC frame is not expected, ignore it */
  4777. if(mftb->state != STATE_WT_FC)
  4778. 8001f32: 68fb ldr r3, [r7, #12]
  4779. 8001f34: 7e1b ldrb r3, [r3, #24]
  4780. 8001f36: 2b04 cmp r3, #4
  4781. 8001f38: d171 bne.n 800201e <i15765_rx_fc+0x106>
  4782. return;
  4783. //qiaoxu add
  4784. if(msg->buf_len<3)
  4785. 8001f3a: 687b ldr r3, [r7, #4]
  4786. 8001f3c: 891b ldrh r3, [r3, #8]
  4787. 8001f3e: 2b02 cmp r3, #2
  4788. 8001f40: d96f bls.n 8002022 <i15765_rx_fc+0x10a>
  4789. return;
  4790. }
  4791. //////////////////////////////////////////////////////////////
  4792. /* determine what type of FC this is and act appropriately */
  4793. switch(msg->buf[0] & 0xf)
  4794. 8001f42: 687b ldr r3, [r7, #4]
  4795. 8001f44: 685b ldr r3, [r3, #4]
  4796. 8001f46: 781b ldrb r3, [r3, #0]
  4797. 8001f48: f003 030f and.w r3, r3, #15
  4798. 8001f4c: 2b00 cmp r3, #0
  4799. 8001f4e: d002 beq.n 8001f56 <i15765_rx_fc+0x3e>
  4800. 8001f50: 2b01 cmp r3, #1
  4801. 8001f52: d048 beq.n 8001fe6 <i15765_rx_fc+0xce>
  4802. 8001f54: e056 b.n 8002004 <i15765_rx_fc+0xec>
  4803. {
  4804. /* continue to send */
  4805. case 0:
  4806. mftb->state = STATE_TX_CF;
  4807. 8001f56: 68fb ldr r3, [r7, #12]
  4808. 8001f58: 2203 movs r2, #3
  4809. 8001f5a: 761a strb r2, [r3, #24]
  4810. mftb->bs = msg->buf[1];
  4811. 8001f5c: 687b ldr r3, [r7, #4]
  4812. 8001f5e: 685a ldr r2, [r3, #4]
  4813. 8001f60: 68fb ldr r3, [r7, #12]
  4814. 8001f62: 7852 ldrb r2, [r2, #1]
  4815. 8001f64: 701a strb r2, [r3, #0]
  4816. mftb->bs_cnt = mftb->bs;
  4817. 8001f66: 68fa ldr r2, [r7, #12]
  4818. 8001f68: 68fb ldr r3, [r7, #12]
  4819. 8001f6a: 7812 ldrb r2, [r2, #0]
  4820. 8001f6c: 705a strb r2, [r3, #1]
  4821. if(msg->buf[2] <= 0x7f)
  4822. 8001f6e: 687b ldr r3, [r7, #4]
  4823. 8001f70: 685b ldr r3, [r3, #4]
  4824. 8001f72: 3302 adds r3, #2
  4825. 8001f74: 781b ldrb r3, [r3, #0]
  4826. 8001f76: b25b sxtb r3, r3
  4827. 8001f78: 2b00 cmp r3, #0
  4828. 8001f7a: db06 blt.n 8001f8a <i15765_rx_fc+0x72>
  4829. mftb->st = msg->buf[2];
  4830. 8001f7c: 687b ldr r3, [r7, #4]
  4831. 8001f7e: 685b ldr r3, [r3, #4]
  4832. 8001f80: 3302 adds r3, #2
  4833. 8001f82: 781a ldrb r2, [r3, #0]
  4834. 8001f84: 68fb ldr r3, [r7, #12]
  4835. 8001f86: 805a strh r2, [r3, #2]
  4836. 8001f88: e012 b.n 8001fb0 <i15765_rx_fc+0x98>
  4837. else if((msg->buf[2] >= 0xf1) && (msg->buf[2] <= 0xf9))
  4838. 8001f8a: 687b ldr r3, [r7, #4]
  4839. 8001f8c: 685b ldr r3, [r3, #4]
  4840. 8001f8e: 3302 adds r3, #2
  4841. 8001f90: 781b ldrb r3, [r3, #0]
  4842. 8001f92: 2bf0 cmp r3, #240 @ 0xf0
  4843. 8001f94: d909 bls.n 8001faa <i15765_rx_fc+0x92>
  4844. 8001f96: 687b ldr r3, [r7, #4]
  4845. 8001f98: 685b ldr r3, [r3, #4]
  4846. 8001f9a: 3302 adds r3, #2
  4847. 8001f9c: 781b ldrb r3, [r3, #0]
  4848. 8001f9e: 2bf9 cmp r3, #249 @ 0xf9
  4849. 8001fa0: d803 bhi.n 8001faa <i15765_rx_fc+0x92>
  4850. mftb->st = 0x01;
  4851. 8001fa2: 68fb ldr r3, [r7, #12]
  4852. 8001fa4: 2201 movs r2, #1
  4853. 8001fa6: 805a strh r2, [r3, #2]
  4854. 8001fa8: e002 b.n 8001fb0 <i15765_rx_fc+0x98>
  4855. else
  4856. mftb->st = 0x7f;
  4857. 8001faa: 68fb ldr r3, [r7, #12]
  4858. 8001fac: 227f movs r2, #127 @ 0x7f
  4859. 8001fae: 805a strh r2, [r3, #2]
  4860. /* convert to units of 100 microseconds (1ms) */
  4861. mftb->st *= ((uint16_t)1);
  4862. 8001fb0: 68fa ldr r2, [r7, #12]
  4863. 8001fb2: 68fb ldr r3, [r7, #12]
  4864. 8001fb4: 8852 ldrh r2, [r2, #2]
  4865. 8001fb6: 805a strh r2, [r3, #2]
  4866. /* convert to ticks */
  4867. mftb->st /= ((uint8_t)I15765CFG_TICK_PERIOD);
  4868. 8001fb8: 68fb ldr r3, [r7, #12]
  4869. 8001fba: 885b ldrh r3, [r3, #2]
  4870. 8001fbc: 461a mov r2, r3
  4871. 8001fbe: 4b1c ldr r3, [pc, #112] @ (8002030 <i15765_rx_fc+0x118>)
  4872. 8001fc0: 881b ldrh r3, [r3, #0]
  4873. 8001fc2: b2db uxtb r3, r3
  4874. 8001fc4: fb92 f2f3 sdiv r2, r2, r3
  4875. 8001fc8: 68fb ldr r3, [r7, #12]
  4876. 8001fca: b292 uxth r2, r2
  4877. 8001fcc: 805a strh r2, [r3, #2]
  4878. mftb->st_cnt = mftb->st;
  4879. 8001fce: 68fa ldr r2, [r7, #12]
  4880. 8001fd0: 68fb ldr r3, [r7, #12]
  4881. 8001fd2: 8852 ldrh r2, [r2, #2]
  4882. 8001fd4: 809a strh r2, [r3, #4]
  4883. mftb->timeout = TIMEOUT_CF_S;
  4884. 8001fd6: 68fb ldr r3, [r7, #12]
  4885. 8001fd8: 4a16 ldr r2, [pc, #88] @ (8002034 <i15765_rx_fc+0x11c>)
  4886. 8001fda: 8812 ldrh r2, [r2, #0]
  4887. 8001fdc: 841a strh r2, [r3, #32]
  4888. mftb->wt_cnt = 0;
  4889. 8001fde: 68fb ldr r3, [r7, #12]
  4890. 8001fe0: 2200 movs r2, #0
  4891. 8001fe2: 71da strb r2, [r3, #7]
  4892. break;
  4893. 8001fe4: e020 b.n 8002028 <i15765_rx_fc+0x110>
  4894. /* wait (NOTE - must be above "default" case) */
  4895. case 1:
  4896. mftb->state = STATE_WT_FC;
  4897. 8001fe6: 68fb ldr r3, [r7, #12]
  4898. 8001fe8: 2204 movs r2, #4
  4899. 8001fea: 761a strb r2, [r3, #24]
  4900. mftb->timeout = TIMEOUT_FC_S;
  4901. 8001fec: 68fb ldr r3, [r7, #12]
  4902. 8001fee: 4a12 ldr r2, [pc, #72] @ (8002038 <i15765_rx_fc+0x120>)
  4903. 8001ff0: 8812 ldrh r2, [r2, #0]
  4904. 8001ff2: 841a strh r2, [r3, #32]
  4905. /* if too many waits, bail */
  4906. if(++mftb->wt_cnt < 5)
  4907. 8001ff4: 68fb ldr r3, [r7, #12]
  4908. 8001ff6: 79da ldrb r2, [r3, #7]
  4909. 8001ff8: 3201 adds r2, #1
  4910. 8001ffa: b2d2 uxtb r2, r2
  4911. 8001ffc: 71da strb r2, [r3, #7]
  4912. 8001ffe: 79db ldrb r3, [r3, #7]
  4913. 8002000: 2b04 cmp r3, #4
  4914. 8002002: d910 bls.n 8002026 <i15765_rx_fc+0x10e>
  4915. break;
  4916. /* all others */
  4917. default:
  4918. mftb->state = STATE_IDLE;
  4919. 8002004: 68fb ldr r3, [r7, #12]
  4920. 8002006: 2200 movs r2, #0
  4921. 8002008: 761a strb r2, [r3, #24]
  4922. *mftb->status = I15765_FAILED;
  4923. 800200a: 68fb ldr r3, [r7, #12]
  4924. 800200c: 69db ldr r3, [r3, #28]
  4925. 800200e: 2202 movs r2, #2
  4926. 8002010: 701a strb r2, [r3, #0]
  4927. mftb->status = &i15765_tmp;
  4928. 8002012: 68fb ldr r3, [r7, #12]
  4929. 8002014: 4a09 ldr r2, [pc, #36] @ (800203c <i15765_rx_fc+0x124>)
  4930. 8002016: 61da str r2, [r3, #28]
  4931. break;
  4932. 8002018: e006 b.n 8002028 <i15765_rx_fc+0x110>
  4933. return;
  4934. 800201a: bf00 nop
  4935. 800201c: e004 b.n 8002028 <i15765_rx_fc+0x110>
  4936. return;
  4937. 800201e: bf00 nop
  4938. 8002020: e002 b.n 8002028 <i15765_rx_fc+0x110>
  4939. return;
  4940. 8002022: bf00 nop
  4941. 8002024: e000 b.n 8002028 <i15765_rx_fc+0x110>
  4942. break;
  4943. 8002026: bf00 nop
  4944. }
  4945. }
  4946. 8002028: 3710 adds r7, #16
  4947. 800202a: 46bd mov sp, r7
  4948. 800202c: bd80 pop {r7, pc}
  4949. 800202e: bf00 nop
  4950. 8002030: 08005dda .word 0x08005dda
  4951. 8002034: 08005dd6 .word 0x08005dd6
  4952. 8002038: 08005dd4 .word 0x08005dd4
  4953. 800203c: 20000e74 .word 0x20000e74
  4954. 08002040 <i15765_rx_post>:
  4955. /*
  4956. ** Translates the CAN frame into an i15765 message
  4957. ** INPUT: can - pointer to the received CAN frame
  4958. */
  4959. void i15765_rx_post(can_t *can)
  4960. {
  4961. 8002040: b580 push {r7, lr}
  4962. 8002042: b088 sub sp, #32
  4963. 8002044: af00 add r7, sp, #0
  4964. 8002046: 6078 str r0, [r7, #4]
  4965. i15765_t msg;
  4966. uint8_t pdu_type;
  4967. if(!(can->id & B31))
  4968. 8002048: 687b ldr r3, [r7, #4]
  4969. 800204a: 681b ldr r3, [r3, #0]
  4970. 800204c: 2b00 cmp r3, #0
  4971. 800204e: db22 blt.n 8002096 <i15765_rx_post+0x56>
  4972. {
  4973. msg.buf = &can->buf[0];
  4974. 8002050: 687b ldr r3, [r7, #4]
  4975. 8002052: 3304 adds r3, #4
  4976. 8002054: 613b str r3, [r7, #16]
  4977. msg.buf_len = can->buf_len;
  4978. 8002056: 687b ldr r3, [r7, #4]
  4979. 8002058: 7b1b ldrb r3, [r3, #12]
  4980. 800205a: 82bb strh r3, [r7, #20]
  4981. msg.pri = 0;
  4982. 800205c: 2300 movs r3, #0
  4983. 800205e: 73bb strb r3, [r7, #14]
  4984. if(can->id == 0x7DF)
  4985. 8002060: 687b ldr r3, [r7, #4]
  4986. 8002062: 681b ldr r3, [r3, #0]
  4987. 8002064: f240 72df movw r2, #2015 @ 0x7df
  4988. 8002068: 4293 cmp r3, r2
  4989. 800206a: d104 bne.n 8002076 <i15765_rx_post+0x36>
  4990. {
  4991. /* support incoming functional requests */
  4992. msg.tat = I15765_TAT_NF11;
  4993. 800206c: 2377 movs r3, #119 @ 0x77
  4994. 800206e: 73fb strb r3, [r7, #15]
  4995. //msg.sa = 0xf1;
  4996. msg.sa = I15765CFG_SA;
  4997. 8002070: 23f1 movs r3, #241 @ 0xf1
  4998. 8002072: 733b strb r3, [r7, #12]
  4999. 8002074: e00f b.n 8002096 <i15765_rx_post+0x56>
  5000. }
  5001. else if(can->id == UDS_RX_ID)//
  5002. 8002076: 687b ldr r3, [r7, #4]
  5003. 8002078: 681a ldr r2, [r3, #0]
  5004. 800207a: 4b24 ldr r3, [pc, #144] @ (800210c <i15765_rx_post+0xcc>)
  5005. 800207c: 681b ldr r3, [r3, #0]
  5006. 800207e: 429a cmp r2, r3
  5007. 8002080: d109 bne.n 8002096 <i15765_rx_post+0x56>
  5008. {
  5009. /* support incoming requests (0xf1 is external test equipment) */
  5010. msg.tat = I15765_TAT_NP11;
  5011. 8002082: 2376 movs r3, #118 @ 0x76
  5012. 8002084: 73fb strb r3, [r7, #15]
  5013. //msg.sa = 0xf1;
  5014. msg.sa = I15765CFG_SA; //
  5015. 8002086: 23f1 movs r3, #241 @ 0xf1
  5016. 8002088: 733b strb r3, [r7, #12]
  5017. msg.ta = (can->id - 0x7e0) + 1;
  5018. 800208a: 687b ldr r3, [r7, #4]
  5019. 800208c: 681b ldr r3, [r3, #0]
  5020. 800208e: b2db uxtb r3, r3
  5021. 8002090: 3321 adds r3, #33 @ 0x21
  5022. 8002092: b2db uxtb r3, r3
  5023. 8002094: 737b strb r3, [r7, #13]
  5024. }
  5025. }
  5026. /* SF, FF, CF, or FC? */
  5027. pdu_type = msg.buf[0] >> 4;
  5028. 8002096: 693b ldr r3, [r7, #16]
  5029. 8002098: 781b ldrb r3, [r3, #0]
  5030. 800209a: 091b lsrs r3, r3, #4
  5031. 800209c: 77fb strb r3, [r7, #31]
  5032. /* if this message is not for us or not functional, discard it */
  5033. if((ADDR_FUNC(msg.tat) && pdu_type != I15765_PDU_SF))
  5034. 800209e: 7bfb ldrb r3, [r7, #15]
  5035. 80020a0: 2b77 cmp r3, #119 @ 0x77
  5036. 80020a2: d002 beq.n 80020aa <i15765_rx_post+0x6a>
  5037. 80020a4: 7bfb ldrb r3, [r7, #15]
  5038. 80020a6: 2bdb cmp r3, #219 @ 0xdb
  5039. 80020a8: d102 bne.n 80020b0 <i15765_rx_post+0x70>
  5040. 80020aa: 7ffb ldrb r3, [r7, #31]
  5041. 80020ac: 2b00 cmp r3, #0
  5042. 80020ae: d129 bne.n 8002104 <i15765_rx_post+0xc4>
  5043. {
  5044. return;
  5045. }
  5046. if(pdu_type <= 3)
  5047. 80020b0: 7ffb ldrb r3, [r7, #31]
  5048. 80020b2: 2b03 cmp r3, #3
  5049. 80020b4: d827 bhi.n 8002106 <i15765_rx_post+0xc6>
  5050. {
  5051. switch(pdu_type)
  5052. 80020b6: 7ffb ldrb r3, [r7, #31]
  5053. 80020b8: 2b03 cmp r3, #3
  5054. 80020ba: d824 bhi.n 8002106 <i15765_rx_post+0xc6>
  5055. 80020bc: a201 add r2, pc, #4 @ (adr r2, 80020c4 <i15765_rx_post+0x84>)
  5056. 80020be: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  5057. 80020c2: bf00 nop
  5058. 80020c4: 080020d5 .word 0x080020d5
  5059. 80020c8: 080020e1 .word 0x080020e1
  5060. 80020cc: 080020ed .word 0x080020ed
  5061. 80020d0: 080020f9 .word 0x080020f9
  5062. {
  5063. case I15765_PDU_SF:
  5064. i15765_rx_sf(&msg);
  5065. 80020d4: f107 030c add.w r3, r7, #12
  5066. 80020d8: 4618 mov r0, r3
  5067. 80020da: f7ff fe15 bl 8001d08 <i15765_rx_sf>
  5068. break;
  5069. 80020de: e012 b.n 8002106 <i15765_rx_post+0xc6>
  5070. case I15765_PDU_FF:
  5071. i15765_rx_ff(&msg);
  5072. 80020e0: f107 030c add.w r3, r7, #12
  5073. 80020e4: 4618 mov r0, r3
  5074. 80020e6: f7ff fe33 bl 8001d50 <i15765_rx_ff>
  5075. break;
  5076. 80020ea: e00c b.n 8002106 <i15765_rx_post+0xc6>
  5077. case I15765_PDU_CF:
  5078. i15765_rx_cf(&msg);
  5079. 80020ec: f107 030c add.w r3, r7, #12
  5080. 80020f0: 4618 mov r0, r3
  5081. 80020f2: f7ff fe93 bl 8001e1c <i15765_rx_cf>
  5082. break;
  5083. 80020f6: e006 b.n 8002106 <i15765_rx_post+0xc6>
  5084. case I15765_PDU_FC:
  5085. i15765_rx_fc(&msg);
  5086. 80020f8: f107 030c add.w r3, r7, #12
  5087. 80020fc: 4618 mov r0, r3
  5088. 80020fe: f7ff ff0b bl 8001f18 <i15765_rx_fc>
  5089. break;
  5090. 8002102: e000 b.n 8002106 <i15765_rx_post+0xc6>
  5091. return;
  5092. 8002104: bf00 nop
  5093. }
  5094. }
  5095. }
  5096. 8002106: 3720 adds r7, #32
  5097. 8002108: 46bd mov sp, r7
  5098. 800210a: bd80 pop {r7, pc}
  5099. 800210c: 08005de4 .word 0x08005de4
  5100. 08002110 <i15765_tx_app>:
  5101. ** Requests a message to be transmitted, either single or multi-frame
  5102. ** INPUT: msg - the message to transmit
  5103. ** status - pointer to user RAM location for status feedback
  5104. */
  5105. void i15765_tx_app(i15765_t *msg, uint8_t *status)
  5106. {
  5107. 8002110: b580 push {r7, lr}
  5108. 8002112: b082 sub sp, #8
  5109. 8002114: af00 add r7, sp, #0
  5110. 8002116: 6078 str r0, [r7, #4]
  5111. 8002118: 6039 str r1, [r7, #0]
  5112. /* status always has to point somewhere */
  5113. if(status == 0)
  5114. 800211a: 683b ldr r3, [r7, #0]
  5115. 800211c: 2b00 cmp r3, #0
  5116. 800211e: d101 bne.n 8002124 <i15765_tx_app+0x14>
  5117. status = &i15765_tmp;
  5118. 8002120: 4b13 ldr r3, [pc, #76] @ (8002170 <i15765_tx_app+0x60>)
  5119. 8002122: 603b str r3, [r7, #0]
  5120. /* load in source address into out going message */
  5121. msg->sa = i15765_sa;
  5122. 8002124: 4b13 ldr r3, [pc, #76] @ (8002174 <i15765_tx_app+0x64>)
  5123. 8002126: 781a ldrb r2, [r3, #0]
  5124. 8002128: 687b ldr r3, [r7, #4]
  5125. 800212a: 701a strb r2, [r3, #0]
  5126. /* if its small enough to send in a SF, pack and transmit */
  5127. if(msg->buf_len <= 7)
  5128. 800212c: 687b ldr r3, [r7, #4]
  5129. 800212e: 891b ldrh r3, [r3, #8]
  5130. 8002130: 2b07 cmp r3, #7
  5131. 8002132: d80b bhi.n 800214c <i15765_tx_app+0x3c>
  5132. {
  5133. *status = (i15765_tx_sf(msg) == 0) ? I15765_SENT : I15765_FAILED;
  5134. 8002134: 6878 ldr r0, [r7, #4]
  5135. 8002136: f7ff fbef bl 8001918 <i15765_tx_sf>
  5136. 800213a: 4603 mov r3, r0
  5137. 800213c: 2b00 cmp r3, #0
  5138. 800213e: d101 bne.n 8002144 <i15765_tx_app+0x34>
  5139. 8002140: 2200 movs r2, #0
  5140. 8002142: e000 b.n 8002146 <i15765_tx_app+0x36>
  5141. 8002144: 2202 movs r2, #2
  5142. 8002146: 683b ldr r3, [r7, #0]
  5143. 8002148: 701a strb r2, [r3, #0]
  5144. {
  5145. /* too big or no available buffers */
  5146. *status = I15765_FAILED;
  5147. }
  5148. }
  5149. 800214a: e00c b.n 8002166 <i15765_tx_app+0x56>
  5150. else if(msg->buf_len <= I15765CFG_MF_TX_BUF_SIZE)
  5151. 800214c: 687b ldr r3, [r7, #4]
  5152. 800214e: 891b ldrh r3, [r3, #8]
  5153. 8002150: f5b3 6f80 cmp.w r3, #1024 @ 0x400
  5154. 8002154: d804 bhi.n 8002160 <i15765_tx_app+0x50>
  5155. i15765_tx_mf(msg, status);
  5156. 8002156: 6839 ldr r1, [r7, #0]
  5157. 8002158: 6878 ldr r0, [r7, #4]
  5158. 800215a: f7ff fd2d bl 8001bb8 <i15765_tx_mf>
  5159. }
  5160. 800215e: e002 b.n 8002166 <i15765_tx_app+0x56>
  5161. *status = I15765_FAILED;
  5162. 8002160: 683b ldr r3, [r7, #0]
  5163. 8002162: 2202 movs r2, #2
  5164. 8002164: 701a strb r2, [r3, #0]
  5165. }
  5166. 8002166: bf00 nop
  5167. 8002168: 3708 adds r7, #8
  5168. 800216a: 46bd mov sp, r7
  5169. 800216c: bd80 pop {r7, pc}
  5170. 800216e: bf00 nop
  5171. 8002170: 20000e74 .word 0x20000e74
  5172. 8002174: 20000008 .word 0x20000008
  5173. 08002178 <i15765_tx_update>:
  5174. /*
  5175. ** Cycle through our active messages and attempt to continue
  5176. ** transmitting. Also, check for timeouts as we go.
  5177. */
  5178. void i15765_tx_update(void)
  5179. {
  5180. 8002178: b580 push {r7, lr}
  5181. 800217a: b082 sub sp, #8
  5182. 800217c: af00 add r7, sp, #0
  5183. uint8_t i;
  5184. /* for each currently transmitting message, continue */
  5185. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  5186. 800217e: 2300 movs r3, #0
  5187. 8002180: 71fb strb r3, [r7, #7]
  5188. 8002182: e065 b.n 8002250 <i15765_tx_update+0xd8>
  5189. {
  5190. /* if we are waiting on a transmission to complete, try it again */
  5191. switch(i15765_mftb[i].state)
  5192. 8002184: 79fb ldrb r3, [r7, #7]
  5193. 8002186: 4a36 ldr r2, [pc, #216] @ (8002260 <i15765_tx_update+0xe8>)
  5194. 8002188: f240 4124 movw r1, #1060 @ 0x424
  5195. 800218c: fb01 f303 mul.w r3, r1, r3
  5196. 8002190: 4413 add r3, r2
  5197. 8002192: 3318 adds r3, #24
  5198. 8002194: 781b ldrb r3, [r3, #0]
  5199. 8002196: 2b01 cmp r3, #1
  5200. 8002198: d002 beq.n 80021a0 <i15765_tx_update+0x28>
  5201. 800219a: 2b03 cmp r3, #3
  5202. 800219c: d00b beq.n 80021b6 <i15765_tx_update+0x3e>
  5203. 800219e: e015 b.n 80021cc <i15765_tx_update+0x54>
  5204. {
  5205. case STATE_TX_FF:
  5206. i15765_tx_ff(&i15765_mftb[i]);
  5207. 80021a0: 79fb ldrb r3, [r7, #7]
  5208. 80021a2: f240 4224 movw r2, #1060 @ 0x424
  5209. 80021a6: fb02 f303 mul.w r3, r2, r3
  5210. 80021aa: 4a2d ldr r2, [pc, #180] @ (8002260 <i15765_tx_update+0xe8>)
  5211. 80021ac: 4413 add r3, r2
  5212. 80021ae: 4618 mov r0, r3
  5213. 80021b0: f7ff fbfc bl 80019ac <i15765_tx_ff>
  5214. break;
  5215. 80021b4: e00a b.n 80021cc <i15765_tx_update+0x54>
  5216. case STATE_TX_CF:
  5217. i15765_tx_cf(&i15765_mftb[i]);
  5218. 80021b6: 79fb ldrb r3, [r7, #7]
  5219. 80021b8: f240 4224 movw r2, #1060 @ 0x424
  5220. 80021bc: fb02 f303 mul.w r3, r2, r3
  5221. 80021c0: 4a27 ldr r2, [pc, #156] @ (8002260 <i15765_tx_update+0xe8>)
  5222. 80021c2: 4413 add r3, r2
  5223. 80021c4: 4618 mov r0, r3
  5224. 80021c6: f7ff fc4d bl 8001a64 <i15765_tx_cf>
  5225. break;
  5226. 80021ca: bf00 nop
  5227. }
  5228. /* update timeout */
  5229. if(i15765_mftb[i].timeout)
  5230. 80021cc: 79fb ldrb r3, [r7, #7]
  5231. 80021ce: 4a24 ldr r2, [pc, #144] @ (8002260 <i15765_tx_update+0xe8>)
  5232. 80021d0: f240 4124 movw r1, #1060 @ 0x424
  5233. 80021d4: fb01 f303 mul.w r3, r1, r3
  5234. 80021d8: 4413 add r3, r2
  5235. 80021da: 3320 adds r3, #32
  5236. 80021dc: 881b ldrh r3, [r3, #0]
  5237. 80021de: 2b00 cmp r3, #0
  5238. 80021e0: d014 beq.n 800220c <i15765_tx_update+0x94>
  5239. {
  5240. i15765_mftb[i].timeout--;
  5241. 80021e2: 79fb ldrb r3, [r7, #7]
  5242. 80021e4: 491e ldr r1, [pc, #120] @ (8002260 <i15765_tx_update+0xe8>)
  5243. 80021e6: f240 4224 movw r2, #1060 @ 0x424
  5244. 80021ea: fb03 f202 mul.w r2, r3, r2
  5245. 80021ee: 440a add r2, r1
  5246. 80021f0: 3220 adds r2, #32
  5247. 80021f2: 8812 ldrh r2, [r2, #0]
  5248. 80021f4: 3a01 subs r2, #1
  5249. 80021f6: b290 uxth r0, r2
  5250. 80021f8: 4a19 ldr r2, [pc, #100] @ (8002260 <i15765_tx_update+0xe8>)
  5251. 80021fa: f240 4124 movw r1, #1060 @ 0x424
  5252. 80021fe: fb01 f303 mul.w r3, r1, r3
  5253. 8002202: 4413 add r3, r2
  5254. 8002204: 3320 adds r3, #32
  5255. 8002206: 4602 mov r2, r0
  5256. 8002208: 801a strh r2, [r3, #0]
  5257. 800220a: e01e b.n 800224a <i15765_tx_update+0xd2>
  5258. }
  5259. else
  5260. {
  5261. i15765_mftb[i].state = STATE_IDLE;
  5262. 800220c: 79fb ldrb r3, [r7, #7]
  5263. 800220e: 4a14 ldr r2, [pc, #80] @ (8002260 <i15765_tx_update+0xe8>)
  5264. 8002210: f240 4124 movw r1, #1060 @ 0x424
  5265. 8002214: fb01 f303 mul.w r3, r1, r3
  5266. 8002218: 4413 add r3, r2
  5267. 800221a: 3318 adds r3, #24
  5268. 800221c: 2200 movs r2, #0
  5269. 800221e: 701a strb r2, [r3, #0]
  5270. *i15765_mftb[i].status = I15765_FAILED;
  5271. 8002220: 79fb ldrb r3, [r7, #7]
  5272. 8002222: 4a0f ldr r2, [pc, #60] @ (8002260 <i15765_tx_update+0xe8>)
  5273. 8002224: f240 4124 movw r1, #1060 @ 0x424
  5274. 8002228: fb01 f303 mul.w r3, r1, r3
  5275. 800222c: 4413 add r3, r2
  5276. 800222e: 331c adds r3, #28
  5277. 8002230: 681b ldr r3, [r3, #0]
  5278. 8002232: 2202 movs r2, #2
  5279. 8002234: 701a strb r2, [r3, #0]
  5280. i15765_mftb[i].status = &i15765_tmp;
  5281. 8002236: 79fb ldrb r3, [r7, #7]
  5282. 8002238: 4a09 ldr r2, [pc, #36] @ (8002260 <i15765_tx_update+0xe8>)
  5283. 800223a: f240 4124 movw r1, #1060 @ 0x424
  5284. 800223e: fb01 f303 mul.w r3, r1, r3
  5285. 8002242: 4413 add r3, r2
  5286. 8002244: 331c adds r3, #28
  5287. 8002246: 4a07 ldr r2, [pc, #28] @ (8002264 <i15765_tx_update+0xec>)
  5288. 8002248: 601a str r2, [r3, #0]
  5289. for(i = 0; i < I15765CFG_MF_TX_BUF_NUM; i++)
  5290. 800224a: 79fb ldrb r3, [r7, #7]
  5291. 800224c: 3301 adds r3, #1
  5292. 800224e: 71fb strb r3, [r7, #7]
  5293. 8002250: 79fb ldrb r3, [r7, #7]
  5294. 8002252: 2b00 cmp r3, #0
  5295. 8002254: d096 beq.n 8002184 <i15765_tx_update+0xc>
  5296. // i15765_mftb[i].status = 0;
  5297. }
  5298. }
  5299. }
  5300. 8002256: bf00 nop
  5301. 8002258: bf00 nop
  5302. 800225a: 3708 adds r7, #8
  5303. 800225c: 46bd mov sp, r7
  5304. 800225e: bd80 pop {r7, pc}
  5305. 8002260: 20000a50 .word 0x20000a50
  5306. 8002264: 20000e74 .word 0x20000e74
  5307. 08002268 <i15765_rx_update>:
  5308. /*
  5309. ** Cycle through our active messages and attempt to continue
  5310. ** reception checking for timeouts as we go.
  5311. */
  5312. void i15765_rx_update(void)
  5313. {
  5314. 8002268: b580 push {r7, lr}
  5315. 800226a: b086 sub sp, #24
  5316. 800226c: af00 add r7, sp, #0
  5317. can_t can;
  5318. uint8_t i;
  5319. /* read all the CAN frames and pass them up */
  5320. while(can_rx(0, &can) == 0)
  5321. 800226e: e003 b.n 8002278 <i15765_rx_update+0x10>
  5322. i15765_rx_post(&can);
  5323. 8002270: 1d3b adds r3, r7, #4
  5324. 8002272: 4618 mov r0, r3
  5325. 8002274: f7ff fee4 bl 8002040 <i15765_rx_post>
  5326. while(can_rx(0, &can) == 0)
  5327. 8002278: 1d3b adds r3, r7, #4
  5328. 800227a: 4619 mov r1, r3
  5329. 800227c: 2000 movs r0, #0
  5330. 800227e: f7ff f915 bl 80014ac <can_rx>
  5331. 8002282: 4603 mov r3, r0
  5332. 8002284: 2b00 cmp r3, #0
  5333. 8002286: d0f3 beq.n 8002270 <i15765_rx_update+0x8>
  5334. /* for each active message, check for expiration and cancel if needed */
  5335. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  5336. 8002288: 2300 movs r3, #0
  5337. 800228a: 75fb strb r3, [r7, #23]
  5338. 800228c: e04c b.n 8002328 <i15765_rx_update+0xc0>
  5339. {
  5340. /* if we are waiting to send an FC frame, try it again */
  5341. if((i15765_mfrb[i].state == STATE_TX_CTS)
  5342. 800228e: 7dfb ldrb r3, [r7, #23]
  5343. 8002290: 4a29 ldr r2, [pc, #164] @ (8002338 <i15765_rx_update+0xd0>)
  5344. 8002292: f640 0118 movw r1, #2072 @ 0x818
  5345. 8002296: fb01 f303 mul.w r3, r1, r3
  5346. 800229a: 4413 add r3, r2
  5347. 800229c: 3314 adds r3, #20
  5348. 800229e: 781b ldrb r3, [r3, #0]
  5349. 80022a0: 2b06 cmp r3, #6
  5350. 80022a2: d00a beq.n 80022ba <i15765_rx_update+0x52>
  5351. || (i15765_mfrb[i].state == STATE_TX_OVFLW))
  5352. 80022a4: 7dfb ldrb r3, [r7, #23]
  5353. 80022a6: 4a24 ldr r2, [pc, #144] @ (8002338 <i15765_rx_update+0xd0>)
  5354. 80022a8: f640 0118 movw r1, #2072 @ 0x818
  5355. 80022ac: fb01 f303 mul.w r3, r1, r3
  5356. 80022b0: 4413 add r3, r2
  5357. 80022b2: 3314 adds r3, #20
  5358. 80022b4: 781b ldrb r3, [r3, #0]
  5359. 80022b6: 2b07 cmp r3, #7
  5360. 80022b8: d109 bne.n 80022ce <i15765_rx_update+0x66>
  5361. i15765_tx_fc(&i15765_mfrb[i]);
  5362. 80022ba: 7dfb ldrb r3, [r7, #23]
  5363. 80022bc: f640 0218 movw r2, #2072 @ 0x818
  5364. 80022c0: fb02 f303 mul.w r3, r2, r3
  5365. 80022c4: 4a1c ldr r2, [pc, #112] @ (8002338 <i15765_rx_update+0xd0>)
  5366. 80022c6: 4413 add r3, r2
  5367. 80022c8: 4618 mov r0, r3
  5368. 80022ca: f7ff fcc3 bl 8001c54 <i15765_tx_fc>
  5369. /* update timeout */
  5370. if(i15765_mfrb[i].timeout)
  5371. 80022ce: 7dfb ldrb r3, [r7, #23]
  5372. 80022d0: 4a19 ldr r2, [pc, #100] @ (8002338 <i15765_rx_update+0xd0>)
  5373. 80022d2: f640 0118 movw r1, #2072 @ 0x818
  5374. 80022d6: fb01 f303 mul.w r3, r1, r3
  5375. 80022da: 4413 add r3, r2
  5376. 80022dc: 3316 adds r3, #22
  5377. 80022de: 881b ldrh r3, [r3, #0]
  5378. 80022e0: 2b00 cmp r3, #0
  5379. 80022e2: d014 beq.n 800230e <i15765_rx_update+0xa6>
  5380. i15765_mfrb[i].timeout--;
  5381. 80022e4: 7dfb ldrb r3, [r7, #23]
  5382. 80022e6: 4914 ldr r1, [pc, #80] @ (8002338 <i15765_rx_update+0xd0>)
  5383. 80022e8: f640 0218 movw r2, #2072 @ 0x818
  5384. 80022ec: fb03 f202 mul.w r2, r3, r2
  5385. 80022f0: 440a add r2, r1
  5386. 80022f2: 3216 adds r2, #22
  5387. 80022f4: 8812 ldrh r2, [r2, #0]
  5388. 80022f6: 3a01 subs r2, #1
  5389. 80022f8: b290 uxth r0, r2
  5390. 80022fa: 4a0f ldr r2, [pc, #60] @ (8002338 <i15765_rx_update+0xd0>)
  5391. 80022fc: f640 0118 movw r1, #2072 @ 0x818
  5392. 8002300: fb01 f303 mul.w r3, r1, r3
  5393. 8002304: 4413 add r3, r2
  5394. 8002306: 3316 adds r3, #22
  5395. 8002308: 4602 mov r2, r0
  5396. 800230a: 801a strh r2, [r3, #0]
  5397. 800230c: e009 b.n 8002322 <i15765_rx_update+0xba>
  5398. else
  5399. i15765_mfrb[i].state = STATE_IDLE;
  5400. 800230e: 7dfb ldrb r3, [r7, #23]
  5401. 8002310: 4a09 ldr r2, [pc, #36] @ (8002338 <i15765_rx_update+0xd0>)
  5402. 8002312: f640 0118 movw r1, #2072 @ 0x818
  5403. 8002316: fb01 f303 mul.w r3, r1, r3
  5404. 800231a: 4413 add r3, r2
  5405. 800231c: 3314 adds r3, #20
  5406. 800231e: 2200 movs r2, #0
  5407. 8002320: 701a strb r2, [r3, #0]
  5408. for(i = 0; i < I15765CFG_MF_RX_BUF_NUM; i++)
  5409. 8002322: 7dfb ldrb r3, [r7, #23]
  5410. 8002324: 3301 adds r3, #1
  5411. 8002326: 75fb strb r3, [r7, #23]
  5412. 8002328: 7dfb ldrb r3, [r7, #23]
  5413. 800232a: 2b00 cmp r3, #0
  5414. 800232c: d0af beq.n 800228e <i15765_rx_update+0x26>
  5415. }
  5416. }
  5417. 800232e: bf00 nop
  5418. 8002330: bf00 nop
  5419. 8002332: 3718 adds r7, #24
  5420. 8002334: 46bd mov sp, r7
  5421. 8002336: bd80 pop {r7, pc}
  5422. 8002338: 20000238 .word 0x20000238
  5423. 0800233c <i15765_update>:
  5424. /*
  5425. ** This function is the time base for the entire i15765 module.
  5426. */
  5427. void i15765_update(void)
  5428. {
  5429. 800233c: b580 push {r7, lr}
  5430. 800233e: af00 add r7, sp, #0
  5431. i15765_rx_update();
  5432. 8002340: f7ff ff92 bl 8002268 <i15765_rx_update>
  5433. i15765_tx_update();
  5434. 8002344: f7ff ff18 bl 8002178 <i15765_tx_update>
  5435. }
  5436. 8002348: bf00 nop
  5437. 800234a: bd80 pop {r7, pc}
  5438. 0800234c <i15765app_init>:
  5439. /*
  5440. ** Initialization routine.
  5441. */
  5442. void i15765app_init(void)
  5443. {
  5444. 800234c: b480 push {r7}
  5445. 800234e: af00 add r7, sp, #0
  5446. DiagnosticSessionType = 0x02;
  5447. 8002350: 4b03 ldr r3, [pc, #12] @ (8002360 <i15765app_init+0x14>)
  5448. 8002352: 2202 movs r2, #2
  5449. 8002354: 701a strb r2, [r3, #0]
  5450. }
  5451. 8002356: bf00 nop
  5452. 8002358: 46bd mov sp, r7
  5453. 800235a: f85d 7b04 ldr.w r7, [sp], #4
  5454. 800235e: 4770 bx lr
  5455. 8002360: 20000009 .word 0x20000009
  5456. 08002364 <i15765app_process>:
  5457. uint8_t SID_34_flag = 0;
  5458. uint8_t SID_36_flag = 0;
  5459. uint8_t SID_37_flag = 0;
  5460. void i15765app_process(i15765_t *msg)
  5461. {
  5462. 8002364: b580 push {r7, lr}
  5463. 8002366: b082 sub sp, #8
  5464. 8002368: af00 add r7, sp, #0
  5465. 800236a: 6078 str r0, [r7, #4]
  5466. msg_new.buf_len = msg->buf_len;
  5467. 800236c: 687b ldr r3, [r7, #4]
  5468. 800236e: 891a ldrh r2, [r3, #8]
  5469. 8002370: 4b47 ldr r3, [pc, #284] @ (8002490 <i15765app_process+0x12c>)
  5470. 8002372: 811a strh r2, [r3, #8]
  5471. msg_new.ID = msg->ID;
  5472. 8002374: 687b ldr r3, [r7, #4]
  5473. 8002376: 68db ldr r3, [r3, #12]
  5474. 8002378: 4a45 ldr r2, [pc, #276] @ (8002490 <i15765app_process+0x12c>)
  5475. 800237a: 60d3 str r3, [r2, #12]
  5476. // 深拷贝缓冲区
  5477. memcpy(msg_new_buf, msg->buf, msg->buf_len);
  5478. 800237c: 687b ldr r3, [r7, #4]
  5479. 800237e: 6859 ldr r1, [r3, #4]
  5480. 8002380: 687b ldr r3, [r7, #4]
  5481. 8002382: 891b ldrh r3, [r3, #8]
  5482. 8002384: 461a mov r2, r3
  5483. 8002386: 4843 ldr r0, [pc, #268] @ (8002494 <i15765app_process+0x130>)
  5484. 8002388: f003 fb00 bl 800598c <memcpy>
  5485. msg_new.buf = msg_new_buf; // 指向我们的缓冲区
  5486. 800238c: 4b40 ldr r3, [pc, #256] @ (8002490 <i15765app_process+0x12c>)
  5487. 800238e: 4a41 ldr r2, [pc, #260] @ (8002494 <i15765app_process+0x130>)
  5488. 8002390: 605a str r2, [r3, #4]
  5489. switch (msg->buf[0])
  5490. 8002392: 687b ldr r3, [r7, #4]
  5491. 8002394: 685b ldr r3, [r3, #4]
  5492. 8002396: 781b ldrb r3, [r3, #0]
  5493. 8002398: 3b11 subs r3, #17
  5494. 800239a: 2b26 cmp r3, #38 @ 0x26
  5495. 800239c: d868 bhi.n 8002470 <i15765app_process+0x10c>
  5496. 800239e: a201 add r2, pc, #4 @ (adr r2, 80023a4 <i15765app_process+0x40>)
  5497. 80023a0: f852 f023 ldr.w pc, [r2, r3, lsl #2]
  5498. 80023a4: 08002441 .word 0x08002441
  5499. 80023a8: 08002471 .word 0x08002471
  5500. 80023ac: 08002471 .word 0x08002471
  5501. 80023b0: 08002471 .word 0x08002471
  5502. 80023b4: 08002471 .word 0x08002471
  5503. 80023b8: 08002471 .word 0x08002471
  5504. 80023bc: 08002471 .word 0x08002471
  5505. 80023c0: 08002471 .word 0x08002471
  5506. 80023c4: 08002471 .word 0x08002471
  5507. 80023c8: 08002471 .word 0x08002471
  5508. 80023cc: 08002471 .word 0x08002471
  5509. 80023d0: 08002471 .word 0x08002471
  5510. 80023d4: 08002471 .word 0x08002471
  5511. 80023d8: 08002471 .word 0x08002471
  5512. 80023dc: 08002471 .word 0x08002471
  5513. 80023e0: 08002471 .word 0x08002471
  5514. 80023e4: 08002471 .word 0x08002471
  5515. 80023e8: 08002471 .word 0x08002471
  5516. 80023ec: 08002471 .word 0x08002471
  5517. 80023f0: 08002471 .word 0x08002471
  5518. 80023f4: 08002471 .word 0x08002471
  5519. 80023f8: 08002471 .word 0x08002471
  5520. 80023fc: 08002471 .word 0x08002471
  5521. 8002400: 08002471 .word 0x08002471
  5522. 8002404: 08002471 .word 0x08002471
  5523. 8002408: 08002471 .word 0x08002471
  5524. 800240c: 08002471 .word 0x08002471
  5525. 8002410: 08002471 .word 0x08002471
  5526. 8002414: 08002471 .word 0x08002471
  5527. 8002418: 08002449 .word 0x08002449
  5528. 800241c: 08002471 .word 0x08002471
  5529. 8002420: 08002471 .word 0x08002471
  5530. 8002424: 08002451 .word 0x08002451
  5531. 8002428: 08002471 .word 0x08002471
  5532. 800242c: 08002471 .word 0x08002471
  5533. 8002430: 08002459 .word 0x08002459
  5534. 8002434: 08002471 .word 0x08002471
  5535. 8002438: 08002461 .word 0x08002461
  5536. 800243c: 08002469 .word 0x08002469
  5537. {
  5538. case 0x11:
  5539. {
  5540. SID_11_flag = 1;
  5541. 8002440: 4b15 ldr r3, [pc, #84] @ (8002498 <i15765app_process+0x134>)
  5542. 8002442: 2201 movs r2, #1
  5543. 8002444: 701a strb r2, [r3, #0]
  5544. // SID_11_function(msg);
  5545. break;
  5546. 8002446: e01f b.n 8002488 <i15765app_process+0x124>
  5547. }
  5548. case 0x2E:
  5549. {
  5550. SID_2E_flag = 1;
  5551. 8002448: 4b14 ldr r3, [pc, #80] @ (800249c <i15765app_process+0x138>)
  5552. 800244a: 2201 movs r2, #1
  5553. 800244c: 701a strb r2, [r3, #0]
  5554. // SID_2E_function(msg);
  5555. break;
  5556. 800244e: e01b b.n 8002488 <i15765app_process+0x124>
  5557. }
  5558. case 0x31:
  5559. {
  5560. SID_31_flag = 1;
  5561. 8002450: 4b13 ldr r3, [pc, #76] @ (80024a0 <i15765app_process+0x13c>)
  5562. 8002452: 2201 movs r2, #1
  5563. 8002454: 701a strb r2, [r3, #0]
  5564. // SID_31_function(msg);
  5565. break;
  5566. 8002456: e017 b.n 8002488 <i15765app_process+0x124>
  5567. }
  5568. case 0x34:
  5569. {
  5570. SID_34_flag = 1;
  5571. 8002458: 4b12 ldr r3, [pc, #72] @ (80024a4 <i15765app_process+0x140>)
  5572. 800245a: 2201 movs r2, #1
  5573. 800245c: 701a strb r2, [r3, #0]
  5574. // SID_34_function(msg);
  5575. break;
  5576. 800245e: e013 b.n 8002488 <i15765app_process+0x124>
  5577. }
  5578. case 0x36:
  5579. {
  5580. SID_36_flag = 1;
  5581. 8002460: 4b11 ldr r3, [pc, #68] @ (80024a8 <i15765app_process+0x144>)
  5582. 8002462: 2201 movs r2, #1
  5583. 8002464: 701a strb r2, [r3, #0]
  5584. // SID_36_function(msg);
  5585. break;
  5586. 8002466: e00f b.n 8002488 <i15765app_process+0x124>
  5587. }
  5588. case 0x37:
  5589. {
  5590. SID_37_flag = 1;
  5591. 8002468: 4b10 ldr r3, [pc, #64] @ (80024ac <i15765app_process+0x148>)
  5592. 800246a: 2201 movs r2, #1
  5593. 800246c: 701a strb r2, [r3, #0]
  5594. // SID_37_function(msg);
  5595. break;
  5596. 800246e: e00b b.n 8002488 <i15765app_process+0x124>
  5597. }
  5598. default:
  5599. {
  5600. if (msg->tat == I15765_TAT_NP11)
  5601. 8002470: 687b ldr r3, [r7, #4]
  5602. 8002472: 78db ldrb r3, [r3, #3]
  5603. 8002474: 2b76 cmp r3, #118 @ 0x76
  5604. 8002476: d107 bne.n 8002488 <i15765app_process+0x124>
  5605. {
  5606. NegativeResponse(msg->buf[0], 0x11);
  5607. 8002478: 687b ldr r3, [r7, #4]
  5608. 800247a: 685b ldr r3, [r3, #4]
  5609. 800247c: 781b ldrb r3, [r3, #0]
  5610. 800247e: 2111 movs r1, #17
  5611. 8002480: 4618 mov r0, r3
  5612. 8002482: f000 f857 bl 8002534 <NegativeResponse>
  5613. break;
  5614. 8002486: bf00 nop
  5615. }
  5616. }
  5617. }
  5618. }
  5619. 8002488: bf00 nop
  5620. 800248a: 3708 adds r7, #8
  5621. 800248c: 46bd mov sp, r7
  5622. 800248e: bd80 pop {r7, pc}
  5623. 8002490: 20000e78 .word 0x20000e78
  5624. 8002494: 20000e88 .word 0x20000e88
  5625. 8002498: 20001e88 .word 0x20001e88
  5626. 800249c: 20001e89 .word 0x20001e89
  5627. 80024a0: 20001e8a .word 0x20001e8a
  5628. 80024a4: 20001e8b .word 0x20001e8b
  5629. 80024a8: 20001e8c .word 0x20001e8c
  5630. 80024ac: 20001e8d .word 0x20001e8d
  5631. 080024b0 <check_SID_run>:
  5632. void check_SID_run(void)
  5633. {
  5634. 80024b0: b580 push {r7, lr}
  5635. 80024b2: af00 add r7, sp, #0
  5636. if(SID_11_flag == 1)
  5637. 80024b4: 4b19 ldr r3, [pc, #100] @ (800251c <check_SID_run+0x6c>)
  5638. 80024b6: 781b ldrb r3, [r3, #0]
  5639. 80024b8: 2b01 cmp r3, #1
  5640. 80024ba: d105 bne.n 80024c8 <check_SID_run+0x18>
  5641. {
  5642. SID_11_flag = 0;
  5643. 80024bc: 4b17 ldr r3, [pc, #92] @ (800251c <check_SID_run+0x6c>)
  5644. 80024be: 2200 movs r2, #0
  5645. 80024c0: 701a strb r2, [r3, #0]
  5646. SID_11_function(&msg_new);
  5647. 80024c2: 4817 ldr r0, [pc, #92] @ (8002520 <check_SID_run+0x70>)
  5648. 80024c4: f000 f85a bl 800257c <SID_11_function>
  5649. }
  5650. if(SID_31_flag == 1)
  5651. 80024c8: 4b16 ldr r3, [pc, #88] @ (8002524 <check_SID_run+0x74>)
  5652. 80024ca: 781b ldrb r3, [r3, #0]
  5653. 80024cc: 2b01 cmp r3, #1
  5654. 80024ce: d105 bne.n 80024dc <check_SID_run+0x2c>
  5655. {
  5656. SID_31_flag = 0;
  5657. 80024d0: 4b14 ldr r3, [pc, #80] @ (8002524 <check_SID_run+0x74>)
  5658. 80024d2: 2200 movs r2, #0
  5659. 80024d4: 701a strb r2, [r3, #0]
  5660. SID_31_function(&msg_new);
  5661. 80024d6: 4812 ldr r0, [pc, #72] @ (8002520 <check_SID_run+0x70>)
  5662. 80024d8: f000 f8de bl 8002698 <SID_31_function>
  5663. }
  5664. if(SID_34_flag == 1)
  5665. 80024dc: 4b12 ldr r3, [pc, #72] @ (8002528 <check_SID_run+0x78>)
  5666. 80024de: 781b ldrb r3, [r3, #0]
  5667. 80024e0: 2b01 cmp r3, #1
  5668. 80024e2: d105 bne.n 80024f0 <check_SID_run+0x40>
  5669. {
  5670. SID_34_flag = 0;
  5671. 80024e4: 4b10 ldr r3, [pc, #64] @ (8002528 <check_SID_run+0x78>)
  5672. 80024e6: 2200 movs r2, #0
  5673. 80024e8: 701a strb r2, [r3, #0]
  5674. SID_34_function(&msg_new);
  5675. 80024ea: 480d ldr r0, [pc, #52] @ (8002520 <check_SID_run+0x70>)
  5676. 80024ec: f000 fb0a bl 8002b04 <SID_34_function>
  5677. }
  5678. if(SID_36_flag == 1)
  5679. 80024f0: 4b0e ldr r3, [pc, #56] @ (800252c <check_SID_run+0x7c>)
  5680. 80024f2: 781b ldrb r3, [r3, #0]
  5681. 80024f4: 2b01 cmp r3, #1
  5682. 80024f6: d105 bne.n 8002504 <check_SID_run+0x54>
  5683. {
  5684. SID_36_flag = 0;
  5685. 80024f8: 4b0c ldr r3, [pc, #48] @ (800252c <check_SID_run+0x7c>)
  5686. 80024fa: 2200 movs r2, #0
  5687. 80024fc: 701a strb r2, [r3, #0]
  5688. SID_36_function(&msg_new);
  5689. 80024fe: 4808 ldr r0, [pc, #32] @ (8002520 <check_SID_run+0x70>)
  5690. 8002500: f000 fbde bl 8002cc0 <SID_36_function>
  5691. }
  5692. if(SID_37_flag == 1)
  5693. 8002504: 4b0a ldr r3, [pc, #40] @ (8002530 <check_SID_run+0x80>)
  5694. 8002506: 781b ldrb r3, [r3, #0]
  5695. 8002508: 2b01 cmp r3, #1
  5696. 800250a: d105 bne.n 8002518 <check_SID_run+0x68>
  5697. {
  5698. SID_37_flag = 0;
  5699. 800250c: 4b08 ldr r3, [pc, #32] @ (8002530 <check_SID_run+0x80>)
  5700. 800250e: 2200 movs r2, #0
  5701. 8002510: 701a strb r2, [r3, #0]
  5702. SID_37_function(&msg_new);
  5703. 8002512: 4803 ldr r0, [pc, #12] @ (8002520 <check_SID_run+0x70>)
  5704. 8002514: f000 fd36 bl 8002f84 <SID_37_function>
  5705. }
  5706. }
  5707. 8002518: bf00 nop
  5708. 800251a: bd80 pop {r7, pc}
  5709. 800251c: 20001e88 .word 0x20001e88
  5710. 8002520: 20000e78 .word 0x20000e78
  5711. 8002524: 20001e8a .word 0x20001e8a
  5712. 8002528: 20001e8b .word 0x20001e8b
  5713. 800252c: 20001e8c .word 0x20001e8c
  5714. 8002530: 20001e8d .word 0x20001e8d
  5715. 08002534 <NegativeResponse>:
  5716. extern uint8_t ota_start_flag;
  5717. uint8_t app2_crc_flag = 0;//crc校验成功标志位,成功后应答版本号位新的。
  5718. void NegativeResponse(uint8_t sid,uint8_t NegativeResponseCode)
  5719. {
  5720. 8002534: b580 push {r7, lr}
  5721. 8002536: b08a sub sp, #40 @ 0x28
  5722. 8002538: af00 add r7, sp, #0
  5723. 800253a: 4603 mov r3, r0
  5724. 800253c: 460a mov r2, r1
  5725. 800253e: 71fb strb r3, [r7, #7]
  5726. 8002540: 4613 mov r3, r2
  5727. 8002542: 71bb strb r3, [r7, #6]
  5728. i15765_t msg_req;
  5729. uint8_t buf[8];
  5730. uint8_t status_rq;
  5731. msg_req.ID = UDS_TX_ID;
  5732. 8002544: 4b0c ldr r3, [pc, #48] @ (8002578 <NegativeResponse+0x44>)
  5733. 8002546: 681b ldr r3, [r3, #0]
  5734. 8002548: 627b str r3, [r7, #36] @ 0x24
  5735. msg_req.buf = buf;
  5736. 800254a: f107 0310 add.w r3, r7, #16
  5737. 800254e: 61fb str r3, [r7, #28]
  5738. buf[0] = 0x7F;//NegativeResponseServiceIdentifier
  5739. 8002550: 237f movs r3, #127 @ 0x7f
  5740. 8002552: 743b strb r3, [r7, #16]
  5741. buf[1] = sid;
  5742. 8002554: 79fb ldrb r3, [r7, #7]
  5743. 8002556: 747b strb r3, [r7, #17]
  5744. buf[2] = NegativeResponseCode;
  5745. 8002558: 79bb ldrb r3, [r7, #6]
  5746. 800255a: 74bb strb r3, [r7, #18]
  5747. msg_req.buf_len = 3;
  5748. 800255c: 2303 movs r3, #3
  5749. 800255e: 843b strh r3, [r7, #32]
  5750. /* transmit message */
  5751. i15765_tx_app(&msg_req, &status_rq);
  5752. 8002560: f107 020f add.w r2, r7, #15
  5753. 8002564: f107 0318 add.w r3, r7, #24
  5754. 8002568: 4611 mov r1, r2
  5755. 800256a: 4618 mov r0, r3
  5756. 800256c: f7ff fdd0 bl 8002110 <i15765_tx_app>
  5757. }
  5758. 8002570: bf00 nop
  5759. 8002572: 3728 adds r7, #40 @ 0x28
  5760. 8002574: 46bd mov sp, r7
  5761. 8002576: bd80 pop {r7, pc}
  5762. 8002578: 08005de8 .word 0x08005de8
  5763. 0800257c <SID_11_function>:
  5764. void SID_11_function(i15765_t *msg)
  5765. {
  5766. 800257c: b580 push {r7, lr}
  5767. 800257e: b08a sub sp, #40 @ 0x28
  5768. 8002580: af00 add r7, sp, #0
  5769. 8002582: 6078 str r0, [r7, #4]
  5770. i15765_t msg_req;
  5771. uint8_t buf[8];
  5772. uint8_t status_rq;
  5773. uint8_t PositiveResponseEnable = 0;
  5774. 8002584: 2300 movs r3, #0
  5775. 8002586: f887 3027 strb.w r3, [r7, #39] @ 0x27
  5776. uint8_t SuppressPosRspMsgIndicationBit;
  5777. uint8_t ResetType;
  5778. /* basic stuff */
  5779. msg_req.buf = buf;
  5780. 800258a: f107 030c add.w r3, r7, #12
  5781. 800258e: 61bb str r3, [r7, #24]
  5782. msg_req.pri = 6;
  5783. 8002590: 2306 movs r3, #6
  5784. 8002592: 75bb strb r3, [r7, #22]
  5785. msg_req.ta = 0x0C;
  5786. 8002594: 230c movs r3, #12
  5787. 8002596: 757b strb r3, [r7, #21]
  5788. if(msg->tat == I15765_TAT_NF11)
  5789. 8002598: 687b ldr r3, [r7, #4]
  5790. 800259a: 78db ldrb r3, [r3, #3]
  5791. 800259c: 2b77 cmp r3, #119 @ 0x77
  5792. 800259e: d102 bne.n 80025a6 <SID_11_function+0x2a>
  5793. {
  5794. msg_req.tat = I15765_TAT_NF11;
  5795. 80025a0: 2377 movs r3, #119 @ 0x77
  5796. 80025a2: 75fb strb r3, [r7, #23]
  5797. 80025a4: e001 b.n 80025aa <SID_11_function+0x2e>
  5798. }
  5799. else
  5800. {
  5801. msg_req.tat = I15765_TAT_NP11;
  5802. 80025a6: 2376 movs r3, #118 @ 0x76
  5803. 80025a8: 75fb strb r3, [r7, #23]
  5804. NegativeResponse(msg->buf[0],0x7F);
  5805. return;
  5806. }
  5807. #endif
  5808. if(DiagnosticSessionType==0x01)
  5809. 80025aa: 4b3a ldr r3, [pc, #232] @ (8002694 <SID_11_function+0x118>)
  5810. 80025ac: 781b ldrb r3, [r3, #0]
  5811. 80025ae: 2b01 cmp r3, #1
  5812. 80025b0: d107 bne.n 80025c2 <SID_11_function+0x46>
  5813. {
  5814. NegativeResponse(msg->buf[0],0x7F);
  5815. 80025b2: 687b ldr r3, [r7, #4]
  5816. 80025b4: 685b ldr r3, [r3, #4]
  5817. 80025b6: 781b ldrb r3, [r3, #0]
  5818. 80025b8: 217f movs r1, #127 @ 0x7f
  5819. 80025ba: 4618 mov r0, r3
  5820. 80025bc: f7ff ffba bl 8002534 <NegativeResponse>
  5821. return;
  5822. 80025c0: e065 b.n 800268e <SID_11_function+0x112>
  5823. }
  5824. if(msg->buf_len!=2)
  5825. 80025c2: 687b ldr r3, [r7, #4]
  5826. 80025c4: 891b ldrh r3, [r3, #8]
  5827. 80025c6: 2b02 cmp r3, #2
  5828. 80025c8: d007 beq.n 80025da <SID_11_function+0x5e>
  5829. {
  5830. NegativeResponse(msg->buf[0],0x13);
  5831. 80025ca: 687b ldr r3, [r7, #4]
  5832. 80025cc: 685b ldr r3, [r3, #4]
  5833. 80025ce: 781b ldrb r3, [r3, #0]
  5834. 80025d0: 2113 movs r1, #19
  5835. 80025d2: 4618 mov r0, r3
  5836. 80025d4: f7ff ffae bl 8002534 <NegativeResponse>
  5837. return;
  5838. 80025d8: e059 b.n 800268e <SID_11_function+0x112>
  5839. }
  5840. SuppressPosRspMsgIndicationBit = msg->buf[1]&0x80;
  5841. 80025da: 687b ldr r3, [r7, #4]
  5842. 80025dc: 685b ldr r3, [r3, #4]
  5843. 80025de: 3301 adds r3, #1
  5844. 80025e0: 781b ldrb r3, [r3, #0]
  5845. 80025e2: f023 037f bic.w r3, r3, #127 @ 0x7f
  5846. 80025e6: f887 3026 strb.w r3, [r7, #38] @ 0x26
  5847. ResetType = msg->buf[1]&0x7F;
  5848. 80025ea: 687b ldr r3, [r7, #4]
  5849. 80025ec: 685b ldr r3, [r3, #4]
  5850. 80025ee: 3301 adds r3, #1
  5851. 80025f0: 781b ldrb r3, [r3, #0]
  5852. 80025f2: f003 037f and.w r3, r3, #127 @ 0x7f
  5853. 80025f6: f887 3025 strb.w r3, [r7, #37] @ 0x25
  5854. switch(ResetType)
  5855. 80025fa: f897 3025 ldrb.w r3, [r7, #37] @ 0x25
  5856. 80025fe: 2b01 cmp r3, #1
  5857. 8002600: d002 beq.n 8002608 <SID_11_function+0x8c>
  5858. 8002602: 2b03 cmp r3, #3
  5859. 8002604: d01c beq.n 8002640 <SID_11_function+0xc4>
  5860. 8002606: e037 b.n 8002678 <SID_11_function+0xfc>
  5861. {
  5862. case 0x01:
  5863. {
  5864. if(1)
  5865. {
  5866. PositiveResponseEnable = 1;
  5867. 8002608: 2301 movs r3, #1
  5868. 800260a: f887 3027 strb.w r3, [r7, #39] @ 0x27
  5869. buf[0] = msg->buf[0]+0x40;// PositiveResponseServiceIdentifier
  5870. 800260e: 687b ldr r3, [r7, #4]
  5871. 8002610: 685b ldr r3, [r3, #4]
  5872. 8002612: 781b ldrb r3, [r3, #0]
  5873. 8002614: 3340 adds r3, #64 @ 0x40
  5874. 8002616: b2db uxtb r3, r3
  5875. 8002618: 733b strb r3, [r7, #12]
  5876. buf[1] = msg->buf[1];// Sub-Function=ResetType
  5877. 800261a: 687b ldr r3, [r7, #4]
  5878. 800261c: 685b ldr r3, [r3, #4]
  5879. 800261e: 785b ldrb r3, [r3, #1]
  5880. 8002620: 737b strb r3, [r7, #13]
  5881. msg_req.buf_len = 2;
  5882. 8002622: 2302 movs r3, #2
  5883. 8002624: 83bb strh r3, [r7, #28]
  5884. if(SuppressPosRspMsgIndicationBit != 0x80)
  5885. 8002626: f897 3026 ldrb.w r3, [r7, #38] @ 0x26
  5886. 800262a: 2b80 cmp r3, #128 @ 0x80
  5887. 800262c: d02c beq.n 8002688 <SID_11_function+0x10c>
  5888. {
  5889. i15765_tx_app(&msg_req, &status_rq);
  5890. 800262e: f107 020b add.w r2, r7, #11
  5891. 8002632: f107 0314 add.w r3, r7, #20
  5892. 8002636: 4611 mov r1, r2
  5893. 8002638: 4618 mov r0, r3
  5894. 800263a: f7ff fd69 bl 8002110 <i15765_tx_app>
  5895. PositiveResponseEnable = 0;
  5896. NegativeResponse(msg->buf[0],0x22);
  5897. return;
  5898. }
  5899. break;
  5900. 800263e: e023 b.n 8002688 <SID_11_function+0x10c>
  5901. case 0x03:
  5902. {
  5903. if(1)
  5904. {
  5905. PositiveResponseEnable = 1;
  5906. 8002640: 2301 movs r3, #1
  5907. 8002642: f887 3027 strb.w r3, [r7, #39] @ 0x27
  5908. buf[0] = msg->buf[0]+0x40;// PositiveResponseServiceIdentifier
  5909. 8002646: 687b ldr r3, [r7, #4]
  5910. 8002648: 685b ldr r3, [r3, #4]
  5911. 800264a: 781b ldrb r3, [r3, #0]
  5912. 800264c: 3340 adds r3, #64 @ 0x40
  5913. 800264e: b2db uxtb r3, r3
  5914. 8002650: 733b strb r3, [r7, #12]
  5915. buf[1] = msg->buf[1];// Sub-Function=ResetType
  5916. 8002652: 687b ldr r3, [r7, #4]
  5917. 8002654: 685b ldr r3, [r3, #4]
  5918. 8002656: 785b ldrb r3, [r3, #1]
  5919. 8002658: 737b strb r3, [r7, #13]
  5920. msg_req.buf_len = 2;
  5921. 800265a: 2302 movs r3, #2
  5922. 800265c: 83bb strh r3, [r7, #28]
  5923. if(SuppressPosRspMsgIndicationBit != 0x80)
  5924. 800265e: f897 3026 ldrb.w r3, [r7, #38] @ 0x26
  5925. 8002662: 2b80 cmp r3, #128 @ 0x80
  5926. 8002664: d012 beq.n 800268c <SID_11_function+0x110>
  5927. {
  5928. i15765_tx_app(&msg_req, &status_rq);
  5929. 8002666: f107 020b add.w r2, r7, #11
  5930. 800266a: f107 0314 add.w r3, r7, #20
  5931. 800266e: 4611 mov r1, r2
  5932. 8002670: 4618 mov r0, r3
  5933. 8002672: f7ff fd4d bl 8002110 <i15765_tx_app>
  5934. PositiveResponseEnable = 0;
  5935. NegativeResponse(msg->buf[0],0x22);
  5936. return;
  5937. }
  5938. break;
  5939. 8002676: e009 b.n 800268c <SID_11_function+0x110>
  5940. }
  5941. default:
  5942. {
  5943. NegativeResponse(msg->buf[0],0x12);
  5944. 8002678: 687b ldr r3, [r7, #4]
  5945. 800267a: 685b ldr r3, [r3, #4]
  5946. 800267c: 781b ldrb r3, [r3, #0]
  5947. 800267e: 2112 movs r1, #18
  5948. 8002680: 4618 mov r0, r3
  5949. 8002682: f7ff ff57 bl 8002534 <NegativeResponse>
  5950. return;
  5951. 8002686: e002 b.n 800268e <SID_11_function+0x112>
  5952. break;
  5953. 8002688: bf00 nop
  5954. 800268a: e000 b.n 800268e <SID_11_function+0x112>
  5955. break;
  5956. 800268c: bf00 nop
  5957. if(ResetType == 0x03)//SoftReset
  5958. {
  5959. //JumpReset();
  5960. }
  5961. }
  5962. }
  5963. 800268e: 3728 adds r7, #40 @ 0x28
  5964. 8002690: 46bd mov sp, r7
  5965. 8002692: bd80 pop {r7, pc}
  5966. 8002694: 20000009 .word 0x20000009
  5967. 08002698 <SID_31_function>:
  5968. i15765_tx_app(&msg_req, &status_rq);
  5969. }
  5970. }
  5971. void SID_31_function(i15765_t *msg)
  5972. {
  5973. 8002698: b580 push {r7, lr}
  5974. 800269a: b090 sub sp, #64 @ 0x40
  5975. 800269c: af00 add r7, sp, #0
  5976. 800269e: 6078 str r0, [r7, #4]
  5977. i15765_t msg_req = {0};
  5978. 80026a0: f107 0320 add.w r3, r7, #32
  5979. 80026a4: 2200 movs r2, #0
  5980. 80026a6: 601a str r2, [r3, #0]
  5981. 80026a8: 605a str r2, [r3, #4]
  5982. 80026aa: 609a str r2, [r3, #8]
  5983. 80026ac: 60da str r2, [r3, #12]
  5984. uint8_t response_buf[20] = {0};
  5985. 80026ae: f107 030c add.w r3, r7, #12
  5986. 80026b2: 2200 movs r2, #0
  5987. 80026b4: 601a str r2, [r3, #0]
  5988. 80026b6: 605a str r2, [r3, #4]
  5989. 80026b8: 609a str r2, [r3, #8]
  5990. 80026ba: 60da str r2, [r3, #12]
  5991. 80026bc: 611a str r2, [r3, #16]
  5992. uint8_t status_rq = 0;
  5993. 80026be: 2300 movs r3, #0
  5994. 80026c0: 72fb strb r3, [r7, #11]
  5995. uint8_t PositiveResponseEnable = 0;
  5996. 80026c2: 2300 movs r3, #0
  5997. 80026c4: f887 303f strb.w r3, [r7, #63] @ 0x3f
  5998. int oReturnCheck;//
  5999. uint8_t result_code = 0x00;
  6000. 80026c8: 2300 movs r3, #0
  6001. 80026ca: f887 303e strb.w r3, [r7, #62] @ 0x3e
  6002. // 初始化请求消息
  6003. msg_req.pri = 6;
  6004. 80026ce: 2306 movs r3, #6
  6005. 80026d0: f887 3022 strb.w r3, [r7, #34] @ 0x22
  6006. msg_req.ta = 0x0C;
  6007. 80026d4: 230c movs r3, #12
  6008. 80026d6: f887 3021 strb.w r3, [r7, #33] @ 0x21
  6009. msg_req.buf = response_buf;
  6010. 80026da: f107 030c add.w r3, r7, #12
  6011. 80026de: 627b str r3, [r7, #36] @ 0x24
  6012. if(msg->tat == I15765_TAT_NF11)
  6013. 80026e0: 687b ldr r3, [r7, #4]
  6014. 80026e2: 78db ldrb r3, [r3, #3]
  6015. 80026e4: 2b77 cmp r3, #119 @ 0x77
  6016. 80026e6: d103 bne.n 80026f0 <SID_31_function+0x58>
  6017. {
  6018. msg_req.tat = I15765_TAT_NF11;
  6019. 80026e8: 2377 movs r3, #119 @ 0x77
  6020. 80026ea: f887 3023 strb.w r3, [r7, #35] @ 0x23
  6021. 80026ee: e002 b.n 80026f6 <SID_31_function+0x5e>
  6022. }
  6023. else
  6024. {
  6025. msg_req.tat = I15765_TAT_NP11;
  6026. 80026f0: 2376 movs r3, #118 @ 0x76
  6027. 80026f2: f887 3023 strb.w r3, [r7, #35] @ 0x23
  6028. }
  6029. // 参数检查
  6030. if (msg == NULL || msg->buf == NULL || msg->buf_len < 4)
  6031. 80026f6: 687b ldr r3, [r7, #4]
  6032. 80026f8: 2b00 cmp r3, #0
  6033. 80026fa: d007 beq.n 800270c <SID_31_function+0x74>
  6034. 80026fc: 687b ldr r3, [r7, #4]
  6035. 80026fe: 685b ldr r3, [r3, #4]
  6036. 8002700: 2b00 cmp r3, #0
  6037. 8002702: d003 beq.n 800270c <SID_31_function+0x74>
  6038. 8002704: 687b ldr r3, [r7, #4]
  6039. 8002706: 891b ldrh r3, [r3, #8]
  6040. 8002708: 2b03 cmp r3, #3
  6041. 800270a: d804 bhi.n 8002716 <SID_31_function+0x7e>
  6042. {
  6043. NegativeResponse(0x31, 0x13); // 参数长度错误
  6044. 800270c: 2113 movs r1, #19
  6045. 800270e: 2031 movs r0, #49 @ 0x31
  6046. 8002710: f7ff ff10 bl 8002534 <NegativeResponse>
  6047. return;
  6048. 8002714: e1f2 b.n 8002afc <SID_31_function+0x464>
  6049. }
  6050. // 检查RoutineControl类型
  6051. uint8_t RoutineControlType = msg->buf[1] & 0x7F;
  6052. 8002716: 687b ldr r3, [r7, #4]
  6053. 8002718: 685b ldr r3, [r3, #4]
  6054. 800271a: 3301 adds r3, #1
  6055. 800271c: 781b ldrb r3, [r3, #0]
  6056. 800271e: f003 037f and.w r3, r3, #127 @ 0x7f
  6057. 8002722: f887 3037 strb.w r3, [r7, #55] @ 0x37
  6058. if (RoutineControlType != 0x01) // 只支持StartRoutine
  6059. 8002726: f897 3037 ldrb.w r3, [r7, #55] @ 0x37
  6060. 800272a: 2b01 cmp r3, #1
  6061. 800272c: d007 beq.n 800273e <SID_31_function+0xa6>
  6062. {
  6063. NegativeResponse(msg->buf[0], 0x12); // 不支持的服务类型
  6064. 800272e: 687b ldr r3, [r7, #4]
  6065. 8002730: 685b ldr r3, [r3, #4]
  6066. 8002732: 781b ldrb r3, [r3, #0]
  6067. 8002734: 2112 movs r1, #18
  6068. 8002736: 4618 mov r0, r3
  6069. 8002738: f7ff fefc bl 8002534 <NegativeResponse>
  6070. return;
  6071. 800273c: e1de b.n 8002afc <SID_31_function+0x464>
  6072. }
  6073. uint16_t RoutineIdentifier = (uint16_t)msg->buf[2] << 8 | msg->buf[3];
  6074. 800273e: 687b ldr r3, [r7, #4]
  6075. 8002740: 685b ldr r3, [r3, #4]
  6076. 8002742: 3302 adds r3, #2
  6077. 8002744: 781b ldrb r3, [r3, #0]
  6078. 8002746: b21b sxth r3, r3
  6079. 8002748: 021b lsls r3, r3, #8
  6080. 800274a: b21a sxth r2, r3
  6081. 800274c: 687b ldr r3, [r7, #4]
  6082. 800274e: 685b ldr r3, [r3, #4]
  6083. 8002750: 3303 adds r3, #3
  6084. 8002752: 781b ldrb r3, [r3, #0]
  6085. 8002754: b21b sxth r3, r3
  6086. 8002756: 4313 orrs r3, r2
  6087. 8002758: b21b sxth r3, r3
  6088. 800275a: 86bb strh r3, [r7, #52] @ 0x34
  6089. // 处理不同的RoutineIdentifier
  6090. switch (RoutineIdentifier)
  6091. 800275c: 8ebb ldrh r3, [r7, #52] @ 0x34
  6092. 800275e: f5b3 4f7f cmp.w r3, #65280 @ 0xff00
  6093. 8002762: d03c beq.n 80027de <SID_31_function+0x146>
  6094. 8002764: f5b3 4f7f cmp.w r3, #65280 @ 0xff00
  6095. 8002768: f300 819d bgt.w 8002aa6 <SID_31_function+0x40e>
  6096. 800276c: f640 620f movw r2, #3599 @ 0xe0f
  6097. 8002770: 4293 cmp r3, r2
  6098. 8002772: f000 8108 beq.w 8002986 <SID_31_function+0x2ee>
  6099. 8002776: f5b3 6f61 cmp.w r3, #3600 @ 0xe10
  6100. 800277a: f280 8194 bge.w 8002aa6 <SID_31_function+0x40e>
  6101. 800277e: f640 620e movw r2, #3598 @ 0xe0e
  6102. 8002782: 4293 cmp r3, r2
  6103. 8002784: f000 80d1 beq.w 800292a <SID_31_function+0x292>
  6104. 8002788: f640 620e movw r2, #3598 @ 0xe0e
  6105. 800278c: 4293 cmp r3, r2
  6106. 800278e: f300 818a bgt.w 8002aa6 <SID_31_function+0x40e>
  6107. 8002792: f240 2202 movw r2, #514 @ 0x202
  6108. 8002796: 4293 cmp r3, r2
  6109. 8002798: f000 8088 beq.w 80028ac <SID_31_function+0x214>
  6110. 800279c: f240 2203 movw r2, #515 @ 0x203
  6111. 80027a0: 4293 cmp r3, r2
  6112. 80027a2: f040 8180 bne.w 8002aa6 <SID_31_function+0x40e>
  6113. {
  6114. case 0x0203: // 请求升级
  6115. if (msg->buf_len != 4)
  6116. 80027a6: 687b ldr r3, [r7, #4]
  6117. 80027a8: 891b ldrh r3, [r3, #8]
  6118. 80027aa: 2b04 cmp r3, #4
  6119. 80027ac: d007 beq.n 80027be <SID_31_function+0x126>
  6120. {
  6121. NegativeResponse(msg->buf[0], 0x13);
  6122. 80027ae: 687b ldr r3, [r7, #4]
  6123. 80027b0: 685b ldr r3, [r3, #4]
  6124. 80027b2: 781b ldrb r3, [r3, #0]
  6125. 80027b4: 2113 movs r1, #19
  6126. 80027b6: 4618 mov r0, r3
  6127. 80027b8: f7ff febc bl 8002534 <NegativeResponse>
  6128. return;
  6129. 80027bc: e19e b.n 8002afc <SID_31_function+0x464>
  6130. }
  6131. ota_start_flag = 1;
  6132. 80027be: 4ba2 ldr r3, [pc, #648] @ (8002a48 <SID_31_function+0x3b0>)
  6133. 80027c0: 2201 movs r2, #1
  6134. 80027c2: 701a strb r2, [r3, #0]
  6135. result_code = 0x00;
  6136. 80027c4: 2300 movs r3, #0
  6137. 80027c6: f887 303e strb.w r3, [r7, #62] @ 0x3e
  6138. load_sequence_state = 0x00;
  6139. 80027ca: 4ba0 ldr r3, [pc, #640] @ (8002a4c <SID_31_function+0x3b4>)
  6140. 80027cc: 2200 movs r2, #0
  6141. 80027ce: 701a strb r2, [r3, #0]
  6142. app2_crc_flag = 0;
  6143. 80027d0: 4b9f ldr r3, [pc, #636] @ (8002a50 <SID_31_function+0x3b8>)
  6144. 80027d2: 2200 movs r2, #0
  6145. 80027d4: 701a strb r2, [r3, #0]
  6146. PositiveResponseEnable = 1;
  6147. 80027d6: 2301 movs r3, #1
  6148. 80027d8: f887 303f strb.w r3, [r7, #63] @ 0x3f
  6149. break;
  6150. 80027dc: e16b b.n 8002ab6 <SID_31_function+0x41e>
  6151. case 0xFF00: // 擦除Flash
  6152. if (msg->buf_len != 13)
  6153. 80027de: 687b ldr r3, [r7, #4]
  6154. 80027e0: 891b ldrh r3, [r3, #8]
  6155. 80027e2: 2b0d cmp r3, #13
  6156. 80027e4: d007 beq.n 80027f6 <SID_31_function+0x15e>
  6157. {
  6158. NegativeResponse(msg->buf[0], 0x13);
  6159. 80027e6: 687b ldr r3, [r7, #4]
  6160. 80027e8: 685b ldr r3, [r3, #4]
  6161. 80027ea: 781b ldrb r3, [r3, #0]
  6162. 80027ec: 2113 movs r1, #19
  6163. 80027ee: 4618 mov r0, r3
  6164. 80027f0: f7ff fea0 bl 8002534 <NegativeResponse>
  6165. return;
  6166. 80027f4: e182 b.n 8002afc <SID_31_function+0x464>
  6167. }
  6168. // 提取擦除地址和大小
  6169. earse_MemoryAddress = (uint32_t)((msg->buf[5] << 24) | (msg->buf[6] << 16) | (msg->buf[7] << 8) | msg->buf[8]);
  6170. 80027f6: 687b ldr r3, [r7, #4]
  6171. 80027f8: 685b ldr r3, [r3, #4]
  6172. 80027fa: 3305 adds r3, #5
  6173. 80027fc: 781b ldrb r3, [r3, #0]
  6174. 80027fe: 061a lsls r2, r3, #24
  6175. 8002800: 687b ldr r3, [r7, #4]
  6176. 8002802: 685b ldr r3, [r3, #4]
  6177. 8002804: 3306 adds r3, #6
  6178. 8002806: 781b ldrb r3, [r3, #0]
  6179. 8002808: 041b lsls r3, r3, #16
  6180. 800280a: 431a orrs r2, r3
  6181. 800280c: 687b ldr r3, [r7, #4]
  6182. 800280e: 685b ldr r3, [r3, #4]
  6183. 8002810: 3307 adds r3, #7
  6184. 8002812: 781b ldrb r3, [r3, #0]
  6185. 8002814: 021b lsls r3, r3, #8
  6186. 8002816: 4313 orrs r3, r2
  6187. 8002818: 687a ldr r2, [r7, #4]
  6188. 800281a: 6852 ldr r2, [r2, #4]
  6189. 800281c: 3208 adds r2, #8
  6190. 800281e: 7812 ldrb r2, [r2, #0]
  6191. 8002820: 4313 orrs r3, r2
  6192. 8002822: 461a mov r2, r3
  6193. 8002824: 4b8b ldr r3, [pc, #556] @ (8002a54 <SID_31_function+0x3bc>)
  6194. 8002826: 601a str r2, [r3, #0]
  6195. earse_MemorySize = (uint32_t)((msg->buf[9] << 24) | (msg->buf[10] << 16) | (msg->buf[11] << 8) | msg->buf[12]);
  6196. 8002828: 687b ldr r3, [r7, #4]
  6197. 800282a: 685b ldr r3, [r3, #4]
  6198. 800282c: 3309 adds r3, #9
  6199. 800282e: 781b ldrb r3, [r3, #0]
  6200. 8002830: 061a lsls r2, r3, #24
  6201. 8002832: 687b ldr r3, [r7, #4]
  6202. 8002834: 685b ldr r3, [r3, #4]
  6203. 8002836: 330a adds r3, #10
  6204. 8002838: 781b ldrb r3, [r3, #0]
  6205. 800283a: 041b lsls r3, r3, #16
  6206. 800283c: 431a orrs r2, r3
  6207. 800283e: 687b ldr r3, [r7, #4]
  6208. 8002840: 685b ldr r3, [r3, #4]
  6209. 8002842: 330b adds r3, #11
  6210. 8002844: 781b ldrb r3, [r3, #0]
  6211. 8002846: 021b lsls r3, r3, #8
  6212. 8002848: 4313 orrs r3, r2
  6213. 800284a: 687a ldr r2, [r7, #4]
  6214. 800284c: 6852 ldr r2, [r2, #4]
  6215. 800284e: 320c adds r2, #12
  6216. 8002850: 7812 ldrb r2, [r2, #0]
  6217. 8002852: 4313 orrs r3, r2
  6218. 8002854: 461a mov r2, r3
  6219. 8002856: 4b80 ldr r3, [pc, #512] @ (8002a58 <SID_31_function+0x3c0>)
  6220. 8002858: 601a str r2, [r3, #0]
  6221. // 验证地址范围
  6222. //if ((earse_MemoryAddress != APP_START_ADDRESS) || (earse_MemorySize > (APP_STOP_ADDRESS - APP_START_ADDRESS)))
  6223. //if ((earse_MemoryAddress != APP2_ADDRESS) || (earse_MemorySize > (APP2_ADDRESS - APP1_ADDRESS)))
  6224. if ((earse_MemoryAddress != APP1_ADDRESS) || (earse_MemorySize > (APP2_ADDRESS - APP1_ADDRESS)))
  6225. 800285a: 4b7e ldr r3, [pc, #504] @ (8002a54 <SID_31_function+0x3bc>)
  6226. 800285c: 681b ldr r3, [r3, #0]
  6227. 800285e: 4a7f ldr r2, [pc, #508] @ (8002a5c <SID_31_function+0x3c4>)
  6228. 8002860: 4293 cmp r3, r2
  6229. 8002862: d104 bne.n 800286e <SID_31_function+0x1d6>
  6230. 8002864: 4b7c ldr r3, [pc, #496] @ (8002a58 <SID_31_function+0x3c0>)
  6231. 8002866: 681b ldr r3, [r3, #0]
  6232. 8002868: f5b3 2fa8 cmp.w r3, #344064 @ 0x54000
  6233. 800286c: d907 bls.n 800287e <SID_31_function+0x1e6>
  6234. {
  6235. NegativeResponse(msg->buf[0], 0x31);
  6236. 800286e: 687b ldr r3, [r7, #4]
  6237. 8002870: 685b ldr r3, [r3, #4]
  6238. 8002872: 781b ldrb r3, [r3, #0]
  6239. 8002874: 2131 movs r1, #49 @ 0x31
  6240. 8002876: 4618 mov r0, r3
  6241. 8002878: f7ff fe5c bl 8002534 <NegativeResponse>
  6242. return;
  6243. 800287c: e13e b.n 8002afc <SID_31_function+0x464>
  6244. }
  6245. // 执行擦除操作
  6246. oReturnCheck = flash_erase_app(2);
  6247. 800287e: 2002 movs r0, #2
  6248. 8002880: f7fe f9ae bl 8000be0 <flash_erase_app>
  6249. 8002884: 6338 str r0, [r7, #48] @ 0x30
  6250. // 根据擦除结果设置响应
  6251. result_code = (oReturnCheck == 0) ? 0x00 : 0x01;
  6252. 8002886: 6b3b ldr r3, [r7, #48] @ 0x30
  6253. 8002888: 2b00 cmp r3, #0
  6254. 800288a: bf14 ite ne
  6255. 800288c: 2301 movne r3, #1
  6256. 800288e: 2300 moveq r3, #0
  6257. 8002890: b2db uxtb r3, r3
  6258. 8002892: f887 303e strb.w r3, [r7, #62] @ 0x3e
  6259. if (result_code == 0x00)
  6260. 8002896: f897 303e ldrb.w r3, [r7, #62] @ 0x3e
  6261. 800289a: 2b00 cmp r3, #0
  6262. 800289c: d102 bne.n 80028a4 <SID_31_function+0x20c>
  6263. {
  6264. load_sequence_state = 0x01; // 进入数据传输流程
  6265. 800289e: 4b6b ldr r3, [pc, #428] @ (8002a4c <SID_31_function+0x3b4>)
  6266. 80028a0: 2201 movs r2, #1
  6267. 80028a2: 701a strb r2, [r3, #0]
  6268. }
  6269. PositiveResponseEnable = 1;
  6270. 80028a4: 2301 movs r3, #1
  6271. 80028a6: f887 303f strb.w r3, [r7, #63] @ 0x3f
  6272. break;
  6273. 80028aa: e104 b.n 8002ab6 <SID_31_function+0x41e>
  6274. case 0x0202: // CRC32验证
  6275. if (msg->buf_len != 8)
  6276. 80028ac: 687b ldr r3, [r7, #4]
  6277. 80028ae: 891b ldrh r3, [r3, #8]
  6278. 80028b0: 2b08 cmp r3, #8
  6279. 80028b2: d007 beq.n 80028c4 <SID_31_function+0x22c>
  6280. {
  6281. NegativeResponse(msg->buf[0], 0x13);
  6282. 80028b4: 687b ldr r3, [r7, #4]
  6283. 80028b6: 685b ldr r3, [r3, #4]
  6284. 80028b8: 781b ldrb r3, [r3, #0]
  6285. 80028ba: 2113 movs r1, #19
  6286. 80028bc: 4618 mov r0, r3
  6287. 80028be: f7ff fe39 bl 8002534 <NegativeResponse>
  6288. return;
  6289. 80028c2: e11b b.n 8002afc <SID_31_function+0x464>
  6290. }
  6291. // 提取CRC32值
  6292. CRC32_value = (uint32_t)(
  6293. (msg->buf[4] << 24) |
  6294. 80028c4: 687b ldr r3, [r7, #4]
  6295. 80028c6: 685b ldr r3, [r3, #4]
  6296. 80028c8: 3304 adds r3, #4
  6297. 80028ca: 781b ldrb r3, [r3, #0]
  6298. 80028cc: 061a lsls r2, r3, #24
  6299. (msg->buf[5] << 16) |
  6300. 80028ce: 687b ldr r3, [r7, #4]
  6301. 80028d0: 685b ldr r3, [r3, #4]
  6302. 80028d2: 3305 adds r3, #5
  6303. 80028d4: 781b ldrb r3, [r3, #0]
  6304. 80028d6: 041b lsls r3, r3, #16
  6305. (msg->buf[4] << 24) |
  6306. 80028d8: 431a orrs r2, r3
  6307. (msg->buf[6] << 8) |
  6308. 80028da: 687b ldr r3, [r7, #4]
  6309. 80028dc: 685b ldr r3, [r3, #4]
  6310. 80028de: 3306 adds r3, #6
  6311. 80028e0: 781b ldrb r3, [r3, #0]
  6312. 80028e2: 021b lsls r3, r3, #8
  6313. (msg->buf[5] << 16) |
  6314. 80028e4: 4313 orrs r3, r2
  6315. msg->buf[7]
  6316. 80028e6: 687a ldr r2, [r7, #4]
  6317. 80028e8: 6852 ldr r2, [r2, #4]
  6318. 80028ea: 3207 adds r2, #7
  6319. 80028ec: 7812 ldrb r2, [r2, #0]
  6320. (msg->buf[6] << 8) |
  6321. 80028ee: 4313 orrs r3, r2
  6322. CRC32_value = (uint32_t)(
  6323. 80028f0: 461a mov r2, r3
  6324. 80028f2: 4b5b ldr r3, [pc, #364] @ (8002a60 <SID_31_function+0x3c8>)
  6325. 80028f4: 601a str r2, [r3, #0]
  6326. );
  6327. // 验证CRC32
  6328. result_code = (CRC32_value == crc32val) ? 0x00 : 0x01;
  6329. 80028f6: 4b5a ldr r3, [pc, #360] @ (8002a60 <SID_31_function+0x3c8>)
  6330. 80028f8: 681a ldr r2, [r3, #0]
  6331. 80028fa: 4b5a ldr r3, [pc, #360] @ (8002a64 <SID_31_function+0x3cc>)
  6332. 80028fc: 681b ldr r3, [r3, #0]
  6333. 80028fe: 429a cmp r2, r3
  6334. 8002900: bf14 ite ne
  6335. 8002902: 2301 movne r3, #1
  6336. 8002904: 2300 moveq r3, #0
  6337. 8002906: b2db uxtb r3, r3
  6338. 8002908: f887 303e strb.w r3, [r7, #62] @ 0x3e
  6339. if(result_code==0)//校验成功
  6340. 800290c: f897 303e ldrb.w r3, [r7, #62] @ 0x3e
  6341. 8002910: 2b00 cmp r3, #0
  6342. 8002912: d103 bne.n 800291c <SID_31_function+0x284>
  6343. {
  6344. app2_crc_flag = 1;
  6345. 8002914: 4b4e ldr r3, [pc, #312] @ (8002a50 <SID_31_function+0x3b8>)
  6346. 8002916: 2201 movs r2, #1
  6347. 8002918: 701a strb r2, [r3, #0]
  6348. 800291a: e002 b.n 8002922 <SID_31_function+0x28a>
  6349. }
  6350. else
  6351. {
  6352. app2_crc_flag = 0;
  6353. 800291c: 4b4c ldr r3, [pc, #304] @ (8002a50 <SID_31_function+0x3b8>)
  6354. 800291e: 2200 movs r2, #0
  6355. 8002920: 701a strb r2, [r3, #0]
  6356. }
  6357. PositiveResponseEnable = 1;
  6358. 8002922: 2301 movs r3, #1
  6359. 8002924: f887 303f strb.w r3, [r7, #63] @ 0x3f
  6360. break;
  6361. 8002928: e0c5 b.n 8002ab6 <SID_31_function+0x41e>
  6362. case 0x0E0E: // 切换旧app版本
  6363. if (msg->buf_len != 4)
  6364. 800292a: 687b ldr r3, [r7, #4]
  6365. 800292c: 891b ldrh r3, [r3, #8]
  6366. 800292e: 2b04 cmp r3, #4
  6367. 8002930: d007 beq.n 8002942 <SID_31_function+0x2aa>
  6368. {
  6369. NegativeResponse(msg->buf[0], 0x13);
  6370. 8002932: 687b ldr r3, [r7, #4]
  6371. 8002934: 685b ldr r3, [r3, #4]
  6372. 8002936: 781b ldrb r3, [r3, #0]
  6373. 8002938: 2113 movs r1, #19
  6374. 800293a: 4618 mov r0, r3
  6375. 800293c: f7ff fdfa bl 8002534 <NegativeResponse>
  6376. return;
  6377. 8002940: e0dc b.n 8002afc <SID_31_function+0x464>
  6378. }
  6379. response_buf[0] = msg->buf[0] + 0x40; // 正响应服务ID
  6380. 8002942: 687b ldr r3, [r7, #4]
  6381. 8002944: 685b ldr r3, [r3, #4]
  6382. 8002946: 781b ldrb r3, [r3, #0]
  6383. 8002948: 3340 adds r3, #64 @ 0x40
  6384. 800294a: b2db uxtb r3, r3
  6385. 800294c: 733b strb r3, [r7, #12]
  6386. response_buf[1] = msg->buf[1]; // RoutineControlType
  6387. 800294e: 687b ldr r3, [r7, #4]
  6388. 8002950: 685b ldr r3, [r3, #4]
  6389. 8002952: 785b ldrb r3, [r3, #1]
  6390. 8002954: 737b strb r3, [r7, #13]
  6391. response_buf[2] = msg->buf[2]; // RoutineIdentifier高字节
  6392. 8002956: 687b ldr r3, [r7, #4]
  6393. 8002958: 685b ldr r3, [r3, #4]
  6394. 800295a: 789b ldrb r3, [r3, #2]
  6395. 800295c: 73bb strb r3, [r7, #14]
  6396. response_buf[3] = msg->buf[3]; // RoutineIdentifier低字节
  6397. 800295e: 687b ldr r3, [r7, #4]
  6398. 8002960: 685b ldr r3, [r3, #4]
  6399. 8002962: 78db ldrb r3, [r3, #3]
  6400. 8002964: 73fb strb r3, [r7, #15]
  6401. response_buf[4] = 0; // 结果代码
  6402. 8002966: 2300 movs r3, #0
  6403. 8002968: 743b strb r3, [r7, #16]
  6404. // 设置响应消息长度
  6405. msg_req.buf_len = 5;
  6406. 800296a: 2305 movs r3, #5
  6407. 800296c: 853b strh r3, [r7, #40] @ 0x28
  6408. // 发送响应
  6409. i15765_tx_app(&msg_req, &status_rq);
  6410. 800296e: f107 020b add.w r2, r7, #11
  6411. 8002972: f107 0320 add.w r3, r7, #32
  6412. 8002976: 4611 mov r1, r2
  6413. 8002978: 4618 mov r0, r3
  6414. 800297a: f7ff fbc9 bl 8002110 <i15765_tx_app>
  6415. jump_to_app(APP1_ADDRESS);
  6416. 800297e: 4837 ldr r0, [pc, #220] @ (8002a5c <SID_31_function+0x3c4>)
  6417. 8002980: f7fe fa36 bl 8000df0 <jump_to_app>
  6418. break;
  6419. 8002984: e097 b.n 8002ab6 <SID_31_function+0x41e>
  6420. case 0x0E0F: // 切换新app版本
  6421. if (msg->buf_len != 4)
  6422. 8002986: 687b ldr r3, [r7, #4]
  6423. 8002988: 891b ldrh r3, [r3, #8]
  6424. 800298a: 2b04 cmp r3, #4
  6425. 800298c: d007 beq.n 800299e <SID_31_function+0x306>
  6426. {
  6427. NegativeResponse(msg->buf[0], 0x13);
  6428. 800298e: 687b ldr r3, [r7, #4]
  6429. 8002990: 685b ldr r3, [r3, #4]
  6430. 8002992: 781b ldrb r3, [r3, #0]
  6431. 8002994: 2113 movs r1, #19
  6432. 8002996: 4618 mov r0, r3
  6433. 8002998: f7ff fdcc bl 8002534 <NegativeResponse>
  6434. return;
  6435. 800299c: e0ae b.n 8002afc <SID_31_function+0x464>
  6436. }
  6437. #if 1
  6438. //计算固件大小,判断是否可以双备份升级
  6439. if(earse_MemorySize < (APP2_ADDRESS - APP1_ADDRESS))
  6440. 800299e: 4b2e ldr r3, [pc, #184] @ (8002a58 <SID_31_function+0x3c0>)
  6441. 80029a0: 681b ldr r3, [r3, #0]
  6442. 80029a2: f5b3 2fa8 cmp.w r3, #344064 @ 0x54000
  6443. 80029a6: d27e bcs.n 8002aa6 <SID_31_function+0x40e>
  6444. {
  6445. //flash_copy_app();
  6446. app2_copy_to_app1();
  6447. 80029a8: f7fe f9fb bl 8000da2 <app2_copy_to_app1>
  6448. //校验CRC
  6449. crc32val = 0xFFFFFFFF;
  6450. 80029ac: 4b2d ldr r3, [pc, #180] @ (8002a64 <SID_31_function+0x3cc>)
  6451. 80029ae: f04f 32ff mov.w r2, #4294967295
  6452. 80029b2: 601a str r2, [r3, #0]
  6453. uint8_t app2_data[1];
  6454. for(uint32_t i = 0;i < earse_MemorySize; i++)
  6455. 80029b4: 2300 movs r3, #0
  6456. 80029b6: 63bb str r3, [r7, #56] @ 0x38
  6457. 80029b8: e015 b.n 80029e6 <SID_31_function+0x34e>
  6458. {
  6459. app2_data[0] = *(volatile uint8_t*)(APP1_ADDRESS + i);
  6460. 80029ba: 6bbb ldr r3, [r7, #56] @ 0x38
  6461. 80029bc: f103 6300 add.w r3, r3, #134217728 @ 0x8000000
  6462. 80029c0: f503 4340 add.w r3, r3, #49152 @ 0xc000
  6463. 80029c4: 781b ldrb r3, [r3, #0]
  6464. 80029c6: b2db uxtb r3, r3
  6465. 80029c8: 723b strb r3, [r7, #8]
  6466. crc32val = crc32(crc32val, app2_data, 1);
  6467. 80029ca: 4b26 ldr r3, [pc, #152] @ (8002a64 <SID_31_function+0x3cc>)
  6468. 80029cc: 681b ldr r3, [r3, #0]
  6469. 80029ce: f107 0108 add.w r1, r7, #8
  6470. 80029d2: 2201 movs r2, #1
  6471. 80029d4: 4618 mov r0, r3
  6472. 80029d6: f7fe fd41 bl 800145c <crc32>
  6473. 80029da: 4603 mov r3, r0
  6474. 80029dc: 4a21 ldr r2, [pc, #132] @ (8002a64 <SID_31_function+0x3cc>)
  6475. 80029de: 6013 str r3, [r2, #0]
  6476. for(uint32_t i = 0;i < earse_MemorySize; i++)
  6477. 80029e0: 6bbb ldr r3, [r7, #56] @ 0x38
  6478. 80029e2: 3301 adds r3, #1
  6479. 80029e4: 63bb str r3, [r7, #56] @ 0x38
  6480. 80029e6: 4b1c ldr r3, [pc, #112] @ (8002a58 <SID_31_function+0x3c0>)
  6481. 80029e8: 681b ldr r3, [r3, #0]
  6482. 80029ea: 6bba ldr r2, [r7, #56] @ 0x38
  6483. 80029ec: 429a cmp r2, r3
  6484. 80029ee: d3e4 bcc.n 80029ba <SID_31_function+0x322>
  6485. }
  6486. if(CRC32_value == crc32val)
  6487. 80029f0: 4b1b ldr r3, [pc, #108] @ (8002a60 <SID_31_function+0x3c8>)
  6488. 80029f2: 681a ldr r2, [r3, #0]
  6489. 80029f4: 4b1b ldr r3, [pc, #108] @ (8002a64 <SID_31_function+0x3cc>)
  6490. 80029f6: 681b ldr r3, [r3, #0]
  6491. 80029f8: 429a cmp r2, r3
  6492. 80029fa: d135 bne.n 8002a68 <SID_31_function+0x3d0>
  6493. {
  6494. response_buf[0] = msg->buf[0] + 0x40; // 正响应服务ID
  6495. 80029fc: 687b ldr r3, [r7, #4]
  6496. 80029fe: 685b ldr r3, [r3, #4]
  6497. 8002a00: 781b ldrb r3, [r3, #0]
  6498. 8002a02: 3340 adds r3, #64 @ 0x40
  6499. 8002a04: b2db uxtb r3, r3
  6500. 8002a06: 733b strb r3, [r7, #12]
  6501. response_buf[1] = msg->buf[1]; // RoutineControlType
  6502. 8002a08: 687b ldr r3, [r7, #4]
  6503. 8002a0a: 685b ldr r3, [r3, #4]
  6504. 8002a0c: 785b ldrb r3, [r3, #1]
  6505. 8002a0e: 737b strb r3, [r7, #13]
  6506. response_buf[2] = msg->buf[2]; // RoutineIdentifier高字节
  6507. 8002a10: 687b ldr r3, [r7, #4]
  6508. 8002a12: 685b ldr r3, [r3, #4]
  6509. 8002a14: 789b ldrb r3, [r3, #2]
  6510. 8002a16: 73bb strb r3, [r7, #14]
  6511. response_buf[3] = msg->buf[3]; // RoutineIdentifier低字节
  6512. 8002a18: 687b ldr r3, [r7, #4]
  6513. 8002a1a: 685b ldr r3, [r3, #4]
  6514. 8002a1c: 78db ldrb r3, [r3, #3]
  6515. 8002a1e: 73fb strb r3, [r7, #15]
  6516. response_buf[4] = 0; // 结果代码
  6517. 8002a20: 2300 movs r3, #0
  6518. 8002a22: 743b strb r3, [r7, #16]
  6519. // 设置响应消息长度
  6520. msg_req.buf_len = 5;
  6521. 8002a24: 2305 movs r3, #5
  6522. 8002a26: 853b strh r3, [r7, #40] @ 0x28
  6523. // 发送响应
  6524. i15765_tx_app(&msg_req, &status_rq);
  6525. 8002a28: f107 020b add.w r2, r7, #11
  6526. 8002a2c: f107 0320 add.w r3, r7, #32
  6527. 8002a30: 4611 mov r1, r2
  6528. 8002a32: 4618 mov r0, r3
  6529. 8002a34: f7ff fb6c bl 8002110 <i15765_tx_app>
  6530. app_status_set(1,true);
  6531. 8002a38: 2101 movs r1, #1
  6532. 8002a3a: 2001 movs r0, #1
  6533. 8002a3c: f7fe f90c bl 8000c58 <app_status_set>
  6534. jump_to_app(APP1_ADDRESS);
  6535. 8002a40: 4806 ldr r0, [pc, #24] @ (8002a5c <SID_31_function+0x3c4>)
  6536. 8002a42: f7fe f9d5 bl 8000df0 <jump_to_app>
  6537. 8002a46: e02e b.n 8002aa6 <SID_31_function+0x40e>
  6538. 8002a48: 200000dc .word 0x200000dc
  6539. 8002a4c: 20001ea8 .word 0x20001ea8
  6540. 8002a50: 20001eb8 .word 0x20001eb8
  6541. 8002a54: 20001ea0 .word 0x20001ea0
  6542. 8002a58: 20001ea4 .word 0x20001ea4
  6543. 8002a5c: 0800c000 .word 0x0800c000
  6544. 8002a60: 20001eb0 .word 0x20001eb0
  6545. 8002a64: 20000004 .word 0x20000004
  6546. }
  6547. else
  6548. {
  6549. response_buf[0] = msg->buf[0] + 0x40; // 正响应服务ID
  6550. 8002a68: 687b ldr r3, [r7, #4]
  6551. 8002a6a: 685b ldr r3, [r3, #4]
  6552. 8002a6c: 781b ldrb r3, [r3, #0]
  6553. 8002a6e: 3340 adds r3, #64 @ 0x40
  6554. 8002a70: b2db uxtb r3, r3
  6555. 8002a72: 733b strb r3, [r7, #12]
  6556. response_buf[1] = msg->buf[1]; // RoutineControlType
  6557. 8002a74: 687b ldr r3, [r7, #4]
  6558. 8002a76: 685b ldr r3, [r3, #4]
  6559. 8002a78: 785b ldrb r3, [r3, #1]
  6560. 8002a7a: 737b strb r3, [r7, #13]
  6561. response_buf[2] = msg->buf[2]; // RoutineIdentifier高字节
  6562. 8002a7c: 687b ldr r3, [r7, #4]
  6563. 8002a7e: 685b ldr r3, [r3, #4]
  6564. 8002a80: 789b ldrb r3, [r3, #2]
  6565. 8002a82: 73bb strb r3, [r7, #14]
  6566. response_buf[3] = msg->buf[3]; // RoutineIdentifier低字节
  6567. 8002a84: 687b ldr r3, [r7, #4]
  6568. 8002a86: 685b ldr r3, [r3, #4]
  6569. 8002a88: 78db ldrb r3, [r3, #3]
  6570. 8002a8a: 73fb strb r3, [r7, #15]
  6571. response_buf[4] = 1; // 结果代码
  6572. 8002a8c: 2301 movs r3, #1
  6573. 8002a8e: 743b strb r3, [r7, #16]
  6574. // 设置响应消息长度
  6575. msg_req.buf_len = 5;
  6576. 8002a90: 2305 movs r3, #5
  6577. 8002a92: 853b strh r3, [r7, #40] @ 0x28
  6578. // 发送响应
  6579. i15765_tx_app(&msg_req, &status_rq);
  6580. 8002a94: f107 020b add.w r2, r7, #11
  6581. 8002a98: f107 0320 add.w r3, r7, #32
  6582. 8002a9c: 4611 mov r1, r2
  6583. 8002a9e: 4618 mov r0, r3
  6584. 8002aa0: f7ff fb36 bl 8002110 <i15765_tx_app>
  6585. 8002aa4: e02a b.n 8002afc <SID_31_function+0x464>
  6586. }
  6587. }
  6588. #endif
  6589. default:
  6590. NegativeResponse(msg->buf[0], 0x31); // 不支持的服务
  6591. 8002aa6: 687b ldr r3, [r7, #4]
  6592. 8002aa8: 685b ldr r3, [r3, #4]
  6593. 8002aaa: 781b ldrb r3, [r3, #0]
  6594. 8002aac: 2131 movs r1, #49 @ 0x31
  6595. 8002aae: 4618 mov r0, r3
  6596. 8002ab0: f7ff fd40 bl 8002534 <NegativeResponse>
  6597. return;
  6598. 8002ab4: e022 b.n 8002afc <SID_31_function+0x464>
  6599. }
  6600. // 发送正响应
  6601. if (PositiveResponseEnable == 1)
  6602. 8002ab6: f897 303f ldrb.w r3, [r7, #63] @ 0x3f
  6603. 8002aba: 2b01 cmp r3, #1
  6604. 8002abc: d11e bne.n 8002afc <SID_31_function+0x464>
  6605. {
  6606. // 构建响应数据
  6607. response_buf[0] = msg->buf[0] + 0x40; // 正响应服务ID
  6608. 8002abe: 687b ldr r3, [r7, #4]
  6609. 8002ac0: 685b ldr r3, [r3, #4]
  6610. 8002ac2: 781b ldrb r3, [r3, #0]
  6611. 8002ac4: 3340 adds r3, #64 @ 0x40
  6612. 8002ac6: b2db uxtb r3, r3
  6613. 8002ac8: 733b strb r3, [r7, #12]
  6614. response_buf[1] = msg->buf[1]; // RoutineControlType
  6615. 8002aca: 687b ldr r3, [r7, #4]
  6616. 8002acc: 685b ldr r3, [r3, #4]
  6617. 8002ace: 785b ldrb r3, [r3, #1]
  6618. 8002ad0: 737b strb r3, [r7, #13]
  6619. response_buf[2] = msg->buf[2]; // RoutineIdentifier高字节
  6620. 8002ad2: 687b ldr r3, [r7, #4]
  6621. 8002ad4: 685b ldr r3, [r3, #4]
  6622. 8002ad6: 789b ldrb r3, [r3, #2]
  6623. 8002ad8: 73bb strb r3, [r7, #14]
  6624. response_buf[3] = msg->buf[3]; // RoutineIdentifier低字节
  6625. 8002ada: 687b ldr r3, [r7, #4]
  6626. 8002adc: 685b ldr r3, [r3, #4]
  6627. 8002ade: 78db ldrb r3, [r3, #3]
  6628. 8002ae0: 73fb strb r3, [r7, #15]
  6629. response_buf[4] = result_code; // 结果代码
  6630. 8002ae2: f897 303e ldrb.w r3, [r7, #62] @ 0x3e
  6631. 8002ae6: 743b strb r3, [r7, #16]
  6632. // 设置响应消息长度
  6633. msg_req.buf_len = 5;
  6634. 8002ae8: 2305 movs r3, #5
  6635. 8002aea: 853b strh r3, [r7, #40] @ 0x28
  6636. // 发送响应
  6637. i15765_tx_app(&msg_req, &status_rq);
  6638. 8002aec: f107 020b add.w r2, r7, #11
  6639. 8002af0: f107 0320 add.w r3, r7, #32
  6640. 8002af4: 4611 mov r1, r2
  6641. 8002af6: 4618 mov r0, r3
  6642. 8002af8: f7ff fb0a bl 8002110 <i15765_tx_app>
  6643. }
  6644. }
  6645. 8002afc: 3740 adds r7, #64 @ 0x40
  6646. 8002afe: 46bd mov sp, r7
  6647. 8002b00: bd80 pop {r7, pc}
  6648. 8002b02: bf00 nop
  6649. 08002b04 <SID_34_function>:
  6650. void SID_34_function(i15765_t *msg)
  6651. {
  6652. 8002b04: b580 push {r7, lr}
  6653. 8002b06: b08a sub sp, #40 @ 0x28
  6654. 8002b08: af00 add r7, sp, #0
  6655. 8002b0a: 6078 str r0, [r7, #4]
  6656. i15765_t msg_req;
  6657. uint8_t buf[8];
  6658. uint8_t status_rq;
  6659. uint8_t PositiveResponseEnable = 0;
  6660. 8002b0c: 2300 movs r3, #0
  6661. 8002b0e: f887 3027 strb.w r3, [r7, #39] @ 0x27
  6662. msg_req.buf = buf;
  6663. 8002b12: f107 030c add.w r3, r7, #12
  6664. 8002b16: 61bb str r3, [r7, #24]
  6665. if(msg->buf_len!=11)
  6666. 8002b18: 687b ldr r3, [r7, #4]
  6667. 8002b1a: 891b ldrh r3, [r3, #8]
  6668. 8002b1c: 2b0b cmp r3, #11
  6669. 8002b1e: d007 beq.n 8002b30 <SID_34_function+0x2c>
  6670. {
  6671. NegativeResponse(msg->buf[0],0x13);
  6672. 8002b20: 687b ldr r3, [r7, #4]
  6673. 8002b22: 685b ldr r3, [r3, #4]
  6674. 8002b24: 781b ldrb r3, [r3, #0]
  6675. 8002b26: 2113 movs r1, #19
  6676. 8002b28: 4618 mov r0, r3
  6677. 8002b2a: f7ff fd03 bl 8002534 <NegativeResponse>
  6678. return;
  6679. 8002b2e: e0ae b.n 8002c8e <SID_34_function+0x18a>
  6680. }
  6681. //3
  6682. if(load_sequence_state != 0x01)
  6683. 8002b30: 4b58 ldr r3, [pc, #352] @ (8002c94 <SID_34_function+0x190>)
  6684. 8002b32: 781b ldrb r3, [r3, #0]
  6685. 8002b34: 2b01 cmp r3, #1
  6686. 8002b36: d007 beq.n 8002b48 <SID_34_function+0x44>
  6687. {
  6688. NegativeResponse(msg->buf[0],0x24); //(24)
  6689. 8002b38: 687b ldr r3, [r7, #4]
  6690. 8002b3a: 685b ldr r3, [r3, #4]
  6691. 8002b3c: 781b ldrb r3, [r3, #0]
  6692. 8002b3e: 2124 movs r1, #36 @ 0x24
  6693. 8002b40: 4618 mov r0, r3
  6694. 8002b42: f7ff fcf7 bl 8002534 <NegativeResponse>
  6695. return;
  6696. 8002b46: e0a2 b.n 8002c8e <SID_34_function+0x18a>
  6697. }
  6698. DataFormatIdentifier = msg->buf[1];
  6699. 8002b48: 687b ldr r3, [r7, #4]
  6700. 8002b4a: 685b ldr r3, [r3, #4]
  6701. 8002b4c: 785a ldrb r2, [r3, #1]
  6702. 8002b4e: 4b52 ldr r3, [pc, #328] @ (8002c98 <SID_34_function+0x194>)
  6703. 8002b50: 701a strb r2, [r3, #0]
  6704. addressAndLengthFormatIdentifier = msg->buf[2];//0x44
  6705. 8002b52: 687b ldr r3, [r7, #4]
  6706. 8002b54: 685b ldr r3, [r3, #4]
  6707. 8002b56: 789a ldrb r2, [r3, #2]
  6708. 8002b58: 4b50 ldr r3, [pc, #320] @ (8002c9c <SID_34_function+0x198>)
  6709. 8002b5a: 701a strb r2, [r3, #0]
  6710. //Flashַ
  6711. load_MemoryAddress = (uint32_t)((uint32_t)msg->buf[3]<<24)|((uint32_t)msg->buf[4]<<16)|((uint32_t)msg->buf[5]<<8)|msg->buf[6];
  6712. 8002b5c: 687b ldr r3, [r7, #4]
  6713. 8002b5e: 685b ldr r3, [r3, #4]
  6714. 8002b60: 3303 adds r3, #3
  6715. 8002b62: 781b ldrb r3, [r3, #0]
  6716. 8002b64: 061a lsls r2, r3, #24
  6717. 8002b66: 687b ldr r3, [r7, #4]
  6718. 8002b68: 685b ldr r3, [r3, #4]
  6719. 8002b6a: 3304 adds r3, #4
  6720. 8002b6c: 781b ldrb r3, [r3, #0]
  6721. 8002b6e: 041b lsls r3, r3, #16
  6722. 8002b70: 431a orrs r2, r3
  6723. 8002b72: 687b ldr r3, [r7, #4]
  6724. 8002b74: 685b ldr r3, [r3, #4]
  6725. 8002b76: 3305 adds r3, #5
  6726. 8002b78: 781b ldrb r3, [r3, #0]
  6727. 8002b7a: 021b lsls r3, r3, #8
  6728. 8002b7c: 4313 orrs r3, r2
  6729. 8002b7e: 687a ldr r2, [r7, #4]
  6730. 8002b80: 6852 ldr r2, [r2, #4]
  6731. 8002b82: 3206 adds r2, #6
  6732. 8002b84: 7812 ldrb r2, [r2, #0]
  6733. 8002b86: 4313 orrs r3, r2
  6734. 8002b88: 4a45 ldr r2, [pc, #276] @ (8002ca0 <SID_34_function+0x19c>)
  6735. 8002b8a: 6013 str r3, [r2, #0]
  6736. load_MemorySize = (uint32_t)((uint32_t)msg->buf[7]<<24)|((uint32_t)msg->buf[8]<<16)|((uint32_t)msg->buf[9]<<8)|msg->buf[10];
  6737. 8002b8c: 687b ldr r3, [r7, #4]
  6738. 8002b8e: 685b ldr r3, [r3, #4]
  6739. 8002b90: 3307 adds r3, #7
  6740. 8002b92: 781b ldrb r3, [r3, #0]
  6741. 8002b94: 061a lsls r2, r3, #24
  6742. 8002b96: 687b ldr r3, [r7, #4]
  6743. 8002b98: 685b ldr r3, [r3, #4]
  6744. 8002b9a: 3308 adds r3, #8
  6745. 8002b9c: 781b ldrb r3, [r3, #0]
  6746. 8002b9e: 041b lsls r3, r3, #16
  6747. 8002ba0: 431a orrs r2, r3
  6748. 8002ba2: 687b ldr r3, [r7, #4]
  6749. 8002ba4: 685b ldr r3, [r3, #4]
  6750. 8002ba6: 3309 adds r3, #9
  6751. 8002ba8: 781b ldrb r3, [r3, #0]
  6752. 8002baa: 021b lsls r3, r3, #8
  6753. 8002bac: 4313 orrs r3, r2
  6754. 8002bae: 687a ldr r2, [r7, #4]
  6755. 8002bb0: 6852 ldr r2, [r2, #4]
  6756. 8002bb2: 320a adds r2, #10
  6757. 8002bb4: 7812 ldrb r2, [r2, #0]
  6758. 8002bb6: 4313 orrs r3, r2
  6759. 8002bb8: 4a3a ldr r2, [pc, #232] @ (8002ca4 <SID_34_function+0x1a0>)
  6760. 8002bba: 6013 str r3, [r2, #0]
  6761. if(load_MemorySize%MaxNumberOfBlockLength == 0)
  6762. 8002bbc: 4b39 ldr r3, [pc, #228] @ (8002ca4 <SID_34_function+0x1a0>)
  6763. 8002bbe: 681b ldr r3, [r3, #0]
  6764. 8002bc0: 2280 movs r2, #128 @ 0x80
  6765. 8002bc2: fbb3 f1f2 udiv r1, r3, r2
  6766. 8002bc6: fb01 f202 mul.w r2, r1, r2
  6767. 8002bca: 1a9b subs r3, r3, r2
  6768. 8002bcc: 2b00 cmp r3, #0
  6769. 8002bce: d107 bne.n 8002be0 <SID_34_function+0xdc>
  6770. {
  6771. load_BlockNum = load_MemorySize/MaxNumberOfBlockLength;
  6772. 8002bd0: 4b34 ldr r3, [pc, #208] @ (8002ca4 <SID_34_function+0x1a0>)
  6773. 8002bd2: 681b ldr r3, [r3, #0]
  6774. 8002bd4: 2280 movs r2, #128 @ 0x80
  6775. 8002bd6: fbb3 f3f2 udiv r3, r3, r2
  6776. 8002bda: 4a33 ldr r2, [pc, #204] @ (8002ca8 <SID_34_function+0x1a4>)
  6777. 8002bdc: 6013 str r3, [r2, #0]
  6778. 8002bde: e007 b.n 8002bf0 <SID_34_function+0xec>
  6779. }
  6780. else
  6781. {
  6782. load_BlockNum = load_MemorySize/MaxNumberOfBlockLength + 1;
  6783. 8002be0: 4b30 ldr r3, [pc, #192] @ (8002ca4 <SID_34_function+0x1a0>)
  6784. 8002be2: 681b ldr r3, [r3, #0]
  6785. 8002be4: 2280 movs r2, #128 @ 0x80
  6786. 8002be6: fbb3 f3f2 udiv r3, r3, r2
  6787. 8002bea: 3301 adds r3, #1
  6788. 8002bec: 4a2e ldr r2, [pc, #184] @ (8002ca8 <SID_34_function+0x1a4>)
  6789. 8002bee: 6013 str r3, [r2, #0]
  6790. load_MemoryAddress_next = load_MemoryAddress + load_MemorySize;
  6791. //////////////////////////////////////////////////////////////////////////////////////////////////////////////
  6792. #endif
  6793. if((load_MemoryAddress == APP1_ADDRESS)&& load_MemorySize <= (APP2_ADDRESS - APP1_ADDRESS))
  6794. 8002bf0: 4b2b ldr r3, [pc, #172] @ (8002ca0 <SID_34_function+0x19c>)
  6795. 8002bf2: 681b ldr r3, [r3, #0]
  6796. 8002bf4: 4a2d ldr r2, [pc, #180] @ (8002cac <SID_34_function+0x1a8>)
  6797. 8002bf6: 4293 cmp r3, r2
  6798. 8002bf8: d139 bne.n 8002c6e <SID_34_function+0x16a>
  6799. 8002bfa: 4b2a ldr r3, [pc, #168] @ (8002ca4 <SID_34_function+0x1a0>)
  6800. 8002bfc: 681b ldr r3, [r3, #0]
  6801. 8002bfe: f5b3 2fa8 cmp.w r3, #344064 @ 0x54000
  6802. 8002c02: d834 bhi.n 8002c6e <SID_34_function+0x16a>
  6803. {
  6804. load_MemoryAddress = APP2_ADDRESS;//虽是APP1的固件地址,但写在备份区APP2地址
  6805. 8002c04: 4b26 ldr r3, [pc, #152] @ (8002ca0 <SID_34_function+0x19c>)
  6806. 8002c06: 4a2a ldr r2, [pc, #168] @ (8002cb0 <SID_34_function+0x1ac>)
  6807. 8002c08: 601a str r2, [r3, #0]
  6808. PositiveResponseEnable = 1;
  6809. 8002c0a: 2301 movs r3, #1
  6810. 8002c0c: f887 3027 strb.w r3, [r7, #39] @ 0x27
  6811. buf[0] = msg->buf[0]+0x40; // PositiveResponseServiceIdentifier
  6812. 8002c10: 687b ldr r3, [r7, #4]
  6813. 8002c12: 685b ldr r3, [r3, #4]
  6814. 8002c14: 781b ldrb r3, [r3, #0]
  6815. 8002c16: 3340 adds r3, #64 @ 0x40
  6816. 8002c18: b2db uxtb r3, r3
  6817. 8002c1a: 733b strb r3, [r7, #12]
  6818. buf[1] = msg->buf[1]; // LengthFormatIdentifier
  6819. 8002c1c: 687b ldr r3, [r7, #4]
  6820. 8002c1e: 685b ldr r3, [r3, #4]
  6821. 8002c20: 785b ldrb r3, [r3, #1]
  6822. 8002c22: 737b strb r3, [r7, #13]
  6823. if(MaxNumberOfBlockLength > 0xFF)
  6824. 8002c24: 2380 movs r3, #128 @ 0x80
  6825. 8002c26: 2bff cmp r3, #255 @ 0xff
  6826. 8002c28: d90a bls.n 8002c40 <SID_34_function+0x13c>
  6827. {
  6828. //MaxNumberOfBlockLength
  6829. buf[2] = (uint8)((MaxNumberOfBlockLength>>8)&0xFF);
  6830. 8002c2a: 2380 movs r3, #128 @ 0x80
  6831. 8002c2c: 0a1b lsrs r3, r3, #8
  6832. 8002c2e: b29b uxth r3, r3
  6833. 8002c30: b2db uxtb r3, r3
  6834. 8002c32: 73bb strb r3, [r7, #14]
  6835. buf[3] = (uint8)(MaxNumberOfBlockLength&0xFF);
  6836. 8002c34: 2380 movs r3, #128 @ 0x80
  6837. 8002c36: b2db uxtb r3, r3
  6838. 8002c38: 73fb strb r3, [r7, #15]
  6839. msg_req.buf_len = 4;
  6840. 8002c3a: 2304 movs r3, #4
  6841. 8002c3c: 83bb strh r3, [r7, #28]
  6842. 8002c3e: e004 b.n 8002c4a <SID_34_function+0x146>
  6843. }
  6844. else
  6845. {
  6846. //MaxNumberOfBlockLength
  6847. buf[2] = (uint8) MaxNumberOfBlockLength;
  6848. 8002c40: 2380 movs r3, #128 @ 0x80
  6849. 8002c42: b2db uxtb r3, r3
  6850. 8002c44: 73bb strb r3, [r7, #14]
  6851. msg_req.buf_len = 3;
  6852. 8002c46: 2303 movs r3, #3
  6853. 8002c48: 83bb strh r3, [r7, #28]
  6854. }
  6855. load_sequence_state = 0x02;
  6856. 8002c4a: 4b12 ldr r3, [pc, #72] @ (8002c94 <SID_34_function+0x190>)
  6857. 8002c4c: 2202 movs r2, #2
  6858. 8002c4e: 701a strb r2, [r3, #0]
  6859. BlockSequenceCounter_pre = 0;
  6860. 8002c50: 4b18 ldr r3, [pc, #96] @ (8002cb4 <SID_34_function+0x1b0>)
  6861. 8002c52: 2200 movs r2, #0
  6862. 8002c54: 801a strh r2, [r3, #0]
  6863. crc32val = 0xFFFFFFFF;
  6864. 8002c56: 4b18 ldr r3, [pc, #96] @ (8002cb8 <SID_34_function+0x1b4>)
  6865. 8002c58: f04f 32ff mov.w r2, #4294967295
  6866. 8002c5c: 601a str r2, [r3, #0]
  6867. load_BlockCount = 0;
  6868. 8002c5e: 4b17 ldr r3, [pc, #92] @ (8002cbc <SID_34_function+0x1b8>)
  6869. 8002c60: 2200 movs r2, #0
  6870. 8002c62: 601a str r2, [r3, #0]
  6871. NegativeResponse(msg->buf[0],31);//
  6872. return;
  6873. }
  6874. if(PositiveResponseEnable==1)
  6875. 8002c64: f897 3027 ldrb.w r3, [r7, #39] @ 0x27
  6876. 8002c68: 2b01 cmp r3, #1
  6877. 8002c6a: d008 beq.n 8002c7e <SID_34_function+0x17a>
  6878. 8002c6c: e00f b.n 8002c8e <SID_34_function+0x18a>
  6879. NegativeResponse(msg->buf[0],31);//
  6880. 8002c6e: 687b ldr r3, [r7, #4]
  6881. 8002c70: 685b ldr r3, [r3, #4]
  6882. 8002c72: 781b ldrb r3, [r3, #0]
  6883. 8002c74: 211f movs r1, #31
  6884. 8002c76: 4618 mov r0, r3
  6885. 8002c78: f7ff fc5c bl 8002534 <NegativeResponse>
  6886. return;
  6887. 8002c7c: e007 b.n 8002c8e <SID_34_function+0x18a>
  6888. {
  6889. /* transmit message */
  6890. i15765_tx_app(&msg_req, &status_rq);
  6891. 8002c7e: f107 020b add.w r2, r7, #11
  6892. 8002c82: f107 0314 add.w r3, r7, #20
  6893. 8002c86: 4611 mov r1, r2
  6894. 8002c88: 4618 mov r0, r3
  6895. 8002c8a: f7ff fa41 bl 8002110 <i15765_tx_app>
  6896. }
  6897. }
  6898. 8002c8e: 3728 adds r7, #40 @ 0x28
  6899. 8002c90: 46bd mov sp, r7
  6900. 8002c92: bd80 pop {r7, pc}
  6901. 8002c94: 20001ea8 .word 0x20001ea8
  6902. 8002c98: 20001e8e .word 0x20001e8e
  6903. 8002c9c: 20001e8f .word 0x20001e8f
  6904. 8002ca0: 20001e90 .word 0x20001e90
  6905. 8002ca4: 20001e94 .word 0x20001e94
  6906. 8002ca8: 20001e98 .word 0x20001e98
  6907. 8002cac: 0800c000 .word 0x0800c000
  6908. 8002cb0: 08060000 .word 0x08060000
  6909. 8002cb4: 20001eac .word 0x20001eac
  6910. 8002cb8: 20000004 .word 0x20000004
  6911. 8002cbc: 20001e9c .word 0x20001e9c
  6912. 08002cc0 <SID_36_function>:
  6913. void SID_36_function(i15765_t *msg)
  6914. {
  6915. 8002cc0: b580 push {r7, lr}
  6916. 8002cc2: f5ad 5d81 sub.w sp, sp, #4128 @ 0x1020
  6917. 8002cc6: b084 sub sp, #16
  6918. 8002cc8: af00 add r7, sp, #0
  6919. 8002cca: f107 0330 add.w r3, r7, #48 @ 0x30
  6920. 8002cce: f843 0c2c str.w r0, [r3, #-44]
  6921. i15765_t msg_req;
  6922. uint8_t buf[8];
  6923. uint8_t status_rq;
  6924. uint8_t PositiveResponseEnable = 0;
  6925. 8002cd2: 2300 movs r3, #0
  6926. 8002cd4: f507 5281 add.w r2, r7, #4128 @ 0x1020
  6927. 8002cd8: f102 020d add.w r2, r2, #13
  6928. 8002cdc: 7013 strb r3, [r2, #0]
  6929. uint16_t i = 0;
  6930. 8002cde: 2300 movs r3, #0
  6931. 8002ce0: f507 5281 add.w r2, r7, #4128 @ 0x1020
  6932. 8002ce4: f102 020e add.w r2, r2, #14
  6933. 8002ce8: 8013 strh r3, [r2, #0]
  6934. int oReturnCheck;
  6935. uint8_t TransferRequestParameterRecord[4096];
  6936. msg_req.buf = buf;
  6937. 8002cea: f507 5380 add.w r3, r7, #4096 @ 0x1000
  6938. 8002cee: f103 0310 add.w r3, r3, #16
  6939. 8002cf2: f507 5280 add.w r2, r7, #4096 @ 0x1000
  6940. 8002cf6: f102 021c add.w r2, r2, #28
  6941. 8002cfa: 6013 str r3, [r2, #0]
  6942. if(load_sequence_state != 0x02)
  6943. 8002cfc: 4b99 ldr r3, [pc, #612] @ (8002f64 <SID_36_function+0x2a4>)
  6944. 8002cfe: 781b ldrb r3, [r3, #0]
  6945. 8002d00: 2b02 cmp r3, #2
  6946. 8002d02: d00a beq.n 8002d1a <SID_36_function+0x5a>
  6947. {
  6948. NegativeResponse(msg->buf[0],0x24);
  6949. 8002d04: f107 0330 add.w r3, r7, #48 @ 0x30
  6950. 8002d08: f853 3c2c ldr.w r3, [r3, #-44]
  6951. 8002d0c: 685b ldr r3, [r3, #4]
  6952. 8002d0e: 781b ldrb r3, [r3, #0]
  6953. 8002d10: 2124 movs r1, #36 @ 0x24
  6954. 8002d12: 4618 mov r0, r3
  6955. 8002d14: f7ff fc0e bl 8002534 <NegativeResponse>
  6956. return;
  6957. 8002d18: e11f b.n 8002f5a <SID_36_function+0x29a>
  6958. }
  6959. BlockSequenceCounter = msg->buf[1];
  6960. 8002d1a: f107 0330 add.w r3, r7, #48 @ 0x30
  6961. 8002d1e: f853 3c2c ldr.w r3, [r3, #-44]
  6962. 8002d22: 685b ldr r3, [r3, #4]
  6963. 8002d24: 3301 adds r3, #1
  6964. 8002d26: 781b ldrb r3, [r3, #0]
  6965. 8002d28: 461a mov r2, r3
  6966. 8002d2a: 4b8f ldr r3, [pc, #572] @ (8002f68 <SID_36_function+0x2a8>)
  6967. 8002d2c: 801a strh r2, [r3, #0]
  6968. if(BlockSequenceCounter == 0x00)
  6969. 8002d2e: 4b8e ldr r3, [pc, #568] @ (8002f68 <SID_36_function+0x2a8>)
  6970. 8002d30: 881b ldrh r3, [r3, #0]
  6971. 8002d32: 2b00 cmp r3, #0
  6972. 8002d34: d10e bne.n 8002d54 <SID_36_function+0x94>
  6973. {
  6974. if(BlockSequenceCounter_pre != 0xFF)
  6975. 8002d36: 4b8d ldr r3, [pc, #564] @ (8002f6c <SID_36_function+0x2ac>)
  6976. 8002d38: 881b ldrh r3, [r3, #0]
  6977. 8002d3a: 2bff cmp r3, #255 @ 0xff
  6978. 8002d3c: d01d beq.n 8002d7a <SID_36_function+0xba>
  6979. {
  6980. NegativeResponse(msg->buf[0],0x73);//
  6981. 8002d3e: f107 0330 add.w r3, r7, #48 @ 0x30
  6982. 8002d42: f853 3c2c ldr.w r3, [r3, #-44]
  6983. 8002d46: 685b ldr r3, [r3, #4]
  6984. 8002d48: 781b ldrb r3, [r3, #0]
  6985. 8002d4a: 2173 movs r1, #115 @ 0x73
  6986. 8002d4c: 4618 mov r0, r3
  6987. 8002d4e: f7ff fbf1 bl 8002534 <NegativeResponse>
  6988. return;
  6989. 8002d52: e102 b.n 8002f5a <SID_36_function+0x29a>
  6990. }
  6991. }
  6992. else if(BlockSequenceCounter != (BlockSequenceCounter_pre+1))
  6993. 8002d54: 4b84 ldr r3, [pc, #528] @ (8002f68 <SID_36_function+0x2a8>)
  6994. 8002d56: 881b ldrh r3, [r3, #0]
  6995. 8002d58: 461a mov r2, r3
  6996. 8002d5a: 4b84 ldr r3, [pc, #528] @ (8002f6c <SID_36_function+0x2ac>)
  6997. 8002d5c: 881b ldrh r3, [r3, #0]
  6998. 8002d5e: 3301 adds r3, #1
  6999. 8002d60: 429a cmp r2, r3
  7000. 8002d62: d00a beq.n 8002d7a <SID_36_function+0xba>
  7001. {
  7002. NegativeResponse(msg->buf[0],0x73);//
  7003. 8002d64: f107 0330 add.w r3, r7, #48 @ 0x30
  7004. 8002d68: f853 3c2c ldr.w r3, [r3, #-44]
  7005. 8002d6c: 685b ldr r3, [r3, #4]
  7006. 8002d6e: 781b ldrb r3, [r3, #0]
  7007. 8002d70: 2173 movs r1, #115 @ 0x73
  7008. 8002d72: 4618 mov r0, r3
  7009. 8002d74: f7ff fbde bl 8002534 <NegativeResponse>
  7010. return;
  7011. 8002d78: e0ef b.n 8002f5a <SID_36_function+0x29a>
  7012. }
  7013. BlockSequenceCounter_pre = BlockSequenceCounter;
  7014. 8002d7a: 4b7b ldr r3, [pc, #492] @ (8002f68 <SID_36_function+0x2a8>)
  7015. 8002d7c: 881a ldrh r2, [r3, #0]
  7016. 8002d7e: 4b7b ldr r3, [pc, #492] @ (8002f6c <SID_36_function+0x2ac>)
  7017. 8002d80: 801a strh r2, [r3, #0]
  7018. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  7019. for(i=0; i < msg->buf_len-2;i++)
  7020. 8002d82: 2300 movs r3, #0
  7021. 8002d84: f507 5281 add.w r2, r7, #4128 @ 0x1020
  7022. 8002d88: f102 020e add.w r2, r2, #14
  7023. 8002d8c: 8013 strh r3, [r2, #0]
  7024. 8002d8e: e021 b.n 8002dd4 <SID_36_function+0x114>
  7025. {
  7026. TransferRequestParameterRecord[i] = msg->buf[2+i];
  7027. 8002d90: f107 0330 add.w r3, r7, #48 @ 0x30
  7028. 8002d94: f853 3c2c ldr.w r3, [r3, #-44]
  7029. 8002d98: 685b ldr r3, [r3, #4]
  7030. 8002d9a: f507 5281 add.w r2, r7, #4128 @ 0x1020
  7031. 8002d9e: f102 020e add.w r2, r2, #14
  7032. 8002da2: 8812 ldrh r2, [r2, #0]
  7033. 8002da4: 3202 adds r2, #2
  7034. 8002da6: 441a add r2, r3
  7035. 8002da8: f507 5381 add.w r3, r7, #4128 @ 0x1020
  7036. 8002dac: f103 030e add.w r3, r3, #14
  7037. 8002db0: 881b ldrh r3, [r3, #0]
  7038. 8002db2: 7812 ldrb r2, [r2, #0]
  7039. 8002db4: f107 0130 add.w r1, r7, #48 @ 0x30
  7040. 8002db8: 440b add r3, r1
  7041. 8002dba: f803 2c24 strb.w r2, [r3, #-36]
  7042. for(i=0; i < msg->buf_len-2;i++)
  7043. 8002dbe: f507 5381 add.w r3, r7, #4128 @ 0x1020
  7044. 8002dc2: f103 030e add.w r3, r3, #14
  7045. 8002dc6: 881b ldrh r3, [r3, #0]
  7046. 8002dc8: 3301 adds r3, #1
  7047. 8002dca: f507 5281 add.w r2, r7, #4128 @ 0x1020
  7048. 8002dce: f102 020e add.w r2, r2, #14
  7049. 8002dd2: 8013 strh r3, [r2, #0]
  7050. 8002dd4: f507 5381 add.w r3, r7, #4128 @ 0x1020
  7051. 8002dd8: f103 030e add.w r3, r3, #14
  7052. 8002ddc: 881a ldrh r2, [r3, #0]
  7053. 8002dde: f107 0330 add.w r3, r7, #48 @ 0x30
  7054. 8002de2: f853 3c2c ldr.w r3, [r3, #-44]
  7055. 8002de6: 891b ldrh r3, [r3, #8]
  7056. 8002de8: 3b02 subs r3, #2
  7057. 8002dea: 429a cmp r2, r3
  7058. 8002dec: dbd0 blt.n 8002d90 <SID_36_function+0xd0>
  7059. }
  7060. crc32val = crc32(crc32val, TransferRequestParameterRecord, msg->buf_len-2);
  7061. 8002dee: 4b60 ldr r3, [pc, #384] @ (8002f70 <SID_36_function+0x2b0>)
  7062. 8002df0: 6818 ldr r0, [r3, #0]
  7063. 8002df2: f107 0330 add.w r3, r7, #48 @ 0x30
  7064. 8002df6: f853 3c2c ldr.w r3, [r3, #-44]
  7065. 8002dfa: 891b ldrh r3, [r3, #8]
  7066. 8002dfc: 3b02 subs r3, #2
  7067. 8002dfe: 461a mov r2, r3
  7068. 8002e00: f107 0310 add.w r3, r7, #16
  7069. 8002e04: 3b04 subs r3, #4
  7070. 8002e06: 4619 mov r1, r3
  7071. 8002e08: f7fe fb28 bl 800145c <crc32>
  7072. 8002e0c: 4603 mov r3, r0
  7073. 8002e0e: 4a58 ldr r2, [pc, #352] @ (8002f70 <SID_36_function+0x2b0>)
  7074. 8002e10: 6013 str r3, [r2, #0]
  7075. oReturnCheck = flash_write_page((load_MemoryAddress + load_BlockCount*MaxNumberOfBlockLength), TransferRequestParameterRecord, msg->buf_len-2, false);
  7076. 8002e12: 2380 movs r3, #128 @ 0x80
  7077. 8002e14: 461a mov r2, r3
  7078. 8002e16: 4b57 ldr r3, [pc, #348] @ (8002f74 <SID_36_function+0x2b4>)
  7079. 8002e18: 681b ldr r3, [r3, #0]
  7080. 8002e1a: fb03 f202 mul.w r2, r3, r2
  7081. 8002e1e: 4b56 ldr r3, [pc, #344] @ (8002f78 <SID_36_function+0x2b8>)
  7082. 8002e20: 681b ldr r3, [r3, #0]
  7083. 8002e22: 18d0 adds r0, r2, r3
  7084. 8002e24: f107 0330 add.w r3, r7, #48 @ 0x30
  7085. 8002e28: f853 3c2c ldr.w r3, [r3, #-44]
  7086. 8002e2c: 891b ldrh r3, [r3, #8]
  7087. 8002e2e: 3b02 subs r3, #2
  7088. 8002e30: 461a mov r2, r3
  7089. 8002e32: f107 0110 add.w r1, r7, #16
  7090. 8002e36: 3904 subs r1, #4
  7091. 8002e38: 2300 movs r3, #0
  7092. 8002e3a: f7fd ff45 bl 8000cc8 <flash_write_page>
  7093. 8002e3e: f507 5381 add.w r3, r7, #4128 @ 0x1020
  7094. 8002e42: f103 0308 add.w r3, r3, #8
  7095. 8002e46: 6018 str r0, [r3, #0]
  7096. if(!oReturnCheck)
  7097. 8002e48: f507 5381 add.w r3, r7, #4128 @ 0x1020
  7098. 8002e4c: f103 0308 add.w r3, r3, #8
  7099. 8002e50: 681b ldr r3, [r3, #0]
  7100. 8002e52: 2b00 cmp r3, #0
  7101. 8002e54: d163 bne.n 8002f1e <SID_36_function+0x25e>
  7102. {
  7103. WriteFlashAlreadySize = WriteFlashAlreadySize + msg->buf_len-2;
  7104. 8002e56: f107 0330 add.w r3, r7, #48 @ 0x30
  7105. 8002e5a: f853 3c2c ldr.w r3, [r3, #-44]
  7106. 8002e5e: 891b ldrh r3, [r3, #8]
  7107. 8002e60: 461a mov r2, r3
  7108. 8002e62: 4b46 ldr r3, [pc, #280] @ (8002f7c <SID_36_function+0x2bc>)
  7109. 8002e64: 681b ldr r3, [r3, #0]
  7110. 8002e66: 4413 add r3, r2
  7111. 8002e68: 3b02 subs r3, #2
  7112. 8002e6a: 4a44 ldr r2, [pc, #272] @ (8002f7c <SID_36_function+0x2bc>)
  7113. 8002e6c: 6013 str r3, [r2, #0]
  7114. //
  7115. PositiveResponseEnable = 1;
  7116. 8002e6e: 2301 movs r3, #1
  7117. 8002e70: f507 5281 add.w r2, r7, #4128 @ 0x1020
  7118. 8002e74: f102 020d add.w r2, r2, #13
  7119. 8002e78: 7013 strb r3, [r2, #0]
  7120. buf[0] = msg->buf[0]+0x40; // PositiveResponseServiceIdentifier
  7121. 8002e7a: f107 0330 add.w r3, r7, #48 @ 0x30
  7122. 8002e7e: f853 3c2c ldr.w r3, [r3, #-44]
  7123. 8002e82: 685b ldr r3, [r3, #4]
  7124. 8002e84: 781b ldrb r3, [r3, #0]
  7125. 8002e86: 3340 adds r3, #64 @ 0x40
  7126. 8002e88: b2db uxtb r3, r3
  7127. 8002e8a: f507 5280 add.w r2, r7, #4096 @ 0x1000
  7128. 8002e8e: f102 0210 add.w r2, r2, #16
  7129. 8002e92: 7013 strb r3, [r2, #0]
  7130. buf[1] = msg->buf[1]; // BlockSequenceCounter
  7131. 8002e94: f107 0330 add.w r3, r7, #48 @ 0x30
  7132. 8002e98: f853 3c2c ldr.w r3, [r3, #-44]
  7133. 8002e9c: 685b ldr r3, [r3, #4]
  7134. 8002e9e: 785b ldrb r3, [r3, #1]
  7135. 8002ea0: f507 5280 add.w r2, r7, #4096 @ 0x1000
  7136. 8002ea4: f102 0211 add.w r2, r2, #17
  7137. 8002ea8: 7013 strb r3, [r2, #0]
  7138. buf[2] = (uint8)((crc32val>>24)&0xFF);
  7139. 8002eaa: 4b31 ldr r3, [pc, #196] @ (8002f70 <SID_36_function+0x2b0>)
  7140. 8002eac: 681b ldr r3, [r3, #0]
  7141. 8002eae: 0e1b lsrs r3, r3, #24
  7142. 8002eb0: b2db uxtb r3, r3
  7143. 8002eb2: f507 5280 add.w r2, r7, #4096 @ 0x1000
  7144. 8002eb6: f102 0212 add.w r2, r2, #18
  7145. 8002eba: 7013 strb r3, [r2, #0]
  7146. buf[3] = (uint8)((crc32val>>16)&0xFF);
  7147. 8002ebc: 4b2c ldr r3, [pc, #176] @ (8002f70 <SID_36_function+0x2b0>)
  7148. 8002ebe: 681b ldr r3, [r3, #0]
  7149. 8002ec0: 0c1b lsrs r3, r3, #16
  7150. 8002ec2: b2db uxtb r3, r3
  7151. 8002ec4: f507 5280 add.w r2, r7, #4096 @ 0x1000
  7152. 8002ec8: f102 0213 add.w r2, r2, #19
  7153. 8002ecc: 7013 strb r3, [r2, #0]
  7154. buf[4] = (uint8)((crc32val>>8)&0xFF);
  7155. 8002ece: 4b28 ldr r3, [pc, #160] @ (8002f70 <SID_36_function+0x2b0>)
  7156. 8002ed0: 681b ldr r3, [r3, #0]
  7157. 8002ed2: 0a1b lsrs r3, r3, #8
  7158. 8002ed4: b2db uxtb r3, r3
  7159. 8002ed6: f507 5280 add.w r2, r7, #4096 @ 0x1000
  7160. 8002eda: f102 0214 add.w r2, r2, #20
  7161. 8002ede: 7013 strb r3, [r2, #0]
  7162. buf[5] = (uint8)((crc32val>>0)&0xFF);
  7163. 8002ee0: 4b23 ldr r3, [pc, #140] @ (8002f70 <SID_36_function+0x2b0>)
  7164. 8002ee2: 681b ldr r3, [r3, #0]
  7165. 8002ee4: b2db uxtb r3, r3
  7166. 8002ee6: f507 5280 add.w r2, r7, #4096 @ 0x1000
  7167. 8002eea: f102 0215 add.w r2, r2, #21
  7168. 8002eee: 7013 strb r3, [r2, #0]
  7169. msg_req.buf_len = 6;
  7170. 8002ef0: 2306 movs r3, #6
  7171. 8002ef2: f507 5281 add.w r2, r7, #4128 @ 0x1020
  7172. 8002ef6: 8013 strh r3, [r2, #0]
  7173. /////////////////////////////////////////////////////////////////
  7174. load_BlockCount++;
  7175. 8002ef8: 4b1e ldr r3, [pc, #120] @ (8002f74 <SID_36_function+0x2b4>)
  7176. 8002efa: 681b ldr r3, [r3, #0]
  7177. 8002efc: 3301 adds r3, #1
  7178. 8002efe: 4a1d ldr r2, [pc, #116] @ (8002f74 <SID_36_function+0x2b4>)
  7179. 8002f00: 6013 str r3, [r2, #0]
  7180. if(load_BlockCount==load_BlockNum)
  7181. 8002f02: 4b1c ldr r3, [pc, #112] @ (8002f74 <SID_36_function+0x2b4>)
  7182. 8002f04: 681a ldr r2, [r3, #0]
  7183. 8002f06: 4b1e ldr r3, [pc, #120] @ (8002f80 <SID_36_function+0x2c0>)
  7184. 8002f08: 681b ldr r3, [r3, #0]
  7185. 8002f0a: 429a cmp r2, r3
  7186. 8002f0c: d103 bne.n 8002f16 <SID_36_function+0x256>
  7187. {
  7188. load_sequence_state = 0x03;
  7189. 8002f0e: 4b15 ldr r3, [pc, #84] @ (8002f64 <SID_36_function+0x2a4>)
  7190. 8002f10: 2203 movs r2, #3
  7191. 8002f12: 701a strb r2, [r3, #0]
  7192. 8002f14: e00e b.n 8002f34 <SID_36_function+0x274>
  7193. }
  7194. else
  7195. {
  7196. load_sequence_state = 0x02;
  7197. 8002f16: 4b13 ldr r3, [pc, #76] @ (8002f64 <SID_36_function+0x2a4>)
  7198. 8002f18: 2202 movs r2, #2
  7199. 8002f1a: 701a strb r2, [r3, #0]
  7200. 8002f1c: e00a b.n 8002f34 <SID_36_function+0x274>
  7201. }
  7202. }
  7203. else
  7204. {
  7205. // Indicate that the flash programming failed.
  7206. NegativeResponse(msg->buf[0],0x70);//
  7207. 8002f1e: f107 0330 add.w r3, r7, #48 @ 0x30
  7208. 8002f22: f853 3c2c ldr.w r3, [r3, #-44]
  7209. 8002f26: 685b ldr r3, [r3, #4]
  7210. 8002f28: 781b ldrb r3, [r3, #0]
  7211. 8002f2a: 2170 movs r1, #112 @ 0x70
  7212. 8002f2c: 4618 mov r0, r3
  7213. 8002f2e: f7ff fb01 bl 8002534 <NegativeResponse>
  7214. return;
  7215. 8002f32: e012 b.n 8002f5a <SID_36_function+0x29a>
  7216. }
  7217. ////////////////////////////////////////////////////////////////////
  7218. if(PositiveResponseEnable==1)
  7219. 8002f34: f507 5381 add.w r3, r7, #4128 @ 0x1020
  7220. 8002f38: f103 030d add.w r3, r3, #13
  7221. 8002f3c: 781b ldrb r3, [r3, #0]
  7222. 8002f3e: 2b01 cmp r3, #1
  7223. 8002f40: d10b bne.n 8002f5a <SID_36_function+0x29a>
  7224. {
  7225. /* transmit message */
  7226. i15765_tx_app(&msg_req, &status_rq);
  7227. 8002f42: f507 5280 add.w r2, r7, #4096 @ 0x1000
  7228. 8002f46: f102 020f add.w r2, r2, #15
  7229. 8002f4a: f507 5380 add.w r3, r7, #4096 @ 0x1000
  7230. 8002f4e: f103 0318 add.w r3, r3, #24
  7231. 8002f52: 4611 mov r1, r2
  7232. 8002f54: 4618 mov r0, r3
  7233. 8002f56: f7ff f8db bl 8002110 <i15765_tx_app>
  7234. }
  7235. }
  7236. 8002f5a: f507 5781 add.w r7, r7, #4128 @ 0x1020
  7237. 8002f5e: 3710 adds r7, #16
  7238. 8002f60: 46bd mov sp, r7
  7239. 8002f62: bd80 pop {r7, pc}
  7240. 8002f64: 20001ea8 .word 0x20001ea8
  7241. 8002f68: 20001eaa .word 0x20001eaa
  7242. 8002f6c: 20001eac .word 0x20001eac
  7243. 8002f70: 20000004 .word 0x20000004
  7244. 8002f74: 20001e9c .word 0x20001e9c
  7245. 8002f78: 20001e90 .word 0x20001e90
  7246. 8002f7c: 20001eb4 .word 0x20001eb4
  7247. 8002f80: 20001e98 .word 0x20001e98
  7248. 08002f84 <SID_37_function>:
  7249. void SID_37_function(i15765_t *msg)
  7250. {
  7251. 8002f84: b580 push {r7, lr}
  7252. 8002f86: b08a sub sp, #40 @ 0x28
  7253. 8002f88: af00 add r7, sp, #0
  7254. 8002f8a: 6078 str r0, [r7, #4]
  7255. i15765_t msg_req;
  7256. uint8_t buf[8];
  7257. uint8_t status_rq;
  7258. /* basic stuff */
  7259. msg_req.buf = buf;
  7260. 8002f8c: f107 0310 add.w r3, r7, #16
  7261. 8002f90: 61fb str r3, [r7, #28]
  7262. msg_req.pri = 6;
  7263. 8002f92: 2306 movs r3, #6
  7264. 8002f94: 76bb strb r3, [r7, #26]
  7265. msg_req.ta = 0x0C;
  7266. 8002f96: 230c movs r3, #12
  7267. 8002f98: 767b strb r3, [r7, #25]
  7268. if(msg->buf_len != 1)
  7269. 8002f9a: 687b ldr r3, [r7, #4]
  7270. 8002f9c: 891b ldrh r3, [r3, #8]
  7271. 8002f9e: 2b01 cmp r3, #1
  7272. 8002fa0: d007 beq.n 8002fb2 <SID_37_function+0x2e>
  7273. {
  7274. NegativeResponse(msg->buf[0],0x13); //
  7275. 8002fa2: 687b ldr r3, [r7, #4]
  7276. 8002fa4: 685b ldr r3, [r3, #4]
  7277. 8002fa6: 781b ldrb r3, [r3, #0]
  7278. 8002fa8: 2113 movs r1, #19
  7279. 8002faa: 4618 mov r0, r3
  7280. 8002fac: f7ff fac2 bl 8002534 <NegativeResponse>
  7281. return;
  7282. 8002fb0: e024 b.n 8002ffc <SID_37_function+0x78>
  7283. }
  7284. // if(load_sequence_state != 0x02)
  7285. if(load_sequence_state != 0x03)
  7286. 8002fb2: 4b14 ldr r3, [pc, #80] @ (8003004 <SID_37_function+0x80>)
  7287. 8002fb4: 781b ldrb r3, [r3, #0]
  7288. 8002fb6: 2b03 cmp r3, #3
  7289. 8002fb8: d007 beq.n 8002fca <SID_37_function+0x46>
  7290. {
  7291. NegativeResponse(msg->buf[0],0x24); //(24)
  7292. 8002fba: 687b ldr r3, [r7, #4]
  7293. 8002fbc: 685b ldr r3, [r3, #4]
  7294. 8002fbe: 781b ldrb r3, [r3, #0]
  7295. 8002fc0: 2124 movs r1, #36 @ 0x24
  7296. 8002fc2: 4618 mov r0, r3
  7297. 8002fc4: f7ff fab6 bl 8002534 <NegativeResponse>
  7298. return;
  7299. 8002fc8: e018 b.n 8002ffc <SID_37_function+0x78>
  7300. }
  7301. else
  7302. {
  7303. buf[0] = msg->buf[0]+0x40; // PositiveResponseServiceIdentifier
  7304. 8002fca: 687b ldr r3, [r7, #4]
  7305. 8002fcc: 685b ldr r3, [r3, #4]
  7306. 8002fce: 781b ldrb r3, [r3, #0]
  7307. 8002fd0: 3340 adds r3, #64 @ 0x40
  7308. 8002fd2: b2db uxtb r3, r3
  7309. 8002fd4: 743b strb r3, [r7, #16]
  7310. msg_req.buf_len = 1;
  7311. 8002fd6: 2301 movs r3, #1
  7312. 8002fd8: 843b strh r3, [r7, #32]
  7313. /* transmit message */
  7314. i15765_tx_app(&msg_req, &status_rq);
  7315. 8002fda: f107 020f add.w r2, r7, #15
  7316. 8002fde: f107 0318 add.w r3, r7, #24
  7317. 8002fe2: 4611 mov r1, r2
  7318. 8002fe4: 4618 mov r0, r3
  7319. 8002fe6: f7ff f893 bl 8002110 <i15765_tx_app>
  7320. //
  7321. load_sequence_state = 0x00;
  7322. 8002fea: 4b06 ldr r3, [pc, #24] @ (8003004 <SID_37_function+0x80>)
  7323. 8002fec: 2200 movs r2, #0
  7324. 8002fee: 701a strb r2, [r3, #0]
  7325. load_BlockCount = 0;
  7326. 8002ff0: 4b05 ldr r3, [pc, #20] @ (8003008 <SID_37_function+0x84>)
  7327. 8002ff2: 2200 movs r2, #0
  7328. 8002ff4: 601a str r2, [r3, #0]
  7329. BlockSequenceCounter_pre = 0;
  7330. 8002ff6: 4b05 ldr r3, [pc, #20] @ (800300c <SID_37_function+0x88>)
  7331. 8002ff8: 2200 movs r2, #0
  7332. 8002ffa: 801a strh r2, [r3, #0]
  7333. }
  7334. }
  7335. 8002ffc: 3728 adds r7, #40 @ 0x28
  7336. 8002ffe: 46bd mov sp, r7
  7337. 8003000: bd80 pop {r7, pc}
  7338. 8003002: bf00 nop
  7339. 8003004: 20001ea8 .word 0x20001ea8
  7340. 8003008: 20001e9c .word 0x20001e9c
  7341. 800300c: 20001eac .word 0x20001eac
  7342. 08003010 <HAL_Init>:
  7343. * need to ensure that the SysTick time base is always set to 1 millisecond
  7344. * to have correct HAL operation.
  7345. * @retval HAL status
  7346. */
  7347. HAL_StatusTypeDef HAL_Init(void)
  7348. {
  7349. 8003010: b580 push {r7, lr}
  7350. 8003012: af00 add r7, sp, #0
  7351. /* Configure Flash prefetch, Instruction cache, Data cache */
  7352. #if (INSTRUCTION_CACHE_ENABLE != 0U)
  7353. __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
  7354. 8003014: 4b0e ldr r3, [pc, #56] @ (8003050 <HAL_Init+0x40>)
  7355. 8003016: 681b ldr r3, [r3, #0]
  7356. 8003018: 4a0d ldr r2, [pc, #52] @ (8003050 <HAL_Init+0x40>)
  7357. 800301a: f443 7300 orr.w r3, r3, #512 @ 0x200
  7358. 800301e: 6013 str r3, [r2, #0]
  7359. #endif /* INSTRUCTION_CACHE_ENABLE */
  7360. #if (DATA_CACHE_ENABLE != 0U)
  7361. __HAL_FLASH_DATA_CACHE_ENABLE();
  7362. 8003020: 4b0b ldr r3, [pc, #44] @ (8003050 <HAL_Init+0x40>)
  7363. 8003022: 681b ldr r3, [r3, #0]
  7364. 8003024: 4a0a ldr r2, [pc, #40] @ (8003050 <HAL_Init+0x40>)
  7365. 8003026: f443 6380 orr.w r3, r3, #1024 @ 0x400
  7366. 800302a: 6013 str r3, [r2, #0]
  7367. #endif /* DATA_CACHE_ENABLE */
  7368. #if (PREFETCH_ENABLE != 0U)
  7369. __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
  7370. 800302c: 4b08 ldr r3, [pc, #32] @ (8003050 <HAL_Init+0x40>)
  7371. 800302e: 681b ldr r3, [r3, #0]
  7372. 8003030: 4a07 ldr r2, [pc, #28] @ (8003050 <HAL_Init+0x40>)
  7373. 8003032: f443 7380 orr.w r3, r3, #256 @ 0x100
  7374. 8003036: 6013 str r3, [r2, #0]
  7375. #endif /* PREFETCH_ENABLE */
  7376. /* Set Interrupt Group Priority */
  7377. HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
  7378. 8003038: 2003 movs r0, #3
  7379. 800303a: f001 f8bf bl 80041bc <HAL_NVIC_SetPriorityGrouping>
  7380. /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
  7381. HAL_InitTick(TICK_INT_PRIORITY);
  7382. 800303e: 200f movs r0, #15
  7383. 8003040: f000 f83e bl 80030c0 <HAL_InitTick>
  7384. /* Init the low level hardware */
  7385. HAL_MspInit();
  7386. 8003044: f7fe f884 bl 8001150 <HAL_MspInit>
  7387. /* Return function status */
  7388. return HAL_OK;
  7389. 8003048: 2300 movs r3, #0
  7390. }
  7391. 800304a: 4618 mov r0, r3
  7392. 800304c: bd80 pop {r7, pc}
  7393. 800304e: bf00 nop
  7394. 8003050: 40023c00 .word 0x40023c00
  7395. 08003054 <HAL_DeInit>:
  7396. * @brief This function de-Initializes common part of the HAL and stops the systick.
  7397. * This function is optional.
  7398. * @retval HAL status
  7399. */
  7400. HAL_StatusTypeDef HAL_DeInit(void)
  7401. {
  7402. 8003054: b580 push {r7, lr}
  7403. 8003056: af00 add r7, sp, #0
  7404. /* Reset of all peripherals */
  7405. __HAL_RCC_APB1_FORCE_RESET();
  7406. 8003058: 4b11 ldr r3, [pc, #68] @ (80030a0 <HAL_DeInit+0x4c>)
  7407. 800305a: 4a12 ldr r2, [pc, #72] @ (80030a4 <HAL_DeInit+0x50>)
  7408. 800305c: 621a str r2, [r3, #32]
  7409. __HAL_RCC_APB1_RELEASE_RESET();
  7410. 800305e: 4b10 ldr r3, [pc, #64] @ (80030a0 <HAL_DeInit+0x4c>)
  7411. 8003060: 2200 movs r2, #0
  7412. 8003062: 621a str r2, [r3, #32]
  7413. __HAL_RCC_APB2_FORCE_RESET();
  7414. 8003064: 4b0e ldr r3, [pc, #56] @ (80030a0 <HAL_DeInit+0x4c>)
  7415. 8003066: 4a10 ldr r2, [pc, #64] @ (80030a8 <HAL_DeInit+0x54>)
  7416. 8003068: 625a str r2, [r3, #36] @ 0x24
  7417. __HAL_RCC_APB2_RELEASE_RESET();
  7418. 800306a: 4b0d ldr r3, [pc, #52] @ (80030a0 <HAL_DeInit+0x4c>)
  7419. 800306c: 2200 movs r2, #0
  7420. 800306e: 625a str r2, [r3, #36] @ 0x24
  7421. __HAL_RCC_AHB1_FORCE_RESET();
  7422. 8003070: 4b0b ldr r3, [pc, #44] @ (80030a0 <HAL_DeInit+0x4c>)
  7423. 8003072: 4a0e ldr r2, [pc, #56] @ (80030ac <HAL_DeInit+0x58>)
  7424. 8003074: 611a str r2, [r3, #16]
  7425. __HAL_RCC_AHB1_RELEASE_RESET();
  7426. 8003076: 4b0a ldr r3, [pc, #40] @ (80030a0 <HAL_DeInit+0x4c>)
  7427. 8003078: 2200 movs r2, #0
  7428. 800307a: 611a str r2, [r3, #16]
  7429. __HAL_RCC_AHB2_FORCE_RESET();
  7430. 800307c: 4b08 ldr r3, [pc, #32] @ (80030a0 <HAL_DeInit+0x4c>)
  7431. 800307e: 22c1 movs r2, #193 @ 0xc1
  7432. 8003080: 615a str r2, [r3, #20]
  7433. __HAL_RCC_AHB2_RELEASE_RESET();
  7434. 8003082: 4b07 ldr r3, [pc, #28] @ (80030a0 <HAL_DeInit+0x4c>)
  7435. 8003084: 2200 movs r2, #0
  7436. 8003086: 615a str r2, [r3, #20]
  7437. __HAL_RCC_AHB3_FORCE_RESET();
  7438. 8003088: 4b05 ldr r3, [pc, #20] @ (80030a0 <HAL_DeInit+0x4c>)
  7439. 800308a: 2201 movs r2, #1
  7440. 800308c: 619a str r2, [r3, #24]
  7441. __HAL_RCC_AHB3_RELEASE_RESET();
  7442. 800308e: 4b04 ldr r3, [pc, #16] @ (80030a0 <HAL_DeInit+0x4c>)
  7443. 8003090: 2200 movs r2, #0
  7444. 8003092: 619a str r2, [r3, #24]
  7445. /* De-Init the low level hardware */
  7446. HAL_MspDeInit();
  7447. 8003094: f000 f80c bl 80030b0 <HAL_MspDeInit>
  7448. /* Return function status */
  7449. return HAL_OK;
  7450. 8003098: 2300 movs r3, #0
  7451. }
  7452. 800309a: 4618 mov r0, r3
  7453. 800309c: bd80 pop {r7, pc}
  7454. 800309e: bf00 nop
  7455. 80030a0: 40023800 .word 0x40023800
  7456. 80030a4: f6fec9ff .word 0xf6fec9ff
  7457. 80030a8: 04777933 .word 0x04777933
  7458. 80030ac: 206011ff .word 0x206011ff
  7459. 080030b0 <HAL_MspDeInit>:
  7460. /**
  7461. * @brief DeInitializes the MSP.
  7462. * @retval None
  7463. */
  7464. __weak void HAL_MspDeInit(void)
  7465. {
  7466. 80030b0: b480 push {r7}
  7467. 80030b2: af00 add r7, sp, #0
  7468. /* NOTE : This function should not be modified, when the callback is needed,
  7469. the HAL_MspDeInit could be implemented in the user file
  7470. */
  7471. }
  7472. 80030b4: bf00 nop
  7473. 80030b6: 46bd mov sp, r7
  7474. 80030b8: f85d 7b04 ldr.w r7, [sp], #4
  7475. 80030bc: 4770 bx lr
  7476. ...
  7477. 080030c0 <HAL_InitTick>:
  7478. * implementation in user file.
  7479. * @param TickPriority Tick interrupt priority.
  7480. * @retval HAL status
  7481. */
  7482. __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
  7483. {
  7484. 80030c0: b580 push {r7, lr}
  7485. 80030c2: b082 sub sp, #8
  7486. 80030c4: af00 add r7, sp, #0
  7487. 80030c6: 6078 str r0, [r7, #4]
  7488. /* Configure the SysTick to have interrupt in 1ms time basis*/
  7489. if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
  7490. 80030c8: 4b12 ldr r3, [pc, #72] @ (8003114 <HAL_InitTick+0x54>)
  7491. 80030ca: 681a ldr r2, [r3, #0]
  7492. 80030cc: 4b12 ldr r3, [pc, #72] @ (8003118 <HAL_InitTick+0x58>)
  7493. 80030ce: 781b ldrb r3, [r3, #0]
  7494. 80030d0: 4619 mov r1, r3
  7495. 80030d2: f44f 737a mov.w r3, #1000 @ 0x3e8
  7496. 80030d6: fbb3 f3f1 udiv r3, r3, r1
  7497. 80030da: fbb2 f3f3 udiv r3, r2, r3
  7498. 80030de: 4618 mov r0, r3
  7499. 80030e0: f001 f8af bl 8004242 <HAL_SYSTICK_Config>
  7500. 80030e4: 4603 mov r3, r0
  7501. 80030e6: 2b00 cmp r3, #0
  7502. 80030e8: d001 beq.n 80030ee <HAL_InitTick+0x2e>
  7503. {
  7504. return HAL_ERROR;
  7505. 80030ea: 2301 movs r3, #1
  7506. 80030ec: e00e b.n 800310c <HAL_InitTick+0x4c>
  7507. }
  7508. /* Configure the SysTick IRQ priority */
  7509. if (TickPriority < (1UL << __NVIC_PRIO_BITS))
  7510. 80030ee: 687b ldr r3, [r7, #4]
  7511. 80030f0: 2b0f cmp r3, #15
  7512. 80030f2: d80a bhi.n 800310a <HAL_InitTick+0x4a>
  7513. {
  7514. HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
  7515. 80030f4: 2200 movs r2, #0
  7516. 80030f6: 6879 ldr r1, [r7, #4]
  7517. 80030f8: f04f 30ff mov.w r0, #4294967295
  7518. 80030fc: f001 f869 bl 80041d2 <HAL_NVIC_SetPriority>
  7519. uwTickPrio = TickPriority;
  7520. 8003100: 4a06 ldr r2, [pc, #24] @ (800311c <HAL_InitTick+0x5c>)
  7521. 8003102: 687b ldr r3, [r7, #4]
  7522. 8003104: 6013 str r3, [r2, #0]
  7523. {
  7524. return HAL_ERROR;
  7525. }
  7526. /* Return function status */
  7527. return HAL_OK;
  7528. 8003106: 2300 movs r3, #0
  7529. 8003108: e000 b.n 800310c <HAL_InitTick+0x4c>
  7530. return HAL_ERROR;
  7531. 800310a: 2301 movs r3, #1
  7532. }
  7533. 800310c: 4618 mov r0, r3
  7534. 800310e: 3708 adds r7, #8
  7535. 8003110: 46bd mov sp, r7
  7536. 8003112: bd80 pop {r7, pc}
  7537. 8003114: 20000000 .word 0x20000000
  7538. 8003118: 20000010 .word 0x20000010
  7539. 800311c: 2000000c .word 0x2000000c
  7540. 08003120 <HAL_IncTick>:
  7541. * @note This function is declared as __weak to be overwritten in case of other
  7542. * implementations in user file.
  7543. * @retval None
  7544. */
  7545. __weak void HAL_IncTick(void)
  7546. {
  7547. 8003120: b480 push {r7}
  7548. 8003122: af00 add r7, sp, #0
  7549. uwTick += uwTickFreq;
  7550. 8003124: 4b06 ldr r3, [pc, #24] @ (8003140 <HAL_IncTick+0x20>)
  7551. 8003126: 781b ldrb r3, [r3, #0]
  7552. 8003128: 461a mov r2, r3
  7553. 800312a: 4b06 ldr r3, [pc, #24] @ (8003144 <HAL_IncTick+0x24>)
  7554. 800312c: 681b ldr r3, [r3, #0]
  7555. 800312e: 4413 add r3, r2
  7556. 8003130: 4a04 ldr r2, [pc, #16] @ (8003144 <HAL_IncTick+0x24>)
  7557. 8003132: 6013 str r3, [r2, #0]
  7558. }
  7559. 8003134: bf00 nop
  7560. 8003136: 46bd mov sp, r7
  7561. 8003138: f85d 7b04 ldr.w r7, [sp], #4
  7562. 800313c: 4770 bx lr
  7563. 800313e: bf00 nop
  7564. 8003140: 20000010 .word 0x20000010
  7565. 8003144: 20001ebc .word 0x20001ebc
  7566. 08003148 <HAL_GetTick>:
  7567. * @note This function is declared as __weak to be overwritten in case of other
  7568. * implementations in user file.
  7569. * @retval tick value
  7570. */
  7571. __weak uint32_t HAL_GetTick(void)
  7572. {
  7573. 8003148: b480 push {r7}
  7574. 800314a: af00 add r7, sp, #0
  7575. return uwTick;
  7576. 800314c: 4b03 ldr r3, [pc, #12] @ (800315c <HAL_GetTick+0x14>)
  7577. 800314e: 681b ldr r3, [r3, #0]
  7578. }
  7579. 8003150: 4618 mov r0, r3
  7580. 8003152: 46bd mov sp, r7
  7581. 8003154: f85d 7b04 ldr.w r7, [sp], #4
  7582. 8003158: 4770 bx lr
  7583. 800315a: bf00 nop
  7584. 800315c: 20001ebc .word 0x20001ebc
  7585. 08003160 <HAL_CAN_Init>:
  7586. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  7587. * the configuration information for the specified CAN.
  7588. * @retval HAL status
  7589. */
  7590. HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef *hcan)
  7591. {
  7592. 8003160: b580 push {r7, lr}
  7593. 8003162: b084 sub sp, #16
  7594. 8003164: af00 add r7, sp, #0
  7595. 8003166: 6078 str r0, [r7, #4]
  7596. uint32_t tickstart;
  7597. /* Check CAN handle */
  7598. if (hcan == NULL)
  7599. 8003168: 687b ldr r3, [r7, #4]
  7600. 800316a: 2b00 cmp r3, #0
  7601. 800316c: d101 bne.n 8003172 <HAL_CAN_Init+0x12>
  7602. {
  7603. return HAL_ERROR;
  7604. 800316e: 2301 movs r3, #1
  7605. 8003170: e0ed b.n 800334e <HAL_CAN_Init+0x1ee>
  7606. /* Init the low level hardware: CLOCK, NVIC */
  7607. hcan->MspInitCallback(hcan);
  7608. }
  7609. #else
  7610. if (hcan->State == HAL_CAN_STATE_RESET)
  7611. 8003172: 687b ldr r3, [r7, #4]
  7612. 8003174: f893 3020 ldrb.w r3, [r3, #32]
  7613. 8003178: b2db uxtb r3, r3
  7614. 800317a: 2b00 cmp r3, #0
  7615. 800317c: d102 bne.n 8003184 <HAL_CAN_Init+0x24>
  7616. {
  7617. /* Init the low level hardware: CLOCK, NVIC */
  7618. HAL_CAN_MspInit(hcan);
  7619. 800317e: 6878 ldr r0, [r7, #4]
  7620. 8003180: f7fd f9f0 bl 8000564 <HAL_CAN_MspInit>
  7621. }
  7622. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  7623. /* Request initialisation */
  7624. SET_BIT(hcan->Instance->MCR, CAN_MCR_INRQ);
  7625. 8003184: 687b ldr r3, [r7, #4]
  7626. 8003186: 681b ldr r3, [r3, #0]
  7627. 8003188: 681a ldr r2, [r3, #0]
  7628. 800318a: 687b ldr r3, [r7, #4]
  7629. 800318c: 681b ldr r3, [r3, #0]
  7630. 800318e: f042 0201 orr.w r2, r2, #1
  7631. 8003192: 601a str r2, [r3, #0]
  7632. /* Get tick */
  7633. tickstart = HAL_GetTick();
  7634. 8003194: f7ff ffd8 bl 8003148 <HAL_GetTick>
  7635. 8003198: 60f8 str r0, [r7, #12]
  7636. /* Wait initialisation acknowledge */
  7637. while ((hcan->Instance->MSR & CAN_MSR_INAK) == 0U)
  7638. 800319a: e012 b.n 80031c2 <HAL_CAN_Init+0x62>
  7639. {
  7640. if ((HAL_GetTick() - tickstart) > CAN_TIMEOUT_VALUE)
  7641. 800319c: f7ff ffd4 bl 8003148 <HAL_GetTick>
  7642. 80031a0: 4602 mov r2, r0
  7643. 80031a2: 68fb ldr r3, [r7, #12]
  7644. 80031a4: 1ad3 subs r3, r2, r3
  7645. 80031a6: 2b0a cmp r3, #10
  7646. 80031a8: d90b bls.n 80031c2 <HAL_CAN_Init+0x62>
  7647. {
  7648. /* Update error code */
  7649. hcan->ErrorCode |= HAL_CAN_ERROR_TIMEOUT;
  7650. 80031aa: 687b ldr r3, [r7, #4]
  7651. 80031ac: 6a5b ldr r3, [r3, #36] @ 0x24
  7652. 80031ae: f443 3200 orr.w r2, r3, #131072 @ 0x20000
  7653. 80031b2: 687b ldr r3, [r7, #4]
  7654. 80031b4: 625a str r2, [r3, #36] @ 0x24
  7655. /* Change CAN state */
  7656. hcan->State = HAL_CAN_STATE_ERROR;
  7657. 80031b6: 687b ldr r3, [r7, #4]
  7658. 80031b8: 2205 movs r2, #5
  7659. 80031ba: f883 2020 strb.w r2, [r3, #32]
  7660. return HAL_ERROR;
  7661. 80031be: 2301 movs r3, #1
  7662. 80031c0: e0c5 b.n 800334e <HAL_CAN_Init+0x1ee>
  7663. while ((hcan->Instance->MSR & CAN_MSR_INAK) == 0U)
  7664. 80031c2: 687b ldr r3, [r7, #4]
  7665. 80031c4: 681b ldr r3, [r3, #0]
  7666. 80031c6: 685b ldr r3, [r3, #4]
  7667. 80031c8: f003 0301 and.w r3, r3, #1
  7668. 80031cc: 2b00 cmp r3, #0
  7669. 80031ce: d0e5 beq.n 800319c <HAL_CAN_Init+0x3c>
  7670. }
  7671. }
  7672. /* Exit from sleep mode */
  7673. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_SLEEP);
  7674. 80031d0: 687b ldr r3, [r7, #4]
  7675. 80031d2: 681b ldr r3, [r3, #0]
  7676. 80031d4: 681a ldr r2, [r3, #0]
  7677. 80031d6: 687b ldr r3, [r7, #4]
  7678. 80031d8: 681b ldr r3, [r3, #0]
  7679. 80031da: f022 0202 bic.w r2, r2, #2
  7680. 80031de: 601a str r2, [r3, #0]
  7681. /* Get tick */
  7682. tickstart = HAL_GetTick();
  7683. 80031e0: f7ff ffb2 bl 8003148 <HAL_GetTick>
  7684. 80031e4: 60f8 str r0, [r7, #12]
  7685. /* Check Sleep mode leave acknowledge */
  7686. while ((hcan->Instance->MSR & CAN_MSR_SLAK) != 0U)
  7687. 80031e6: e012 b.n 800320e <HAL_CAN_Init+0xae>
  7688. {
  7689. if ((HAL_GetTick() - tickstart) > CAN_TIMEOUT_VALUE)
  7690. 80031e8: f7ff ffae bl 8003148 <HAL_GetTick>
  7691. 80031ec: 4602 mov r2, r0
  7692. 80031ee: 68fb ldr r3, [r7, #12]
  7693. 80031f0: 1ad3 subs r3, r2, r3
  7694. 80031f2: 2b0a cmp r3, #10
  7695. 80031f4: d90b bls.n 800320e <HAL_CAN_Init+0xae>
  7696. {
  7697. /* Update error code */
  7698. hcan->ErrorCode |= HAL_CAN_ERROR_TIMEOUT;
  7699. 80031f6: 687b ldr r3, [r7, #4]
  7700. 80031f8: 6a5b ldr r3, [r3, #36] @ 0x24
  7701. 80031fa: f443 3200 orr.w r2, r3, #131072 @ 0x20000
  7702. 80031fe: 687b ldr r3, [r7, #4]
  7703. 8003200: 625a str r2, [r3, #36] @ 0x24
  7704. /* Change CAN state */
  7705. hcan->State = HAL_CAN_STATE_ERROR;
  7706. 8003202: 687b ldr r3, [r7, #4]
  7707. 8003204: 2205 movs r2, #5
  7708. 8003206: f883 2020 strb.w r2, [r3, #32]
  7709. return HAL_ERROR;
  7710. 800320a: 2301 movs r3, #1
  7711. 800320c: e09f b.n 800334e <HAL_CAN_Init+0x1ee>
  7712. while ((hcan->Instance->MSR & CAN_MSR_SLAK) != 0U)
  7713. 800320e: 687b ldr r3, [r7, #4]
  7714. 8003210: 681b ldr r3, [r3, #0]
  7715. 8003212: 685b ldr r3, [r3, #4]
  7716. 8003214: f003 0302 and.w r3, r3, #2
  7717. 8003218: 2b00 cmp r3, #0
  7718. 800321a: d1e5 bne.n 80031e8 <HAL_CAN_Init+0x88>
  7719. }
  7720. }
  7721. /* Set the time triggered communication mode */
  7722. if (hcan->Init.TimeTriggeredMode == ENABLE)
  7723. 800321c: 687b ldr r3, [r7, #4]
  7724. 800321e: 7e1b ldrb r3, [r3, #24]
  7725. 8003220: 2b01 cmp r3, #1
  7726. 8003222: d108 bne.n 8003236 <HAL_CAN_Init+0xd6>
  7727. {
  7728. SET_BIT(hcan->Instance->MCR, CAN_MCR_TTCM);
  7729. 8003224: 687b ldr r3, [r7, #4]
  7730. 8003226: 681b ldr r3, [r3, #0]
  7731. 8003228: 681a ldr r2, [r3, #0]
  7732. 800322a: 687b ldr r3, [r7, #4]
  7733. 800322c: 681b ldr r3, [r3, #0]
  7734. 800322e: f042 0280 orr.w r2, r2, #128 @ 0x80
  7735. 8003232: 601a str r2, [r3, #0]
  7736. 8003234: e007 b.n 8003246 <HAL_CAN_Init+0xe6>
  7737. }
  7738. else
  7739. {
  7740. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_TTCM);
  7741. 8003236: 687b ldr r3, [r7, #4]
  7742. 8003238: 681b ldr r3, [r3, #0]
  7743. 800323a: 681a ldr r2, [r3, #0]
  7744. 800323c: 687b ldr r3, [r7, #4]
  7745. 800323e: 681b ldr r3, [r3, #0]
  7746. 8003240: f022 0280 bic.w r2, r2, #128 @ 0x80
  7747. 8003244: 601a str r2, [r3, #0]
  7748. }
  7749. /* Set the automatic bus-off management */
  7750. if (hcan->Init.AutoBusOff == ENABLE)
  7751. 8003246: 687b ldr r3, [r7, #4]
  7752. 8003248: 7e5b ldrb r3, [r3, #25]
  7753. 800324a: 2b01 cmp r3, #1
  7754. 800324c: d108 bne.n 8003260 <HAL_CAN_Init+0x100>
  7755. {
  7756. SET_BIT(hcan->Instance->MCR, CAN_MCR_ABOM);
  7757. 800324e: 687b ldr r3, [r7, #4]
  7758. 8003250: 681b ldr r3, [r3, #0]
  7759. 8003252: 681a ldr r2, [r3, #0]
  7760. 8003254: 687b ldr r3, [r7, #4]
  7761. 8003256: 681b ldr r3, [r3, #0]
  7762. 8003258: f042 0240 orr.w r2, r2, #64 @ 0x40
  7763. 800325c: 601a str r2, [r3, #0]
  7764. 800325e: e007 b.n 8003270 <HAL_CAN_Init+0x110>
  7765. }
  7766. else
  7767. {
  7768. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_ABOM);
  7769. 8003260: 687b ldr r3, [r7, #4]
  7770. 8003262: 681b ldr r3, [r3, #0]
  7771. 8003264: 681a ldr r2, [r3, #0]
  7772. 8003266: 687b ldr r3, [r7, #4]
  7773. 8003268: 681b ldr r3, [r3, #0]
  7774. 800326a: f022 0240 bic.w r2, r2, #64 @ 0x40
  7775. 800326e: 601a str r2, [r3, #0]
  7776. }
  7777. /* Set the automatic wake-up mode */
  7778. if (hcan->Init.AutoWakeUp == ENABLE)
  7779. 8003270: 687b ldr r3, [r7, #4]
  7780. 8003272: 7e9b ldrb r3, [r3, #26]
  7781. 8003274: 2b01 cmp r3, #1
  7782. 8003276: d108 bne.n 800328a <HAL_CAN_Init+0x12a>
  7783. {
  7784. SET_BIT(hcan->Instance->MCR, CAN_MCR_AWUM);
  7785. 8003278: 687b ldr r3, [r7, #4]
  7786. 800327a: 681b ldr r3, [r3, #0]
  7787. 800327c: 681a ldr r2, [r3, #0]
  7788. 800327e: 687b ldr r3, [r7, #4]
  7789. 8003280: 681b ldr r3, [r3, #0]
  7790. 8003282: f042 0220 orr.w r2, r2, #32
  7791. 8003286: 601a str r2, [r3, #0]
  7792. 8003288: e007 b.n 800329a <HAL_CAN_Init+0x13a>
  7793. }
  7794. else
  7795. {
  7796. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_AWUM);
  7797. 800328a: 687b ldr r3, [r7, #4]
  7798. 800328c: 681b ldr r3, [r3, #0]
  7799. 800328e: 681a ldr r2, [r3, #0]
  7800. 8003290: 687b ldr r3, [r7, #4]
  7801. 8003292: 681b ldr r3, [r3, #0]
  7802. 8003294: f022 0220 bic.w r2, r2, #32
  7803. 8003298: 601a str r2, [r3, #0]
  7804. }
  7805. /* Set the automatic retransmission */
  7806. if (hcan->Init.AutoRetransmission == ENABLE)
  7807. 800329a: 687b ldr r3, [r7, #4]
  7808. 800329c: 7edb ldrb r3, [r3, #27]
  7809. 800329e: 2b01 cmp r3, #1
  7810. 80032a0: d108 bne.n 80032b4 <HAL_CAN_Init+0x154>
  7811. {
  7812. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_NART);
  7813. 80032a2: 687b ldr r3, [r7, #4]
  7814. 80032a4: 681b ldr r3, [r3, #0]
  7815. 80032a6: 681a ldr r2, [r3, #0]
  7816. 80032a8: 687b ldr r3, [r7, #4]
  7817. 80032aa: 681b ldr r3, [r3, #0]
  7818. 80032ac: f022 0210 bic.w r2, r2, #16
  7819. 80032b0: 601a str r2, [r3, #0]
  7820. 80032b2: e007 b.n 80032c4 <HAL_CAN_Init+0x164>
  7821. }
  7822. else
  7823. {
  7824. SET_BIT(hcan->Instance->MCR, CAN_MCR_NART);
  7825. 80032b4: 687b ldr r3, [r7, #4]
  7826. 80032b6: 681b ldr r3, [r3, #0]
  7827. 80032b8: 681a ldr r2, [r3, #0]
  7828. 80032ba: 687b ldr r3, [r7, #4]
  7829. 80032bc: 681b ldr r3, [r3, #0]
  7830. 80032be: f042 0210 orr.w r2, r2, #16
  7831. 80032c2: 601a str r2, [r3, #0]
  7832. }
  7833. /* Set the receive FIFO locked mode */
  7834. if (hcan->Init.ReceiveFifoLocked == ENABLE)
  7835. 80032c4: 687b ldr r3, [r7, #4]
  7836. 80032c6: 7f1b ldrb r3, [r3, #28]
  7837. 80032c8: 2b01 cmp r3, #1
  7838. 80032ca: d108 bne.n 80032de <HAL_CAN_Init+0x17e>
  7839. {
  7840. SET_BIT(hcan->Instance->MCR, CAN_MCR_RFLM);
  7841. 80032cc: 687b ldr r3, [r7, #4]
  7842. 80032ce: 681b ldr r3, [r3, #0]
  7843. 80032d0: 681a ldr r2, [r3, #0]
  7844. 80032d2: 687b ldr r3, [r7, #4]
  7845. 80032d4: 681b ldr r3, [r3, #0]
  7846. 80032d6: f042 0208 orr.w r2, r2, #8
  7847. 80032da: 601a str r2, [r3, #0]
  7848. 80032dc: e007 b.n 80032ee <HAL_CAN_Init+0x18e>
  7849. }
  7850. else
  7851. {
  7852. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_RFLM);
  7853. 80032de: 687b ldr r3, [r7, #4]
  7854. 80032e0: 681b ldr r3, [r3, #0]
  7855. 80032e2: 681a ldr r2, [r3, #0]
  7856. 80032e4: 687b ldr r3, [r7, #4]
  7857. 80032e6: 681b ldr r3, [r3, #0]
  7858. 80032e8: f022 0208 bic.w r2, r2, #8
  7859. 80032ec: 601a str r2, [r3, #0]
  7860. }
  7861. /* Set the transmit FIFO priority */
  7862. if (hcan->Init.TransmitFifoPriority == ENABLE)
  7863. 80032ee: 687b ldr r3, [r7, #4]
  7864. 80032f0: 7f5b ldrb r3, [r3, #29]
  7865. 80032f2: 2b01 cmp r3, #1
  7866. 80032f4: d108 bne.n 8003308 <HAL_CAN_Init+0x1a8>
  7867. {
  7868. SET_BIT(hcan->Instance->MCR, CAN_MCR_TXFP);
  7869. 80032f6: 687b ldr r3, [r7, #4]
  7870. 80032f8: 681b ldr r3, [r3, #0]
  7871. 80032fa: 681a ldr r2, [r3, #0]
  7872. 80032fc: 687b ldr r3, [r7, #4]
  7873. 80032fe: 681b ldr r3, [r3, #0]
  7874. 8003300: f042 0204 orr.w r2, r2, #4
  7875. 8003304: 601a str r2, [r3, #0]
  7876. 8003306: e007 b.n 8003318 <HAL_CAN_Init+0x1b8>
  7877. }
  7878. else
  7879. {
  7880. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_TXFP);
  7881. 8003308: 687b ldr r3, [r7, #4]
  7882. 800330a: 681b ldr r3, [r3, #0]
  7883. 800330c: 681a ldr r2, [r3, #0]
  7884. 800330e: 687b ldr r3, [r7, #4]
  7885. 8003310: 681b ldr r3, [r3, #0]
  7886. 8003312: f022 0204 bic.w r2, r2, #4
  7887. 8003316: 601a str r2, [r3, #0]
  7888. }
  7889. /* Set the bit timing register */
  7890. WRITE_REG(hcan->Instance->BTR, (uint32_t)(hcan->Init.Mode |
  7891. 8003318: 687b ldr r3, [r7, #4]
  7892. 800331a: 689a ldr r2, [r3, #8]
  7893. 800331c: 687b ldr r3, [r7, #4]
  7894. 800331e: 68db ldr r3, [r3, #12]
  7895. 8003320: 431a orrs r2, r3
  7896. 8003322: 687b ldr r3, [r7, #4]
  7897. 8003324: 691b ldr r3, [r3, #16]
  7898. 8003326: 431a orrs r2, r3
  7899. 8003328: 687b ldr r3, [r7, #4]
  7900. 800332a: 695b ldr r3, [r3, #20]
  7901. 800332c: ea42 0103 orr.w r1, r2, r3
  7902. 8003330: 687b ldr r3, [r7, #4]
  7903. 8003332: 685b ldr r3, [r3, #4]
  7904. 8003334: 1e5a subs r2, r3, #1
  7905. 8003336: 687b ldr r3, [r7, #4]
  7906. 8003338: 681b ldr r3, [r3, #0]
  7907. 800333a: 430a orrs r2, r1
  7908. 800333c: 61da str r2, [r3, #28]
  7909. hcan->Init.TimeSeg1 |
  7910. hcan->Init.TimeSeg2 |
  7911. (hcan->Init.Prescaler - 1U)));
  7912. /* Initialize the error code */
  7913. hcan->ErrorCode = HAL_CAN_ERROR_NONE;
  7914. 800333e: 687b ldr r3, [r7, #4]
  7915. 8003340: 2200 movs r2, #0
  7916. 8003342: 625a str r2, [r3, #36] @ 0x24
  7917. /* Initialize the CAN state */
  7918. hcan->State = HAL_CAN_STATE_READY;
  7919. 8003344: 687b ldr r3, [r7, #4]
  7920. 8003346: 2201 movs r2, #1
  7921. 8003348: f883 2020 strb.w r2, [r3, #32]
  7922. /* Return function status */
  7923. return HAL_OK;
  7924. 800334c: 2300 movs r3, #0
  7925. }
  7926. 800334e: 4618 mov r0, r3
  7927. 8003350: 3710 adds r7, #16
  7928. 8003352: 46bd mov sp, r7
  7929. 8003354: bd80 pop {r7, pc}
  7930. 08003356 <HAL_CAN_DeInit>:
  7931. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  7932. * the configuration information for the specified CAN.
  7933. * @retval HAL status
  7934. */
  7935. HAL_StatusTypeDef HAL_CAN_DeInit(CAN_HandleTypeDef *hcan)
  7936. {
  7937. 8003356: b580 push {r7, lr}
  7938. 8003358: b082 sub sp, #8
  7939. 800335a: af00 add r7, sp, #0
  7940. 800335c: 6078 str r0, [r7, #4]
  7941. /* Check CAN handle */
  7942. if (hcan == NULL)
  7943. 800335e: 687b ldr r3, [r7, #4]
  7944. 8003360: 2b00 cmp r3, #0
  7945. 8003362: d101 bne.n 8003368 <HAL_CAN_DeInit+0x12>
  7946. {
  7947. return HAL_ERROR;
  7948. 8003364: 2301 movs r3, #1
  7949. 8003366: e015 b.n 8003394 <HAL_CAN_DeInit+0x3e>
  7950. /* Check the parameters */
  7951. assert_param(IS_CAN_ALL_INSTANCE(hcan->Instance));
  7952. /* Stop the CAN module */
  7953. (void)HAL_CAN_Stop(hcan);
  7954. 8003368: 6878 ldr r0, [r7, #4]
  7955. 800336a: f000 f939 bl 80035e0 <HAL_CAN_Stop>
  7956. /* DeInit the low level hardware: CLOCK, NVIC */
  7957. hcan->MspDeInitCallback(hcan);
  7958. #else
  7959. /* DeInit the low level hardware: CLOCK, NVIC */
  7960. HAL_CAN_MspDeInit(hcan);
  7961. 800336e: 6878 ldr r0, [r7, #4]
  7962. 8003370: f7fd f948 bl 8000604 <HAL_CAN_MspDeInit>
  7963. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  7964. /* Reset the CAN peripheral */
  7965. SET_BIT(hcan->Instance->MCR, CAN_MCR_RESET);
  7966. 8003374: 687b ldr r3, [r7, #4]
  7967. 8003376: 681b ldr r3, [r3, #0]
  7968. 8003378: 681a ldr r2, [r3, #0]
  7969. 800337a: 687b ldr r3, [r7, #4]
  7970. 800337c: 681b ldr r3, [r3, #0]
  7971. 800337e: f442 4200 orr.w r2, r2, #32768 @ 0x8000
  7972. 8003382: 601a str r2, [r3, #0]
  7973. /* Reset the CAN ErrorCode */
  7974. hcan->ErrorCode = HAL_CAN_ERROR_NONE;
  7975. 8003384: 687b ldr r3, [r7, #4]
  7976. 8003386: 2200 movs r2, #0
  7977. 8003388: 625a str r2, [r3, #36] @ 0x24
  7978. /* Change CAN state */
  7979. hcan->State = HAL_CAN_STATE_RESET;
  7980. 800338a: 687b ldr r3, [r7, #4]
  7981. 800338c: 2200 movs r2, #0
  7982. 800338e: f883 2020 strb.w r2, [r3, #32]
  7983. /* Return function status */
  7984. return HAL_OK;
  7985. 8003392: 2300 movs r3, #0
  7986. }
  7987. 8003394: 4618 mov r0, r3
  7988. 8003396: 3708 adds r7, #8
  7989. 8003398: 46bd mov sp, r7
  7990. 800339a: bd80 pop {r7, pc}
  7991. 0800339c <HAL_CAN_ConfigFilter>:
  7992. * @param sFilterConfig pointer to a CAN_FilterTypeDef structure that
  7993. * contains the filter configuration information.
  7994. * @retval None
  7995. */
  7996. HAL_StatusTypeDef HAL_CAN_ConfigFilter(CAN_HandleTypeDef *hcan, const CAN_FilterTypeDef *sFilterConfig)
  7997. {
  7998. 800339c: b480 push {r7}
  7999. 800339e: b087 sub sp, #28
  8000. 80033a0: af00 add r7, sp, #0
  8001. 80033a2: 6078 str r0, [r7, #4]
  8002. 80033a4: 6039 str r1, [r7, #0]
  8003. uint32_t filternbrbitpos;
  8004. CAN_TypeDef *can_ip;
  8005. HAL_CAN_StateTypeDef state = hcan->State;
  8006. 80033a6: 687b ldr r3, [r7, #4]
  8007. 80033a8: f893 3020 ldrb.w r3, [r3, #32]
  8008. 80033ac: 75fb strb r3, [r7, #23]
  8009. if ((state == HAL_CAN_STATE_READY) ||
  8010. 80033ae: 7dfb ldrb r3, [r7, #23]
  8011. 80033b0: 2b01 cmp r3, #1
  8012. 80033b2: d003 beq.n 80033bc <HAL_CAN_ConfigFilter+0x20>
  8013. 80033b4: 7dfb ldrb r3, [r7, #23]
  8014. 80033b6: 2b02 cmp r3, #2
  8015. 80033b8: f040 80be bne.w 8003538 <HAL_CAN_ConfigFilter+0x19c>
  8016. assert_param(IS_CAN_FILTER_BANK_DUAL(sFilterConfig->SlaveStartFilterBank));
  8017. }
  8018. #elif defined(CAN2)
  8019. /* CAN1 and CAN2 are dual instances with 28 common filters banks */
  8020. /* Select master instance to access the filter banks */
  8021. can_ip = CAN1;
  8022. 80033bc: 4b65 ldr r3, [pc, #404] @ (8003554 <HAL_CAN_ConfigFilter+0x1b8>)
  8023. 80033be: 613b str r3, [r7, #16]
  8024. /* Check the parameters */
  8025. assert_param(IS_CAN_FILTER_BANK_SINGLE(sFilterConfig->FilterBank));
  8026. #endif /* CAN3 */
  8027. /* Initialisation mode for the filter */
  8028. SET_BIT(can_ip->FMR, CAN_FMR_FINIT);
  8029. 80033c0: 693b ldr r3, [r7, #16]
  8030. 80033c2: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200
  8031. 80033c6: f043 0201 orr.w r2, r3, #1
  8032. 80033ca: 693b ldr r3, [r7, #16]
  8033. 80033cc: f8c3 2200 str.w r2, [r3, #512] @ 0x200
  8034. SET_BIT(can_ip->FMR, sFilterConfig->SlaveStartFilterBank << CAN_FMR_CAN2SB_Pos);
  8035. }
  8036. #elif defined(CAN2)
  8037. /* Select the start filter number of CAN2 slave instance */
  8038. CLEAR_BIT(can_ip->FMR, CAN_FMR_CAN2SB);
  8039. 80033d0: 693b ldr r3, [r7, #16]
  8040. 80033d2: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200
  8041. 80033d6: f423 527c bic.w r2, r3, #16128 @ 0x3f00
  8042. 80033da: 693b ldr r3, [r7, #16]
  8043. 80033dc: f8c3 2200 str.w r2, [r3, #512] @ 0x200
  8044. SET_BIT(can_ip->FMR, sFilterConfig->SlaveStartFilterBank << CAN_FMR_CAN2SB_Pos);
  8045. 80033e0: 693b ldr r3, [r7, #16]
  8046. 80033e2: f8d3 2200 ldr.w r2, [r3, #512] @ 0x200
  8047. 80033e6: 683b ldr r3, [r7, #0]
  8048. 80033e8: 6a5b ldr r3, [r3, #36] @ 0x24
  8049. 80033ea: 021b lsls r3, r3, #8
  8050. 80033ec: 431a orrs r2, r3
  8051. 80033ee: 693b ldr r3, [r7, #16]
  8052. 80033f0: f8c3 2200 str.w r2, [r3, #512] @ 0x200
  8053. #endif /* CAN3 */
  8054. /* Convert filter number into bit position */
  8055. filternbrbitpos = (uint32_t)1 << (sFilterConfig->FilterBank & 0x1FU);
  8056. 80033f4: 683b ldr r3, [r7, #0]
  8057. 80033f6: 695b ldr r3, [r3, #20]
  8058. 80033f8: f003 031f and.w r3, r3, #31
  8059. 80033fc: 2201 movs r2, #1
  8060. 80033fe: fa02 f303 lsl.w r3, r2, r3
  8061. 8003402: 60fb str r3, [r7, #12]
  8062. /* Filter Deactivation */
  8063. CLEAR_BIT(can_ip->FA1R, filternbrbitpos);
  8064. 8003404: 693b ldr r3, [r7, #16]
  8065. 8003406: f8d3 221c ldr.w r2, [r3, #540] @ 0x21c
  8066. 800340a: 68fb ldr r3, [r7, #12]
  8067. 800340c: 43db mvns r3, r3
  8068. 800340e: 401a ands r2, r3
  8069. 8003410: 693b ldr r3, [r7, #16]
  8070. 8003412: f8c3 221c str.w r2, [r3, #540] @ 0x21c
  8071. /* Filter Scale */
  8072. if (sFilterConfig->FilterScale == CAN_FILTERSCALE_16BIT)
  8073. 8003416: 683b ldr r3, [r7, #0]
  8074. 8003418: 69db ldr r3, [r3, #28]
  8075. 800341a: 2b00 cmp r3, #0
  8076. 800341c: d123 bne.n 8003466 <HAL_CAN_ConfigFilter+0xca>
  8077. {
  8078. /* 16-bit scale for the filter */
  8079. CLEAR_BIT(can_ip->FS1R, filternbrbitpos);
  8080. 800341e: 693b ldr r3, [r7, #16]
  8081. 8003420: f8d3 220c ldr.w r2, [r3, #524] @ 0x20c
  8082. 8003424: 68fb ldr r3, [r7, #12]
  8083. 8003426: 43db mvns r3, r3
  8084. 8003428: 401a ands r2, r3
  8085. 800342a: 693b ldr r3, [r7, #16]
  8086. 800342c: f8c3 220c str.w r2, [r3, #524] @ 0x20c
  8087. /* First 16-bit identifier and First 16-bit mask */
  8088. /* Or First 16-bit identifier and Second 16-bit identifier */
  8089. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR1 =
  8090. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterMaskIdLow) << 16U) |
  8091. 8003430: 683b ldr r3, [r7, #0]
  8092. 8003432: 68db ldr r3, [r3, #12]
  8093. 8003434: 0419 lsls r1, r3, #16
  8094. (0x0000FFFFU & (uint32_t)sFilterConfig->FilterIdLow);
  8095. 8003436: 683b ldr r3, [r7, #0]
  8096. 8003438: 685b ldr r3, [r3, #4]
  8097. 800343a: b29b uxth r3, r3
  8098. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR1 =
  8099. 800343c: 683a ldr r2, [r7, #0]
  8100. 800343e: 6952 ldr r2, [r2, #20]
  8101. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterMaskIdLow) << 16U) |
  8102. 8003440: 4319 orrs r1, r3
  8103. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR1 =
  8104. 8003442: 693b ldr r3, [r7, #16]
  8105. 8003444: 3248 adds r2, #72 @ 0x48
  8106. 8003446: f843 1032 str.w r1, [r3, r2, lsl #3]
  8107. /* Second 16-bit identifier and Second 16-bit mask */
  8108. /* Or Third 16-bit identifier and Fourth 16-bit identifier */
  8109. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR2 =
  8110. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterMaskIdHigh) << 16U) |
  8111. 800344a: 683b ldr r3, [r7, #0]
  8112. 800344c: 689b ldr r3, [r3, #8]
  8113. 800344e: 0419 lsls r1, r3, #16
  8114. (0x0000FFFFU & (uint32_t)sFilterConfig->FilterIdHigh);
  8115. 8003450: 683b ldr r3, [r7, #0]
  8116. 8003452: 681b ldr r3, [r3, #0]
  8117. 8003454: b29a uxth r2, r3
  8118. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR2 =
  8119. 8003456: 683b ldr r3, [r7, #0]
  8120. 8003458: 695b ldr r3, [r3, #20]
  8121. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterMaskIdHigh) << 16U) |
  8122. 800345a: 430a orrs r2, r1
  8123. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR2 =
  8124. 800345c: 6939 ldr r1, [r7, #16]
  8125. 800345e: 3348 adds r3, #72 @ 0x48
  8126. 8003460: 00db lsls r3, r3, #3
  8127. 8003462: 440b add r3, r1
  8128. 8003464: 605a str r2, [r3, #4]
  8129. }
  8130. if (sFilterConfig->FilterScale == CAN_FILTERSCALE_32BIT)
  8131. 8003466: 683b ldr r3, [r7, #0]
  8132. 8003468: 69db ldr r3, [r3, #28]
  8133. 800346a: 2b01 cmp r3, #1
  8134. 800346c: d122 bne.n 80034b4 <HAL_CAN_ConfigFilter+0x118>
  8135. {
  8136. /* 32-bit scale for the filter */
  8137. SET_BIT(can_ip->FS1R, filternbrbitpos);
  8138. 800346e: 693b ldr r3, [r7, #16]
  8139. 8003470: f8d3 220c ldr.w r2, [r3, #524] @ 0x20c
  8140. 8003474: 68fb ldr r3, [r7, #12]
  8141. 8003476: 431a orrs r2, r3
  8142. 8003478: 693b ldr r3, [r7, #16]
  8143. 800347a: f8c3 220c str.w r2, [r3, #524] @ 0x20c
  8144. /* 32-bit identifier or First 32-bit identifier */
  8145. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR1 =
  8146. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterIdHigh) << 16U) |
  8147. 800347e: 683b ldr r3, [r7, #0]
  8148. 8003480: 681b ldr r3, [r3, #0]
  8149. 8003482: 0419 lsls r1, r3, #16
  8150. (0x0000FFFFU & (uint32_t)sFilterConfig->FilterIdLow);
  8151. 8003484: 683b ldr r3, [r7, #0]
  8152. 8003486: 685b ldr r3, [r3, #4]
  8153. 8003488: b29b uxth r3, r3
  8154. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR1 =
  8155. 800348a: 683a ldr r2, [r7, #0]
  8156. 800348c: 6952 ldr r2, [r2, #20]
  8157. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterIdHigh) << 16U) |
  8158. 800348e: 4319 orrs r1, r3
  8159. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR1 =
  8160. 8003490: 693b ldr r3, [r7, #16]
  8161. 8003492: 3248 adds r2, #72 @ 0x48
  8162. 8003494: f843 1032 str.w r1, [r3, r2, lsl #3]
  8163. /* 32-bit mask or Second 32-bit identifier */
  8164. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR2 =
  8165. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterMaskIdHigh) << 16U) |
  8166. 8003498: 683b ldr r3, [r7, #0]
  8167. 800349a: 689b ldr r3, [r3, #8]
  8168. 800349c: 0419 lsls r1, r3, #16
  8169. (0x0000FFFFU & (uint32_t)sFilterConfig->FilterMaskIdLow);
  8170. 800349e: 683b ldr r3, [r7, #0]
  8171. 80034a0: 68db ldr r3, [r3, #12]
  8172. 80034a2: b29a uxth r2, r3
  8173. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR2 =
  8174. 80034a4: 683b ldr r3, [r7, #0]
  8175. 80034a6: 695b ldr r3, [r3, #20]
  8176. ((0x0000FFFFU & (uint32_t)sFilterConfig->FilterMaskIdHigh) << 16U) |
  8177. 80034a8: 430a orrs r2, r1
  8178. can_ip->sFilterRegister[sFilterConfig->FilterBank].FR2 =
  8179. 80034aa: 6939 ldr r1, [r7, #16]
  8180. 80034ac: 3348 adds r3, #72 @ 0x48
  8181. 80034ae: 00db lsls r3, r3, #3
  8182. 80034b0: 440b add r3, r1
  8183. 80034b2: 605a str r2, [r3, #4]
  8184. }
  8185. /* Filter Mode */
  8186. if (sFilterConfig->FilterMode == CAN_FILTERMODE_IDMASK)
  8187. 80034b4: 683b ldr r3, [r7, #0]
  8188. 80034b6: 699b ldr r3, [r3, #24]
  8189. 80034b8: 2b00 cmp r3, #0
  8190. 80034ba: d109 bne.n 80034d0 <HAL_CAN_ConfigFilter+0x134>
  8191. {
  8192. /* Id/Mask mode for the filter*/
  8193. CLEAR_BIT(can_ip->FM1R, filternbrbitpos);
  8194. 80034bc: 693b ldr r3, [r7, #16]
  8195. 80034be: f8d3 2204 ldr.w r2, [r3, #516] @ 0x204
  8196. 80034c2: 68fb ldr r3, [r7, #12]
  8197. 80034c4: 43db mvns r3, r3
  8198. 80034c6: 401a ands r2, r3
  8199. 80034c8: 693b ldr r3, [r7, #16]
  8200. 80034ca: f8c3 2204 str.w r2, [r3, #516] @ 0x204
  8201. 80034ce: e007 b.n 80034e0 <HAL_CAN_ConfigFilter+0x144>
  8202. }
  8203. else /* CAN_FilterInitStruct->CAN_FilterMode == CAN_FilterMode_IdList */
  8204. {
  8205. /* Identifier list mode for the filter*/
  8206. SET_BIT(can_ip->FM1R, filternbrbitpos);
  8207. 80034d0: 693b ldr r3, [r7, #16]
  8208. 80034d2: f8d3 2204 ldr.w r2, [r3, #516] @ 0x204
  8209. 80034d6: 68fb ldr r3, [r7, #12]
  8210. 80034d8: 431a orrs r2, r3
  8211. 80034da: 693b ldr r3, [r7, #16]
  8212. 80034dc: f8c3 2204 str.w r2, [r3, #516] @ 0x204
  8213. }
  8214. /* Filter FIFO assignment */
  8215. if (sFilterConfig->FilterFIFOAssignment == CAN_FILTER_FIFO0)
  8216. 80034e0: 683b ldr r3, [r7, #0]
  8217. 80034e2: 691b ldr r3, [r3, #16]
  8218. 80034e4: 2b00 cmp r3, #0
  8219. 80034e6: d109 bne.n 80034fc <HAL_CAN_ConfigFilter+0x160>
  8220. {
  8221. /* FIFO 0 assignation for the filter */
  8222. CLEAR_BIT(can_ip->FFA1R, filternbrbitpos);
  8223. 80034e8: 693b ldr r3, [r7, #16]
  8224. 80034ea: f8d3 2214 ldr.w r2, [r3, #532] @ 0x214
  8225. 80034ee: 68fb ldr r3, [r7, #12]
  8226. 80034f0: 43db mvns r3, r3
  8227. 80034f2: 401a ands r2, r3
  8228. 80034f4: 693b ldr r3, [r7, #16]
  8229. 80034f6: f8c3 2214 str.w r2, [r3, #532] @ 0x214
  8230. 80034fa: e007 b.n 800350c <HAL_CAN_ConfigFilter+0x170>
  8231. }
  8232. else
  8233. {
  8234. /* FIFO 1 assignation for the filter */
  8235. SET_BIT(can_ip->FFA1R, filternbrbitpos);
  8236. 80034fc: 693b ldr r3, [r7, #16]
  8237. 80034fe: f8d3 2214 ldr.w r2, [r3, #532] @ 0x214
  8238. 8003502: 68fb ldr r3, [r7, #12]
  8239. 8003504: 431a orrs r2, r3
  8240. 8003506: 693b ldr r3, [r7, #16]
  8241. 8003508: f8c3 2214 str.w r2, [r3, #532] @ 0x214
  8242. }
  8243. /* Filter activation */
  8244. if (sFilterConfig->FilterActivation == CAN_FILTER_ENABLE)
  8245. 800350c: 683b ldr r3, [r7, #0]
  8246. 800350e: 6a1b ldr r3, [r3, #32]
  8247. 8003510: 2b01 cmp r3, #1
  8248. 8003512: d107 bne.n 8003524 <HAL_CAN_ConfigFilter+0x188>
  8249. {
  8250. SET_BIT(can_ip->FA1R, filternbrbitpos);
  8251. 8003514: 693b ldr r3, [r7, #16]
  8252. 8003516: f8d3 221c ldr.w r2, [r3, #540] @ 0x21c
  8253. 800351a: 68fb ldr r3, [r7, #12]
  8254. 800351c: 431a orrs r2, r3
  8255. 800351e: 693b ldr r3, [r7, #16]
  8256. 8003520: f8c3 221c str.w r2, [r3, #540] @ 0x21c
  8257. }
  8258. /* Leave the initialisation mode for the filter */
  8259. CLEAR_BIT(can_ip->FMR, CAN_FMR_FINIT);
  8260. 8003524: 693b ldr r3, [r7, #16]
  8261. 8003526: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200
  8262. 800352a: f023 0201 bic.w r2, r3, #1
  8263. 800352e: 693b ldr r3, [r7, #16]
  8264. 8003530: f8c3 2200 str.w r2, [r3, #512] @ 0x200
  8265. /* Return function status */
  8266. return HAL_OK;
  8267. 8003534: 2300 movs r3, #0
  8268. 8003536: e006 b.n 8003546 <HAL_CAN_ConfigFilter+0x1aa>
  8269. }
  8270. else
  8271. {
  8272. /* Update error code */
  8273. hcan->ErrorCode |= HAL_CAN_ERROR_NOT_INITIALIZED;
  8274. 8003538: 687b ldr r3, [r7, #4]
  8275. 800353a: 6a5b ldr r3, [r3, #36] @ 0x24
  8276. 800353c: f443 2280 orr.w r2, r3, #262144 @ 0x40000
  8277. 8003540: 687b ldr r3, [r7, #4]
  8278. 8003542: 625a str r2, [r3, #36] @ 0x24
  8279. return HAL_ERROR;
  8280. 8003544: 2301 movs r3, #1
  8281. }
  8282. }
  8283. 8003546: 4618 mov r0, r3
  8284. 8003548: 371c adds r7, #28
  8285. 800354a: 46bd mov sp, r7
  8286. 800354c: f85d 7b04 ldr.w r7, [sp], #4
  8287. 8003550: 4770 bx lr
  8288. 8003552: bf00 nop
  8289. 8003554: 40006400 .word 0x40006400
  8290. 08003558 <HAL_CAN_Start>:
  8291. * @param hcan pointer to an CAN_HandleTypeDef structure that contains
  8292. * the configuration information for the specified CAN.
  8293. * @retval HAL status
  8294. */
  8295. HAL_StatusTypeDef HAL_CAN_Start(CAN_HandleTypeDef *hcan)
  8296. {
  8297. 8003558: b580 push {r7, lr}
  8298. 800355a: b084 sub sp, #16
  8299. 800355c: af00 add r7, sp, #0
  8300. 800355e: 6078 str r0, [r7, #4]
  8301. uint32_t tickstart;
  8302. if (hcan->State == HAL_CAN_STATE_READY)
  8303. 8003560: 687b ldr r3, [r7, #4]
  8304. 8003562: f893 3020 ldrb.w r3, [r3, #32]
  8305. 8003566: b2db uxtb r3, r3
  8306. 8003568: 2b01 cmp r3, #1
  8307. 800356a: d12e bne.n 80035ca <HAL_CAN_Start+0x72>
  8308. {
  8309. /* Change CAN peripheral state */
  8310. hcan->State = HAL_CAN_STATE_LISTENING;
  8311. 800356c: 687b ldr r3, [r7, #4]
  8312. 800356e: 2202 movs r2, #2
  8313. 8003570: f883 2020 strb.w r2, [r3, #32]
  8314. /* Request leave initialisation */
  8315. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_INRQ);
  8316. 8003574: 687b ldr r3, [r7, #4]
  8317. 8003576: 681b ldr r3, [r3, #0]
  8318. 8003578: 681a ldr r2, [r3, #0]
  8319. 800357a: 687b ldr r3, [r7, #4]
  8320. 800357c: 681b ldr r3, [r3, #0]
  8321. 800357e: f022 0201 bic.w r2, r2, #1
  8322. 8003582: 601a str r2, [r3, #0]
  8323. /* Get tick */
  8324. tickstart = HAL_GetTick();
  8325. 8003584: f7ff fde0 bl 8003148 <HAL_GetTick>
  8326. 8003588: 60f8 str r0, [r7, #12]
  8327. /* Wait the acknowledge */
  8328. while ((hcan->Instance->MSR & CAN_MSR_INAK) != 0U)
  8329. 800358a: e012 b.n 80035b2 <HAL_CAN_Start+0x5a>
  8330. {
  8331. /* Check for the Timeout */
  8332. if ((HAL_GetTick() - tickstart) > CAN_TIMEOUT_VALUE)
  8333. 800358c: f7ff fddc bl 8003148 <HAL_GetTick>
  8334. 8003590: 4602 mov r2, r0
  8335. 8003592: 68fb ldr r3, [r7, #12]
  8336. 8003594: 1ad3 subs r3, r2, r3
  8337. 8003596: 2b0a cmp r3, #10
  8338. 8003598: d90b bls.n 80035b2 <HAL_CAN_Start+0x5a>
  8339. {
  8340. /* Update error code */
  8341. hcan->ErrorCode |= HAL_CAN_ERROR_TIMEOUT;
  8342. 800359a: 687b ldr r3, [r7, #4]
  8343. 800359c: 6a5b ldr r3, [r3, #36] @ 0x24
  8344. 800359e: f443 3200 orr.w r2, r3, #131072 @ 0x20000
  8345. 80035a2: 687b ldr r3, [r7, #4]
  8346. 80035a4: 625a str r2, [r3, #36] @ 0x24
  8347. /* Change CAN state */
  8348. hcan->State = HAL_CAN_STATE_ERROR;
  8349. 80035a6: 687b ldr r3, [r7, #4]
  8350. 80035a8: 2205 movs r2, #5
  8351. 80035aa: f883 2020 strb.w r2, [r3, #32]
  8352. return HAL_ERROR;
  8353. 80035ae: 2301 movs r3, #1
  8354. 80035b0: e012 b.n 80035d8 <HAL_CAN_Start+0x80>
  8355. while ((hcan->Instance->MSR & CAN_MSR_INAK) != 0U)
  8356. 80035b2: 687b ldr r3, [r7, #4]
  8357. 80035b4: 681b ldr r3, [r3, #0]
  8358. 80035b6: 685b ldr r3, [r3, #4]
  8359. 80035b8: f003 0301 and.w r3, r3, #1
  8360. 80035bc: 2b00 cmp r3, #0
  8361. 80035be: d1e5 bne.n 800358c <HAL_CAN_Start+0x34>
  8362. }
  8363. }
  8364. /* Reset the CAN ErrorCode */
  8365. hcan->ErrorCode = HAL_CAN_ERROR_NONE;
  8366. 80035c0: 687b ldr r3, [r7, #4]
  8367. 80035c2: 2200 movs r2, #0
  8368. 80035c4: 625a str r2, [r3, #36] @ 0x24
  8369. /* Return function status */
  8370. return HAL_OK;
  8371. 80035c6: 2300 movs r3, #0
  8372. 80035c8: e006 b.n 80035d8 <HAL_CAN_Start+0x80>
  8373. }
  8374. else
  8375. {
  8376. /* Update error code */
  8377. hcan->ErrorCode |= HAL_CAN_ERROR_NOT_READY;
  8378. 80035ca: 687b ldr r3, [r7, #4]
  8379. 80035cc: 6a5b ldr r3, [r3, #36] @ 0x24
  8380. 80035ce: f443 2200 orr.w r2, r3, #524288 @ 0x80000
  8381. 80035d2: 687b ldr r3, [r7, #4]
  8382. 80035d4: 625a str r2, [r3, #36] @ 0x24
  8383. return HAL_ERROR;
  8384. 80035d6: 2301 movs r3, #1
  8385. }
  8386. }
  8387. 80035d8: 4618 mov r0, r3
  8388. 80035da: 3710 adds r7, #16
  8389. 80035dc: 46bd mov sp, r7
  8390. 80035de: bd80 pop {r7, pc}
  8391. 080035e0 <HAL_CAN_Stop>:
  8392. * @param hcan pointer to an CAN_HandleTypeDef structure that contains
  8393. * the configuration information for the specified CAN.
  8394. * @retval HAL status
  8395. */
  8396. HAL_StatusTypeDef HAL_CAN_Stop(CAN_HandleTypeDef *hcan)
  8397. {
  8398. 80035e0: b580 push {r7, lr}
  8399. 80035e2: b084 sub sp, #16
  8400. 80035e4: af00 add r7, sp, #0
  8401. 80035e6: 6078 str r0, [r7, #4]
  8402. uint32_t tickstart;
  8403. if (hcan->State == HAL_CAN_STATE_LISTENING)
  8404. 80035e8: 687b ldr r3, [r7, #4]
  8405. 80035ea: f893 3020 ldrb.w r3, [r3, #32]
  8406. 80035ee: b2db uxtb r3, r3
  8407. 80035f0: 2b02 cmp r3, #2
  8408. 80035f2: d133 bne.n 800365c <HAL_CAN_Stop+0x7c>
  8409. {
  8410. /* Request initialisation */
  8411. SET_BIT(hcan->Instance->MCR, CAN_MCR_INRQ);
  8412. 80035f4: 687b ldr r3, [r7, #4]
  8413. 80035f6: 681b ldr r3, [r3, #0]
  8414. 80035f8: 681a ldr r2, [r3, #0]
  8415. 80035fa: 687b ldr r3, [r7, #4]
  8416. 80035fc: 681b ldr r3, [r3, #0]
  8417. 80035fe: f042 0201 orr.w r2, r2, #1
  8418. 8003602: 601a str r2, [r3, #0]
  8419. /* Get tick */
  8420. tickstart = HAL_GetTick();
  8421. 8003604: f7ff fda0 bl 8003148 <HAL_GetTick>
  8422. 8003608: 60f8 str r0, [r7, #12]
  8423. /* Wait the acknowledge */
  8424. while ((hcan->Instance->MSR & CAN_MSR_INAK) == 0U)
  8425. 800360a: e012 b.n 8003632 <HAL_CAN_Stop+0x52>
  8426. {
  8427. /* Check for the Timeout */
  8428. if ((HAL_GetTick() - tickstart) > CAN_TIMEOUT_VALUE)
  8429. 800360c: f7ff fd9c bl 8003148 <HAL_GetTick>
  8430. 8003610: 4602 mov r2, r0
  8431. 8003612: 68fb ldr r3, [r7, #12]
  8432. 8003614: 1ad3 subs r3, r2, r3
  8433. 8003616: 2b0a cmp r3, #10
  8434. 8003618: d90b bls.n 8003632 <HAL_CAN_Stop+0x52>
  8435. {
  8436. /* Update error code */
  8437. hcan->ErrorCode |= HAL_CAN_ERROR_TIMEOUT;
  8438. 800361a: 687b ldr r3, [r7, #4]
  8439. 800361c: 6a5b ldr r3, [r3, #36] @ 0x24
  8440. 800361e: f443 3200 orr.w r2, r3, #131072 @ 0x20000
  8441. 8003622: 687b ldr r3, [r7, #4]
  8442. 8003624: 625a str r2, [r3, #36] @ 0x24
  8443. /* Change CAN state */
  8444. hcan->State = HAL_CAN_STATE_ERROR;
  8445. 8003626: 687b ldr r3, [r7, #4]
  8446. 8003628: 2205 movs r2, #5
  8447. 800362a: f883 2020 strb.w r2, [r3, #32]
  8448. return HAL_ERROR;
  8449. 800362e: 2301 movs r3, #1
  8450. 8003630: e01b b.n 800366a <HAL_CAN_Stop+0x8a>
  8451. while ((hcan->Instance->MSR & CAN_MSR_INAK) == 0U)
  8452. 8003632: 687b ldr r3, [r7, #4]
  8453. 8003634: 681b ldr r3, [r3, #0]
  8454. 8003636: 685b ldr r3, [r3, #4]
  8455. 8003638: f003 0301 and.w r3, r3, #1
  8456. 800363c: 2b00 cmp r3, #0
  8457. 800363e: d0e5 beq.n 800360c <HAL_CAN_Stop+0x2c>
  8458. }
  8459. }
  8460. /* Exit from sleep mode */
  8461. CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_SLEEP);
  8462. 8003640: 687b ldr r3, [r7, #4]
  8463. 8003642: 681b ldr r3, [r3, #0]
  8464. 8003644: 681a ldr r2, [r3, #0]
  8465. 8003646: 687b ldr r3, [r7, #4]
  8466. 8003648: 681b ldr r3, [r3, #0]
  8467. 800364a: f022 0202 bic.w r2, r2, #2
  8468. 800364e: 601a str r2, [r3, #0]
  8469. /* Change CAN peripheral state */
  8470. hcan->State = HAL_CAN_STATE_READY;
  8471. 8003650: 687b ldr r3, [r7, #4]
  8472. 8003652: 2201 movs r2, #1
  8473. 8003654: f883 2020 strb.w r2, [r3, #32]
  8474. /* Return function status */
  8475. return HAL_OK;
  8476. 8003658: 2300 movs r3, #0
  8477. 800365a: e006 b.n 800366a <HAL_CAN_Stop+0x8a>
  8478. }
  8479. else
  8480. {
  8481. /* Update error code */
  8482. hcan->ErrorCode |= HAL_CAN_ERROR_NOT_STARTED;
  8483. 800365c: 687b ldr r3, [r7, #4]
  8484. 800365e: 6a5b ldr r3, [r3, #36] @ 0x24
  8485. 8003660: f443 1280 orr.w r2, r3, #1048576 @ 0x100000
  8486. 8003664: 687b ldr r3, [r7, #4]
  8487. 8003666: 625a str r2, [r3, #36] @ 0x24
  8488. return HAL_ERROR;
  8489. 8003668: 2301 movs r3, #1
  8490. }
  8491. }
  8492. 800366a: 4618 mov r0, r3
  8493. 800366c: 3710 adds r7, #16
  8494. 800366e: 46bd mov sp, r7
  8495. 8003670: bd80 pop {r7, pc}
  8496. 08003672 <HAL_CAN_AddTxMessage>:
  8497. * This parameter can be a value of @arg CAN_Tx_Mailboxes.
  8498. * @retval HAL status
  8499. */
  8500. HAL_StatusTypeDef HAL_CAN_AddTxMessage(CAN_HandleTypeDef *hcan, const CAN_TxHeaderTypeDef *pHeader,
  8501. const uint8_t aData[], uint32_t *pTxMailbox)
  8502. {
  8503. 8003672: b480 push {r7}
  8504. 8003674: b089 sub sp, #36 @ 0x24
  8505. 8003676: af00 add r7, sp, #0
  8506. 8003678: 60f8 str r0, [r7, #12]
  8507. 800367a: 60b9 str r1, [r7, #8]
  8508. 800367c: 607a str r2, [r7, #4]
  8509. 800367e: 603b str r3, [r7, #0]
  8510. uint32_t transmitmailbox;
  8511. HAL_CAN_StateTypeDef state = hcan->State;
  8512. 8003680: 68fb ldr r3, [r7, #12]
  8513. 8003682: f893 3020 ldrb.w r3, [r3, #32]
  8514. 8003686: 77fb strb r3, [r7, #31]
  8515. uint32_t tsr = READ_REG(hcan->Instance->TSR);
  8516. 8003688: 68fb ldr r3, [r7, #12]
  8517. 800368a: 681b ldr r3, [r3, #0]
  8518. 800368c: 689b ldr r3, [r3, #8]
  8519. 800368e: 61bb str r3, [r7, #24]
  8520. {
  8521. assert_param(IS_CAN_EXTID(pHeader->ExtId));
  8522. }
  8523. assert_param(IS_FUNCTIONAL_STATE(pHeader->TransmitGlobalTime));
  8524. if ((state == HAL_CAN_STATE_READY) ||
  8525. 8003690: 7ffb ldrb r3, [r7, #31]
  8526. 8003692: 2b01 cmp r3, #1
  8527. 8003694: d003 beq.n 800369e <HAL_CAN_AddTxMessage+0x2c>
  8528. 8003696: 7ffb ldrb r3, [r7, #31]
  8529. 8003698: 2b02 cmp r3, #2
  8530. 800369a: f040 80ad bne.w 80037f8 <HAL_CAN_AddTxMessage+0x186>
  8531. (state == HAL_CAN_STATE_LISTENING))
  8532. {
  8533. /* Check that all the Tx mailboxes are not full */
  8534. if (((tsr & CAN_TSR_TME0) != 0U) ||
  8535. 800369e: 69bb ldr r3, [r7, #24]
  8536. 80036a0: f003 6380 and.w r3, r3, #67108864 @ 0x4000000
  8537. 80036a4: 2b00 cmp r3, #0
  8538. 80036a6: d10a bne.n 80036be <HAL_CAN_AddTxMessage+0x4c>
  8539. ((tsr & CAN_TSR_TME1) != 0U) ||
  8540. 80036a8: 69bb ldr r3, [r7, #24]
  8541. 80036aa: f003 6300 and.w r3, r3, #134217728 @ 0x8000000
  8542. if (((tsr & CAN_TSR_TME0) != 0U) ||
  8543. 80036ae: 2b00 cmp r3, #0
  8544. 80036b0: d105 bne.n 80036be <HAL_CAN_AddTxMessage+0x4c>
  8545. ((tsr & CAN_TSR_TME2) != 0U))
  8546. 80036b2: 69bb ldr r3, [r7, #24]
  8547. 80036b4: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
  8548. ((tsr & CAN_TSR_TME1) != 0U) ||
  8549. 80036b8: 2b00 cmp r3, #0
  8550. 80036ba: f000 8095 beq.w 80037e8 <HAL_CAN_AddTxMessage+0x176>
  8551. {
  8552. /* Select an empty transmit mailbox */
  8553. transmitmailbox = (tsr & CAN_TSR_CODE) >> CAN_TSR_CODE_Pos;
  8554. 80036be: 69bb ldr r3, [r7, #24]
  8555. 80036c0: 0e1b lsrs r3, r3, #24
  8556. 80036c2: f003 0303 and.w r3, r3, #3
  8557. 80036c6: 617b str r3, [r7, #20]
  8558. /* Store the Tx mailbox */
  8559. *pTxMailbox = (uint32_t)1 << transmitmailbox;
  8560. 80036c8: 2201 movs r2, #1
  8561. 80036ca: 697b ldr r3, [r7, #20]
  8562. 80036cc: 409a lsls r2, r3
  8563. 80036ce: 683b ldr r3, [r7, #0]
  8564. 80036d0: 601a str r2, [r3, #0]
  8565. /* Set up the Id */
  8566. if (pHeader->IDE == CAN_ID_STD)
  8567. 80036d2: 68bb ldr r3, [r7, #8]
  8568. 80036d4: 689b ldr r3, [r3, #8]
  8569. 80036d6: 2b00 cmp r3, #0
  8570. 80036d8: d10d bne.n 80036f6 <HAL_CAN_AddTxMessage+0x84>
  8571. {
  8572. hcan->Instance->sTxMailBox[transmitmailbox].TIR = ((pHeader->StdId << CAN_TI0R_STID_Pos) |
  8573. 80036da: 68bb ldr r3, [r7, #8]
  8574. 80036dc: 681b ldr r3, [r3, #0]
  8575. 80036de: 055a lsls r2, r3, #21
  8576. pHeader->RTR);
  8577. 80036e0: 68bb ldr r3, [r7, #8]
  8578. 80036e2: 68db ldr r3, [r3, #12]
  8579. hcan->Instance->sTxMailBox[transmitmailbox].TIR = ((pHeader->StdId << CAN_TI0R_STID_Pos) |
  8580. 80036e4: 68f9 ldr r1, [r7, #12]
  8581. 80036e6: 6809 ldr r1, [r1, #0]
  8582. 80036e8: 431a orrs r2, r3
  8583. 80036ea: 697b ldr r3, [r7, #20]
  8584. 80036ec: 3318 adds r3, #24
  8585. 80036ee: 011b lsls r3, r3, #4
  8586. 80036f0: 440b add r3, r1
  8587. 80036f2: 601a str r2, [r3, #0]
  8588. 80036f4: e00f b.n 8003716 <HAL_CAN_AddTxMessage+0xa4>
  8589. }
  8590. else
  8591. {
  8592. hcan->Instance->sTxMailBox[transmitmailbox].TIR = ((pHeader->ExtId << CAN_TI0R_EXID_Pos) |
  8593. 80036f6: 68bb ldr r3, [r7, #8]
  8594. 80036f8: 685b ldr r3, [r3, #4]
  8595. 80036fa: 00da lsls r2, r3, #3
  8596. pHeader->IDE |
  8597. 80036fc: 68bb ldr r3, [r7, #8]
  8598. 80036fe: 689b ldr r3, [r3, #8]
  8599. hcan->Instance->sTxMailBox[transmitmailbox].TIR = ((pHeader->ExtId << CAN_TI0R_EXID_Pos) |
  8600. 8003700: 431a orrs r2, r3
  8601. pHeader->RTR);
  8602. 8003702: 68bb ldr r3, [r7, #8]
  8603. 8003704: 68db ldr r3, [r3, #12]
  8604. hcan->Instance->sTxMailBox[transmitmailbox].TIR = ((pHeader->ExtId << CAN_TI0R_EXID_Pos) |
  8605. 8003706: 68f9 ldr r1, [r7, #12]
  8606. 8003708: 6809 ldr r1, [r1, #0]
  8607. pHeader->IDE |
  8608. 800370a: 431a orrs r2, r3
  8609. hcan->Instance->sTxMailBox[transmitmailbox].TIR = ((pHeader->ExtId << CAN_TI0R_EXID_Pos) |
  8610. 800370c: 697b ldr r3, [r7, #20]
  8611. 800370e: 3318 adds r3, #24
  8612. 8003710: 011b lsls r3, r3, #4
  8613. 8003712: 440b add r3, r1
  8614. 8003714: 601a str r2, [r3, #0]
  8615. }
  8616. /* Set up the DLC */
  8617. hcan->Instance->sTxMailBox[transmitmailbox].TDTR = (pHeader->DLC);
  8618. 8003716: 68fb ldr r3, [r7, #12]
  8619. 8003718: 6819 ldr r1, [r3, #0]
  8620. 800371a: 68bb ldr r3, [r7, #8]
  8621. 800371c: 691a ldr r2, [r3, #16]
  8622. 800371e: 697b ldr r3, [r7, #20]
  8623. 8003720: 3318 adds r3, #24
  8624. 8003722: 011b lsls r3, r3, #4
  8625. 8003724: 440b add r3, r1
  8626. 8003726: 3304 adds r3, #4
  8627. 8003728: 601a str r2, [r3, #0]
  8628. /* Set up the Transmit Global Time mode */
  8629. if (pHeader->TransmitGlobalTime == ENABLE)
  8630. 800372a: 68bb ldr r3, [r7, #8]
  8631. 800372c: 7d1b ldrb r3, [r3, #20]
  8632. 800372e: 2b01 cmp r3, #1
  8633. 8003730: d111 bne.n 8003756 <HAL_CAN_AddTxMessage+0xe4>
  8634. {
  8635. SET_BIT(hcan->Instance->sTxMailBox[transmitmailbox].TDTR, CAN_TDT0R_TGT);
  8636. 8003732: 68fb ldr r3, [r7, #12]
  8637. 8003734: 681a ldr r2, [r3, #0]
  8638. 8003736: 697b ldr r3, [r7, #20]
  8639. 8003738: 3318 adds r3, #24
  8640. 800373a: 011b lsls r3, r3, #4
  8641. 800373c: 4413 add r3, r2
  8642. 800373e: 3304 adds r3, #4
  8643. 8003740: 681b ldr r3, [r3, #0]
  8644. 8003742: 68fa ldr r2, [r7, #12]
  8645. 8003744: 6811 ldr r1, [r2, #0]
  8646. 8003746: f443 7280 orr.w r2, r3, #256 @ 0x100
  8647. 800374a: 697b ldr r3, [r7, #20]
  8648. 800374c: 3318 adds r3, #24
  8649. 800374e: 011b lsls r3, r3, #4
  8650. 8003750: 440b add r3, r1
  8651. 8003752: 3304 adds r3, #4
  8652. 8003754: 601a str r2, [r3, #0]
  8653. }
  8654. /* Set up the data field */
  8655. WRITE_REG(hcan->Instance->sTxMailBox[transmitmailbox].TDHR,
  8656. 8003756: 687b ldr r3, [r7, #4]
  8657. 8003758: 3307 adds r3, #7
  8658. 800375a: 781b ldrb r3, [r3, #0]
  8659. 800375c: 061a lsls r2, r3, #24
  8660. 800375e: 687b ldr r3, [r7, #4]
  8661. 8003760: 3306 adds r3, #6
  8662. 8003762: 781b ldrb r3, [r3, #0]
  8663. 8003764: 041b lsls r3, r3, #16
  8664. 8003766: 431a orrs r2, r3
  8665. 8003768: 687b ldr r3, [r7, #4]
  8666. 800376a: 3305 adds r3, #5
  8667. 800376c: 781b ldrb r3, [r3, #0]
  8668. 800376e: 021b lsls r3, r3, #8
  8669. 8003770: 4313 orrs r3, r2
  8670. 8003772: 687a ldr r2, [r7, #4]
  8671. 8003774: 3204 adds r2, #4
  8672. 8003776: 7812 ldrb r2, [r2, #0]
  8673. 8003778: 4610 mov r0, r2
  8674. 800377a: 68fa ldr r2, [r7, #12]
  8675. 800377c: 6811 ldr r1, [r2, #0]
  8676. 800377e: ea43 0200 orr.w r2, r3, r0
  8677. 8003782: 697b ldr r3, [r7, #20]
  8678. 8003784: 011b lsls r3, r3, #4
  8679. 8003786: 440b add r3, r1
  8680. 8003788: f503 73c6 add.w r3, r3, #396 @ 0x18c
  8681. 800378c: 601a str r2, [r3, #0]
  8682. ((uint32_t)aData[7] << CAN_TDH0R_DATA7_Pos) |
  8683. ((uint32_t)aData[6] << CAN_TDH0R_DATA6_Pos) |
  8684. ((uint32_t)aData[5] << CAN_TDH0R_DATA5_Pos) |
  8685. ((uint32_t)aData[4] << CAN_TDH0R_DATA4_Pos));
  8686. WRITE_REG(hcan->Instance->sTxMailBox[transmitmailbox].TDLR,
  8687. 800378e: 687b ldr r3, [r7, #4]
  8688. 8003790: 3303 adds r3, #3
  8689. 8003792: 781b ldrb r3, [r3, #0]
  8690. 8003794: 061a lsls r2, r3, #24
  8691. 8003796: 687b ldr r3, [r7, #4]
  8692. 8003798: 3302 adds r3, #2
  8693. 800379a: 781b ldrb r3, [r3, #0]
  8694. 800379c: 041b lsls r3, r3, #16
  8695. 800379e: 431a orrs r2, r3
  8696. 80037a0: 687b ldr r3, [r7, #4]
  8697. 80037a2: 3301 adds r3, #1
  8698. 80037a4: 781b ldrb r3, [r3, #0]
  8699. 80037a6: 021b lsls r3, r3, #8
  8700. 80037a8: 4313 orrs r3, r2
  8701. 80037aa: 687a ldr r2, [r7, #4]
  8702. 80037ac: 7812 ldrb r2, [r2, #0]
  8703. 80037ae: 4610 mov r0, r2
  8704. 80037b0: 68fa ldr r2, [r7, #12]
  8705. 80037b2: 6811 ldr r1, [r2, #0]
  8706. 80037b4: ea43 0200 orr.w r2, r3, r0
  8707. 80037b8: 697b ldr r3, [r7, #20]
  8708. 80037ba: 011b lsls r3, r3, #4
  8709. 80037bc: 440b add r3, r1
  8710. 80037be: f503 73c4 add.w r3, r3, #392 @ 0x188
  8711. 80037c2: 601a str r2, [r3, #0]
  8712. ((uint32_t)aData[2] << CAN_TDL0R_DATA2_Pos) |
  8713. ((uint32_t)aData[1] << CAN_TDL0R_DATA1_Pos) |
  8714. ((uint32_t)aData[0] << CAN_TDL0R_DATA0_Pos));
  8715. /* Request transmission */
  8716. SET_BIT(hcan->Instance->sTxMailBox[transmitmailbox].TIR, CAN_TI0R_TXRQ);
  8717. 80037c4: 68fb ldr r3, [r7, #12]
  8718. 80037c6: 681a ldr r2, [r3, #0]
  8719. 80037c8: 697b ldr r3, [r7, #20]
  8720. 80037ca: 3318 adds r3, #24
  8721. 80037cc: 011b lsls r3, r3, #4
  8722. 80037ce: 4413 add r3, r2
  8723. 80037d0: 681b ldr r3, [r3, #0]
  8724. 80037d2: 68fa ldr r2, [r7, #12]
  8725. 80037d4: 6811 ldr r1, [r2, #0]
  8726. 80037d6: f043 0201 orr.w r2, r3, #1
  8727. 80037da: 697b ldr r3, [r7, #20]
  8728. 80037dc: 3318 adds r3, #24
  8729. 80037de: 011b lsls r3, r3, #4
  8730. 80037e0: 440b add r3, r1
  8731. 80037e2: 601a str r2, [r3, #0]
  8732. /* Return function status */
  8733. return HAL_OK;
  8734. 80037e4: 2300 movs r3, #0
  8735. 80037e6: e00e b.n 8003806 <HAL_CAN_AddTxMessage+0x194>
  8736. }
  8737. else
  8738. {
  8739. /* Update error code */
  8740. hcan->ErrorCode |= HAL_CAN_ERROR_PARAM;
  8741. 80037e8: 68fb ldr r3, [r7, #12]
  8742. 80037ea: 6a5b ldr r3, [r3, #36] @ 0x24
  8743. 80037ec: f443 1200 orr.w r2, r3, #2097152 @ 0x200000
  8744. 80037f0: 68fb ldr r3, [r7, #12]
  8745. 80037f2: 625a str r2, [r3, #36] @ 0x24
  8746. return HAL_ERROR;
  8747. 80037f4: 2301 movs r3, #1
  8748. 80037f6: e006 b.n 8003806 <HAL_CAN_AddTxMessage+0x194>
  8749. }
  8750. }
  8751. else
  8752. {
  8753. /* Update error code */
  8754. hcan->ErrorCode |= HAL_CAN_ERROR_NOT_INITIALIZED;
  8755. 80037f8: 68fb ldr r3, [r7, #12]
  8756. 80037fa: 6a5b ldr r3, [r3, #36] @ 0x24
  8757. 80037fc: f443 2280 orr.w r2, r3, #262144 @ 0x40000
  8758. 8003800: 68fb ldr r3, [r7, #12]
  8759. 8003802: 625a str r2, [r3, #36] @ 0x24
  8760. return HAL_ERROR;
  8761. 8003804: 2301 movs r3, #1
  8762. }
  8763. }
  8764. 8003806: 4618 mov r0, r3
  8765. 8003808: 3724 adds r7, #36 @ 0x24
  8766. 800380a: 46bd mov sp, r7
  8767. 800380c: f85d 7b04 ldr.w r7, [sp], #4
  8768. 8003810: 4770 bx lr
  8769. 08003812 <HAL_CAN_AbortTxRequest>:
  8770. * @param TxMailboxes List of the Tx Mailboxes to abort.
  8771. * This parameter can be any combination of @arg CAN_Tx_Mailboxes.
  8772. * @retval HAL status
  8773. */
  8774. HAL_StatusTypeDef HAL_CAN_AbortTxRequest(CAN_HandleTypeDef *hcan, uint32_t TxMailboxes)
  8775. {
  8776. 8003812: b480 push {r7}
  8777. 8003814: b085 sub sp, #20
  8778. 8003816: af00 add r7, sp, #0
  8779. 8003818: 6078 str r0, [r7, #4]
  8780. 800381a: 6039 str r1, [r7, #0]
  8781. HAL_CAN_StateTypeDef state = hcan->State;
  8782. 800381c: 687b ldr r3, [r7, #4]
  8783. 800381e: f893 3020 ldrb.w r3, [r3, #32]
  8784. 8003822: 73fb strb r3, [r7, #15]
  8785. /* Check function parameters */
  8786. assert_param(IS_CAN_TX_MAILBOX_LIST(TxMailboxes));
  8787. if ((state == HAL_CAN_STATE_READY) ||
  8788. 8003824: 7bfb ldrb r3, [r7, #15]
  8789. 8003826: 2b01 cmp r3, #1
  8790. 8003828: d002 beq.n 8003830 <HAL_CAN_AbortTxRequest+0x1e>
  8791. 800382a: 7bfb ldrb r3, [r7, #15]
  8792. 800382c: 2b02 cmp r3, #2
  8793. 800382e: d128 bne.n 8003882 <HAL_CAN_AbortTxRequest+0x70>
  8794. (state == HAL_CAN_STATE_LISTENING))
  8795. {
  8796. /* Check Tx Mailbox 0 */
  8797. if ((TxMailboxes & CAN_TX_MAILBOX0) != 0U)
  8798. 8003830: 683b ldr r3, [r7, #0]
  8799. 8003832: f003 0301 and.w r3, r3, #1
  8800. 8003836: 2b00 cmp r3, #0
  8801. 8003838: d007 beq.n 800384a <HAL_CAN_AbortTxRequest+0x38>
  8802. {
  8803. /* Add cancellation request for Tx Mailbox 0 */
  8804. SET_BIT(hcan->Instance->TSR, CAN_TSR_ABRQ0);
  8805. 800383a: 687b ldr r3, [r7, #4]
  8806. 800383c: 681b ldr r3, [r3, #0]
  8807. 800383e: 689a ldr r2, [r3, #8]
  8808. 8003840: 687b ldr r3, [r7, #4]
  8809. 8003842: 681b ldr r3, [r3, #0]
  8810. 8003844: f042 0280 orr.w r2, r2, #128 @ 0x80
  8811. 8003848: 609a str r2, [r3, #8]
  8812. }
  8813. /* Check Tx Mailbox 1 */
  8814. if ((TxMailboxes & CAN_TX_MAILBOX1) != 0U)
  8815. 800384a: 683b ldr r3, [r7, #0]
  8816. 800384c: f003 0302 and.w r3, r3, #2
  8817. 8003850: 2b00 cmp r3, #0
  8818. 8003852: d007 beq.n 8003864 <HAL_CAN_AbortTxRequest+0x52>
  8819. {
  8820. /* Add cancellation request for Tx Mailbox 1 */
  8821. SET_BIT(hcan->Instance->TSR, CAN_TSR_ABRQ1);
  8822. 8003854: 687b ldr r3, [r7, #4]
  8823. 8003856: 681b ldr r3, [r3, #0]
  8824. 8003858: 689a ldr r2, [r3, #8]
  8825. 800385a: 687b ldr r3, [r7, #4]
  8826. 800385c: 681b ldr r3, [r3, #0]
  8827. 800385e: f442 4200 orr.w r2, r2, #32768 @ 0x8000
  8828. 8003862: 609a str r2, [r3, #8]
  8829. }
  8830. /* Check Tx Mailbox 2 */
  8831. if ((TxMailboxes & CAN_TX_MAILBOX2) != 0U)
  8832. 8003864: 683b ldr r3, [r7, #0]
  8833. 8003866: f003 0304 and.w r3, r3, #4
  8834. 800386a: 2b00 cmp r3, #0
  8835. 800386c: d007 beq.n 800387e <HAL_CAN_AbortTxRequest+0x6c>
  8836. {
  8837. /* Add cancellation request for Tx Mailbox 2 */
  8838. SET_BIT(hcan->Instance->TSR, CAN_TSR_ABRQ2);
  8839. 800386e: 687b ldr r3, [r7, #4]
  8840. 8003870: 681b ldr r3, [r3, #0]
  8841. 8003872: 689a ldr r2, [r3, #8]
  8842. 8003874: 687b ldr r3, [r7, #4]
  8843. 8003876: 681b ldr r3, [r3, #0]
  8844. 8003878: f442 0200 orr.w r2, r2, #8388608 @ 0x800000
  8845. 800387c: 609a str r2, [r3, #8]
  8846. }
  8847. /* Return function status */
  8848. return HAL_OK;
  8849. 800387e: 2300 movs r3, #0
  8850. 8003880: e006 b.n 8003890 <HAL_CAN_AbortTxRequest+0x7e>
  8851. }
  8852. else
  8853. {
  8854. /* Update error code */
  8855. hcan->ErrorCode |= HAL_CAN_ERROR_NOT_INITIALIZED;
  8856. 8003882: 687b ldr r3, [r7, #4]
  8857. 8003884: 6a5b ldr r3, [r3, #36] @ 0x24
  8858. 8003886: f443 2280 orr.w r2, r3, #262144 @ 0x40000
  8859. 800388a: 687b ldr r3, [r7, #4]
  8860. 800388c: 625a str r2, [r3, #36] @ 0x24
  8861. return HAL_ERROR;
  8862. 800388e: 2301 movs r3, #1
  8863. }
  8864. }
  8865. 8003890: 4618 mov r0, r3
  8866. 8003892: 3714 adds r7, #20
  8867. 8003894: 46bd mov sp, r7
  8868. 8003896: f85d 7b04 ldr.w r7, [sp], #4
  8869. 800389a: 4770 bx lr
  8870. 0800389c <HAL_CAN_IsTxMessagePending>:
  8871. * - 0 : No pending transmission request on any selected Tx Mailboxes.
  8872. * - 1 : Pending transmission request on at least one of the selected
  8873. * Tx Mailbox.
  8874. */
  8875. uint32_t HAL_CAN_IsTxMessagePending(const CAN_HandleTypeDef *hcan, uint32_t TxMailboxes)
  8876. {
  8877. 800389c: b480 push {r7}
  8878. 800389e: b085 sub sp, #20
  8879. 80038a0: af00 add r7, sp, #0
  8880. 80038a2: 6078 str r0, [r7, #4]
  8881. 80038a4: 6039 str r1, [r7, #0]
  8882. uint32_t status = 0U;
  8883. 80038a6: 2300 movs r3, #0
  8884. 80038a8: 60fb str r3, [r7, #12]
  8885. HAL_CAN_StateTypeDef state = hcan->State;
  8886. 80038aa: 687b ldr r3, [r7, #4]
  8887. 80038ac: f893 3020 ldrb.w r3, [r3, #32]
  8888. 80038b0: 72fb strb r3, [r7, #11]
  8889. /* Check function parameters */
  8890. assert_param(IS_CAN_TX_MAILBOX_LIST(TxMailboxes));
  8891. if ((state == HAL_CAN_STATE_READY) ||
  8892. 80038b2: 7afb ldrb r3, [r7, #11]
  8893. 80038b4: 2b01 cmp r3, #1
  8894. 80038b6: d002 beq.n 80038be <HAL_CAN_IsTxMessagePending+0x22>
  8895. 80038b8: 7afb ldrb r3, [r7, #11]
  8896. 80038ba: 2b02 cmp r3, #2
  8897. 80038bc: d10b bne.n 80038d6 <HAL_CAN_IsTxMessagePending+0x3a>
  8898. (state == HAL_CAN_STATE_LISTENING))
  8899. {
  8900. /* Check pending transmission request on the selected Tx Mailboxes */
  8901. if ((hcan->Instance->TSR & (TxMailboxes << CAN_TSR_TME0_Pos)) != (TxMailboxes << CAN_TSR_TME0_Pos))
  8902. 80038be: 687b ldr r3, [r7, #4]
  8903. 80038c0: 681b ldr r3, [r3, #0]
  8904. 80038c2: 689a ldr r2, [r3, #8]
  8905. 80038c4: 683b ldr r3, [r7, #0]
  8906. 80038c6: 069b lsls r3, r3, #26
  8907. 80038c8: 401a ands r2, r3
  8908. 80038ca: 683b ldr r3, [r7, #0]
  8909. 80038cc: 069b lsls r3, r3, #26
  8910. 80038ce: 429a cmp r2, r3
  8911. 80038d0: d001 beq.n 80038d6 <HAL_CAN_IsTxMessagePending+0x3a>
  8912. {
  8913. status = 1U;
  8914. 80038d2: 2301 movs r3, #1
  8915. 80038d4: 60fb str r3, [r7, #12]
  8916. }
  8917. }
  8918. /* Return status */
  8919. return status;
  8920. 80038d6: 68fb ldr r3, [r7, #12]
  8921. }
  8922. 80038d8: 4618 mov r0, r3
  8923. 80038da: 3714 adds r7, #20
  8924. 80038dc: 46bd mov sp, r7
  8925. 80038de: f85d 7b04 ldr.w r7, [sp], #4
  8926. 80038e2: 4770 bx lr
  8927. 080038e4 <HAL_CAN_GetRxMessage>:
  8928. * @param aData array where the payload of the Rx frame will be stored.
  8929. * @retval HAL status
  8930. */
  8931. HAL_StatusTypeDef HAL_CAN_GetRxMessage(CAN_HandleTypeDef *hcan, uint32_t RxFifo,
  8932. CAN_RxHeaderTypeDef *pHeader, uint8_t aData[])
  8933. {
  8934. 80038e4: b480 push {r7}
  8935. 80038e6: b087 sub sp, #28
  8936. 80038e8: af00 add r7, sp, #0
  8937. 80038ea: 60f8 str r0, [r7, #12]
  8938. 80038ec: 60b9 str r1, [r7, #8]
  8939. 80038ee: 607a str r2, [r7, #4]
  8940. 80038f0: 603b str r3, [r7, #0]
  8941. HAL_CAN_StateTypeDef state = hcan->State;
  8942. 80038f2: 68fb ldr r3, [r7, #12]
  8943. 80038f4: f893 3020 ldrb.w r3, [r3, #32]
  8944. 80038f8: 75fb strb r3, [r7, #23]
  8945. assert_param(IS_CAN_RX_FIFO(RxFifo));
  8946. if ((state == HAL_CAN_STATE_READY) ||
  8947. 80038fa: 7dfb ldrb r3, [r7, #23]
  8948. 80038fc: 2b01 cmp r3, #1
  8949. 80038fe: d003 beq.n 8003908 <HAL_CAN_GetRxMessage+0x24>
  8950. 8003900: 7dfb ldrb r3, [r7, #23]
  8951. 8003902: 2b02 cmp r3, #2
  8952. 8003904: f040 8103 bne.w 8003b0e <HAL_CAN_GetRxMessage+0x22a>
  8953. (state == HAL_CAN_STATE_LISTENING))
  8954. {
  8955. /* Check the Rx FIFO */
  8956. if (RxFifo == CAN_RX_FIFO0) /* Rx element is assigned to Rx FIFO 0 */
  8957. 8003908: 68bb ldr r3, [r7, #8]
  8958. 800390a: 2b00 cmp r3, #0
  8959. 800390c: d10e bne.n 800392c <HAL_CAN_GetRxMessage+0x48>
  8960. {
  8961. /* Check that the Rx FIFO 0 is not empty */
  8962. if ((hcan->Instance->RF0R & CAN_RF0R_FMP0) == 0U)
  8963. 800390e: 68fb ldr r3, [r7, #12]
  8964. 8003910: 681b ldr r3, [r3, #0]
  8965. 8003912: 68db ldr r3, [r3, #12]
  8966. 8003914: f003 0303 and.w r3, r3, #3
  8967. 8003918: 2b00 cmp r3, #0
  8968. 800391a: d116 bne.n 800394a <HAL_CAN_GetRxMessage+0x66>
  8969. {
  8970. /* Update error code */
  8971. hcan->ErrorCode |= HAL_CAN_ERROR_PARAM;
  8972. 800391c: 68fb ldr r3, [r7, #12]
  8973. 800391e: 6a5b ldr r3, [r3, #36] @ 0x24
  8974. 8003920: f443 1200 orr.w r2, r3, #2097152 @ 0x200000
  8975. 8003924: 68fb ldr r3, [r7, #12]
  8976. 8003926: 625a str r2, [r3, #36] @ 0x24
  8977. return HAL_ERROR;
  8978. 8003928: 2301 movs r3, #1
  8979. 800392a: e0f7 b.n 8003b1c <HAL_CAN_GetRxMessage+0x238>
  8980. }
  8981. }
  8982. else /* Rx element is assigned to Rx FIFO 1 */
  8983. {
  8984. /* Check that the Rx FIFO 1 is not empty */
  8985. if ((hcan->Instance->RF1R & CAN_RF1R_FMP1) == 0U)
  8986. 800392c: 68fb ldr r3, [r7, #12]
  8987. 800392e: 681b ldr r3, [r3, #0]
  8988. 8003930: 691b ldr r3, [r3, #16]
  8989. 8003932: f003 0303 and.w r3, r3, #3
  8990. 8003936: 2b00 cmp r3, #0
  8991. 8003938: d107 bne.n 800394a <HAL_CAN_GetRxMessage+0x66>
  8992. {
  8993. /* Update error code */
  8994. hcan->ErrorCode |= HAL_CAN_ERROR_PARAM;
  8995. 800393a: 68fb ldr r3, [r7, #12]
  8996. 800393c: 6a5b ldr r3, [r3, #36] @ 0x24
  8997. 800393e: f443 1200 orr.w r2, r3, #2097152 @ 0x200000
  8998. 8003942: 68fb ldr r3, [r7, #12]
  8999. 8003944: 625a str r2, [r3, #36] @ 0x24
  9000. return HAL_ERROR;
  9001. 8003946: 2301 movs r3, #1
  9002. 8003948: e0e8 b.n 8003b1c <HAL_CAN_GetRxMessage+0x238>
  9003. }
  9004. }
  9005. /* Get the header */
  9006. pHeader->IDE = CAN_RI0R_IDE & hcan->Instance->sFIFOMailBox[RxFifo].RIR;
  9007. 800394a: 68fb ldr r3, [r7, #12]
  9008. 800394c: 681a ldr r2, [r3, #0]
  9009. 800394e: 68bb ldr r3, [r7, #8]
  9010. 8003950: 331b adds r3, #27
  9011. 8003952: 011b lsls r3, r3, #4
  9012. 8003954: 4413 add r3, r2
  9013. 8003956: 681b ldr r3, [r3, #0]
  9014. 8003958: f003 0204 and.w r2, r3, #4
  9015. 800395c: 687b ldr r3, [r7, #4]
  9016. 800395e: 609a str r2, [r3, #8]
  9017. if (pHeader->IDE == CAN_ID_STD)
  9018. 8003960: 687b ldr r3, [r7, #4]
  9019. 8003962: 689b ldr r3, [r3, #8]
  9020. 8003964: 2b00 cmp r3, #0
  9021. 8003966: d10c bne.n 8003982 <HAL_CAN_GetRxMessage+0x9e>
  9022. {
  9023. pHeader->StdId = (CAN_RI0R_STID & hcan->Instance->sFIFOMailBox[RxFifo].RIR) >> CAN_TI0R_STID_Pos;
  9024. 8003968: 68fb ldr r3, [r7, #12]
  9025. 800396a: 681a ldr r2, [r3, #0]
  9026. 800396c: 68bb ldr r3, [r7, #8]
  9027. 800396e: 331b adds r3, #27
  9028. 8003970: 011b lsls r3, r3, #4
  9029. 8003972: 4413 add r3, r2
  9030. 8003974: 681b ldr r3, [r3, #0]
  9031. 8003976: 0d5b lsrs r3, r3, #21
  9032. 8003978: f3c3 020a ubfx r2, r3, #0, #11
  9033. 800397c: 687b ldr r3, [r7, #4]
  9034. 800397e: 601a str r2, [r3, #0]
  9035. 8003980: e00b b.n 800399a <HAL_CAN_GetRxMessage+0xb6>
  9036. }
  9037. else
  9038. {
  9039. pHeader->ExtId = ((CAN_RI0R_EXID | CAN_RI0R_STID) &
  9040. hcan->Instance->sFIFOMailBox[RxFifo].RIR) >> CAN_RI0R_EXID_Pos;
  9041. 8003982: 68fb ldr r3, [r7, #12]
  9042. 8003984: 681a ldr r2, [r3, #0]
  9043. 8003986: 68bb ldr r3, [r7, #8]
  9044. 8003988: 331b adds r3, #27
  9045. 800398a: 011b lsls r3, r3, #4
  9046. 800398c: 4413 add r3, r2
  9047. 800398e: 681b ldr r3, [r3, #0]
  9048. 8003990: 08db lsrs r3, r3, #3
  9049. 8003992: f023 4260 bic.w r2, r3, #3758096384 @ 0xe0000000
  9050. pHeader->ExtId = ((CAN_RI0R_EXID | CAN_RI0R_STID) &
  9051. 8003996: 687b ldr r3, [r7, #4]
  9052. 8003998: 605a str r2, [r3, #4]
  9053. }
  9054. pHeader->RTR = (CAN_RI0R_RTR & hcan->Instance->sFIFOMailBox[RxFifo].RIR);
  9055. 800399a: 68fb ldr r3, [r7, #12]
  9056. 800399c: 681a ldr r2, [r3, #0]
  9057. 800399e: 68bb ldr r3, [r7, #8]
  9058. 80039a0: 331b adds r3, #27
  9059. 80039a2: 011b lsls r3, r3, #4
  9060. 80039a4: 4413 add r3, r2
  9061. 80039a6: 681b ldr r3, [r3, #0]
  9062. 80039a8: f003 0202 and.w r2, r3, #2
  9063. 80039ac: 687b ldr r3, [r7, #4]
  9064. 80039ae: 60da str r2, [r3, #12]
  9065. if (((CAN_RDT0R_DLC & hcan->Instance->sFIFOMailBox[RxFifo].RDTR) >> CAN_RDT0R_DLC_Pos) >= 8U)
  9066. 80039b0: 68fb ldr r3, [r7, #12]
  9067. 80039b2: 681a ldr r2, [r3, #0]
  9068. 80039b4: 68bb ldr r3, [r7, #8]
  9069. 80039b6: 331b adds r3, #27
  9070. 80039b8: 011b lsls r3, r3, #4
  9071. 80039ba: 4413 add r3, r2
  9072. 80039bc: 3304 adds r3, #4
  9073. 80039be: 681b ldr r3, [r3, #0]
  9074. 80039c0: f003 0308 and.w r3, r3, #8
  9075. 80039c4: 2b00 cmp r3, #0
  9076. 80039c6: d003 beq.n 80039d0 <HAL_CAN_GetRxMessage+0xec>
  9077. {
  9078. /* Truncate DLC to 8 if received field is over range */
  9079. pHeader->DLC = 8U;
  9080. 80039c8: 687b ldr r3, [r7, #4]
  9081. 80039ca: 2208 movs r2, #8
  9082. 80039cc: 611a str r2, [r3, #16]
  9083. 80039ce: e00b b.n 80039e8 <HAL_CAN_GetRxMessage+0x104>
  9084. }
  9085. else
  9086. {
  9087. pHeader->DLC = (CAN_RDT0R_DLC & hcan->Instance->sFIFOMailBox[RxFifo].RDTR) >> CAN_RDT0R_DLC_Pos;
  9088. 80039d0: 68fb ldr r3, [r7, #12]
  9089. 80039d2: 681a ldr r2, [r3, #0]
  9090. 80039d4: 68bb ldr r3, [r7, #8]
  9091. 80039d6: 331b adds r3, #27
  9092. 80039d8: 011b lsls r3, r3, #4
  9093. 80039da: 4413 add r3, r2
  9094. 80039dc: 3304 adds r3, #4
  9095. 80039de: 681b ldr r3, [r3, #0]
  9096. 80039e0: f003 020f and.w r2, r3, #15
  9097. 80039e4: 687b ldr r3, [r7, #4]
  9098. 80039e6: 611a str r2, [r3, #16]
  9099. }
  9100. pHeader->FilterMatchIndex = (CAN_RDT0R_FMI & hcan->Instance->sFIFOMailBox[RxFifo].RDTR) >> CAN_RDT0R_FMI_Pos;
  9101. 80039e8: 68fb ldr r3, [r7, #12]
  9102. 80039ea: 681a ldr r2, [r3, #0]
  9103. 80039ec: 68bb ldr r3, [r7, #8]
  9104. 80039ee: 331b adds r3, #27
  9105. 80039f0: 011b lsls r3, r3, #4
  9106. 80039f2: 4413 add r3, r2
  9107. 80039f4: 3304 adds r3, #4
  9108. 80039f6: 681b ldr r3, [r3, #0]
  9109. 80039f8: 0a1b lsrs r3, r3, #8
  9110. 80039fa: b2da uxtb r2, r3
  9111. 80039fc: 687b ldr r3, [r7, #4]
  9112. 80039fe: 619a str r2, [r3, #24]
  9113. pHeader->Timestamp = (CAN_RDT0R_TIME & hcan->Instance->sFIFOMailBox[RxFifo].RDTR) >> CAN_RDT0R_TIME_Pos;
  9114. 8003a00: 68fb ldr r3, [r7, #12]
  9115. 8003a02: 681a ldr r2, [r3, #0]
  9116. 8003a04: 68bb ldr r3, [r7, #8]
  9117. 8003a06: 331b adds r3, #27
  9118. 8003a08: 011b lsls r3, r3, #4
  9119. 8003a0a: 4413 add r3, r2
  9120. 8003a0c: 3304 adds r3, #4
  9121. 8003a0e: 681b ldr r3, [r3, #0]
  9122. 8003a10: 0c1b lsrs r3, r3, #16
  9123. 8003a12: b29a uxth r2, r3
  9124. 8003a14: 687b ldr r3, [r7, #4]
  9125. 8003a16: 615a str r2, [r3, #20]
  9126. /* Get the data */
  9127. aData[0] = (uint8_t)((CAN_RDL0R_DATA0 & hcan->Instance->sFIFOMailBox[RxFifo].RDLR) >> CAN_RDL0R_DATA0_Pos);
  9128. 8003a18: 68fb ldr r3, [r7, #12]
  9129. 8003a1a: 681a ldr r2, [r3, #0]
  9130. 8003a1c: 68bb ldr r3, [r7, #8]
  9131. 8003a1e: 011b lsls r3, r3, #4
  9132. 8003a20: 4413 add r3, r2
  9133. 8003a22: f503 73dc add.w r3, r3, #440 @ 0x1b8
  9134. 8003a26: 681b ldr r3, [r3, #0]
  9135. 8003a28: b2da uxtb r2, r3
  9136. 8003a2a: 683b ldr r3, [r7, #0]
  9137. 8003a2c: 701a strb r2, [r3, #0]
  9138. aData[1] = (uint8_t)((CAN_RDL0R_DATA1 & hcan->Instance->sFIFOMailBox[RxFifo].RDLR) >> CAN_RDL0R_DATA1_Pos);
  9139. 8003a2e: 68fb ldr r3, [r7, #12]
  9140. 8003a30: 681a ldr r2, [r3, #0]
  9141. 8003a32: 68bb ldr r3, [r7, #8]
  9142. 8003a34: 011b lsls r3, r3, #4
  9143. 8003a36: 4413 add r3, r2
  9144. 8003a38: f503 73dc add.w r3, r3, #440 @ 0x1b8
  9145. 8003a3c: 681b ldr r3, [r3, #0]
  9146. 8003a3e: 0a1a lsrs r2, r3, #8
  9147. 8003a40: 683b ldr r3, [r7, #0]
  9148. 8003a42: 3301 adds r3, #1
  9149. 8003a44: b2d2 uxtb r2, r2
  9150. 8003a46: 701a strb r2, [r3, #0]
  9151. aData[2] = (uint8_t)((CAN_RDL0R_DATA2 & hcan->Instance->sFIFOMailBox[RxFifo].RDLR) >> CAN_RDL0R_DATA2_Pos);
  9152. 8003a48: 68fb ldr r3, [r7, #12]
  9153. 8003a4a: 681a ldr r2, [r3, #0]
  9154. 8003a4c: 68bb ldr r3, [r7, #8]
  9155. 8003a4e: 011b lsls r3, r3, #4
  9156. 8003a50: 4413 add r3, r2
  9157. 8003a52: f503 73dc add.w r3, r3, #440 @ 0x1b8
  9158. 8003a56: 681b ldr r3, [r3, #0]
  9159. 8003a58: 0c1a lsrs r2, r3, #16
  9160. 8003a5a: 683b ldr r3, [r7, #0]
  9161. 8003a5c: 3302 adds r3, #2
  9162. 8003a5e: b2d2 uxtb r2, r2
  9163. 8003a60: 701a strb r2, [r3, #0]
  9164. aData[3] = (uint8_t)((CAN_RDL0R_DATA3 & hcan->Instance->sFIFOMailBox[RxFifo].RDLR) >> CAN_RDL0R_DATA3_Pos);
  9165. 8003a62: 68fb ldr r3, [r7, #12]
  9166. 8003a64: 681a ldr r2, [r3, #0]
  9167. 8003a66: 68bb ldr r3, [r7, #8]
  9168. 8003a68: 011b lsls r3, r3, #4
  9169. 8003a6a: 4413 add r3, r2
  9170. 8003a6c: f503 73dc add.w r3, r3, #440 @ 0x1b8
  9171. 8003a70: 681b ldr r3, [r3, #0]
  9172. 8003a72: 0e1a lsrs r2, r3, #24
  9173. 8003a74: 683b ldr r3, [r7, #0]
  9174. 8003a76: 3303 adds r3, #3
  9175. 8003a78: b2d2 uxtb r2, r2
  9176. 8003a7a: 701a strb r2, [r3, #0]
  9177. aData[4] = (uint8_t)((CAN_RDH0R_DATA4 & hcan->Instance->sFIFOMailBox[RxFifo].RDHR) >> CAN_RDH0R_DATA4_Pos);
  9178. 8003a7c: 68fb ldr r3, [r7, #12]
  9179. 8003a7e: 681a ldr r2, [r3, #0]
  9180. 8003a80: 68bb ldr r3, [r7, #8]
  9181. 8003a82: 011b lsls r3, r3, #4
  9182. 8003a84: 4413 add r3, r2
  9183. 8003a86: f503 73de add.w r3, r3, #444 @ 0x1bc
  9184. 8003a8a: 681a ldr r2, [r3, #0]
  9185. 8003a8c: 683b ldr r3, [r7, #0]
  9186. 8003a8e: 3304 adds r3, #4
  9187. 8003a90: b2d2 uxtb r2, r2
  9188. 8003a92: 701a strb r2, [r3, #0]
  9189. aData[5] = (uint8_t)((CAN_RDH0R_DATA5 & hcan->Instance->sFIFOMailBox[RxFifo].RDHR) >> CAN_RDH0R_DATA5_Pos);
  9190. 8003a94: 68fb ldr r3, [r7, #12]
  9191. 8003a96: 681a ldr r2, [r3, #0]
  9192. 8003a98: 68bb ldr r3, [r7, #8]
  9193. 8003a9a: 011b lsls r3, r3, #4
  9194. 8003a9c: 4413 add r3, r2
  9195. 8003a9e: f503 73de add.w r3, r3, #444 @ 0x1bc
  9196. 8003aa2: 681b ldr r3, [r3, #0]
  9197. 8003aa4: 0a1a lsrs r2, r3, #8
  9198. 8003aa6: 683b ldr r3, [r7, #0]
  9199. 8003aa8: 3305 adds r3, #5
  9200. 8003aaa: b2d2 uxtb r2, r2
  9201. 8003aac: 701a strb r2, [r3, #0]
  9202. aData[6] = (uint8_t)((CAN_RDH0R_DATA6 & hcan->Instance->sFIFOMailBox[RxFifo].RDHR) >> CAN_RDH0R_DATA6_Pos);
  9203. 8003aae: 68fb ldr r3, [r7, #12]
  9204. 8003ab0: 681a ldr r2, [r3, #0]
  9205. 8003ab2: 68bb ldr r3, [r7, #8]
  9206. 8003ab4: 011b lsls r3, r3, #4
  9207. 8003ab6: 4413 add r3, r2
  9208. 8003ab8: f503 73de add.w r3, r3, #444 @ 0x1bc
  9209. 8003abc: 681b ldr r3, [r3, #0]
  9210. 8003abe: 0c1a lsrs r2, r3, #16
  9211. 8003ac0: 683b ldr r3, [r7, #0]
  9212. 8003ac2: 3306 adds r3, #6
  9213. 8003ac4: b2d2 uxtb r2, r2
  9214. 8003ac6: 701a strb r2, [r3, #0]
  9215. aData[7] = (uint8_t)((CAN_RDH0R_DATA7 & hcan->Instance->sFIFOMailBox[RxFifo].RDHR) >> CAN_RDH0R_DATA7_Pos);
  9216. 8003ac8: 68fb ldr r3, [r7, #12]
  9217. 8003aca: 681a ldr r2, [r3, #0]
  9218. 8003acc: 68bb ldr r3, [r7, #8]
  9219. 8003ace: 011b lsls r3, r3, #4
  9220. 8003ad0: 4413 add r3, r2
  9221. 8003ad2: f503 73de add.w r3, r3, #444 @ 0x1bc
  9222. 8003ad6: 681b ldr r3, [r3, #0]
  9223. 8003ad8: 0e1a lsrs r2, r3, #24
  9224. 8003ada: 683b ldr r3, [r7, #0]
  9225. 8003adc: 3307 adds r3, #7
  9226. 8003ade: b2d2 uxtb r2, r2
  9227. 8003ae0: 701a strb r2, [r3, #0]
  9228. /* Release the FIFO */
  9229. if (RxFifo == CAN_RX_FIFO0) /* Rx element is assigned to Rx FIFO 0 */
  9230. 8003ae2: 68bb ldr r3, [r7, #8]
  9231. 8003ae4: 2b00 cmp r3, #0
  9232. 8003ae6: d108 bne.n 8003afa <HAL_CAN_GetRxMessage+0x216>
  9233. {
  9234. /* Release RX FIFO 0 */
  9235. SET_BIT(hcan->Instance->RF0R, CAN_RF0R_RFOM0);
  9236. 8003ae8: 68fb ldr r3, [r7, #12]
  9237. 8003aea: 681b ldr r3, [r3, #0]
  9238. 8003aec: 68da ldr r2, [r3, #12]
  9239. 8003aee: 68fb ldr r3, [r7, #12]
  9240. 8003af0: 681b ldr r3, [r3, #0]
  9241. 8003af2: f042 0220 orr.w r2, r2, #32
  9242. 8003af6: 60da str r2, [r3, #12]
  9243. 8003af8: e007 b.n 8003b0a <HAL_CAN_GetRxMessage+0x226>
  9244. }
  9245. else /* Rx element is assigned to Rx FIFO 1 */
  9246. {
  9247. /* Release RX FIFO 1 */
  9248. SET_BIT(hcan->Instance->RF1R, CAN_RF1R_RFOM1);
  9249. 8003afa: 68fb ldr r3, [r7, #12]
  9250. 8003afc: 681b ldr r3, [r3, #0]
  9251. 8003afe: 691a ldr r2, [r3, #16]
  9252. 8003b00: 68fb ldr r3, [r7, #12]
  9253. 8003b02: 681b ldr r3, [r3, #0]
  9254. 8003b04: f042 0220 orr.w r2, r2, #32
  9255. 8003b08: 611a str r2, [r3, #16]
  9256. }
  9257. /* Return function status */
  9258. return HAL_OK;
  9259. 8003b0a: 2300 movs r3, #0
  9260. 8003b0c: e006 b.n 8003b1c <HAL_CAN_GetRxMessage+0x238>
  9261. }
  9262. else
  9263. {
  9264. /* Update error code */
  9265. hcan->ErrorCode |= HAL_CAN_ERROR_NOT_INITIALIZED;
  9266. 8003b0e: 68fb ldr r3, [r7, #12]
  9267. 8003b10: 6a5b ldr r3, [r3, #36] @ 0x24
  9268. 8003b12: f443 2280 orr.w r2, r3, #262144 @ 0x40000
  9269. 8003b16: 68fb ldr r3, [r7, #12]
  9270. 8003b18: 625a str r2, [r3, #36] @ 0x24
  9271. return HAL_ERROR;
  9272. 8003b1a: 2301 movs r3, #1
  9273. }
  9274. }
  9275. 8003b1c: 4618 mov r0, r3
  9276. 8003b1e: 371c adds r7, #28
  9277. 8003b20: 46bd mov sp, r7
  9278. 8003b22: f85d 7b04 ldr.w r7, [sp], #4
  9279. 8003b26: 4770 bx lr
  9280. 08003b28 <HAL_CAN_ActivateNotification>:
  9281. * @param ActiveITs indicates which interrupts will be enabled.
  9282. * This parameter can be any combination of @arg CAN_Interrupts.
  9283. * @retval HAL status
  9284. */
  9285. HAL_StatusTypeDef HAL_CAN_ActivateNotification(CAN_HandleTypeDef *hcan, uint32_t ActiveITs)
  9286. {
  9287. 8003b28: b480 push {r7}
  9288. 8003b2a: b085 sub sp, #20
  9289. 8003b2c: af00 add r7, sp, #0
  9290. 8003b2e: 6078 str r0, [r7, #4]
  9291. 8003b30: 6039 str r1, [r7, #0]
  9292. HAL_CAN_StateTypeDef state = hcan->State;
  9293. 8003b32: 687b ldr r3, [r7, #4]
  9294. 8003b34: f893 3020 ldrb.w r3, [r3, #32]
  9295. 8003b38: 73fb strb r3, [r7, #15]
  9296. /* Check function parameters */
  9297. assert_param(IS_CAN_IT(ActiveITs));
  9298. if ((state == HAL_CAN_STATE_READY) ||
  9299. 8003b3a: 7bfb ldrb r3, [r7, #15]
  9300. 8003b3c: 2b01 cmp r3, #1
  9301. 8003b3e: d002 beq.n 8003b46 <HAL_CAN_ActivateNotification+0x1e>
  9302. 8003b40: 7bfb ldrb r3, [r7, #15]
  9303. 8003b42: 2b02 cmp r3, #2
  9304. 8003b44: d109 bne.n 8003b5a <HAL_CAN_ActivateNotification+0x32>
  9305. (state == HAL_CAN_STATE_LISTENING))
  9306. {
  9307. /* Enable the selected interrupts */
  9308. __HAL_CAN_ENABLE_IT(hcan, ActiveITs);
  9309. 8003b46: 687b ldr r3, [r7, #4]
  9310. 8003b48: 681b ldr r3, [r3, #0]
  9311. 8003b4a: 6959 ldr r1, [r3, #20]
  9312. 8003b4c: 687b ldr r3, [r7, #4]
  9313. 8003b4e: 681b ldr r3, [r3, #0]
  9314. 8003b50: 683a ldr r2, [r7, #0]
  9315. 8003b52: 430a orrs r2, r1
  9316. 8003b54: 615a str r2, [r3, #20]
  9317. /* Return function status */
  9318. return HAL_OK;
  9319. 8003b56: 2300 movs r3, #0
  9320. 8003b58: e006 b.n 8003b68 <HAL_CAN_ActivateNotification+0x40>
  9321. }
  9322. else
  9323. {
  9324. /* Update error code */
  9325. hcan->ErrorCode |= HAL_CAN_ERROR_NOT_INITIALIZED;
  9326. 8003b5a: 687b ldr r3, [r7, #4]
  9327. 8003b5c: 6a5b ldr r3, [r3, #36] @ 0x24
  9328. 8003b5e: f443 2280 orr.w r2, r3, #262144 @ 0x40000
  9329. 8003b62: 687b ldr r3, [r7, #4]
  9330. 8003b64: 625a str r2, [r3, #36] @ 0x24
  9331. return HAL_ERROR;
  9332. 8003b66: 2301 movs r3, #1
  9333. }
  9334. }
  9335. 8003b68: 4618 mov r0, r3
  9336. 8003b6a: 3714 adds r7, #20
  9337. 8003b6c: 46bd mov sp, r7
  9338. 8003b6e: f85d 7b04 ldr.w r7, [sp], #4
  9339. 8003b72: 4770 bx lr
  9340. 08003b74 <HAL_CAN_IRQHandler>:
  9341. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  9342. * the configuration information for the specified CAN.
  9343. * @retval None
  9344. */
  9345. void HAL_CAN_IRQHandler(CAN_HandleTypeDef *hcan)
  9346. {
  9347. 8003b74: b580 push {r7, lr}
  9348. 8003b76: b08a sub sp, #40 @ 0x28
  9349. 8003b78: af00 add r7, sp, #0
  9350. 8003b7a: 6078 str r0, [r7, #4]
  9351. uint32_t errorcode = HAL_CAN_ERROR_NONE;
  9352. 8003b7c: 2300 movs r3, #0
  9353. 8003b7e: 627b str r3, [r7, #36] @ 0x24
  9354. uint32_t interrupts = READ_REG(hcan->Instance->IER);
  9355. 8003b80: 687b ldr r3, [r7, #4]
  9356. 8003b82: 681b ldr r3, [r3, #0]
  9357. 8003b84: 695b ldr r3, [r3, #20]
  9358. 8003b86: 623b str r3, [r7, #32]
  9359. uint32_t msrflags = READ_REG(hcan->Instance->MSR);
  9360. 8003b88: 687b ldr r3, [r7, #4]
  9361. 8003b8a: 681b ldr r3, [r3, #0]
  9362. 8003b8c: 685b ldr r3, [r3, #4]
  9363. 8003b8e: 61fb str r3, [r7, #28]
  9364. uint32_t tsrflags = READ_REG(hcan->Instance->TSR);
  9365. 8003b90: 687b ldr r3, [r7, #4]
  9366. 8003b92: 681b ldr r3, [r3, #0]
  9367. 8003b94: 689b ldr r3, [r3, #8]
  9368. 8003b96: 61bb str r3, [r7, #24]
  9369. uint32_t rf0rflags = READ_REG(hcan->Instance->RF0R);
  9370. 8003b98: 687b ldr r3, [r7, #4]
  9371. 8003b9a: 681b ldr r3, [r3, #0]
  9372. 8003b9c: 68db ldr r3, [r3, #12]
  9373. 8003b9e: 617b str r3, [r7, #20]
  9374. uint32_t rf1rflags = READ_REG(hcan->Instance->RF1R);
  9375. 8003ba0: 687b ldr r3, [r7, #4]
  9376. 8003ba2: 681b ldr r3, [r3, #0]
  9377. 8003ba4: 691b ldr r3, [r3, #16]
  9378. 8003ba6: 613b str r3, [r7, #16]
  9379. uint32_t esrflags = READ_REG(hcan->Instance->ESR);
  9380. 8003ba8: 687b ldr r3, [r7, #4]
  9381. 8003baa: 681b ldr r3, [r3, #0]
  9382. 8003bac: 699b ldr r3, [r3, #24]
  9383. 8003bae: 60fb str r3, [r7, #12]
  9384. /* Transmit Mailbox empty interrupt management *****************************/
  9385. if ((interrupts & CAN_IT_TX_MAILBOX_EMPTY) != 0U)
  9386. 8003bb0: 6a3b ldr r3, [r7, #32]
  9387. 8003bb2: f003 0301 and.w r3, r3, #1
  9388. 8003bb6: 2b00 cmp r3, #0
  9389. 8003bb8: d07c beq.n 8003cb4 <HAL_CAN_IRQHandler+0x140>
  9390. {
  9391. /* Transmit Mailbox 0 management *****************************************/
  9392. if ((tsrflags & CAN_TSR_RQCP0) != 0U)
  9393. 8003bba: 69bb ldr r3, [r7, #24]
  9394. 8003bbc: f003 0301 and.w r3, r3, #1
  9395. 8003bc0: 2b00 cmp r3, #0
  9396. 8003bc2: d023 beq.n 8003c0c <HAL_CAN_IRQHandler+0x98>
  9397. {
  9398. /* Clear the Transmission Complete flag (and TXOK0,ALST0,TERR0 bits) */
  9399. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_RQCP0);
  9400. 8003bc4: 687b ldr r3, [r7, #4]
  9401. 8003bc6: 681b ldr r3, [r3, #0]
  9402. 8003bc8: 2201 movs r2, #1
  9403. 8003bca: 609a str r2, [r3, #8]
  9404. if ((tsrflags & CAN_TSR_TXOK0) != 0U)
  9405. 8003bcc: 69bb ldr r3, [r7, #24]
  9406. 8003bce: f003 0302 and.w r3, r3, #2
  9407. 8003bd2: 2b00 cmp r3, #0
  9408. 8003bd4: d003 beq.n 8003bde <HAL_CAN_IRQHandler+0x6a>
  9409. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9410. /* Call registered callback*/
  9411. hcan->TxMailbox0CompleteCallback(hcan);
  9412. #else
  9413. /* Call weak (surcharged) callback */
  9414. HAL_CAN_TxMailbox0CompleteCallback(hcan);
  9415. 8003bd6: 6878 ldr r0, [r7, #4]
  9416. 8003bd8: f000 f983 bl 8003ee2 <HAL_CAN_TxMailbox0CompleteCallback>
  9417. 8003bdc: e016 b.n 8003c0c <HAL_CAN_IRQHandler+0x98>
  9418. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9419. }
  9420. else
  9421. {
  9422. if ((tsrflags & CAN_TSR_ALST0) != 0U)
  9423. 8003bde: 69bb ldr r3, [r7, #24]
  9424. 8003be0: f003 0304 and.w r3, r3, #4
  9425. 8003be4: 2b00 cmp r3, #0
  9426. 8003be6: d004 beq.n 8003bf2 <HAL_CAN_IRQHandler+0x7e>
  9427. {
  9428. /* Update error code */
  9429. errorcode |= HAL_CAN_ERROR_TX_ALST0;
  9430. 8003be8: 6a7b ldr r3, [r7, #36] @ 0x24
  9431. 8003bea: f443 6300 orr.w r3, r3, #2048 @ 0x800
  9432. 8003bee: 627b str r3, [r7, #36] @ 0x24
  9433. 8003bf0: e00c b.n 8003c0c <HAL_CAN_IRQHandler+0x98>
  9434. }
  9435. else if ((tsrflags & CAN_TSR_TERR0) != 0U)
  9436. 8003bf2: 69bb ldr r3, [r7, #24]
  9437. 8003bf4: f003 0308 and.w r3, r3, #8
  9438. 8003bf8: 2b00 cmp r3, #0
  9439. 8003bfa: d004 beq.n 8003c06 <HAL_CAN_IRQHandler+0x92>
  9440. {
  9441. /* Update error code */
  9442. errorcode |= HAL_CAN_ERROR_TX_TERR0;
  9443. 8003bfc: 6a7b ldr r3, [r7, #36] @ 0x24
  9444. 8003bfe: f443 5380 orr.w r3, r3, #4096 @ 0x1000
  9445. 8003c02: 627b str r3, [r7, #36] @ 0x24
  9446. 8003c04: e002 b.n 8003c0c <HAL_CAN_IRQHandler+0x98>
  9447. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9448. /* Call registered callback*/
  9449. hcan->TxMailbox0AbortCallback(hcan);
  9450. #else
  9451. /* Call weak (surcharged) callback */
  9452. HAL_CAN_TxMailbox0AbortCallback(hcan);
  9453. 8003c06: 6878 ldr r0, [r7, #4]
  9454. 8003c08: f000 f989 bl 8003f1e <HAL_CAN_TxMailbox0AbortCallback>
  9455. }
  9456. }
  9457. }
  9458. /* Transmit Mailbox 1 management *****************************************/
  9459. if ((tsrflags & CAN_TSR_RQCP1) != 0U)
  9460. 8003c0c: 69bb ldr r3, [r7, #24]
  9461. 8003c0e: f403 7380 and.w r3, r3, #256 @ 0x100
  9462. 8003c12: 2b00 cmp r3, #0
  9463. 8003c14: d024 beq.n 8003c60 <HAL_CAN_IRQHandler+0xec>
  9464. {
  9465. /* Clear the Transmission Complete flag (and TXOK1,ALST1,TERR1 bits) */
  9466. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_RQCP1);
  9467. 8003c16: 687b ldr r3, [r7, #4]
  9468. 8003c18: 681b ldr r3, [r3, #0]
  9469. 8003c1a: f44f 7280 mov.w r2, #256 @ 0x100
  9470. 8003c1e: 609a str r2, [r3, #8]
  9471. if ((tsrflags & CAN_TSR_TXOK1) != 0U)
  9472. 8003c20: 69bb ldr r3, [r7, #24]
  9473. 8003c22: f403 7300 and.w r3, r3, #512 @ 0x200
  9474. 8003c26: 2b00 cmp r3, #0
  9475. 8003c28: d003 beq.n 8003c32 <HAL_CAN_IRQHandler+0xbe>
  9476. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9477. /* Call registered callback*/
  9478. hcan->TxMailbox1CompleteCallback(hcan);
  9479. #else
  9480. /* Call weak (surcharged) callback */
  9481. HAL_CAN_TxMailbox1CompleteCallback(hcan);
  9482. 8003c2a: 6878 ldr r0, [r7, #4]
  9483. 8003c2c: f000 f963 bl 8003ef6 <HAL_CAN_TxMailbox1CompleteCallback>
  9484. 8003c30: e016 b.n 8003c60 <HAL_CAN_IRQHandler+0xec>
  9485. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9486. }
  9487. else
  9488. {
  9489. if ((tsrflags & CAN_TSR_ALST1) != 0U)
  9490. 8003c32: 69bb ldr r3, [r7, #24]
  9491. 8003c34: f403 6380 and.w r3, r3, #1024 @ 0x400
  9492. 8003c38: 2b00 cmp r3, #0
  9493. 8003c3a: d004 beq.n 8003c46 <HAL_CAN_IRQHandler+0xd2>
  9494. {
  9495. /* Update error code */
  9496. errorcode |= HAL_CAN_ERROR_TX_ALST1;
  9497. 8003c3c: 6a7b ldr r3, [r7, #36] @ 0x24
  9498. 8003c3e: f443 5300 orr.w r3, r3, #8192 @ 0x2000
  9499. 8003c42: 627b str r3, [r7, #36] @ 0x24
  9500. 8003c44: e00c b.n 8003c60 <HAL_CAN_IRQHandler+0xec>
  9501. }
  9502. else if ((tsrflags & CAN_TSR_TERR1) != 0U)
  9503. 8003c46: 69bb ldr r3, [r7, #24]
  9504. 8003c48: f403 6300 and.w r3, r3, #2048 @ 0x800
  9505. 8003c4c: 2b00 cmp r3, #0
  9506. 8003c4e: d004 beq.n 8003c5a <HAL_CAN_IRQHandler+0xe6>
  9507. {
  9508. /* Update error code */
  9509. errorcode |= HAL_CAN_ERROR_TX_TERR1;
  9510. 8003c50: 6a7b ldr r3, [r7, #36] @ 0x24
  9511. 8003c52: f443 4380 orr.w r3, r3, #16384 @ 0x4000
  9512. 8003c56: 627b str r3, [r7, #36] @ 0x24
  9513. 8003c58: e002 b.n 8003c60 <HAL_CAN_IRQHandler+0xec>
  9514. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9515. /* Call registered callback*/
  9516. hcan->TxMailbox1AbortCallback(hcan);
  9517. #else
  9518. /* Call weak (surcharged) callback */
  9519. HAL_CAN_TxMailbox1AbortCallback(hcan);
  9520. 8003c5a: 6878 ldr r0, [r7, #4]
  9521. 8003c5c: f000 f969 bl 8003f32 <HAL_CAN_TxMailbox1AbortCallback>
  9522. }
  9523. }
  9524. }
  9525. /* Transmit Mailbox 2 management *****************************************/
  9526. if ((tsrflags & CAN_TSR_RQCP2) != 0U)
  9527. 8003c60: 69bb ldr r3, [r7, #24]
  9528. 8003c62: f403 3380 and.w r3, r3, #65536 @ 0x10000
  9529. 8003c66: 2b00 cmp r3, #0
  9530. 8003c68: d024 beq.n 8003cb4 <HAL_CAN_IRQHandler+0x140>
  9531. {
  9532. /* Clear the Transmission Complete flag (and TXOK2,ALST2,TERR2 bits) */
  9533. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_RQCP2);
  9534. 8003c6a: 687b ldr r3, [r7, #4]
  9535. 8003c6c: 681b ldr r3, [r3, #0]
  9536. 8003c6e: f44f 3280 mov.w r2, #65536 @ 0x10000
  9537. 8003c72: 609a str r2, [r3, #8]
  9538. if ((tsrflags & CAN_TSR_TXOK2) != 0U)
  9539. 8003c74: 69bb ldr r3, [r7, #24]
  9540. 8003c76: f403 3300 and.w r3, r3, #131072 @ 0x20000
  9541. 8003c7a: 2b00 cmp r3, #0
  9542. 8003c7c: d003 beq.n 8003c86 <HAL_CAN_IRQHandler+0x112>
  9543. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9544. /* Call registered callback*/
  9545. hcan->TxMailbox2CompleteCallback(hcan);
  9546. #else
  9547. /* Call weak (surcharged) callback */
  9548. HAL_CAN_TxMailbox2CompleteCallback(hcan);
  9549. 8003c7e: 6878 ldr r0, [r7, #4]
  9550. 8003c80: f000 f943 bl 8003f0a <HAL_CAN_TxMailbox2CompleteCallback>
  9551. 8003c84: e016 b.n 8003cb4 <HAL_CAN_IRQHandler+0x140>
  9552. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9553. }
  9554. else
  9555. {
  9556. if ((tsrflags & CAN_TSR_ALST2) != 0U)
  9557. 8003c86: 69bb ldr r3, [r7, #24]
  9558. 8003c88: f403 2380 and.w r3, r3, #262144 @ 0x40000
  9559. 8003c8c: 2b00 cmp r3, #0
  9560. 8003c8e: d004 beq.n 8003c9a <HAL_CAN_IRQHandler+0x126>
  9561. {
  9562. /* Update error code */
  9563. errorcode |= HAL_CAN_ERROR_TX_ALST2;
  9564. 8003c90: 6a7b ldr r3, [r7, #36] @ 0x24
  9565. 8003c92: f443 4300 orr.w r3, r3, #32768 @ 0x8000
  9566. 8003c96: 627b str r3, [r7, #36] @ 0x24
  9567. 8003c98: e00c b.n 8003cb4 <HAL_CAN_IRQHandler+0x140>
  9568. }
  9569. else if ((tsrflags & CAN_TSR_TERR2) != 0U)
  9570. 8003c9a: 69bb ldr r3, [r7, #24]
  9571. 8003c9c: f403 2300 and.w r3, r3, #524288 @ 0x80000
  9572. 8003ca0: 2b00 cmp r3, #0
  9573. 8003ca2: d004 beq.n 8003cae <HAL_CAN_IRQHandler+0x13a>
  9574. {
  9575. /* Update error code */
  9576. errorcode |= HAL_CAN_ERROR_TX_TERR2;
  9577. 8003ca4: 6a7b ldr r3, [r7, #36] @ 0x24
  9578. 8003ca6: f443 3380 orr.w r3, r3, #65536 @ 0x10000
  9579. 8003caa: 627b str r3, [r7, #36] @ 0x24
  9580. 8003cac: e002 b.n 8003cb4 <HAL_CAN_IRQHandler+0x140>
  9581. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9582. /* Call registered callback*/
  9583. hcan->TxMailbox2AbortCallback(hcan);
  9584. #else
  9585. /* Call weak (surcharged) callback */
  9586. HAL_CAN_TxMailbox2AbortCallback(hcan);
  9587. 8003cae: 6878 ldr r0, [r7, #4]
  9588. 8003cb0: f000 f949 bl 8003f46 <HAL_CAN_TxMailbox2AbortCallback>
  9589. }
  9590. }
  9591. }
  9592. /* Receive FIFO 0 overrun interrupt management *****************************/
  9593. if ((interrupts & CAN_IT_RX_FIFO0_OVERRUN) != 0U)
  9594. 8003cb4: 6a3b ldr r3, [r7, #32]
  9595. 8003cb6: f003 0308 and.w r3, r3, #8
  9596. 8003cba: 2b00 cmp r3, #0
  9597. 8003cbc: d00c beq.n 8003cd8 <HAL_CAN_IRQHandler+0x164>
  9598. {
  9599. if ((rf0rflags & CAN_RF0R_FOVR0) != 0U)
  9600. 8003cbe: 697b ldr r3, [r7, #20]
  9601. 8003cc0: f003 0310 and.w r3, r3, #16
  9602. 8003cc4: 2b00 cmp r3, #0
  9603. 8003cc6: d007 beq.n 8003cd8 <HAL_CAN_IRQHandler+0x164>
  9604. {
  9605. /* Set CAN error code to Rx Fifo 0 overrun error */
  9606. errorcode |= HAL_CAN_ERROR_RX_FOV0;
  9607. 8003cc8: 6a7b ldr r3, [r7, #36] @ 0x24
  9608. 8003cca: f443 7300 orr.w r3, r3, #512 @ 0x200
  9609. 8003cce: 627b str r3, [r7, #36] @ 0x24
  9610. /* Clear FIFO0 Overrun Flag */
  9611. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_FOV0);
  9612. 8003cd0: 687b ldr r3, [r7, #4]
  9613. 8003cd2: 681b ldr r3, [r3, #0]
  9614. 8003cd4: 2210 movs r2, #16
  9615. 8003cd6: 60da str r2, [r3, #12]
  9616. }
  9617. }
  9618. /* Receive FIFO 0 full interrupt management ********************************/
  9619. if ((interrupts & CAN_IT_RX_FIFO0_FULL) != 0U)
  9620. 8003cd8: 6a3b ldr r3, [r7, #32]
  9621. 8003cda: f003 0304 and.w r3, r3, #4
  9622. 8003cde: 2b00 cmp r3, #0
  9623. 8003ce0: d00b beq.n 8003cfa <HAL_CAN_IRQHandler+0x186>
  9624. {
  9625. if ((rf0rflags & CAN_RF0R_FULL0) != 0U)
  9626. 8003ce2: 697b ldr r3, [r7, #20]
  9627. 8003ce4: f003 0308 and.w r3, r3, #8
  9628. 8003ce8: 2b00 cmp r3, #0
  9629. 8003cea: d006 beq.n 8003cfa <HAL_CAN_IRQHandler+0x186>
  9630. {
  9631. /* Clear FIFO 0 full Flag */
  9632. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_FF0);
  9633. 8003cec: 687b ldr r3, [r7, #4]
  9634. 8003cee: 681b ldr r3, [r3, #0]
  9635. 8003cf0: 2208 movs r2, #8
  9636. 8003cf2: 60da str r2, [r3, #12]
  9637. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9638. /* Call registered callback*/
  9639. hcan->RxFifo0FullCallback(hcan);
  9640. #else
  9641. /* Call weak (surcharged) callback */
  9642. HAL_CAN_RxFifo0FullCallback(hcan);
  9643. 8003cf4: 6878 ldr r0, [r7, #4]
  9644. 8003cf6: f000 f930 bl 8003f5a <HAL_CAN_RxFifo0FullCallback>
  9645. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9646. }
  9647. }
  9648. /* Receive FIFO 0 message pending interrupt management *********************/
  9649. if ((interrupts & CAN_IT_RX_FIFO0_MSG_PENDING) != 0U)
  9650. 8003cfa: 6a3b ldr r3, [r7, #32]
  9651. 8003cfc: f003 0302 and.w r3, r3, #2
  9652. 8003d00: 2b00 cmp r3, #0
  9653. 8003d02: d009 beq.n 8003d18 <HAL_CAN_IRQHandler+0x1a4>
  9654. {
  9655. /* Check if message is still pending */
  9656. if ((hcan->Instance->RF0R & CAN_RF0R_FMP0) != 0U)
  9657. 8003d04: 687b ldr r3, [r7, #4]
  9658. 8003d06: 681b ldr r3, [r3, #0]
  9659. 8003d08: 68db ldr r3, [r3, #12]
  9660. 8003d0a: f003 0303 and.w r3, r3, #3
  9661. 8003d0e: 2b00 cmp r3, #0
  9662. 8003d10: d002 beq.n 8003d18 <HAL_CAN_IRQHandler+0x1a4>
  9663. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9664. /* Call registered callback*/
  9665. hcan->RxFifo0MsgPendingCallback(hcan);
  9666. #else
  9667. /* Call weak (surcharged) callback */
  9668. HAL_CAN_RxFifo0MsgPendingCallback(hcan);
  9669. 8003d12: 6878 ldr r0, [r7, #4]
  9670. 8003d14: f7fc fd2e bl 8000774 <HAL_CAN_RxFifo0MsgPendingCallback>
  9671. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9672. }
  9673. }
  9674. /* Receive FIFO 1 overrun interrupt management *****************************/
  9675. if ((interrupts & CAN_IT_RX_FIFO1_OVERRUN) != 0U)
  9676. 8003d18: 6a3b ldr r3, [r7, #32]
  9677. 8003d1a: f003 0340 and.w r3, r3, #64 @ 0x40
  9678. 8003d1e: 2b00 cmp r3, #0
  9679. 8003d20: d00c beq.n 8003d3c <HAL_CAN_IRQHandler+0x1c8>
  9680. {
  9681. if ((rf1rflags & CAN_RF1R_FOVR1) != 0U)
  9682. 8003d22: 693b ldr r3, [r7, #16]
  9683. 8003d24: f003 0310 and.w r3, r3, #16
  9684. 8003d28: 2b00 cmp r3, #0
  9685. 8003d2a: d007 beq.n 8003d3c <HAL_CAN_IRQHandler+0x1c8>
  9686. {
  9687. /* Set CAN error code to Rx Fifo 1 overrun error */
  9688. errorcode |= HAL_CAN_ERROR_RX_FOV1;
  9689. 8003d2c: 6a7b ldr r3, [r7, #36] @ 0x24
  9690. 8003d2e: f443 6380 orr.w r3, r3, #1024 @ 0x400
  9691. 8003d32: 627b str r3, [r7, #36] @ 0x24
  9692. /* Clear FIFO1 Overrun Flag */
  9693. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_FOV1);
  9694. 8003d34: 687b ldr r3, [r7, #4]
  9695. 8003d36: 681b ldr r3, [r3, #0]
  9696. 8003d38: 2210 movs r2, #16
  9697. 8003d3a: 611a str r2, [r3, #16]
  9698. }
  9699. }
  9700. /* Receive FIFO 1 full interrupt management ********************************/
  9701. if ((interrupts & CAN_IT_RX_FIFO1_FULL) != 0U)
  9702. 8003d3c: 6a3b ldr r3, [r7, #32]
  9703. 8003d3e: f003 0320 and.w r3, r3, #32
  9704. 8003d42: 2b00 cmp r3, #0
  9705. 8003d44: d00b beq.n 8003d5e <HAL_CAN_IRQHandler+0x1ea>
  9706. {
  9707. if ((rf1rflags & CAN_RF1R_FULL1) != 0U)
  9708. 8003d46: 693b ldr r3, [r7, #16]
  9709. 8003d48: f003 0308 and.w r3, r3, #8
  9710. 8003d4c: 2b00 cmp r3, #0
  9711. 8003d4e: d006 beq.n 8003d5e <HAL_CAN_IRQHandler+0x1ea>
  9712. {
  9713. /* Clear FIFO 1 full Flag */
  9714. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_FF1);
  9715. 8003d50: 687b ldr r3, [r7, #4]
  9716. 8003d52: 681b ldr r3, [r3, #0]
  9717. 8003d54: 2208 movs r2, #8
  9718. 8003d56: 611a str r2, [r3, #16]
  9719. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9720. /* Call registered callback*/
  9721. hcan->RxFifo1FullCallback(hcan);
  9722. #else
  9723. /* Call weak (surcharged) callback */
  9724. HAL_CAN_RxFifo1FullCallback(hcan);
  9725. 8003d58: 6878 ldr r0, [r7, #4]
  9726. 8003d5a: f000 f912 bl 8003f82 <HAL_CAN_RxFifo1FullCallback>
  9727. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9728. }
  9729. }
  9730. /* Receive FIFO 1 message pending interrupt management *********************/
  9731. if ((interrupts & CAN_IT_RX_FIFO1_MSG_PENDING) != 0U)
  9732. 8003d5e: 6a3b ldr r3, [r7, #32]
  9733. 8003d60: f003 0310 and.w r3, r3, #16
  9734. 8003d64: 2b00 cmp r3, #0
  9735. 8003d66: d009 beq.n 8003d7c <HAL_CAN_IRQHandler+0x208>
  9736. {
  9737. /* Check if message is still pending */
  9738. if ((hcan->Instance->RF1R & CAN_RF1R_FMP1) != 0U)
  9739. 8003d68: 687b ldr r3, [r7, #4]
  9740. 8003d6a: 681b ldr r3, [r3, #0]
  9741. 8003d6c: 691b ldr r3, [r3, #16]
  9742. 8003d6e: f003 0303 and.w r3, r3, #3
  9743. 8003d72: 2b00 cmp r3, #0
  9744. 8003d74: d002 beq.n 8003d7c <HAL_CAN_IRQHandler+0x208>
  9745. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9746. /* Call registered callback*/
  9747. hcan->RxFifo1MsgPendingCallback(hcan);
  9748. #else
  9749. /* Call weak (surcharged) callback */
  9750. HAL_CAN_RxFifo1MsgPendingCallback(hcan);
  9751. 8003d76: 6878 ldr r0, [r7, #4]
  9752. 8003d78: f000 f8f9 bl 8003f6e <HAL_CAN_RxFifo1MsgPendingCallback>
  9753. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9754. }
  9755. }
  9756. /* Sleep interrupt management *********************************************/
  9757. if ((interrupts & CAN_IT_SLEEP_ACK) != 0U)
  9758. 8003d7c: 6a3b ldr r3, [r7, #32]
  9759. 8003d7e: f403 3300 and.w r3, r3, #131072 @ 0x20000
  9760. 8003d82: 2b00 cmp r3, #0
  9761. 8003d84: d00b beq.n 8003d9e <HAL_CAN_IRQHandler+0x22a>
  9762. {
  9763. if ((msrflags & CAN_MSR_SLAKI) != 0U)
  9764. 8003d86: 69fb ldr r3, [r7, #28]
  9765. 8003d88: f003 0310 and.w r3, r3, #16
  9766. 8003d8c: 2b00 cmp r3, #0
  9767. 8003d8e: d006 beq.n 8003d9e <HAL_CAN_IRQHandler+0x22a>
  9768. {
  9769. /* Clear Sleep interrupt Flag */
  9770. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_SLAKI);
  9771. 8003d90: 687b ldr r3, [r7, #4]
  9772. 8003d92: 681b ldr r3, [r3, #0]
  9773. 8003d94: 2210 movs r2, #16
  9774. 8003d96: 605a str r2, [r3, #4]
  9775. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9776. /* Call registered callback*/
  9777. hcan->SleepCallback(hcan);
  9778. #else
  9779. /* Call weak (surcharged) callback */
  9780. HAL_CAN_SleepCallback(hcan);
  9781. 8003d98: 6878 ldr r0, [r7, #4]
  9782. 8003d9a: f000 f8fc bl 8003f96 <HAL_CAN_SleepCallback>
  9783. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9784. }
  9785. }
  9786. /* WakeUp interrupt management *********************************************/
  9787. if ((interrupts & CAN_IT_WAKEUP) != 0U)
  9788. 8003d9e: 6a3b ldr r3, [r7, #32]
  9789. 8003da0: f403 3380 and.w r3, r3, #65536 @ 0x10000
  9790. 8003da4: 2b00 cmp r3, #0
  9791. 8003da6: d00b beq.n 8003dc0 <HAL_CAN_IRQHandler+0x24c>
  9792. {
  9793. if ((msrflags & CAN_MSR_WKUI) != 0U)
  9794. 8003da8: 69fb ldr r3, [r7, #28]
  9795. 8003daa: f003 0308 and.w r3, r3, #8
  9796. 8003dae: 2b00 cmp r3, #0
  9797. 8003db0: d006 beq.n 8003dc0 <HAL_CAN_IRQHandler+0x24c>
  9798. {
  9799. /* Clear WakeUp Flag */
  9800. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_WKU);
  9801. 8003db2: 687b ldr r3, [r7, #4]
  9802. 8003db4: 681b ldr r3, [r3, #0]
  9803. 8003db6: 2208 movs r2, #8
  9804. 8003db8: 605a str r2, [r3, #4]
  9805. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  9806. /* Call registered callback*/
  9807. hcan->WakeUpFromRxMsgCallback(hcan);
  9808. #else
  9809. /* Call weak (surcharged) callback */
  9810. HAL_CAN_WakeUpFromRxMsgCallback(hcan);
  9811. 8003dba: 6878 ldr r0, [r7, #4]
  9812. 8003dbc: f000 f8f5 bl 8003faa <HAL_CAN_WakeUpFromRxMsgCallback>
  9813. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  9814. }
  9815. }
  9816. /* Error interrupts management *********************************************/
  9817. if ((interrupts & CAN_IT_ERROR) != 0U)
  9818. 8003dc0: 6a3b ldr r3, [r7, #32]
  9819. 8003dc2: f403 4300 and.w r3, r3, #32768 @ 0x8000
  9820. 8003dc6: 2b00 cmp r3, #0
  9821. 8003dc8: d07b beq.n 8003ec2 <HAL_CAN_IRQHandler+0x34e>
  9822. {
  9823. if ((msrflags & CAN_MSR_ERRI) != 0U)
  9824. 8003dca: 69fb ldr r3, [r7, #28]
  9825. 8003dcc: f003 0304 and.w r3, r3, #4
  9826. 8003dd0: 2b00 cmp r3, #0
  9827. 8003dd2: d072 beq.n 8003eba <HAL_CAN_IRQHandler+0x346>
  9828. {
  9829. /* Check Error Warning Flag */
  9830. if (((interrupts & CAN_IT_ERROR_WARNING) != 0U) &&
  9831. 8003dd4: 6a3b ldr r3, [r7, #32]
  9832. 8003dd6: f403 7380 and.w r3, r3, #256 @ 0x100
  9833. 8003dda: 2b00 cmp r3, #0
  9834. 8003ddc: d008 beq.n 8003df0 <HAL_CAN_IRQHandler+0x27c>
  9835. ((esrflags & CAN_ESR_EWGF) != 0U))
  9836. 8003dde: 68fb ldr r3, [r7, #12]
  9837. 8003de0: f003 0301 and.w r3, r3, #1
  9838. if (((interrupts & CAN_IT_ERROR_WARNING) != 0U) &&
  9839. 8003de4: 2b00 cmp r3, #0
  9840. 8003de6: d003 beq.n 8003df0 <HAL_CAN_IRQHandler+0x27c>
  9841. {
  9842. /* Set CAN error code to Error Warning */
  9843. errorcode |= HAL_CAN_ERROR_EWG;
  9844. 8003de8: 6a7b ldr r3, [r7, #36] @ 0x24
  9845. 8003dea: f043 0301 orr.w r3, r3, #1
  9846. 8003dee: 627b str r3, [r7, #36] @ 0x24
  9847. /* No need for clear of Error Warning Flag as read-only */
  9848. }
  9849. /* Check Error Passive Flag */
  9850. if (((interrupts & CAN_IT_ERROR_PASSIVE) != 0U) &&
  9851. 8003df0: 6a3b ldr r3, [r7, #32]
  9852. 8003df2: f403 7300 and.w r3, r3, #512 @ 0x200
  9853. 8003df6: 2b00 cmp r3, #0
  9854. 8003df8: d008 beq.n 8003e0c <HAL_CAN_IRQHandler+0x298>
  9855. ((esrflags & CAN_ESR_EPVF) != 0U))
  9856. 8003dfa: 68fb ldr r3, [r7, #12]
  9857. 8003dfc: f003 0302 and.w r3, r3, #2
  9858. if (((interrupts & CAN_IT_ERROR_PASSIVE) != 0U) &&
  9859. 8003e00: 2b00 cmp r3, #0
  9860. 8003e02: d003 beq.n 8003e0c <HAL_CAN_IRQHandler+0x298>
  9861. {
  9862. /* Set CAN error code to Error Passive */
  9863. errorcode |= HAL_CAN_ERROR_EPV;
  9864. 8003e04: 6a7b ldr r3, [r7, #36] @ 0x24
  9865. 8003e06: f043 0302 orr.w r3, r3, #2
  9866. 8003e0a: 627b str r3, [r7, #36] @ 0x24
  9867. /* No need for clear of Error Passive Flag as read-only */
  9868. }
  9869. /* Check Bus-off Flag */
  9870. if (((interrupts & CAN_IT_BUSOFF) != 0U) &&
  9871. 8003e0c: 6a3b ldr r3, [r7, #32]
  9872. 8003e0e: f403 6380 and.w r3, r3, #1024 @ 0x400
  9873. 8003e12: 2b00 cmp r3, #0
  9874. 8003e14: d008 beq.n 8003e28 <HAL_CAN_IRQHandler+0x2b4>
  9875. ((esrflags & CAN_ESR_BOFF) != 0U))
  9876. 8003e16: 68fb ldr r3, [r7, #12]
  9877. 8003e18: f003 0304 and.w r3, r3, #4
  9878. if (((interrupts & CAN_IT_BUSOFF) != 0U) &&
  9879. 8003e1c: 2b00 cmp r3, #0
  9880. 8003e1e: d003 beq.n 8003e28 <HAL_CAN_IRQHandler+0x2b4>
  9881. {
  9882. /* Set CAN error code to Bus-Off */
  9883. errorcode |= HAL_CAN_ERROR_BOF;
  9884. 8003e20: 6a7b ldr r3, [r7, #36] @ 0x24
  9885. 8003e22: f043 0304 orr.w r3, r3, #4
  9886. 8003e26: 627b str r3, [r7, #36] @ 0x24
  9887. /* No need for clear of Error Bus-Off as read-only */
  9888. }
  9889. /* Check Last Error Code Flag */
  9890. if (((interrupts & CAN_IT_LAST_ERROR_CODE) != 0U) &&
  9891. 8003e28: 6a3b ldr r3, [r7, #32]
  9892. 8003e2a: f403 6300 and.w r3, r3, #2048 @ 0x800
  9893. 8003e2e: 2b00 cmp r3, #0
  9894. 8003e30: d043 beq.n 8003eba <HAL_CAN_IRQHandler+0x346>
  9895. ((esrflags & CAN_ESR_LEC) != 0U))
  9896. 8003e32: 68fb ldr r3, [r7, #12]
  9897. 8003e34: f003 0370 and.w r3, r3, #112 @ 0x70
  9898. if (((interrupts & CAN_IT_LAST_ERROR_CODE) != 0U) &&
  9899. 8003e38: 2b00 cmp r3, #0
  9900. 8003e3a: d03e beq.n 8003eba <HAL_CAN_IRQHandler+0x346>
  9901. {
  9902. switch (esrflags & CAN_ESR_LEC)
  9903. 8003e3c: 68fb ldr r3, [r7, #12]
  9904. 8003e3e: f003 0370 and.w r3, r3, #112 @ 0x70
  9905. 8003e42: 2b60 cmp r3, #96 @ 0x60
  9906. 8003e44: d02b beq.n 8003e9e <HAL_CAN_IRQHandler+0x32a>
  9907. 8003e46: 2b60 cmp r3, #96 @ 0x60
  9908. 8003e48: d82e bhi.n 8003ea8 <HAL_CAN_IRQHandler+0x334>
  9909. 8003e4a: 2b50 cmp r3, #80 @ 0x50
  9910. 8003e4c: d022 beq.n 8003e94 <HAL_CAN_IRQHandler+0x320>
  9911. 8003e4e: 2b50 cmp r3, #80 @ 0x50
  9912. 8003e50: d82a bhi.n 8003ea8 <HAL_CAN_IRQHandler+0x334>
  9913. 8003e52: 2b40 cmp r3, #64 @ 0x40
  9914. 8003e54: d019 beq.n 8003e8a <HAL_CAN_IRQHandler+0x316>
  9915. 8003e56: 2b40 cmp r3, #64 @ 0x40
  9916. 8003e58: d826 bhi.n 8003ea8 <HAL_CAN_IRQHandler+0x334>
  9917. 8003e5a: 2b30 cmp r3, #48 @ 0x30
  9918. 8003e5c: d010 beq.n 8003e80 <HAL_CAN_IRQHandler+0x30c>
  9919. 8003e5e: 2b30 cmp r3, #48 @ 0x30
  9920. 8003e60: d822 bhi.n 8003ea8 <HAL_CAN_IRQHandler+0x334>
  9921. 8003e62: 2b10 cmp r3, #16
  9922. 8003e64: d002 beq.n 8003e6c <HAL_CAN_IRQHandler+0x2f8>
  9923. 8003e66: 2b20 cmp r3, #32
  9924. 8003e68: d005 beq.n 8003e76 <HAL_CAN_IRQHandler+0x302>
  9925. case (CAN_ESR_LEC_2 | CAN_ESR_LEC_1):
  9926. /* Set CAN error code to CRC error */
  9927. errorcode |= HAL_CAN_ERROR_CRC;
  9928. break;
  9929. default:
  9930. break;
  9931. 8003e6a: e01d b.n 8003ea8 <HAL_CAN_IRQHandler+0x334>
  9932. errorcode |= HAL_CAN_ERROR_STF;
  9933. 8003e6c: 6a7b ldr r3, [r7, #36] @ 0x24
  9934. 8003e6e: f043 0308 orr.w r3, r3, #8
  9935. 8003e72: 627b str r3, [r7, #36] @ 0x24
  9936. break;
  9937. 8003e74: e019 b.n 8003eaa <HAL_CAN_IRQHandler+0x336>
  9938. errorcode |= HAL_CAN_ERROR_FOR;
  9939. 8003e76: 6a7b ldr r3, [r7, #36] @ 0x24
  9940. 8003e78: f043 0310 orr.w r3, r3, #16
  9941. 8003e7c: 627b str r3, [r7, #36] @ 0x24
  9942. break;
  9943. 8003e7e: e014 b.n 8003eaa <HAL_CAN_IRQHandler+0x336>
  9944. errorcode |= HAL_CAN_ERROR_ACK;
  9945. 8003e80: 6a7b ldr r3, [r7, #36] @ 0x24
  9946. 8003e82: f043 0320 orr.w r3, r3, #32
  9947. 8003e86: 627b str r3, [r7, #36] @ 0x24
  9948. break;
  9949. 8003e88: e00f b.n 8003eaa <HAL_CAN_IRQHandler+0x336>
  9950. errorcode |= HAL_CAN_ERROR_BR;
  9951. 8003e8a: 6a7b ldr r3, [r7, #36] @ 0x24
  9952. 8003e8c: f043 0340 orr.w r3, r3, #64 @ 0x40
  9953. 8003e90: 627b str r3, [r7, #36] @ 0x24
  9954. break;
  9955. 8003e92: e00a b.n 8003eaa <HAL_CAN_IRQHandler+0x336>
  9956. errorcode |= HAL_CAN_ERROR_BD;
  9957. 8003e94: 6a7b ldr r3, [r7, #36] @ 0x24
  9958. 8003e96: f043 0380 orr.w r3, r3, #128 @ 0x80
  9959. 8003e9a: 627b str r3, [r7, #36] @ 0x24
  9960. break;
  9961. 8003e9c: e005 b.n 8003eaa <HAL_CAN_IRQHandler+0x336>
  9962. errorcode |= HAL_CAN_ERROR_CRC;
  9963. 8003e9e: 6a7b ldr r3, [r7, #36] @ 0x24
  9964. 8003ea0: f443 7380 orr.w r3, r3, #256 @ 0x100
  9965. 8003ea4: 627b str r3, [r7, #36] @ 0x24
  9966. break;
  9967. 8003ea6: e000 b.n 8003eaa <HAL_CAN_IRQHandler+0x336>
  9968. break;
  9969. 8003ea8: bf00 nop
  9970. }
  9971. /* Clear Last error code Flag */
  9972. CLEAR_BIT(hcan->Instance->ESR, CAN_ESR_LEC);
  9973. 8003eaa: 687b ldr r3, [r7, #4]
  9974. 8003eac: 681b ldr r3, [r3, #0]
  9975. 8003eae: 699a ldr r2, [r3, #24]
  9976. 8003eb0: 687b ldr r3, [r7, #4]
  9977. 8003eb2: 681b ldr r3, [r3, #0]
  9978. 8003eb4: f022 0270 bic.w r2, r2, #112 @ 0x70
  9979. 8003eb8: 619a str r2, [r3, #24]
  9980. }
  9981. }
  9982. /* Clear ERRI Flag */
  9983. __HAL_CAN_CLEAR_FLAG(hcan, CAN_FLAG_ERRI);
  9984. 8003eba: 687b ldr r3, [r7, #4]
  9985. 8003ebc: 681b ldr r3, [r3, #0]
  9986. 8003ebe: 2204 movs r2, #4
  9987. 8003ec0: 605a str r2, [r3, #4]
  9988. }
  9989. /* Call the Error call Back in case of Errors */
  9990. if (errorcode != HAL_CAN_ERROR_NONE)
  9991. 8003ec2: 6a7b ldr r3, [r7, #36] @ 0x24
  9992. 8003ec4: 2b00 cmp r3, #0
  9993. 8003ec6: d008 beq.n 8003eda <HAL_CAN_IRQHandler+0x366>
  9994. {
  9995. /* Update error code in handle */
  9996. hcan->ErrorCode |= errorcode;
  9997. 8003ec8: 687b ldr r3, [r7, #4]
  9998. 8003eca: 6a5a ldr r2, [r3, #36] @ 0x24
  9999. 8003ecc: 6a7b ldr r3, [r7, #36] @ 0x24
  10000. 8003ece: 431a orrs r2, r3
  10001. 8003ed0: 687b ldr r3, [r7, #4]
  10002. 8003ed2: 625a str r2, [r3, #36] @ 0x24
  10003. #if USE_HAL_CAN_REGISTER_CALLBACKS == 1
  10004. /* Call registered callback*/
  10005. hcan->ErrorCallback(hcan);
  10006. #else
  10007. /* Call weak (surcharged) callback */
  10008. HAL_CAN_ErrorCallback(hcan);
  10009. 8003ed4: 6878 ldr r0, [r7, #4]
  10010. 8003ed6: f000 f872 bl 8003fbe <HAL_CAN_ErrorCallback>
  10011. #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */
  10012. }
  10013. }
  10014. 8003eda: bf00 nop
  10015. 8003edc: 3728 adds r7, #40 @ 0x28
  10016. 8003ede: 46bd mov sp, r7
  10017. 8003ee0: bd80 pop {r7, pc}
  10018. 08003ee2 <HAL_CAN_TxMailbox0CompleteCallback>:
  10019. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10020. * the configuration information for the specified CAN.
  10021. * @retval None
  10022. */
  10023. __weak void HAL_CAN_TxMailbox0CompleteCallback(CAN_HandleTypeDef *hcan)
  10024. {
  10025. 8003ee2: b480 push {r7}
  10026. 8003ee4: b083 sub sp, #12
  10027. 8003ee6: af00 add r7, sp, #0
  10028. 8003ee8: 6078 str r0, [r7, #4]
  10029. /* NOTE : This function Should not be modified, when the callback is needed,
  10030. the HAL_CAN_TxMailbox0CompleteCallback could be implemented in the
  10031. user file
  10032. */
  10033. }
  10034. 8003eea: bf00 nop
  10035. 8003eec: 370c adds r7, #12
  10036. 8003eee: 46bd mov sp, r7
  10037. 8003ef0: f85d 7b04 ldr.w r7, [sp], #4
  10038. 8003ef4: 4770 bx lr
  10039. 08003ef6 <HAL_CAN_TxMailbox1CompleteCallback>:
  10040. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10041. * the configuration information for the specified CAN.
  10042. * @retval None
  10043. */
  10044. __weak void HAL_CAN_TxMailbox1CompleteCallback(CAN_HandleTypeDef *hcan)
  10045. {
  10046. 8003ef6: b480 push {r7}
  10047. 8003ef8: b083 sub sp, #12
  10048. 8003efa: af00 add r7, sp, #0
  10049. 8003efc: 6078 str r0, [r7, #4]
  10050. /* NOTE : This function Should not be modified, when the callback is needed,
  10051. the HAL_CAN_TxMailbox1CompleteCallback could be implemented in the
  10052. user file
  10053. */
  10054. }
  10055. 8003efe: bf00 nop
  10056. 8003f00: 370c adds r7, #12
  10057. 8003f02: 46bd mov sp, r7
  10058. 8003f04: f85d 7b04 ldr.w r7, [sp], #4
  10059. 8003f08: 4770 bx lr
  10060. 08003f0a <HAL_CAN_TxMailbox2CompleteCallback>:
  10061. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10062. * the configuration information for the specified CAN.
  10063. * @retval None
  10064. */
  10065. __weak void HAL_CAN_TxMailbox2CompleteCallback(CAN_HandleTypeDef *hcan)
  10066. {
  10067. 8003f0a: b480 push {r7}
  10068. 8003f0c: b083 sub sp, #12
  10069. 8003f0e: af00 add r7, sp, #0
  10070. 8003f10: 6078 str r0, [r7, #4]
  10071. /* NOTE : This function Should not be modified, when the callback is needed,
  10072. the HAL_CAN_TxMailbox2CompleteCallback could be implemented in the
  10073. user file
  10074. */
  10075. }
  10076. 8003f12: bf00 nop
  10077. 8003f14: 370c adds r7, #12
  10078. 8003f16: 46bd mov sp, r7
  10079. 8003f18: f85d 7b04 ldr.w r7, [sp], #4
  10080. 8003f1c: 4770 bx lr
  10081. 08003f1e <HAL_CAN_TxMailbox0AbortCallback>:
  10082. * @param hcan pointer to an CAN_HandleTypeDef structure that contains
  10083. * the configuration information for the specified CAN.
  10084. * @retval None
  10085. */
  10086. __weak void HAL_CAN_TxMailbox0AbortCallback(CAN_HandleTypeDef *hcan)
  10087. {
  10088. 8003f1e: b480 push {r7}
  10089. 8003f20: b083 sub sp, #12
  10090. 8003f22: af00 add r7, sp, #0
  10091. 8003f24: 6078 str r0, [r7, #4]
  10092. /* NOTE : This function Should not be modified, when the callback is needed,
  10093. the HAL_CAN_TxMailbox0AbortCallback could be implemented in the
  10094. user file
  10095. */
  10096. }
  10097. 8003f26: bf00 nop
  10098. 8003f28: 370c adds r7, #12
  10099. 8003f2a: 46bd mov sp, r7
  10100. 8003f2c: f85d 7b04 ldr.w r7, [sp], #4
  10101. 8003f30: 4770 bx lr
  10102. 08003f32 <HAL_CAN_TxMailbox1AbortCallback>:
  10103. * @param hcan pointer to an CAN_HandleTypeDef structure that contains
  10104. * the configuration information for the specified CAN.
  10105. * @retval None
  10106. */
  10107. __weak void HAL_CAN_TxMailbox1AbortCallback(CAN_HandleTypeDef *hcan)
  10108. {
  10109. 8003f32: b480 push {r7}
  10110. 8003f34: b083 sub sp, #12
  10111. 8003f36: af00 add r7, sp, #0
  10112. 8003f38: 6078 str r0, [r7, #4]
  10113. /* NOTE : This function Should not be modified, when the callback is needed,
  10114. the HAL_CAN_TxMailbox1AbortCallback could be implemented in the
  10115. user file
  10116. */
  10117. }
  10118. 8003f3a: bf00 nop
  10119. 8003f3c: 370c adds r7, #12
  10120. 8003f3e: 46bd mov sp, r7
  10121. 8003f40: f85d 7b04 ldr.w r7, [sp], #4
  10122. 8003f44: 4770 bx lr
  10123. 08003f46 <HAL_CAN_TxMailbox2AbortCallback>:
  10124. * @param hcan pointer to an CAN_HandleTypeDef structure that contains
  10125. * the configuration information for the specified CAN.
  10126. * @retval None
  10127. */
  10128. __weak void HAL_CAN_TxMailbox2AbortCallback(CAN_HandleTypeDef *hcan)
  10129. {
  10130. 8003f46: b480 push {r7}
  10131. 8003f48: b083 sub sp, #12
  10132. 8003f4a: af00 add r7, sp, #0
  10133. 8003f4c: 6078 str r0, [r7, #4]
  10134. /* NOTE : This function Should not be modified, when the callback is needed,
  10135. the HAL_CAN_TxMailbox2AbortCallback could be implemented in the
  10136. user file
  10137. */
  10138. }
  10139. 8003f4e: bf00 nop
  10140. 8003f50: 370c adds r7, #12
  10141. 8003f52: 46bd mov sp, r7
  10142. 8003f54: f85d 7b04 ldr.w r7, [sp], #4
  10143. 8003f58: 4770 bx lr
  10144. 08003f5a <HAL_CAN_RxFifo0FullCallback>:
  10145. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10146. * the configuration information for the specified CAN.
  10147. * @retval None
  10148. */
  10149. __weak void HAL_CAN_RxFifo0FullCallback(CAN_HandleTypeDef *hcan)
  10150. {
  10151. 8003f5a: b480 push {r7}
  10152. 8003f5c: b083 sub sp, #12
  10153. 8003f5e: af00 add r7, sp, #0
  10154. 8003f60: 6078 str r0, [r7, #4]
  10155. /* NOTE : This function Should not be modified, when the callback is needed,
  10156. the HAL_CAN_RxFifo0FullCallback could be implemented in the user
  10157. file
  10158. */
  10159. }
  10160. 8003f62: bf00 nop
  10161. 8003f64: 370c adds r7, #12
  10162. 8003f66: 46bd mov sp, r7
  10163. 8003f68: f85d 7b04 ldr.w r7, [sp], #4
  10164. 8003f6c: 4770 bx lr
  10165. 08003f6e <HAL_CAN_RxFifo1MsgPendingCallback>:
  10166. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10167. * the configuration information for the specified CAN.
  10168. * @retval None
  10169. */
  10170. __weak void HAL_CAN_RxFifo1MsgPendingCallback(CAN_HandleTypeDef *hcan)
  10171. {
  10172. 8003f6e: b480 push {r7}
  10173. 8003f70: b083 sub sp, #12
  10174. 8003f72: af00 add r7, sp, #0
  10175. 8003f74: 6078 str r0, [r7, #4]
  10176. /* NOTE : This function Should not be modified, when the callback is needed,
  10177. the HAL_CAN_RxFifo1MsgPendingCallback could be implemented in the
  10178. user file
  10179. */
  10180. }
  10181. 8003f76: bf00 nop
  10182. 8003f78: 370c adds r7, #12
  10183. 8003f7a: 46bd mov sp, r7
  10184. 8003f7c: f85d 7b04 ldr.w r7, [sp], #4
  10185. 8003f80: 4770 bx lr
  10186. 08003f82 <HAL_CAN_RxFifo1FullCallback>:
  10187. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10188. * the configuration information for the specified CAN.
  10189. * @retval None
  10190. */
  10191. __weak void HAL_CAN_RxFifo1FullCallback(CAN_HandleTypeDef *hcan)
  10192. {
  10193. 8003f82: b480 push {r7}
  10194. 8003f84: b083 sub sp, #12
  10195. 8003f86: af00 add r7, sp, #0
  10196. 8003f88: 6078 str r0, [r7, #4]
  10197. /* NOTE : This function Should not be modified, when the callback is needed,
  10198. the HAL_CAN_RxFifo1FullCallback could be implemented in the user
  10199. file
  10200. */
  10201. }
  10202. 8003f8a: bf00 nop
  10203. 8003f8c: 370c adds r7, #12
  10204. 8003f8e: 46bd mov sp, r7
  10205. 8003f90: f85d 7b04 ldr.w r7, [sp], #4
  10206. 8003f94: 4770 bx lr
  10207. 08003f96 <HAL_CAN_SleepCallback>:
  10208. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10209. * the configuration information for the specified CAN.
  10210. * @retval None
  10211. */
  10212. __weak void HAL_CAN_SleepCallback(CAN_HandleTypeDef *hcan)
  10213. {
  10214. 8003f96: b480 push {r7}
  10215. 8003f98: b083 sub sp, #12
  10216. 8003f9a: af00 add r7, sp, #0
  10217. 8003f9c: 6078 str r0, [r7, #4]
  10218. UNUSED(hcan);
  10219. /* NOTE : This function Should not be modified, when the callback is needed,
  10220. the HAL_CAN_SleepCallback could be implemented in the user file
  10221. */
  10222. }
  10223. 8003f9e: bf00 nop
  10224. 8003fa0: 370c adds r7, #12
  10225. 8003fa2: 46bd mov sp, r7
  10226. 8003fa4: f85d 7b04 ldr.w r7, [sp], #4
  10227. 8003fa8: 4770 bx lr
  10228. 08003faa <HAL_CAN_WakeUpFromRxMsgCallback>:
  10229. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10230. * the configuration information for the specified CAN.
  10231. * @retval None
  10232. */
  10233. __weak void HAL_CAN_WakeUpFromRxMsgCallback(CAN_HandleTypeDef *hcan)
  10234. {
  10235. 8003faa: b480 push {r7}
  10236. 8003fac: b083 sub sp, #12
  10237. 8003fae: af00 add r7, sp, #0
  10238. 8003fb0: 6078 str r0, [r7, #4]
  10239. /* NOTE : This function Should not be modified, when the callback is needed,
  10240. the HAL_CAN_WakeUpFromRxMsgCallback could be implemented in the
  10241. user file
  10242. */
  10243. }
  10244. 8003fb2: bf00 nop
  10245. 8003fb4: 370c adds r7, #12
  10246. 8003fb6: 46bd mov sp, r7
  10247. 8003fb8: f85d 7b04 ldr.w r7, [sp], #4
  10248. 8003fbc: 4770 bx lr
  10249. 08003fbe <HAL_CAN_ErrorCallback>:
  10250. * @param hcan pointer to a CAN_HandleTypeDef structure that contains
  10251. * the configuration information for the specified CAN.
  10252. * @retval None
  10253. */
  10254. __weak void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan)
  10255. {
  10256. 8003fbe: b480 push {r7}
  10257. 8003fc0: b083 sub sp, #12
  10258. 8003fc2: af00 add r7, sp, #0
  10259. 8003fc4: 6078 str r0, [r7, #4]
  10260. UNUSED(hcan);
  10261. /* NOTE : This function Should not be modified, when the callback is needed,
  10262. the HAL_CAN_ErrorCallback could be implemented in the user file
  10263. */
  10264. }
  10265. 8003fc6: bf00 nop
  10266. 8003fc8: 370c adds r7, #12
  10267. 8003fca: 46bd mov sp, r7
  10268. 8003fcc: f85d 7b04 ldr.w r7, [sp], #4
  10269. 8003fd0: 4770 bx lr
  10270. ...
  10271. 08003fd4 <__NVIC_SetPriorityGrouping>:
  10272. In case of a conflict between priority grouping and available
  10273. priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
  10274. \param [in] PriorityGroup Priority grouping field.
  10275. */
  10276. __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
  10277. {
  10278. 8003fd4: b480 push {r7}
  10279. 8003fd6: b085 sub sp, #20
  10280. 8003fd8: af00 add r7, sp, #0
  10281. 8003fda: 6078 str r0, [r7, #4]
  10282. uint32_t reg_value;
  10283. uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
  10284. 8003fdc: 687b ldr r3, [r7, #4]
  10285. 8003fde: f003 0307 and.w r3, r3, #7
  10286. 8003fe2: 60fb str r3, [r7, #12]
  10287. reg_value = SCB->AIRCR; /* read old register configuration */
  10288. 8003fe4: 4b0c ldr r3, [pc, #48] @ (8004018 <__NVIC_SetPriorityGrouping+0x44>)
  10289. 8003fe6: 68db ldr r3, [r3, #12]
  10290. 8003fe8: 60bb str r3, [r7, #8]
  10291. reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
  10292. 8003fea: 68ba ldr r2, [r7, #8]
  10293. 8003fec: f64f 03ff movw r3, #63743 @ 0xf8ff
  10294. 8003ff0: 4013 ands r3, r2
  10295. 8003ff2: 60bb str r3, [r7, #8]
  10296. reg_value = (reg_value |
  10297. ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
  10298. (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
  10299. 8003ff4: 68fb ldr r3, [r7, #12]
  10300. 8003ff6: 021a lsls r2, r3, #8
  10301. ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
  10302. 8003ff8: 68bb ldr r3, [r7, #8]
  10303. 8003ffa: 4313 orrs r3, r2
  10304. reg_value = (reg_value |
  10305. 8003ffc: f043 63bf orr.w r3, r3, #100139008 @ 0x5f80000
  10306. 8004000: f443 3300 orr.w r3, r3, #131072 @ 0x20000
  10307. 8004004: 60bb str r3, [r7, #8]
  10308. SCB->AIRCR = reg_value;
  10309. 8004006: 4a04 ldr r2, [pc, #16] @ (8004018 <__NVIC_SetPriorityGrouping+0x44>)
  10310. 8004008: 68bb ldr r3, [r7, #8]
  10311. 800400a: 60d3 str r3, [r2, #12]
  10312. }
  10313. 800400c: bf00 nop
  10314. 800400e: 3714 adds r7, #20
  10315. 8004010: 46bd mov sp, r7
  10316. 8004012: f85d 7b04 ldr.w r7, [sp], #4
  10317. 8004016: 4770 bx lr
  10318. 8004018: e000ed00 .word 0xe000ed00
  10319. 0800401c <__NVIC_GetPriorityGrouping>:
  10320. \brief Get Priority Grouping
  10321. \details Reads the priority grouping field from the NVIC Interrupt Controller.
  10322. \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
  10323. */
  10324. __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
  10325. {
  10326. 800401c: b480 push {r7}
  10327. 800401e: af00 add r7, sp, #0
  10328. return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
  10329. 8004020: 4b04 ldr r3, [pc, #16] @ (8004034 <__NVIC_GetPriorityGrouping+0x18>)
  10330. 8004022: 68db ldr r3, [r3, #12]
  10331. 8004024: 0a1b lsrs r3, r3, #8
  10332. 8004026: f003 0307 and.w r3, r3, #7
  10333. }
  10334. 800402a: 4618 mov r0, r3
  10335. 800402c: 46bd mov sp, r7
  10336. 800402e: f85d 7b04 ldr.w r7, [sp], #4
  10337. 8004032: 4770 bx lr
  10338. 8004034: e000ed00 .word 0xe000ed00
  10339. 08004038 <__NVIC_EnableIRQ>:
  10340. \details Enables a device specific interrupt in the NVIC interrupt controller.
  10341. \param [in] IRQn Device specific interrupt number.
  10342. \note IRQn must not be negative.
  10343. */
  10344. __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
  10345. {
  10346. 8004038: b480 push {r7}
  10347. 800403a: b083 sub sp, #12
  10348. 800403c: af00 add r7, sp, #0
  10349. 800403e: 4603 mov r3, r0
  10350. 8004040: 71fb strb r3, [r7, #7]
  10351. if ((int32_t)(IRQn) >= 0)
  10352. 8004042: f997 3007 ldrsb.w r3, [r7, #7]
  10353. 8004046: 2b00 cmp r3, #0
  10354. 8004048: db0b blt.n 8004062 <__NVIC_EnableIRQ+0x2a>
  10355. {
  10356. __COMPILER_BARRIER();
  10357. NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  10358. 800404a: 79fb ldrb r3, [r7, #7]
  10359. 800404c: f003 021f and.w r2, r3, #31
  10360. 8004050: 4907 ldr r1, [pc, #28] @ (8004070 <__NVIC_EnableIRQ+0x38>)
  10361. 8004052: f997 3007 ldrsb.w r3, [r7, #7]
  10362. 8004056: 095b lsrs r3, r3, #5
  10363. 8004058: 2001 movs r0, #1
  10364. 800405a: fa00 f202 lsl.w r2, r0, r2
  10365. 800405e: f841 2023 str.w r2, [r1, r3, lsl #2]
  10366. __COMPILER_BARRIER();
  10367. }
  10368. }
  10369. 8004062: bf00 nop
  10370. 8004064: 370c adds r7, #12
  10371. 8004066: 46bd mov sp, r7
  10372. 8004068: f85d 7b04 ldr.w r7, [sp], #4
  10373. 800406c: 4770 bx lr
  10374. 800406e: bf00 nop
  10375. 8004070: e000e100 .word 0xe000e100
  10376. 08004074 <__NVIC_DisableIRQ>:
  10377. \details Disables a device specific interrupt in the NVIC interrupt controller.
  10378. \param [in] IRQn Device specific interrupt number.
  10379. \note IRQn must not be negative.
  10380. */
  10381. __STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn)
  10382. {
  10383. 8004074: b480 push {r7}
  10384. 8004076: b083 sub sp, #12
  10385. 8004078: af00 add r7, sp, #0
  10386. 800407a: 4603 mov r3, r0
  10387. 800407c: 71fb strb r3, [r7, #7]
  10388. if ((int32_t)(IRQn) >= 0)
  10389. 800407e: f997 3007 ldrsb.w r3, [r7, #7]
  10390. 8004082: 2b00 cmp r3, #0
  10391. 8004084: db12 blt.n 80040ac <__NVIC_DisableIRQ+0x38>
  10392. {
  10393. NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  10394. 8004086: 79fb ldrb r3, [r7, #7]
  10395. 8004088: f003 021f and.w r2, r3, #31
  10396. 800408c: 490a ldr r1, [pc, #40] @ (80040b8 <__NVIC_DisableIRQ+0x44>)
  10397. 800408e: f997 3007 ldrsb.w r3, [r7, #7]
  10398. 8004092: 095b lsrs r3, r3, #5
  10399. 8004094: 2001 movs r0, #1
  10400. 8004096: fa00 f202 lsl.w r2, r0, r2
  10401. 800409a: 3320 adds r3, #32
  10402. 800409c: f841 2023 str.w r2, [r1, r3, lsl #2]
  10403. __ASM volatile ("dsb 0xF":::"memory");
  10404. 80040a0: f3bf 8f4f dsb sy
  10405. }
  10406. 80040a4: bf00 nop
  10407. __ASM volatile ("isb 0xF":::"memory");
  10408. 80040a6: f3bf 8f6f isb sy
  10409. }
  10410. 80040aa: bf00 nop
  10411. __DSB();
  10412. __ISB();
  10413. }
  10414. }
  10415. 80040ac: bf00 nop
  10416. 80040ae: 370c adds r7, #12
  10417. 80040b0: 46bd mov sp, r7
  10418. 80040b2: f85d 7b04 ldr.w r7, [sp], #4
  10419. 80040b6: 4770 bx lr
  10420. 80040b8: e000e100 .word 0xe000e100
  10421. 080040bc <__NVIC_SetPriority>:
  10422. \param [in] IRQn Interrupt number.
  10423. \param [in] priority Priority to set.
  10424. \note The priority cannot be set for every processor exception.
  10425. */
  10426. __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
  10427. {
  10428. 80040bc: b480 push {r7}
  10429. 80040be: b083 sub sp, #12
  10430. 80040c0: af00 add r7, sp, #0
  10431. 80040c2: 4603 mov r3, r0
  10432. 80040c4: 6039 str r1, [r7, #0]
  10433. 80040c6: 71fb strb r3, [r7, #7]
  10434. if ((int32_t)(IRQn) >= 0)
  10435. 80040c8: f997 3007 ldrsb.w r3, [r7, #7]
  10436. 80040cc: 2b00 cmp r3, #0
  10437. 80040ce: db0a blt.n 80040e6 <__NVIC_SetPriority+0x2a>
  10438. {
  10439. NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  10440. 80040d0: 683b ldr r3, [r7, #0]
  10441. 80040d2: b2da uxtb r2, r3
  10442. 80040d4: 490c ldr r1, [pc, #48] @ (8004108 <__NVIC_SetPriority+0x4c>)
  10443. 80040d6: f997 3007 ldrsb.w r3, [r7, #7]
  10444. 80040da: 0112 lsls r2, r2, #4
  10445. 80040dc: b2d2 uxtb r2, r2
  10446. 80040de: 440b add r3, r1
  10447. 80040e0: f883 2300 strb.w r2, [r3, #768] @ 0x300
  10448. }
  10449. else
  10450. {
  10451. SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  10452. }
  10453. }
  10454. 80040e4: e00a b.n 80040fc <__NVIC_SetPriority+0x40>
  10455. SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  10456. 80040e6: 683b ldr r3, [r7, #0]
  10457. 80040e8: b2da uxtb r2, r3
  10458. 80040ea: 4908 ldr r1, [pc, #32] @ (800410c <__NVIC_SetPriority+0x50>)
  10459. 80040ec: 79fb ldrb r3, [r7, #7]
  10460. 80040ee: f003 030f and.w r3, r3, #15
  10461. 80040f2: 3b04 subs r3, #4
  10462. 80040f4: 0112 lsls r2, r2, #4
  10463. 80040f6: b2d2 uxtb r2, r2
  10464. 80040f8: 440b add r3, r1
  10465. 80040fa: 761a strb r2, [r3, #24]
  10466. }
  10467. 80040fc: bf00 nop
  10468. 80040fe: 370c adds r7, #12
  10469. 8004100: 46bd mov sp, r7
  10470. 8004102: f85d 7b04 ldr.w r7, [sp], #4
  10471. 8004106: 4770 bx lr
  10472. 8004108: e000e100 .word 0xe000e100
  10473. 800410c: e000ed00 .word 0xe000ed00
  10474. 08004110 <NVIC_EncodePriority>:
  10475. \param [in] PreemptPriority Preemptive priority value (starting from 0).
  10476. \param [in] SubPriority Subpriority value (starting from 0).
  10477. \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
  10478. */
  10479. __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
  10480. {
  10481. 8004110: b480 push {r7}
  10482. 8004112: b089 sub sp, #36 @ 0x24
  10483. 8004114: af00 add r7, sp, #0
  10484. 8004116: 60f8 str r0, [r7, #12]
  10485. 8004118: 60b9 str r1, [r7, #8]
  10486. 800411a: 607a str r2, [r7, #4]
  10487. uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
  10488. 800411c: 68fb ldr r3, [r7, #12]
  10489. 800411e: f003 0307 and.w r3, r3, #7
  10490. 8004122: 61fb str r3, [r7, #28]
  10491. uint32_t PreemptPriorityBits;
  10492. uint32_t SubPriorityBits;
  10493. PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
  10494. 8004124: 69fb ldr r3, [r7, #28]
  10495. 8004126: f1c3 0307 rsb r3, r3, #7
  10496. 800412a: 2b04 cmp r3, #4
  10497. 800412c: bf28 it cs
  10498. 800412e: 2304 movcs r3, #4
  10499. 8004130: 61bb str r3, [r7, #24]
  10500. SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
  10501. 8004132: 69fb ldr r3, [r7, #28]
  10502. 8004134: 3304 adds r3, #4
  10503. 8004136: 2b06 cmp r3, #6
  10504. 8004138: d902 bls.n 8004140 <NVIC_EncodePriority+0x30>
  10505. 800413a: 69fb ldr r3, [r7, #28]
  10506. 800413c: 3b03 subs r3, #3
  10507. 800413e: e000 b.n 8004142 <NVIC_EncodePriority+0x32>
  10508. 8004140: 2300 movs r3, #0
  10509. 8004142: 617b str r3, [r7, #20]
  10510. return (
  10511. ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
  10512. 8004144: f04f 32ff mov.w r2, #4294967295
  10513. 8004148: 69bb ldr r3, [r7, #24]
  10514. 800414a: fa02 f303 lsl.w r3, r2, r3
  10515. 800414e: 43da mvns r2, r3
  10516. 8004150: 68bb ldr r3, [r7, #8]
  10517. 8004152: 401a ands r2, r3
  10518. 8004154: 697b ldr r3, [r7, #20]
  10519. 8004156: 409a lsls r2, r3
  10520. ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
  10521. 8004158: f04f 31ff mov.w r1, #4294967295
  10522. 800415c: 697b ldr r3, [r7, #20]
  10523. 800415e: fa01 f303 lsl.w r3, r1, r3
  10524. 8004162: 43d9 mvns r1, r3
  10525. 8004164: 687b ldr r3, [r7, #4]
  10526. 8004166: 400b ands r3, r1
  10527. ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
  10528. 8004168: 4313 orrs r3, r2
  10529. );
  10530. }
  10531. 800416a: 4618 mov r0, r3
  10532. 800416c: 3724 adds r7, #36 @ 0x24
  10533. 800416e: 46bd mov sp, r7
  10534. 8004170: f85d 7b04 ldr.w r7, [sp], #4
  10535. 8004174: 4770 bx lr
  10536. ...
  10537. 08004178 <SysTick_Config>:
  10538. \note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
  10539. function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
  10540. must contain a vendor-specific implementation of this function.
  10541. */
  10542. __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
  10543. {
  10544. 8004178: b580 push {r7, lr}
  10545. 800417a: b082 sub sp, #8
  10546. 800417c: af00 add r7, sp, #0
  10547. 800417e: 6078 str r0, [r7, #4]
  10548. if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
  10549. 8004180: 687b ldr r3, [r7, #4]
  10550. 8004182: 3b01 subs r3, #1
  10551. 8004184: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000
  10552. 8004188: d301 bcc.n 800418e <SysTick_Config+0x16>
  10553. {
  10554. return (1UL); /* Reload value impossible */
  10555. 800418a: 2301 movs r3, #1
  10556. 800418c: e00f b.n 80041ae <SysTick_Config+0x36>
  10557. }
  10558. SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
  10559. 800418e: 4a0a ldr r2, [pc, #40] @ (80041b8 <SysTick_Config+0x40>)
  10560. 8004190: 687b ldr r3, [r7, #4]
  10561. 8004192: 3b01 subs r3, #1
  10562. 8004194: 6053 str r3, [r2, #4]
  10563. NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
  10564. 8004196: 210f movs r1, #15
  10565. 8004198: f04f 30ff mov.w r0, #4294967295
  10566. 800419c: f7ff ff8e bl 80040bc <__NVIC_SetPriority>
  10567. SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
  10568. 80041a0: 4b05 ldr r3, [pc, #20] @ (80041b8 <SysTick_Config+0x40>)
  10569. 80041a2: 2200 movs r2, #0
  10570. 80041a4: 609a str r2, [r3, #8]
  10571. SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
  10572. 80041a6: 4b04 ldr r3, [pc, #16] @ (80041b8 <SysTick_Config+0x40>)
  10573. 80041a8: 2207 movs r2, #7
  10574. 80041aa: 601a str r2, [r3, #0]
  10575. SysTick_CTRL_TICKINT_Msk |
  10576. SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
  10577. return (0UL); /* Function successful */
  10578. 80041ac: 2300 movs r3, #0
  10579. }
  10580. 80041ae: 4618 mov r0, r3
  10581. 80041b0: 3708 adds r7, #8
  10582. 80041b2: 46bd mov sp, r7
  10583. 80041b4: bd80 pop {r7, pc}
  10584. 80041b6: bf00 nop
  10585. 80041b8: e000e010 .word 0xe000e010
  10586. 080041bc <HAL_NVIC_SetPriorityGrouping>:
  10587. * @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible.
  10588. * The pending IRQ priority will be managed only by the subpriority.
  10589. * @retval None
  10590. */
  10591. void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
  10592. {
  10593. 80041bc: b580 push {r7, lr}
  10594. 80041be: b082 sub sp, #8
  10595. 80041c0: af00 add r7, sp, #0
  10596. 80041c2: 6078 str r0, [r7, #4]
  10597. /* Check the parameters */
  10598. assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup));
  10599. /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
  10600. NVIC_SetPriorityGrouping(PriorityGroup);
  10601. 80041c4: 6878 ldr r0, [r7, #4]
  10602. 80041c6: f7ff ff05 bl 8003fd4 <__NVIC_SetPriorityGrouping>
  10603. }
  10604. 80041ca: bf00 nop
  10605. 80041cc: 3708 adds r7, #8
  10606. 80041ce: 46bd mov sp, r7
  10607. 80041d0: bd80 pop {r7, pc}
  10608. 080041d2 <HAL_NVIC_SetPriority>:
  10609. * This parameter can be a value between 0 and 15
  10610. * A lower priority value indicates a higher priority.
  10611. * @retval None
  10612. */
  10613. void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
  10614. {
  10615. 80041d2: b580 push {r7, lr}
  10616. 80041d4: b086 sub sp, #24
  10617. 80041d6: af00 add r7, sp, #0
  10618. 80041d8: 4603 mov r3, r0
  10619. 80041da: 60b9 str r1, [r7, #8]
  10620. 80041dc: 607a str r2, [r7, #4]
  10621. 80041de: 73fb strb r3, [r7, #15]
  10622. uint32_t prioritygroup = 0x00U;
  10623. 80041e0: 2300 movs r3, #0
  10624. 80041e2: 617b str r3, [r7, #20]
  10625. /* Check the parameters */
  10626. assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
  10627. assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
  10628. prioritygroup = NVIC_GetPriorityGrouping();
  10629. 80041e4: f7ff ff1a bl 800401c <__NVIC_GetPriorityGrouping>
  10630. 80041e8: 6178 str r0, [r7, #20]
  10631. NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
  10632. 80041ea: 687a ldr r2, [r7, #4]
  10633. 80041ec: 68b9 ldr r1, [r7, #8]
  10634. 80041ee: 6978 ldr r0, [r7, #20]
  10635. 80041f0: f7ff ff8e bl 8004110 <NVIC_EncodePriority>
  10636. 80041f4: 4602 mov r2, r0
  10637. 80041f6: f997 300f ldrsb.w r3, [r7, #15]
  10638. 80041fa: 4611 mov r1, r2
  10639. 80041fc: 4618 mov r0, r3
  10640. 80041fe: f7ff ff5d bl 80040bc <__NVIC_SetPriority>
  10641. }
  10642. 8004202: bf00 nop
  10643. 8004204: 3718 adds r7, #24
  10644. 8004206: 46bd mov sp, r7
  10645. 8004208: bd80 pop {r7, pc}
  10646. 0800420a <HAL_NVIC_EnableIRQ>:
  10647. * This parameter can be an enumerator of IRQn_Type enumeration
  10648. * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f4xxxx.h))
  10649. * @retval None
  10650. */
  10651. void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
  10652. {
  10653. 800420a: b580 push {r7, lr}
  10654. 800420c: b082 sub sp, #8
  10655. 800420e: af00 add r7, sp, #0
  10656. 8004210: 4603 mov r3, r0
  10657. 8004212: 71fb strb r3, [r7, #7]
  10658. /* Check the parameters */
  10659. assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
  10660. /* Enable interrupt */
  10661. NVIC_EnableIRQ(IRQn);
  10662. 8004214: f997 3007 ldrsb.w r3, [r7, #7]
  10663. 8004218: 4618 mov r0, r3
  10664. 800421a: f7ff ff0d bl 8004038 <__NVIC_EnableIRQ>
  10665. }
  10666. 800421e: bf00 nop
  10667. 8004220: 3708 adds r7, #8
  10668. 8004222: 46bd mov sp, r7
  10669. 8004224: bd80 pop {r7, pc}
  10670. 08004226 <HAL_NVIC_DisableIRQ>:
  10671. * This parameter can be an enumerator of IRQn_Type enumeration
  10672. * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f4xxxx.h))
  10673. * @retval None
  10674. */
  10675. void HAL_NVIC_DisableIRQ(IRQn_Type IRQn)
  10676. {
  10677. 8004226: b580 push {r7, lr}
  10678. 8004228: b082 sub sp, #8
  10679. 800422a: af00 add r7, sp, #0
  10680. 800422c: 4603 mov r3, r0
  10681. 800422e: 71fb strb r3, [r7, #7]
  10682. /* Check the parameters */
  10683. assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
  10684. /* Disable interrupt */
  10685. NVIC_DisableIRQ(IRQn);
  10686. 8004230: f997 3007 ldrsb.w r3, [r7, #7]
  10687. 8004234: 4618 mov r0, r3
  10688. 8004236: f7ff ff1d bl 8004074 <__NVIC_DisableIRQ>
  10689. }
  10690. 800423a: bf00 nop
  10691. 800423c: 3708 adds r7, #8
  10692. 800423e: 46bd mov sp, r7
  10693. 8004240: bd80 pop {r7, pc}
  10694. 08004242 <HAL_SYSTICK_Config>:
  10695. * @param TicksNumb Specifies the ticks Number of ticks between two interrupts.
  10696. * @retval status: - 0 Function succeeded.
  10697. * - 1 Function failed.
  10698. */
  10699. uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
  10700. {
  10701. 8004242: b580 push {r7, lr}
  10702. 8004244: b082 sub sp, #8
  10703. 8004246: af00 add r7, sp, #0
  10704. 8004248: 6078 str r0, [r7, #4]
  10705. return SysTick_Config(TicksNumb);
  10706. 800424a: 6878 ldr r0, [r7, #4]
  10707. 800424c: f7ff ff94 bl 8004178 <SysTick_Config>
  10708. 8004250: 4603 mov r3, r0
  10709. }
  10710. 8004252: 4618 mov r0, r3
  10711. 8004254: 3708 adds r7, #8
  10712. 8004256: 46bd mov sp, r7
  10713. 8004258: bd80 pop {r7, pc}
  10714. ...
  10715. 0800425c <HAL_GPIO_Init>:
  10716. * @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
  10717. * the configuration information for the specified GPIO peripheral.
  10718. * @retval None
  10719. */
  10720. void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
  10721. {
  10722. 800425c: b480 push {r7}
  10723. 800425e: b089 sub sp, #36 @ 0x24
  10724. 8004260: af00 add r7, sp, #0
  10725. 8004262: 6078 str r0, [r7, #4]
  10726. 8004264: 6039 str r1, [r7, #0]
  10727. uint32_t position;
  10728. uint32_t ioposition = 0x00U;
  10729. 8004266: 2300 movs r3, #0
  10730. 8004268: 617b str r3, [r7, #20]
  10731. uint32_t iocurrent = 0x00U;
  10732. 800426a: 2300 movs r3, #0
  10733. 800426c: 613b str r3, [r7, #16]
  10734. uint32_t temp = 0x00U;
  10735. 800426e: 2300 movs r3, #0
  10736. 8004270: 61bb str r3, [r7, #24]
  10737. assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
  10738. assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
  10739. assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
  10740. /* Configure the port pins */
  10741. for(position = 0U; position < GPIO_NUMBER; position++)
  10742. 8004272: 2300 movs r3, #0
  10743. 8004274: 61fb str r3, [r7, #28]
  10744. 8004276: e16b b.n 8004550 <HAL_GPIO_Init+0x2f4>
  10745. {
  10746. /* Get the IO position */
  10747. ioposition = 0x01U << position;
  10748. 8004278: 2201 movs r2, #1
  10749. 800427a: 69fb ldr r3, [r7, #28]
  10750. 800427c: fa02 f303 lsl.w r3, r2, r3
  10751. 8004280: 617b str r3, [r7, #20]
  10752. /* Get the current IO position */
  10753. iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
  10754. 8004282: 683b ldr r3, [r7, #0]
  10755. 8004284: 681b ldr r3, [r3, #0]
  10756. 8004286: 697a ldr r2, [r7, #20]
  10757. 8004288: 4013 ands r3, r2
  10758. 800428a: 613b str r3, [r7, #16]
  10759. if(iocurrent == ioposition)
  10760. 800428c: 693a ldr r2, [r7, #16]
  10761. 800428e: 697b ldr r3, [r7, #20]
  10762. 8004290: 429a cmp r2, r3
  10763. 8004292: f040 815a bne.w 800454a <HAL_GPIO_Init+0x2ee>
  10764. {
  10765. /*--------------------- GPIO Mode Configuration ------------------------*/
  10766. /* In case of Output or Alternate function mode selection */
  10767. if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
  10768. 8004296: 683b ldr r3, [r7, #0]
  10769. 8004298: 685b ldr r3, [r3, #4]
  10770. 800429a: f003 0303 and.w r3, r3, #3
  10771. 800429e: 2b01 cmp r3, #1
  10772. 80042a0: d005 beq.n 80042ae <HAL_GPIO_Init+0x52>
  10773. (GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
  10774. 80042a2: 683b ldr r3, [r7, #0]
  10775. 80042a4: 685b ldr r3, [r3, #4]
  10776. 80042a6: f003 0303 and.w r3, r3, #3
  10777. if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || \
  10778. 80042aa: 2b02 cmp r3, #2
  10779. 80042ac: d130 bne.n 8004310 <HAL_GPIO_Init+0xb4>
  10780. {
  10781. /* Check the Speed parameter */
  10782. assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
  10783. /* Configure the IO Speed */
  10784. temp = GPIOx->OSPEEDR;
  10785. 80042ae: 687b ldr r3, [r7, #4]
  10786. 80042b0: 689b ldr r3, [r3, #8]
  10787. 80042b2: 61bb str r3, [r7, #24]
  10788. temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2U));
  10789. 80042b4: 69fb ldr r3, [r7, #28]
  10790. 80042b6: 005b lsls r3, r3, #1
  10791. 80042b8: 2203 movs r2, #3
  10792. 80042ba: fa02 f303 lsl.w r3, r2, r3
  10793. 80042be: 43db mvns r3, r3
  10794. 80042c0: 69ba ldr r2, [r7, #24]
  10795. 80042c2: 4013 ands r3, r2
  10796. 80042c4: 61bb str r3, [r7, #24]
  10797. temp |= (GPIO_Init->Speed << (position * 2U));
  10798. 80042c6: 683b ldr r3, [r7, #0]
  10799. 80042c8: 68da ldr r2, [r3, #12]
  10800. 80042ca: 69fb ldr r3, [r7, #28]
  10801. 80042cc: 005b lsls r3, r3, #1
  10802. 80042ce: fa02 f303 lsl.w r3, r2, r3
  10803. 80042d2: 69ba ldr r2, [r7, #24]
  10804. 80042d4: 4313 orrs r3, r2
  10805. 80042d6: 61bb str r3, [r7, #24]
  10806. GPIOx->OSPEEDR = temp;
  10807. 80042d8: 687b ldr r3, [r7, #4]
  10808. 80042da: 69ba ldr r2, [r7, #24]
  10809. 80042dc: 609a str r2, [r3, #8]
  10810. /* Configure the IO Output Type */
  10811. temp = GPIOx->OTYPER;
  10812. 80042de: 687b ldr r3, [r7, #4]
  10813. 80042e0: 685b ldr r3, [r3, #4]
  10814. 80042e2: 61bb str r3, [r7, #24]
  10815. temp &= ~(GPIO_OTYPER_OT_0 << position) ;
  10816. 80042e4: 2201 movs r2, #1
  10817. 80042e6: 69fb ldr r3, [r7, #28]
  10818. 80042e8: fa02 f303 lsl.w r3, r2, r3
  10819. 80042ec: 43db mvns r3, r3
  10820. 80042ee: 69ba ldr r2, [r7, #24]
  10821. 80042f0: 4013 ands r3, r2
  10822. 80042f2: 61bb str r3, [r7, #24]
  10823. temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
  10824. 80042f4: 683b ldr r3, [r7, #0]
  10825. 80042f6: 685b ldr r3, [r3, #4]
  10826. 80042f8: 091b lsrs r3, r3, #4
  10827. 80042fa: f003 0201 and.w r2, r3, #1
  10828. 80042fe: 69fb ldr r3, [r7, #28]
  10829. 8004300: fa02 f303 lsl.w r3, r2, r3
  10830. 8004304: 69ba ldr r2, [r7, #24]
  10831. 8004306: 4313 orrs r3, r2
  10832. 8004308: 61bb str r3, [r7, #24]
  10833. GPIOx->OTYPER = temp;
  10834. 800430a: 687b ldr r3, [r7, #4]
  10835. 800430c: 69ba ldr r2, [r7, #24]
  10836. 800430e: 605a str r2, [r3, #4]
  10837. }
  10838. if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
  10839. 8004310: 683b ldr r3, [r7, #0]
  10840. 8004312: 685b ldr r3, [r3, #4]
  10841. 8004314: f003 0303 and.w r3, r3, #3
  10842. 8004318: 2b03 cmp r3, #3
  10843. 800431a: d017 beq.n 800434c <HAL_GPIO_Init+0xf0>
  10844. {
  10845. /* Check the parameters */
  10846. assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
  10847. /* Activate the Pull-up or Pull down resistor for the current IO */
  10848. temp = GPIOx->PUPDR;
  10849. 800431c: 687b ldr r3, [r7, #4]
  10850. 800431e: 68db ldr r3, [r3, #12]
  10851. 8004320: 61bb str r3, [r7, #24]
  10852. temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2U));
  10853. 8004322: 69fb ldr r3, [r7, #28]
  10854. 8004324: 005b lsls r3, r3, #1
  10855. 8004326: 2203 movs r2, #3
  10856. 8004328: fa02 f303 lsl.w r3, r2, r3
  10857. 800432c: 43db mvns r3, r3
  10858. 800432e: 69ba ldr r2, [r7, #24]
  10859. 8004330: 4013 ands r3, r2
  10860. 8004332: 61bb str r3, [r7, #24]
  10861. temp |= ((GPIO_Init->Pull) << (position * 2U));
  10862. 8004334: 683b ldr r3, [r7, #0]
  10863. 8004336: 689a ldr r2, [r3, #8]
  10864. 8004338: 69fb ldr r3, [r7, #28]
  10865. 800433a: 005b lsls r3, r3, #1
  10866. 800433c: fa02 f303 lsl.w r3, r2, r3
  10867. 8004340: 69ba ldr r2, [r7, #24]
  10868. 8004342: 4313 orrs r3, r2
  10869. 8004344: 61bb str r3, [r7, #24]
  10870. GPIOx->PUPDR = temp;
  10871. 8004346: 687b ldr r3, [r7, #4]
  10872. 8004348: 69ba ldr r2, [r7, #24]
  10873. 800434a: 60da str r2, [r3, #12]
  10874. }
  10875. /* In case of Alternate function mode selection */
  10876. if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
  10877. 800434c: 683b ldr r3, [r7, #0]
  10878. 800434e: 685b ldr r3, [r3, #4]
  10879. 8004350: f003 0303 and.w r3, r3, #3
  10880. 8004354: 2b02 cmp r3, #2
  10881. 8004356: d123 bne.n 80043a0 <HAL_GPIO_Init+0x144>
  10882. {
  10883. /* Check the Alternate function parameter */
  10884. assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
  10885. /* Configure Alternate function mapped with the current IO */
  10886. temp = GPIOx->AFR[position >> 3U];
  10887. 8004358: 69fb ldr r3, [r7, #28]
  10888. 800435a: 08da lsrs r2, r3, #3
  10889. 800435c: 687b ldr r3, [r7, #4]
  10890. 800435e: 3208 adds r2, #8
  10891. 8004360: f853 3022 ldr.w r3, [r3, r2, lsl #2]
  10892. 8004364: 61bb str r3, [r7, #24]
  10893. temp &= ~(0xFU << ((uint32_t)(position & 0x07U) * 4U)) ;
  10894. 8004366: 69fb ldr r3, [r7, #28]
  10895. 8004368: f003 0307 and.w r3, r3, #7
  10896. 800436c: 009b lsls r3, r3, #2
  10897. 800436e: 220f movs r2, #15
  10898. 8004370: fa02 f303 lsl.w r3, r2, r3
  10899. 8004374: 43db mvns r3, r3
  10900. 8004376: 69ba ldr r2, [r7, #24]
  10901. 8004378: 4013 ands r3, r2
  10902. 800437a: 61bb str r3, [r7, #24]
  10903. temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4U));
  10904. 800437c: 683b ldr r3, [r7, #0]
  10905. 800437e: 691a ldr r2, [r3, #16]
  10906. 8004380: 69fb ldr r3, [r7, #28]
  10907. 8004382: f003 0307 and.w r3, r3, #7
  10908. 8004386: 009b lsls r3, r3, #2
  10909. 8004388: fa02 f303 lsl.w r3, r2, r3
  10910. 800438c: 69ba ldr r2, [r7, #24]
  10911. 800438e: 4313 orrs r3, r2
  10912. 8004390: 61bb str r3, [r7, #24]
  10913. GPIOx->AFR[position >> 3U] = temp;
  10914. 8004392: 69fb ldr r3, [r7, #28]
  10915. 8004394: 08da lsrs r2, r3, #3
  10916. 8004396: 687b ldr r3, [r7, #4]
  10917. 8004398: 3208 adds r2, #8
  10918. 800439a: 69b9 ldr r1, [r7, #24]
  10919. 800439c: f843 1022 str.w r1, [r3, r2, lsl #2]
  10920. }
  10921. /* Configure IO Direction mode (Input, Output, Alternate or Analog) */
  10922. temp = GPIOx->MODER;
  10923. 80043a0: 687b ldr r3, [r7, #4]
  10924. 80043a2: 681b ldr r3, [r3, #0]
  10925. 80043a4: 61bb str r3, [r7, #24]
  10926. temp &= ~(GPIO_MODER_MODER0 << (position * 2U));
  10927. 80043a6: 69fb ldr r3, [r7, #28]
  10928. 80043a8: 005b lsls r3, r3, #1
  10929. 80043aa: 2203 movs r2, #3
  10930. 80043ac: fa02 f303 lsl.w r3, r2, r3
  10931. 80043b0: 43db mvns r3, r3
  10932. 80043b2: 69ba ldr r2, [r7, #24]
  10933. 80043b4: 4013 ands r3, r2
  10934. 80043b6: 61bb str r3, [r7, #24]
  10935. temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
  10936. 80043b8: 683b ldr r3, [r7, #0]
  10937. 80043ba: 685b ldr r3, [r3, #4]
  10938. 80043bc: f003 0203 and.w r2, r3, #3
  10939. 80043c0: 69fb ldr r3, [r7, #28]
  10940. 80043c2: 005b lsls r3, r3, #1
  10941. 80043c4: fa02 f303 lsl.w r3, r2, r3
  10942. 80043c8: 69ba ldr r2, [r7, #24]
  10943. 80043ca: 4313 orrs r3, r2
  10944. 80043cc: 61bb str r3, [r7, #24]
  10945. GPIOx->MODER = temp;
  10946. 80043ce: 687b ldr r3, [r7, #4]
  10947. 80043d0: 69ba ldr r2, [r7, #24]
  10948. 80043d2: 601a str r2, [r3, #0]
  10949. /*--------------------- EXTI Mode Configuration ------------------------*/
  10950. /* Configure the External Interrupt or event for the current IO */
  10951. if((GPIO_Init->Mode & EXTI_MODE) != 0x00U)
  10952. 80043d4: 683b ldr r3, [r7, #0]
  10953. 80043d6: 685b ldr r3, [r3, #4]
  10954. 80043d8: f403 3340 and.w r3, r3, #196608 @ 0x30000
  10955. 80043dc: 2b00 cmp r3, #0
  10956. 80043de: f000 80b4 beq.w 800454a <HAL_GPIO_Init+0x2ee>
  10957. {
  10958. /* Enable SYSCFG Clock */
  10959. __HAL_RCC_SYSCFG_CLK_ENABLE();
  10960. 80043e2: 2300 movs r3, #0
  10961. 80043e4: 60fb str r3, [r7, #12]
  10962. 80043e6: 4b60 ldr r3, [pc, #384] @ (8004568 <HAL_GPIO_Init+0x30c>)
  10963. 80043e8: 6c5b ldr r3, [r3, #68] @ 0x44
  10964. 80043ea: 4a5f ldr r2, [pc, #380] @ (8004568 <HAL_GPIO_Init+0x30c>)
  10965. 80043ec: f443 4380 orr.w r3, r3, #16384 @ 0x4000
  10966. 80043f0: 6453 str r3, [r2, #68] @ 0x44
  10967. 80043f2: 4b5d ldr r3, [pc, #372] @ (8004568 <HAL_GPIO_Init+0x30c>)
  10968. 80043f4: 6c5b ldr r3, [r3, #68] @ 0x44
  10969. 80043f6: f403 4380 and.w r3, r3, #16384 @ 0x4000
  10970. 80043fa: 60fb str r3, [r7, #12]
  10971. 80043fc: 68fb ldr r3, [r7, #12]
  10972. temp = SYSCFG->EXTICR[position >> 2U];
  10973. 80043fe: 4a5b ldr r2, [pc, #364] @ (800456c <HAL_GPIO_Init+0x310>)
  10974. 8004400: 69fb ldr r3, [r7, #28]
  10975. 8004402: 089b lsrs r3, r3, #2
  10976. 8004404: 3302 adds r3, #2
  10977. 8004406: f852 3023 ldr.w r3, [r2, r3, lsl #2]
  10978. 800440a: 61bb str r3, [r7, #24]
  10979. temp &= ~(0x0FU << (4U * (position & 0x03U)));
  10980. 800440c: 69fb ldr r3, [r7, #28]
  10981. 800440e: f003 0303 and.w r3, r3, #3
  10982. 8004412: 009b lsls r3, r3, #2
  10983. 8004414: 220f movs r2, #15
  10984. 8004416: fa02 f303 lsl.w r3, r2, r3
  10985. 800441a: 43db mvns r3, r3
  10986. 800441c: 69ba ldr r2, [r7, #24]
  10987. 800441e: 4013 ands r3, r2
  10988. 8004420: 61bb str r3, [r7, #24]
  10989. temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)));
  10990. 8004422: 687b ldr r3, [r7, #4]
  10991. 8004424: 4a52 ldr r2, [pc, #328] @ (8004570 <HAL_GPIO_Init+0x314>)
  10992. 8004426: 4293 cmp r3, r2
  10993. 8004428: d02b beq.n 8004482 <HAL_GPIO_Init+0x226>
  10994. 800442a: 687b ldr r3, [r7, #4]
  10995. 800442c: 4a51 ldr r2, [pc, #324] @ (8004574 <HAL_GPIO_Init+0x318>)
  10996. 800442e: 4293 cmp r3, r2
  10997. 8004430: d025 beq.n 800447e <HAL_GPIO_Init+0x222>
  10998. 8004432: 687b ldr r3, [r7, #4]
  10999. 8004434: 4a50 ldr r2, [pc, #320] @ (8004578 <HAL_GPIO_Init+0x31c>)
  11000. 8004436: 4293 cmp r3, r2
  11001. 8004438: d01f beq.n 800447a <HAL_GPIO_Init+0x21e>
  11002. 800443a: 687b ldr r3, [r7, #4]
  11003. 800443c: 4a4f ldr r2, [pc, #316] @ (800457c <HAL_GPIO_Init+0x320>)
  11004. 800443e: 4293 cmp r3, r2
  11005. 8004440: d019 beq.n 8004476 <HAL_GPIO_Init+0x21a>
  11006. 8004442: 687b ldr r3, [r7, #4]
  11007. 8004444: 4a4e ldr r2, [pc, #312] @ (8004580 <HAL_GPIO_Init+0x324>)
  11008. 8004446: 4293 cmp r3, r2
  11009. 8004448: d013 beq.n 8004472 <HAL_GPIO_Init+0x216>
  11010. 800444a: 687b ldr r3, [r7, #4]
  11011. 800444c: 4a4d ldr r2, [pc, #308] @ (8004584 <HAL_GPIO_Init+0x328>)
  11012. 800444e: 4293 cmp r3, r2
  11013. 8004450: d00d beq.n 800446e <HAL_GPIO_Init+0x212>
  11014. 8004452: 687b ldr r3, [r7, #4]
  11015. 8004454: 4a4c ldr r2, [pc, #304] @ (8004588 <HAL_GPIO_Init+0x32c>)
  11016. 8004456: 4293 cmp r3, r2
  11017. 8004458: d007 beq.n 800446a <HAL_GPIO_Init+0x20e>
  11018. 800445a: 687b ldr r3, [r7, #4]
  11019. 800445c: 4a4b ldr r2, [pc, #300] @ (800458c <HAL_GPIO_Init+0x330>)
  11020. 800445e: 4293 cmp r3, r2
  11021. 8004460: d101 bne.n 8004466 <HAL_GPIO_Init+0x20a>
  11022. 8004462: 2307 movs r3, #7
  11023. 8004464: e00e b.n 8004484 <HAL_GPIO_Init+0x228>
  11024. 8004466: 2308 movs r3, #8
  11025. 8004468: e00c b.n 8004484 <HAL_GPIO_Init+0x228>
  11026. 800446a: 2306 movs r3, #6
  11027. 800446c: e00a b.n 8004484 <HAL_GPIO_Init+0x228>
  11028. 800446e: 2305 movs r3, #5
  11029. 8004470: e008 b.n 8004484 <HAL_GPIO_Init+0x228>
  11030. 8004472: 2304 movs r3, #4
  11031. 8004474: e006 b.n 8004484 <HAL_GPIO_Init+0x228>
  11032. 8004476: 2303 movs r3, #3
  11033. 8004478: e004 b.n 8004484 <HAL_GPIO_Init+0x228>
  11034. 800447a: 2302 movs r3, #2
  11035. 800447c: e002 b.n 8004484 <HAL_GPIO_Init+0x228>
  11036. 800447e: 2301 movs r3, #1
  11037. 8004480: e000 b.n 8004484 <HAL_GPIO_Init+0x228>
  11038. 8004482: 2300 movs r3, #0
  11039. 8004484: 69fa ldr r2, [r7, #28]
  11040. 8004486: f002 0203 and.w r2, r2, #3
  11041. 800448a: 0092 lsls r2, r2, #2
  11042. 800448c: 4093 lsls r3, r2
  11043. 800448e: 69ba ldr r2, [r7, #24]
  11044. 8004490: 4313 orrs r3, r2
  11045. 8004492: 61bb str r3, [r7, #24]
  11046. SYSCFG->EXTICR[position >> 2U] = temp;
  11047. 8004494: 4935 ldr r1, [pc, #212] @ (800456c <HAL_GPIO_Init+0x310>)
  11048. 8004496: 69fb ldr r3, [r7, #28]
  11049. 8004498: 089b lsrs r3, r3, #2
  11050. 800449a: 3302 adds r3, #2
  11051. 800449c: 69ba ldr r2, [r7, #24]
  11052. 800449e: f841 2023 str.w r2, [r1, r3, lsl #2]
  11053. /* Clear Rising Falling edge configuration */
  11054. temp = EXTI->RTSR;
  11055. 80044a2: 4b3b ldr r3, [pc, #236] @ (8004590 <HAL_GPIO_Init+0x334>)
  11056. 80044a4: 689b ldr r3, [r3, #8]
  11057. 80044a6: 61bb str r3, [r7, #24]
  11058. temp &= ~((uint32_t)iocurrent);
  11059. 80044a8: 693b ldr r3, [r7, #16]
  11060. 80044aa: 43db mvns r3, r3
  11061. 80044ac: 69ba ldr r2, [r7, #24]
  11062. 80044ae: 4013 ands r3, r2
  11063. 80044b0: 61bb str r3, [r7, #24]
  11064. if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
  11065. 80044b2: 683b ldr r3, [r7, #0]
  11066. 80044b4: 685b ldr r3, [r3, #4]
  11067. 80044b6: f403 1380 and.w r3, r3, #1048576 @ 0x100000
  11068. 80044ba: 2b00 cmp r3, #0
  11069. 80044bc: d003 beq.n 80044c6 <HAL_GPIO_Init+0x26a>
  11070. {
  11071. temp |= iocurrent;
  11072. 80044be: 69ba ldr r2, [r7, #24]
  11073. 80044c0: 693b ldr r3, [r7, #16]
  11074. 80044c2: 4313 orrs r3, r2
  11075. 80044c4: 61bb str r3, [r7, #24]
  11076. }
  11077. EXTI->RTSR = temp;
  11078. 80044c6: 4a32 ldr r2, [pc, #200] @ (8004590 <HAL_GPIO_Init+0x334>)
  11079. 80044c8: 69bb ldr r3, [r7, #24]
  11080. 80044ca: 6093 str r3, [r2, #8]
  11081. temp = EXTI->FTSR;
  11082. 80044cc: 4b30 ldr r3, [pc, #192] @ (8004590 <HAL_GPIO_Init+0x334>)
  11083. 80044ce: 68db ldr r3, [r3, #12]
  11084. 80044d0: 61bb str r3, [r7, #24]
  11085. temp &= ~((uint32_t)iocurrent);
  11086. 80044d2: 693b ldr r3, [r7, #16]
  11087. 80044d4: 43db mvns r3, r3
  11088. 80044d6: 69ba ldr r2, [r7, #24]
  11089. 80044d8: 4013 ands r3, r2
  11090. 80044da: 61bb str r3, [r7, #24]
  11091. if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
  11092. 80044dc: 683b ldr r3, [r7, #0]
  11093. 80044de: 685b ldr r3, [r3, #4]
  11094. 80044e0: f403 1300 and.w r3, r3, #2097152 @ 0x200000
  11095. 80044e4: 2b00 cmp r3, #0
  11096. 80044e6: d003 beq.n 80044f0 <HAL_GPIO_Init+0x294>
  11097. {
  11098. temp |= iocurrent;
  11099. 80044e8: 69ba ldr r2, [r7, #24]
  11100. 80044ea: 693b ldr r3, [r7, #16]
  11101. 80044ec: 4313 orrs r3, r2
  11102. 80044ee: 61bb str r3, [r7, #24]
  11103. }
  11104. EXTI->FTSR = temp;
  11105. 80044f0: 4a27 ldr r2, [pc, #156] @ (8004590 <HAL_GPIO_Init+0x334>)
  11106. 80044f2: 69bb ldr r3, [r7, #24]
  11107. 80044f4: 60d3 str r3, [r2, #12]
  11108. temp = EXTI->EMR;
  11109. 80044f6: 4b26 ldr r3, [pc, #152] @ (8004590 <HAL_GPIO_Init+0x334>)
  11110. 80044f8: 685b ldr r3, [r3, #4]
  11111. 80044fa: 61bb str r3, [r7, #24]
  11112. temp &= ~((uint32_t)iocurrent);
  11113. 80044fc: 693b ldr r3, [r7, #16]
  11114. 80044fe: 43db mvns r3, r3
  11115. 8004500: 69ba ldr r2, [r7, #24]
  11116. 8004502: 4013 ands r3, r2
  11117. 8004504: 61bb str r3, [r7, #24]
  11118. if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
  11119. 8004506: 683b ldr r3, [r7, #0]
  11120. 8004508: 685b ldr r3, [r3, #4]
  11121. 800450a: f403 3300 and.w r3, r3, #131072 @ 0x20000
  11122. 800450e: 2b00 cmp r3, #0
  11123. 8004510: d003 beq.n 800451a <HAL_GPIO_Init+0x2be>
  11124. {
  11125. temp |= iocurrent;
  11126. 8004512: 69ba ldr r2, [r7, #24]
  11127. 8004514: 693b ldr r3, [r7, #16]
  11128. 8004516: 4313 orrs r3, r2
  11129. 8004518: 61bb str r3, [r7, #24]
  11130. }
  11131. EXTI->EMR = temp;
  11132. 800451a: 4a1d ldr r2, [pc, #116] @ (8004590 <HAL_GPIO_Init+0x334>)
  11133. 800451c: 69bb ldr r3, [r7, #24]
  11134. 800451e: 6053 str r3, [r2, #4]
  11135. /* Clear EXTI line configuration */
  11136. temp = EXTI->IMR;
  11137. 8004520: 4b1b ldr r3, [pc, #108] @ (8004590 <HAL_GPIO_Init+0x334>)
  11138. 8004522: 681b ldr r3, [r3, #0]
  11139. 8004524: 61bb str r3, [r7, #24]
  11140. temp &= ~((uint32_t)iocurrent);
  11141. 8004526: 693b ldr r3, [r7, #16]
  11142. 8004528: 43db mvns r3, r3
  11143. 800452a: 69ba ldr r2, [r7, #24]
  11144. 800452c: 4013 ands r3, r2
  11145. 800452e: 61bb str r3, [r7, #24]
  11146. if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
  11147. 8004530: 683b ldr r3, [r7, #0]
  11148. 8004532: 685b ldr r3, [r3, #4]
  11149. 8004534: f403 3380 and.w r3, r3, #65536 @ 0x10000
  11150. 8004538: 2b00 cmp r3, #0
  11151. 800453a: d003 beq.n 8004544 <HAL_GPIO_Init+0x2e8>
  11152. {
  11153. temp |= iocurrent;
  11154. 800453c: 69ba ldr r2, [r7, #24]
  11155. 800453e: 693b ldr r3, [r7, #16]
  11156. 8004540: 4313 orrs r3, r2
  11157. 8004542: 61bb str r3, [r7, #24]
  11158. }
  11159. EXTI->IMR = temp;
  11160. 8004544: 4a12 ldr r2, [pc, #72] @ (8004590 <HAL_GPIO_Init+0x334>)
  11161. 8004546: 69bb ldr r3, [r7, #24]
  11162. 8004548: 6013 str r3, [r2, #0]
  11163. for(position = 0U; position < GPIO_NUMBER; position++)
  11164. 800454a: 69fb ldr r3, [r7, #28]
  11165. 800454c: 3301 adds r3, #1
  11166. 800454e: 61fb str r3, [r7, #28]
  11167. 8004550: 69fb ldr r3, [r7, #28]
  11168. 8004552: 2b0f cmp r3, #15
  11169. 8004554: f67f ae90 bls.w 8004278 <HAL_GPIO_Init+0x1c>
  11170. }
  11171. }
  11172. }
  11173. }
  11174. 8004558: bf00 nop
  11175. 800455a: bf00 nop
  11176. 800455c: 3724 adds r7, #36 @ 0x24
  11177. 800455e: 46bd mov sp, r7
  11178. 8004560: f85d 7b04 ldr.w r7, [sp], #4
  11179. 8004564: 4770 bx lr
  11180. 8004566: bf00 nop
  11181. 8004568: 40023800 .word 0x40023800
  11182. 800456c: 40013800 .word 0x40013800
  11183. 8004570: 40020000 .word 0x40020000
  11184. 8004574: 40020400 .word 0x40020400
  11185. 8004578: 40020800 .word 0x40020800
  11186. 800457c: 40020c00 .word 0x40020c00
  11187. 8004580: 40021000 .word 0x40021000
  11188. 8004584: 40021400 .word 0x40021400
  11189. 8004588: 40021800 .word 0x40021800
  11190. 800458c: 40021c00 .word 0x40021c00
  11191. 8004590: 40013c00 .word 0x40013c00
  11192. 08004594 <HAL_GPIO_DeInit>:
  11193. * @param GPIO_Pin specifies the port bit to be written.
  11194. * This parameter can be one of GPIO_PIN_x where x can be (0..15).
  11195. * @retval None
  11196. */
  11197. void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
  11198. {
  11199. 8004594: b480 push {r7}
  11200. 8004596: b087 sub sp, #28
  11201. 8004598: af00 add r7, sp, #0
  11202. 800459a: 6078 str r0, [r7, #4]
  11203. 800459c: 6039 str r1, [r7, #0]
  11204. uint32_t position;
  11205. uint32_t ioposition = 0x00U;
  11206. 800459e: 2300 movs r3, #0
  11207. 80045a0: 613b str r3, [r7, #16]
  11208. uint32_t iocurrent = 0x00U;
  11209. 80045a2: 2300 movs r3, #0
  11210. 80045a4: 60fb str r3, [r7, #12]
  11211. uint32_t tmp = 0x00U;
  11212. 80045a6: 2300 movs r3, #0
  11213. 80045a8: 60bb str r3, [r7, #8]
  11214. /* Check the parameters */
  11215. assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
  11216. /* Configure the port pins */
  11217. for(position = 0U; position < GPIO_NUMBER; position++)
  11218. 80045aa: 2300 movs r3, #0
  11219. 80045ac: 617b str r3, [r7, #20]
  11220. 80045ae: e0cd b.n 800474c <HAL_GPIO_DeInit+0x1b8>
  11221. {
  11222. /* Get the IO position */
  11223. ioposition = 0x01U << position;
  11224. 80045b0: 2201 movs r2, #1
  11225. 80045b2: 697b ldr r3, [r7, #20]
  11226. 80045b4: fa02 f303 lsl.w r3, r2, r3
  11227. 80045b8: 613b str r3, [r7, #16]
  11228. /* Get the current IO position */
  11229. iocurrent = (GPIO_Pin) & ioposition;
  11230. 80045ba: 683a ldr r2, [r7, #0]
  11231. 80045bc: 693b ldr r3, [r7, #16]
  11232. 80045be: 4013 ands r3, r2
  11233. 80045c0: 60fb str r3, [r7, #12]
  11234. if(iocurrent == ioposition)
  11235. 80045c2: 68fa ldr r2, [r7, #12]
  11236. 80045c4: 693b ldr r3, [r7, #16]
  11237. 80045c6: 429a cmp r2, r3
  11238. 80045c8: f040 80bd bne.w 8004746 <HAL_GPIO_DeInit+0x1b2>
  11239. {
  11240. /*------------------------- EXTI Mode Configuration --------------------*/
  11241. tmp = SYSCFG->EXTICR[position >> 2U];
  11242. 80045cc: 4a65 ldr r2, [pc, #404] @ (8004764 <HAL_GPIO_DeInit+0x1d0>)
  11243. 80045ce: 697b ldr r3, [r7, #20]
  11244. 80045d0: 089b lsrs r3, r3, #2
  11245. 80045d2: 3302 adds r3, #2
  11246. 80045d4: f852 3023 ldr.w r3, [r2, r3, lsl #2]
  11247. 80045d8: 60bb str r3, [r7, #8]
  11248. tmp &= (0x0FU << (4U * (position & 0x03U)));
  11249. 80045da: 697b ldr r3, [r7, #20]
  11250. 80045dc: f003 0303 and.w r3, r3, #3
  11251. 80045e0: 009b lsls r3, r3, #2
  11252. 80045e2: 220f movs r2, #15
  11253. 80045e4: fa02 f303 lsl.w r3, r2, r3
  11254. 80045e8: 68ba ldr r2, [r7, #8]
  11255. 80045ea: 4013 ands r3, r2
  11256. 80045ec: 60bb str r3, [r7, #8]
  11257. if(tmp == ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U))))
  11258. 80045ee: 687b ldr r3, [r7, #4]
  11259. 80045f0: 4a5d ldr r2, [pc, #372] @ (8004768 <HAL_GPIO_DeInit+0x1d4>)
  11260. 80045f2: 4293 cmp r3, r2
  11261. 80045f4: d02b beq.n 800464e <HAL_GPIO_DeInit+0xba>
  11262. 80045f6: 687b ldr r3, [r7, #4]
  11263. 80045f8: 4a5c ldr r2, [pc, #368] @ (800476c <HAL_GPIO_DeInit+0x1d8>)
  11264. 80045fa: 4293 cmp r3, r2
  11265. 80045fc: d025 beq.n 800464a <HAL_GPIO_DeInit+0xb6>
  11266. 80045fe: 687b ldr r3, [r7, #4]
  11267. 8004600: 4a5b ldr r2, [pc, #364] @ (8004770 <HAL_GPIO_DeInit+0x1dc>)
  11268. 8004602: 4293 cmp r3, r2
  11269. 8004604: d01f beq.n 8004646 <HAL_GPIO_DeInit+0xb2>
  11270. 8004606: 687b ldr r3, [r7, #4]
  11271. 8004608: 4a5a ldr r2, [pc, #360] @ (8004774 <HAL_GPIO_DeInit+0x1e0>)
  11272. 800460a: 4293 cmp r3, r2
  11273. 800460c: d019 beq.n 8004642 <HAL_GPIO_DeInit+0xae>
  11274. 800460e: 687b ldr r3, [r7, #4]
  11275. 8004610: 4a59 ldr r2, [pc, #356] @ (8004778 <HAL_GPIO_DeInit+0x1e4>)
  11276. 8004612: 4293 cmp r3, r2
  11277. 8004614: d013 beq.n 800463e <HAL_GPIO_DeInit+0xaa>
  11278. 8004616: 687b ldr r3, [r7, #4]
  11279. 8004618: 4a58 ldr r2, [pc, #352] @ (800477c <HAL_GPIO_DeInit+0x1e8>)
  11280. 800461a: 4293 cmp r3, r2
  11281. 800461c: d00d beq.n 800463a <HAL_GPIO_DeInit+0xa6>
  11282. 800461e: 687b ldr r3, [r7, #4]
  11283. 8004620: 4a57 ldr r2, [pc, #348] @ (8004780 <HAL_GPIO_DeInit+0x1ec>)
  11284. 8004622: 4293 cmp r3, r2
  11285. 8004624: d007 beq.n 8004636 <HAL_GPIO_DeInit+0xa2>
  11286. 8004626: 687b ldr r3, [r7, #4]
  11287. 8004628: 4a56 ldr r2, [pc, #344] @ (8004784 <HAL_GPIO_DeInit+0x1f0>)
  11288. 800462a: 4293 cmp r3, r2
  11289. 800462c: d101 bne.n 8004632 <HAL_GPIO_DeInit+0x9e>
  11290. 800462e: 2307 movs r3, #7
  11291. 8004630: e00e b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11292. 8004632: 2308 movs r3, #8
  11293. 8004634: e00c b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11294. 8004636: 2306 movs r3, #6
  11295. 8004638: e00a b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11296. 800463a: 2305 movs r3, #5
  11297. 800463c: e008 b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11298. 800463e: 2304 movs r3, #4
  11299. 8004640: e006 b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11300. 8004642: 2303 movs r3, #3
  11301. 8004644: e004 b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11302. 8004646: 2302 movs r3, #2
  11303. 8004648: e002 b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11304. 800464a: 2301 movs r3, #1
  11305. 800464c: e000 b.n 8004650 <HAL_GPIO_DeInit+0xbc>
  11306. 800464e: 2300 movs r3, #0
  11307. 8004650: 697a ldr r2, [r7, #20]
  11308. 8004652: f002 0203 and.w r2, r2, #3
  11309. 8004656: 0092 lsls r2, r2, #2
  11310. 8004658: 4093 lsls r3, r2
  11311. 800465a: 68ba ldr r2, [r7, #8]
  11312. 800465c: 429a cmp r2, r3
  11313. 800465e: d132 bne.n 80046c6 <HAL_GPIO_DeInit+0x132>
  11314. {
  11315. /* Clear EXTI line configuration */
  11316. EXTI->IMR &= ~((uint32_t)iocurrent);
  11317. 8004660: 4b49 ldr r3, [pc, #292] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11318. 8004662: 681a ldr r2, [r3, #0]
  11319. 8004664: 68fb ldr r3, [r7, #12]
  11320. 8004666: 43db mvns r3, r3
  11321. 8004668: 4947 ldr r1, [pc, #284] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11322. 800466a: 4013 ands r3, r2
  11323. 800466c: 600b str r3, [r1, #0]
  11324. EXTI->EMR &= ~((uint32_t)iocurrent);
  11325. 800466e: 4b46 ldr r3, [pc, #280] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11326. 8004670: 685a ldr r2, [r3, #4]
  11327. 8004672: 68fb ldr r3, [r7, #12]
  11328. 8004674: 43db mvns r3, r3
  11329. 8004676: 4944 ldr r1, [pc, #272] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11330. 8004678: 4013 ands r3, r2
  11331. 800467a: 604b str r3, [r1, #4]
  11332. /* Clear Rising Falling edge configuration */
  11333. EXTI->FTSR &= ~((uint32_t)iocurrent);
  11334. 800467c: 4b42 ldr r3, [pc, #264] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11335. 800467e: 68da ldr r2, [r3, #12]
  11336. 8004680: 68fb ldr r3, [r7, #12]
  11337. 8004682: 43db mvns r3, r3
  11338. 8004684: 4940 ldr r1, [pc, #256] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11339. 8004686: 4013 ands r3, r2
  11340. 8004688: 60cb str r3, [r1, #12]
  11341. EXTI->RTSR &= ~((uint32_t)iocurrent);
  11342. 800468a: 4b3f ldr r3, [pc, #252] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11343. 800468c: 689a ldr r2, [r3, #8]
  11344. 800468e: 68fb ldr r3, [r7, #12]
  11345. 8004690: 43db mvns r3, r3
  11346. 8004692: 493d ldr r1, [pc, #244] @ (8004788 <HAL_GPIO_DeInit+0x1f4>)
  11347. 8004694: 4013 ands r3, r2
  11348. 8004696: 608b str r3, [r1, #8]
  11349. /* Configure the External Interrupt or event for the current IO */
  11350. tmp = 0x0FU << (4U * (position & 0x03U));
  11351. 8004698: 697b ldr r3, [r7, #20]
  11352. 800469a: f003 0303 and.w r3, r3, #3
  11353. 800469e: 009b lsls r3, r3, #2
  11354. 80046a0: 220f movs r2, #15
  11355. 80046a2: fa02 f303 lsl.w r3, r2, r3
  11356. 80046a6: 60bb str r3, [r7, #8]
  11357. SYSCFG->EXTICR[position >> 2U] &= ~tmp;
  11358. 80046a8: 4a2e ldr r2, [pc, #184] @ (8004764 <HAL_GPIO_DeInit+0x1d0>)
  11359. 80046aa: 697b ldr r3, [r7, #20]
  11360. 80046ac: 089b lsrs r3, r3, #2
  11361. 80046ae: 3302 adds r3, #2
  11362. 80046b0: f852 1023 ldr.w r1, [r2, r3, lsl #2]
  11363. 80046b4: 68bb ldr r3, [r7, #8]
  11364. 80046b6: 43da mvns r2, r3
  11365. 80046b8: 482a ldr r0, [pc, #168] @ (8004764 <HAL_GPIO_DeInit+0x1d0>)
  11366. 80046ba: 697b ldr r3, [r7, #20]
  11367. 80046bc: 089b lsrs r3, r3, #2
  11368. 80046be: 400a ands r2, r1
  11369. 80046c0: 3302 adds r3, #2
  11370. 80046c2: f840 2023 str.w r2, [r0, r3, lsl #2]
  11371. }
  11372. /*------------------------- GPIO Mode Configuration --------------------*/
  11373. /* Configure IO Direction in Input Floating Mode */
  11374. GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (position * 2U));
  11375. 80046c6: 687b ldr r3, [r7, #4]
  11376. 80046c8: 681a ldr r2, [r3, #0]
  11377. 80046ca: 697b ldr r3, [r7, #20]
  11378. 80046cc: 005b lsls r3, r3, #1
  11379. 80046ce: 2103 movs r1, #3
  11380. 80046d0: fa01 f303 lsl.w r3, r1, r3
  11381. 80046d4: 43db mvns r3, r3
  11382. 80046d6: 401a ands r2, r3
  11383. 80046d8: 687b ldr r3, [r7, #4]
  11384. 80046da: 601a str r2, [r3, #0]
  11385. /* Configure the default Alternate Function in current IO */
  11386. GPIOx->AFR[position >> 3U] &= ~(0xFU << ((uint32_t)(position & 0x07U) * 4U)) ;
  11387. 80046dc: 697b ldr r3, [r7, #20]
  11388. 80046de: 08da lsrs r2, r3, #3
  11389. 80046e0: 687b ldr r3, [r7, #4]
  11390. 80046e2: 3208 adds r2, #8
  11391. 80046e4: f853 1022 ldr.w r1, [r3, r2, lsl #2]
  11392. 80046e8: 697b ldr r3, [r7, #20]
  11393. 80046ea: f003 0307 and.w r3, r3, #7
  11394. 80046ee: 009b lsls r3, r3, #2
  11395. 80046f0: 220f movs r2, #15
  11396. 80046f2: fa02 f303 lsl.w r3, r2, r3
  11397. 80046f6: 43db mvns r3, r3
  11398. 80046f8: 697a ldr r2, [r7, #20]
  11399. 80046fa: 08d2 lsrs r2, r2, #3
  11400. 80046fc: 4019 ands r1, r3
  11401. 80046fe: 687b ldr r3, [r7, #4]
  11402. 8004700: 3208 adds r2, #8
  11403. 8004702: f843 1022 str.w r1, [r3, r2, lsl #2]
  11404. /* Deactivate the Pull-up and Pull-down resistor for the current IO */
  11405. GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << (position * 2U));
  11406. 8004706: 687b ldr r3, [r7, #4]
  11407. 8004708: 68da ldr r2, [r3, #12]
  11408. 800470a: 697b ldr r3, [r7, #20]
  11409. 800470c: 005b lsls r3, r3, #1
  11410. 800470e: 2103 movs r1, #3
  11411. 8004710: fa01 f303 lsl.w r3, r1, r3
  11412. 8004714: 43db mvns r3, r3
  11413. 8004716: 401a ands r2, r3
  11414. 8004718: 687b ldr r3, [r7, #4]
  11415. 800471a: 60da str r2, [r3, #12]
  11416. /* Configure the default value IO Output Type */
  11417. GPIOx->OTYPER &= ~(GPIO_OTYPER_OT_0 << position) ;
  11418. 800471c: 687b ldr r3, [r7, #4]
  11419. 800471e: 685a ldr r2, [r3, #4]
  11420. 8004720: 2101 movs r1, #1
  11421. 8004722: 697b ldr r3, [r7, #20]
  11422. 8004724: fa01 f303 lsl.w r3, r1, r3
  11423. 8004728: 43db mvns r3, r3
  11424. 800472a: 401a ands r2, r3
  11425. 800472c: 687b ldr r3, [r7, #4]
  11426. 800472e: 605a str r2, [r3, #4]
  11427. /* Configure the default value for IO Speed */
  11428. GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2U));
  11429. 8004730: 687b ldr r3, [r7, #4]
  11430. 8004732: 689a ldr r2, [r3, #8]
  11431. 8004734: 697b ldr r3, [r7, #20]
  11432. 8004736: 005b lsls r3, r3, #1
  11433. 8004738: 2103 movs r1, #3
  11434. 800473a: fa01 f303 lsl.w r3, r1, r3
  11435. 800473e: 43db mvns r3, r3
  11436. 8004740: 401a ands r2, r3
  11437. 8004742: 687b ldr r3, [r7, #4]
  11438. 8004744: 609a str r2, [r3, #8]
  11439. for(position = 0U; position < GPIO_NUMBER; position++)
  11440. 8004746: 697b ldr r3, [r7, #20]
  11441. 8004748: 3301 adds r3, #1
  11442. 800474a: 617b str r3, [r7, #20]
  11443. 800474c: 697b ldr r3, [r7, #20]
  11444. 800474e: 2b0f cmp r3, #15
  11445. 8004750: f67f af2e bls.w 80045b0 <HAL_GPIO_DeInit+0x1c>
  11446. }
  11447. }
  11448. }
  11449. 8004754: bf00 nop
  11450. 8004756: bf00 nop
  11451. 8004758: 371c adds r7, #28
  11452. 800475a: 46bd mov sp, r7
  11453. 800475c: f85d 7b04 ldr.w r7, [sp], #4
  11454. 8004760: 4770 bx lr
  11455. 8004762: bf00 nop
  11456. 8004764: 40013800 .word 0x40013800
  11457. 8004768: 40020000 .word 0x40020000
  11458. 800476c: 40020400 .word 0x40020400
  11459. 8004770: 40020800 .word 0x40020800
  11460. 8004774: 40020c00 .word 0x40020c00
  11461. 8004778: 40021000 .word 0x40021000
  11462. 800477c: 40021400 .word 0x40021400
  11463. 8004780: 40021800 .word 0x40021800
  11464. 8004784: 40021c00 .word 0x40021c00
  11465. 8004788: 40013c00 .word 0x40013c00
  11466. 0800478c <HAL_RCC_OscConfig>:
  11467. * supported by this API. User should request a transition to HSE Off
  11468. * first and then HSE On or HSE Bypass.
  11469. * @retval HAL status
  11470. */
  11471. __weak HAL_StatusTypeDef HAL_RCC_OscConfig(const RCC_OscInitTypeDef *RCC_OscInitStruct)
  11472. {
  11473. 800478c: b580 push {r7, lr}
  11474. 800478e: b086 sub sp, #24
  11475. 8004790: af00 add r7, sp, #0
  11476. 8004792: 6078 str r0, [r7, #4]
  11477. uint32_t tickstart;
  11478. uint32_t pll_config;
  11479. /* Check Null pointer */
  11480. if (RCC_OscInitStruct == NULL)
  11481. 8004794: 687b ldr r3, [r7, #4]
  11482. 8004796: 2b00 cmp r3, #0
  11483. 8004798: d101 bne.n 800479e <HAL_RCC_OscConfig+0x12>
  11484. {
  11485. return HAL_ERROR;
  11486. 800479a: 2301 movs r3, #1
  11487. 800479c: e267 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11488. }
  11489. /* Check the parameters */
  11490. assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
  11491. /*------------------------------- HSE Configuration ------------------------*/
  11492. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
  11493. 800479e: 687b ldr r3, [r7, #4]
  11494. 80047a0: 681b ldr r3, [r3, #0]
  11495. 80047a2: f003 0301 and.w r3, r3, #1
  11496. 80047a6: 2b00 cmp r3, #0
  11497. 80047a8: d075 beq.n 8004896 <HAL_RCC_OscConfig+0x10a>
  11498. {
  11499. /* Check the parameters */
  11500. assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
  11501. /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */
  11502. if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) || \
  11503. 80047aa: 4b88 ldr r3, [pc, #544] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11504. 80047ac: 689b ldr r3, [r3, #8]
  11505. 80047ae: f003 030c and.w r3, r3, #12
  11506. 80047b2: 2b04 cmp r3, #4
  11507. 80047b4: d00c beq.n 80047d0 <HAL_RCC_OscConfig+0x44>
  11508. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
  11509. 80047b6: 4b85 ldr r3, [pc, #532] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11510. 80047b8: 689b ldr r3, [r3, #8]
  11511. 80047ba: f003 030c and.w r3, r3, #12
  11512. if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) || \
  11513. 80047be: 2b08 cmp r3, #8
  11514. 80047c0: d112 bne.n 80047e8 <HAL_RCC_OscConfig+0x5c>
  11515. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
  11516. 80047c2: 4b82 ldr r3, [pc, #520] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11517. 80047c4: 685b ldr r3, [r3, #4]
  11518. 80047c6: f403 0380 and.w r3, r3, #4194304 @ 0x400000
  11519. 80047ca: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000
  11520. 80047ce: d10b bne.n 80047e8 <HAL_RCC_OscConfig+0x5c>
  11521. {
  11522. if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
  11523. 80047d0: 4b7e ldr r3, [pc, #504] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11524. 80047d2: 681b ldr r3, [r3, #0]
  11525. 80047d4: f403 3300 and.w r3, r3, #131072 @ 0x20000
  11526. 80047d8: 2b00 cmp r3, #0
  11527. 80047da: d05b beq.n 8004894 <HAL_RCC_OscConfig+0x108>
  11528. 80047dc: 687b ldr r3, [r7, #4]
  11529. 80047de: 685b ldr r3, [r3, #4]
  11530. 80047e0: 2b00 cmp r3, #0
  11531. 80047e2: d157 bne.n 8004894 <HAL_RCC_OscConfig+0x108>
  11532. {
  11533. return HAL_ERROR;
  11534. 80047e4: 2301 movs r3, #1
  11535. 80047e6: e242 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11536. }
  11537. }
  11538. else
  11539. {
  11540. /* Set the new HSE configuration ---------------------------------------*/
  11541. __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
  11542. 80047e8: 687b ldr r3, [r7, #4]
  11543. 80047ea: 685b ldr r3, [r3, #4]
  11544. 80047ec: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
  11545. 80047f0: d106 bne.n 8004800 <HAL_RCC_OscConfig+0x74>
  11546. 80047f2: 4b76 ldr r3, [pc, #472] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11547. 80047f4: 681b ldr r3, [r3, #0]
  11548. 80047f6: 4a75 ldr r2, [pc, #468] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11549. 80047f8: f443 3380 orr.w r3, r3, #65536 @ 0x10000
  11550. 80047fc: 6013 str r3, [r2, #0]
  11551. 80047fe: e01d b.n 800483c <HAL_RCC_OscConfig+0xb0>
  11552. 8004800: 687b ldr r3, [r7, #4]
  11553. 8004802: 685b ldr r3, [r3, #4]
  11554. 8004804: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000
  11555. 8004808: d10c bne.n 8004824 <HAL_RCC_OscConfig+0x98>
  11556. 800480a: 4b70 ldr r3, [pc, #448] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11557. 800480c: 681b ldr r3, [r3, #0]
  11558. 800480e: 4a6f ldr r2, [pc, #444] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11559. 8004810: f443 2380 orr.w r3, r3, #262144 @ 0x40000
  11560. 8004814: 6013 str r3, [r2, #0]
  11561. 8004816: 4b6d ldr r3, [pc, #436] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11562. 8004818: 681b ldr r3, [r3, #0]
  11563. 800481a: 4a6c ldr r2, [pc, #432] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11564. 800481c: f443 3380 orr.w r3, r3, #65536 @ 0x10000
  11565. 8004820: 6013 str r3, [r2, #0]
  11566. 8004822: e00b b.n 800483c <HAL_RCC_OscConfig+0xb0>
  11567. 8004824: 4b69 ldr r3, [pc, #420] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11568. 8004826: 681b ldr r3, [r3, #0]
  11569. 8004828: 4a68 ldr r2, [pc, #416] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11570. 800482a: f423 3380 bic.w r3, r3, #65536 @ 0x10000
  11571. 800482e: 6013 str r3, [r2, #0]
  11572. 8004830: 4b66 ldr r3, [pc, #408] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11573. 8004832: 681b ldr r3, [r3, #0]
  11574. 8004834: 4a65 ldr r2, [pc, #404] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11575. 8004836: f423 2380 bic.w r3, r3, #262144 @ 0x40000
  11576. 800483a: 6013 str r3, [r2, #0]
  11577. /* Check the HSE State */
  11578. if ((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF)
  11579. 800483c: 687b ldr r3, [r7, #4]
  11580. 800483e: 685b ldr r3, [r3, #4]
  11581. 8004840: 2b00 cmp r3, #0
  11582. 8004842: d013 beq.n 800486c <HAL_RCC_OscConfig+0xe0>
  11583. {
  11584. /* Get Start Tick */
  11585. tickstart = HAL_GetTick();
  11586. 8004844: f7fe fc80 bl 8003148 <HAL_GetTick>
  11587. 8004848: 6138 str r0, [r7, #16]
  11588. /* Wait till HSE is ready */
  11589. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
  11590. 800484a: e008 b.n 800485e <HAL_RCC_OscConfig+0xd2>
  11591. {
  11592. if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
  11593. 800484c: f7fe fc7c bl 8003148 <HAL_GetTick>
  11594. 8004850: 4602 mov r2, r0
  11595. 8004852: 693b ldr r3, [r7, #16]
  11596. 8004854: 1ad3 subs r3, r2, r3
  11597. 8004856: 2b64 cmp r3, #100 @ 0x64
  11598. 8004858: d901 bls.n 800485e <HAL_RCC_OscConfig+0xd2>
  11599. {
  11600. return HAL_TIMEOUT;
  11601. 800485a: 2303 movs r3, #3
  11602. 800485c: e207 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11603. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
  11604. 800485e: 4b5b ldr r3, [pc, #364] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11605. 8004860: 681b ldr r3, [r3, #0]
  11606. 8004862: f403 3300 and.w r3, r3, #131072 @ 0x20000
  11607. 8004866: 2b00 cmp r3, #0
  11608. 8004868: d0f0 beq.n 800484c <HAL_RCC_OscConfig+0xc0>
  11609. 800486a: e014 b.n 8004896 <HAL_RCC_OscConfig+0x10a>
  11610. }
  11611. }
  11612. else
  11613. {
  11614. /* Get Start Tick */
  11615. tickstart = HAL_GetTick();
  11616. 800486c: f7fe fc6c bl 8003148 <HAL_GetTick>
  11617. 8004870: 6138 str r0, [r7, #16]
  11618. /* Wait till HSE is bypassed or disabled */
  11619. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
  11620. 8004872: e008 b.n 8004886 <HAL_RCC_OscConfig+0xfa>
  11621. {
  11622. if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
  11623. 8004874: f7fe fc68 bl 8003148 <HAL_GetTick>
  11624. 8004878: 4602 mov r2, r0
  11625. 800487a: 693b ldr r3, [r7, #16]
  11626. 800487c: 1ad3 subs r3, r2, r3
  11627. 800487e: 2b64 cmp r3, #100 @ 0x64
  11628. 8004880: d901 bls.n 8004886 <HAL_RCC_OscConfig+0xfa>
  11629. {
  11630. return HAL_TIMEOUT;
  11631. 8004882: 2303 movs r3, #3
  11632. 8004884: e1f3 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11633. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET)
  11634. 8004886: 4b51 ldr r3, [pc, #324] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11635. 8004888: 681b ldr r3, [r3, #0]
  11636. 800488a: f403 3300 and.w r3, r3, #131072 @ 0x20000
  11637. 800488e: 2b00 cmp r3, #0
  11638. 8004890: d1f0 bne.n 8004874 <HAL_RCC_OscConfig+0xe8>
  11639. 8004892: e000 b.n 8004896 <HAL_RCC_OscConfig+0x10a>
  11640. if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
  11641. 8004894: bf00 nop
  11642. }
  11643. }
  11644. }
  11645. }
  11646. /*----------------------------- HSI Configuration --------------------------*/
  11647. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
  11648. 8004896: 687b ldr r3, [r7, #4]
  11649. 8004898: 681b ldr r3, [r3, #0]
  11650. 800489a: f003 0302 and.w r3, r3, #2
  11651. 800489e: 2b00 cmp r3, #0
  11652. 80048a0: d063 beq.n 800496a <HAL_RCC_OscConfig+0x1de>
  11653. /* Check the parameters */
  11654. assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
  11655. assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
  11656. /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
  11657. if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) || \
  11658. 80048a2: 4b4a ldr r3, [pc, #296] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11659. 80048a4: 689b ldr r3, [r3, #8]
  11660. 80048a6: f003 030c and.w r3, r3, #12
  11661. 80048aa: 2b00 cmp r3, #0
  11662. 80048ac: d00b beq.n 80048c6 <HAL_RCC_OscConfig+0x13a>
  11663. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
  11664. 80048ae: 4b47 ldr r3, [pc, #284] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11665. 80048b0: 689b ldr r3, [r3, #8]
  11666. 80048b2: f003 030c and.w r3, r3, #12
  11667. if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) || \
  11668. 80048b6: 2b08 cmp r3, #8
  11669. 80048b8: d11c bne.n 80048f4 <HAL_RCC_OscConfig+0x168>
  11670. ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
  11671. 80048ba: 4b44 ldr r3, [pc, #272] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11672. 80048bc: 685b ldr r3, [r3, #4]
  11673. 80048be: f403 0380 and.w r3, r3, #4194304 @ 0x400000
  11674. 80048c2: 2b00 cmp r3, #0
  11675. 80048c4: d116 bne.n 80048f4 <HAL_RCC_OscConfig+0x168>
  11676. {
  11677. /* When HSI is used as system clock it will not disabled */
  11678. if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
  11679. 80048c6: 4b41 ldr r3, [pc, #260] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11680. 80048c8: 681b ldr r3, [r3, #0]
  11681. 80048ca: f003 0302 and.w r3, r3, #2
  11682. 80048ce: 2b00 cmp r3, #0
  11683. 80048d0: d005 beq.n 80048de <HAL_RCC_OscConfig+0x152>
  11684. 80048d2: 687b ldr r3, [r7, #4]
  11685. 80048d4: 68db ldr r3, [r3, #12]
  11686. 80048d6: 2b01 cmp r3, #1
  11687. 80048d8: d001 beq.n 80048de <HAL_RCC_OscConfig+0x152>
  11688. {
  11689. return HAL_ERROR;
  11690. 80048da: 2301 movs r3, #1
  11691. 80048dc: e1c7 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11692. }
  11693. /* Otherwise, just the calibration is allowed */
  11694. else
  11695. {
  11696. /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
  11697. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  11698. 80048de: 4b3b ldr r3, [pc, #236] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11699. 80048e0: 681b ldr r3, [r3, #0]
  11700. 80048e2: f023 02f8 bic.w r2, r3, #248 @ 0xf8
  11701. 80048e6: 687b ldr r3, [r7, #4]
  11702. 80048e8: 691b ldr r3, [r3, #16]
  11703. 80048ea: 00db lsls r3, r3, #3
  11704. 80048ec: 4937 ldr r1, [pc, #220] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11705. 80048ee: 4313 orrs r3, r2
  11706. 80048f0: 600b str r3, [r1, #0]
  11707. if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
  11708. 80048f2: e03a b.n 800496a <HAL_RCC_OscConfig+0x1de>
  11709. }
  11710. }
  11711. else
  11712. {
  11713. /* Check the HSI State */
  11714. if ((RCC_OscInitStruct->HSIState) != RCC_HSI_OFF)
  11715. 80048f4: 687b ldr r3, [r7, #4]
  11716. 80048f6: 68db ldr r3, [r3, #12]
  11717. 80048f8: 2b00 cmp r3, #0
  11718. 80048fa: d020 beq.n 800493e <HAL_RCC_OscConfig+0x1b2>
  11719. {
  11720. /* Enable the Internal High Speed oscillator (HSI). */
  11721. __HAL_RCC_HSI_ENABLE();
  11722. 80048fc: 4b34 ldr r3, [pc, #208] @ (80049d0 <HAL_RCC_OscConfig+0x244>)
  11723. 80048fe: 2201 movs r2, #1
  11724. 8004900: 601a str r2, [r3, #0]
  11725. /* Get Start Tick*/
  11726. tickstart = HAL_GetTick();
  11727. 8004902: f7fe fc21 bl 8003148 <HAL_GetTick>
  11728. 8004906: 6138 str r0, [r7, #16]
  11729. /* Wait till HSI is ready */
  11730. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
  11731. 8004908: e008 b.n 800491c <HAL_RCC_OscConfig+0x190>
  11732. {
  11733. if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
  11734. 800490a: f7fe fc1d bl 8003148 <HAL_GetTick>
  11735. 800490e: 4602 mov r2, r0
  11736. 8004910: 693b ldr r3, [r7, #16]
  11737. 8004912: 1ad3 subs r3, r2, r3
  11738. 8004914: 2b02 cmp r3, #2
  11739. 8004916: d901 bls.n 800491c <HAL_RCC_OscConfig+0x190>
  11740. {
  11741. return HAL_TIMEOUT;
  11742. 8004918: 2303 movs r3, #3
  11743. 800491a: e1a8 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11744. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
  11745. 800491c: 4b2b ldr r3, [pc, #172] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11746. 800491e: 681b ldr r3, [r3, #0]
  11747. 8004920: f003 0302 and.w r3, r3, #2
  11748. 8004924: 2b00 cmp r3, #0
  11749. 8004926: d0f0 beq.n 800490a <HAL_RCC_OscConfig+0x17e>
  11750. }
  11751. }
  11752. /* Adjusts the Internal High Speed oscillator (HSI) calibration value. */
  11753. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  11754. 8004928: 4b28 ldr r3, [pc, #160] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11755. 800492a: 681b ldr r3, [r3, #0]
  11756. 800492c: f023 02f8 bic.w r2, r3, #248 @ 0xf8
  11757. 8004930: 687b ldr r3, [r7, #4]
  11758. 8004932: 691b ldr r3, [r3, #16]
  11759. 8004934: 00db lsls r3, r3, #3
  11760. 8004936: 4925 ldr r1, [pc, #148] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11761. 8004938: 4313 orrs r3, r2
  11762. 800493a: 600b str r3, [r1, #0]
  11763. 800493c: e015 b.n 800496a <HAL_RCC_OscConfig+0x1de>
  11764. }
  11765. else
  11766. {
  11767. /* Disable the Internal High Speed oscillator (HSI). */
  11768. __HAL_RCC_HSI_DISABLE();
  11769. 800493e: 4b24 ldr r3, [pc, #144] @ (80049d0 <HAL_RCC_OscConfig+0x244>)
  11770. 8004940: 2200 movs r2, #0
  11771. 8004942: 601a str r2, [r3, #0]
  11772. /* Get Start Tick*/
  11773. tickstart = HAL_GetTick();
  11774. 8004944: f7fe fc00 bl 8003148 <HAL_GetTick>
  11775. 8004948: 6138 str r0, [r7, #16]
  11776. /* Wait till HSI is ready */
  11777. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
  11778. 800494a: e008 b.n 800495e <HAL_RCC_OscConfig+0x1d2>
  11779. {
  11780. if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE)
  11781. 800494c: f7fe fbfc bl 8003148 <HAL_GetTick>
  11782. 8004950: 4602 mov r2, r0
  11783. 8004952: 693b ldr r3, [r7, #16]
  11784. 8004954: 1ad3 subs r3, r2, r3
  11785. 8004956: 2b02 cmp r3, #2
  11786. 8004958: d901 bls.n 800495e <HAL_RCC_OscConfig+0x1d2>
  11787. {
  11788. return HAL_TIMEOUT;
  11789. 800495a: 2303 movs r3, #3
  11790. 800495c: e187 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11791. while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
  11792. 800495e: 4b1b ldr r3, [pc, #108] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11793. 8004960: 681b ldr r3, [r3, #0]
  11794. 8004962: f003 0302 and.w r3, r3, #2
  11795. 8004966: 2b00 cmp r3, #0
  11796. 8004968: d1f0 bne.n 800494c <HAL_RCC_OscConfig+0x1c0>
  11797. }
  11798. }
  11799. }
  11800. }
  11801. /*------------------------------ LSI Configuration -------------------------*/
  11802. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
  11803. 800496a: 687b ldr r3, [r7, #4]
  11804. 800496c: 681b ldr r3, [r3, #0]
  11805. 800496e: f003 0308 and.w r3, r3, #8
  11806. 8004972: 2b00 cmp r3, #0
  11807. 8004974: d036 beq.n 80049e4 <HAL_RCC_OscConfig+0x258>
  11808. {
  11809. /* Check the parameters */
  11810. assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
  11811. /* Check the LSI State */
  11812. if ((RCC_OscInitStruct->LSIState) != RCC_LSI_OFF)
  11813. 8004976: 687b ldr r3, [r7, #4]
  11814. 8004978: 695b ldr r3, [r3, #20]
  11815. 800497a: 2b00 cmp r3, #0
  11816. 800497c: d016 beq.n 80049ac <HAL_RCC_OscConfig+0x220>
  11817. {
  11818. /* Enable the Internal Low Speed oscillator (LSI). */
  11819. __HAL_RCC_LSI_ENABLE();
  11820. 800497e: 4b15 ldr r3, [pc, #84] @ (80049d4 <HAL_RCC_OscConfig+0x248>)
  11821. 8004980: 2201 movs r2, #1
  11822. 8004982: 601a str r2, [r3, #0]
  11823. /* Get Start Tick*/
  11824. tickstart = HAL_GetTick();
  11825. 8004984: f7fe fbe0 bl 8003148 <HAL_GetTick>
  11826. 8004988: 6138 str r0, [r7, #16]
  11827. /* Wait till LSI is ready */
  11828. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
  11829. 800498a: e008 b.n 800499e <HAL_RCC_OscConfig+0x212>
  11830. {
  11831. if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
  11832. 800498c: f7fe fbdc bl 8003148 <HAL_GetTick>
  11833. 8004990: 4602 mov r2, r0
  11834. 8004992: 693b ldr r3, [r7, #16]
  11835. 8004994: 1ad3 subs r3, r2, r3
  11836. 8004996: 2b02 cmp r3, #2
  11837. 8004998: d901 bls.n 800499e <HAL_RCC_OscConfig+0x212>
  11838. {
  11839. return HAL_TIMEOUT;
  11840. 800499a: 2303 movs r3, #3
  11841. 800499c: e167 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11842. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET)
  11843. 800499e: 4b0b ldr r3, [pc, #44] @ (80049cc <HAL_RCC_OscConfig+0x240>)
  11844. 80049a0: 6f5b ldr r3, [r3, #116] @ 0x74
  11845. 80049a2: f003 0302 and.w r3, r3, #2
  11846. 80049a6: 2b00 cmp r3, #0
  11847. 80049a8: d0f0 beq.n 800498c <HAL_RCC_OscConfig+0x200>
  11848. 80049aa: e01b b.n 80049e4 <HAL_RCC_OscConfig+0x258>
  11849. }
  11850. }
  11851. else
  11852. {
  11853. /* Disable the Internal Low Speed oscillator (LSI). */
  11854. __HAL_RCC_LSI_DISABLE();
  11855. 80049ac: 4b09 ldr r3, [pc, #36] @ (80049d4 <HAL_RCC_OscConfig+0x248>)
  11856. 80049ae: 2200 movs r2, #0
  11857. 80049b0: 601a str r2, [r3, #0]
  11858. /* Get Start Tick */
  11859. tickstart = HAL_GetTick();
  11860. 80049b2: f7fe fbc9 bl 8003148 <HAL_GetTick>
  11861. 80049b6: 6138 str r0, [r7, #16]
  11862. /* Wait till LSI is ready */
  11863. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
  11864. 80049b8: e00e b.n 80049d8 <HAL_RCC_OscConfig+0x24c>
  11865. {
  11866. if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE)
  11867. 80049ba: f7fe fbc5 bl 8003148 <HAL_GetTick>
  11868. 80049be: 4602 mov r2, r0
  11869. 80049c0: 693b ldr r3, [r7, #16]
  11870. 80049c2: 1ad3 subs r3, r2, r3
  11871. 80049c4: 2b02 cmp r3, #2
  11872. 80049c6: d907 bls.n 80049d8 <HAL_RCC_OscConfig+0x24c>
  11873. {
  11874. return HAL_TIMEOUT;
  11875. 80049c8: 2303 movs r3, #3
  11876. 80049ca: e150 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11877. 80049cc: 40023800 .word 0x40023800
  11878. 80049d0: 42470000 .word 0x42470000
  11879. 80049d4: 42470e80 .word 0x42470e80
  11880. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET)
  11881. 80049d8: 4b88 ldr r3, [pc, #544] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11882. 80049da: 6f5b ldr r3, [r3, #116] @ 0x74
  11883. 80049dc: f003 0302 and.w r3, r3, #2
  11884. 80049e0: 2b00 cmp r3, #0
  11885. 80049e2: d1ea bne.n 80049ba <HAL_RCC_OscConfig+0x22e>
  11886. }
  11887. }
  11888. }
  11889. }
  11890. /*------------------------------ LSE Configuration -------------------------*/
  11891. if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
  11892. 80049e4: 687b ldr r3, [r7, #4]
  11893. 80049e6: 681b ldr r3, [r3, #0]
  11894. 80049e8: f003 0304 and.w r3, r3, #4
  11895. 80049ec: 2b00 cmp r3, #0
  11896. 80049ee: f000 8097 beq.w 8004b20 <HAL_RCC_OscConfig+0x394>
  11897. {
  11898. FlagStatus pwrclkchanged = RESET;
  11899. 80049f2: 2300 movs r3, #0
  11900. 80049f4: 75fb strb r3, [r7, #23]
  11901. /* Check the parameters */
  11902. assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
  11903. /* Update LSE configuration in Backup Domain control register */
  11904. /* Requires to enable write access to Backup Domain of necessary */
  11905. if (__HAL_RCC_PWR_IS_CLK_DISABLED())
  11906. 80049f6: 4b81 ldr r3, [pc, #516] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11907. 80049f8: 6c1b ldr r3, [r3, #64] @ 0x40
  11908. 80049fa: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
  11909. 80049fe: 2b00 cmp r3, #0
  11910. 8004a00: d10f bne.n 8004a22 <HAL_RCC_OscConfig+0x296>
  11911. {
  11912. __HAL_RCC_PWR_CLK_ENABLE();
  11913. 8004a02: 2300 movs r3, #0
  11914. 8004a04: 60bb str r3, [r7, #8]
  11915. 8004a06: 4b7d ldr r3, [pc, #500] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11916. 8004a08: 6c1b ldr r3, [r3, #64] @ 0x40
  11917. 8004a0a: 4a7c ldr r2, [pc, #496] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11918. 8004a0c: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
  11919. 8004a10: 6413 str r3, [r2, #64] @ 0x40
  11920. 8004a12: 4b7a ldr r3, [pc, #488] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11921. 8004a14: 6c1b ldr r3, [r3, #64] @ 0x40
  11922. 8004a16: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
  11923. 8004a1a: 60bb str r3, [r7, #8]
  11924. 8004a1c: 68bb ldr r3, [r7, #8]
  11925. pwrclkchanged = SET;
  11926. 8004a1e: 2301 movs r3, #1
  11927. 8004a20: 75fb strb r3, [r7, #23]
  11928. }
  11929. if (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
  11930. 8004a22: 4b77 ldr r3, [pc, #476] @ (8004c00 <HAL_RCC_OscConfig+0x474>)
  11931. 8004a24: 681b ldr r3, [r3, #0]
  11932. 8004a26: f403 7380 and.w r3, r3, #256 @ 0x100
  11933. 8004a2a: 2b00 cmp r3, #0
  11934. 8004a2c: d118 bne.n 8004a60 <HAL_RCC_OscConfig+0x2d4>
  11935. {
  11936. /* Enable write access to Backup domain */
  11937. SET_BIT(PWR->CR, PWR_CR_DBP);
  11938. 8004a2e: 4b74 ldr r3, [pc, #464] @ (8004c00 <HAL_RCC_OscConfig+0x474>)
  11939. 8004a30: 681b ldr r3, [r3, #0]
  11940. 8004a32: 4a73 ldr r2, [pc, #460] @ (8004c00 <HAL_RCC_OscConfig+0x474>)
  11941. 8004a34: f443 7380 orr.w r3, r3, #256 @ 0x100
  11942. 8004a38: 6013 str r3, [r2, #0]
  11943. /* Wait for Backup domain Write protection disable */
  11944. tickstart = HAL_GetTick();
  11945. 8004a3a: f7fe fb85 bl 8003148 <HAL_GetTick>
  11946. 8004a3e: 6138 str r0, [r7, #16]
  11947. while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
  11948. 8004a40: e008 b.n 8004a54 <HAL_RCC_OscConfig+0x2c8>
  11949. {
  11950. if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
  11951. 8004a42: f7fe fb81 bl 8003148 <HAL_GetTick>
  11952. 8004a46: 4602 mov r2, r0
  11953. 8004a48: 693b ldr r3, [r7, #16]
  11954. 8004a4a: 1ad3 subs r3, r2, r3
  11955. 8004a4c: 2b02 cmp r3, #2
  11956. 8004a4e: d901 bls.n 8004a54 <HAL_RCC_OscConfig+0x2c8>
  11957. {
  11958. return HAL_TIMEOUT;
  11959. 8004a50: 2303 movs r3, #3
  11960. 8004a52: e10c b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  11961. while (HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
  11962. 8004a54: 4b6a ldr r3, [pc, #424] @ (8004c00 <HAL_RCC_OscConfig+0x474>)
  11963. 8004a56: 681b ldr r3, [r3, #0]
  11964. 8004a58: f403 7380 and.w r3, r3, #256 @ 0x100
  11965. 8004a5c: 2b00 cmp r3, #0
  11966. 8004a5e: d0f0 beq.n 8004a42 <HAL_RCC_OscConfig+0x2b6>
  11967. }
  11968. }
  11969. }
  11970. /* Set the new LSE configuration -----------------------------------------*/
  11971. __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
  11972. 8004a60: 687b ldr r3, [r7, #4]
  11973. 8004a62: 689b ldr r3, [r3, #8]
  11974. 8004a64: 2b01 cmp r3, #1
  11975. 8004a66: d106 bne.n 8004a76 <HAL_RCC_OscConfig+0x2ea>
  11976. 8004a68: 4b64 ldr r3, [pc, #400] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11977. 8004a6a: 6f1b ldr r3, [r3, #112] @ 0x70
  11978. 8004a6c: 4a63 ldr r2, [pc, #396] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11979. 8004a6e: f043 0301 orr.w r3, r3, #1
  11980. 8004a72: 6713 str r3, [r2, #112] @ 0x70
  11981. 8004a74: e01c b.n 8004ab0 <HAL_RCC_OscConfig+0x324>
  11982. 8004a76: 687b ldr r3, [r7, #4]
  11983. 8004a78: 689b ldr r3, [r3, #8]
  11984. 8004a7a: 2b05 cmp r3, #5
  11985. 8004a7c: d10c bne.n 8004a98 <HAL_RCC_OscConfig+0x30c>
  11986. 8004a7e: 4b5f ldr r3, [pc, #380] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11987. 8004a80: 6f1b ldr r3, [r3, #112] @ 0x70
  11988. 8004a82: 4a5e ldr r2, [pc, #376] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11989. 8004a84: f043 0304 orr.w r3, r3, #4
  11990. 8004a88: 6713 str r3, [r2, #112] @ 0x70
  11991. 8004a8a: 4b5c ldr r3, [pc, #368] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11992. 8004a8c: 6f1b ldr r3, [r3, #112] @ 0x70
  11993. 8004a8e: 4a5b ldr r2, [pc, #364] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11994. 8004a90: f043 0301 orr.w r3, r3, #1
  11995. 8004a94: 6713 str r3, [r2, #112] @ 0x70
  11996. 8004a96: e00b b.n 8004ab0 <HAL_RCC_OscConfig+0x324>
  11997. 8004a98: 4b58 ldr r3, [pc, #352] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  11998. 8004a9a: 6f1b ldr r3, [r3, #112] @ 0x70
  11999. 8004a9c: 4a57 ldr r2, [pc, #348] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12000. 8004a9e: f023 0301 bic.w r3, r3, #1
  12001. 8004aa2: 6713 str r3, [r2, #112] @ 0x70
  12002. 8004aa4: 4b55 ldr r3, [pc, #340] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12003. 8004aa6: 6f1b ldr r3, [r3, #112] @ 0x70
  12004. 8004aa8: 4a54 ldr r2, [pc, #336] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12005. 8004aaa: f023 0304 bic.w r3, r3, #4
  12006. 8004aae: 6713 str r3, [r2, #112] @ 0x70
  12007. /* Check the LSE State */
  12008. if ((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
  12009. 8004ab0: 687b ldr r3, [r7, #4]
  12010. 8004ab2: 689b ldr r3, [r3, #8]
  12011. 8004ab4: 2b00 cmp r3, #0
  12012. 8004ab6: d015 beq.n 8004ae4 <HAL_RCC_OscConfig+0x358>
  12013. {
  12014. /* Get Start Tick*/
  12015. tickstart = HAL_GetTick();
  12016. 8004ab8: f7fe fb46 bl 8003148 <HAL_GetTick>
  12017. 8004abc: 6138 str r0, [r7, #16]
  12018. /* Wait till LSE is ready */
  12019. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
  12020. 8004abe: e00a b.n 8004ad6 <HAL_RCC_OscConfig+0x34a>
  12021. {
  12022. if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
  12023. 8004ac0: f7fe fb42 bl 8003148 <HAL_GetTick>
  12024. 8004ac4: 4602 mov r2, r0
  12025. 8004ac6: 693b ldr r3, [r7, #16]
  12026. 8004ac8: 1ad3 subs r3, r2, r3
  12027. 8004aca: f241 3288 movw r2, #5000 @ 0x1388
  12028. 8004ace: 4293 cmp r3, r2
  12029. 8004ad0: d901 bls.n 8004ad6 <HAL_RCC_OscConfig+0x34a>
  12030. {
  12031. return HAL_TIMEOUT;
  12032. 8004ad2: 2303 movs r3, #3
  12033. 8004ad4: e0cb b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  12034. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
  12035. 8004ad6: 4b49 ldr r3, [pc, #292] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12036. 8004ad8: 6f1b ldr r3, [r3, #112] @ 0x70
  12037. 8004ada: f003 0302 and.w r3, r3, #2
  12038. 8004ade: 2b00 cmp r3, #0
  12039. 8004ae0: d0ee beq.n 8004ac0 <HAL_RCC_OscConfig+0x334>
  12040. 8004ae2: e014 b.n 8004b0e <HAL_RCC_OscConfig+0x382>
  12041. }
  12042. }
  12043. else
  12044. {
  12045. /* Get Start Tick */
  12046. tickstart = HAL_GetTick();
  12047. 8004ae4: f7fe fb30 bl 8003148 <HAL_GetTick>
  12048. 8004ae8: 6138 str r0, [r7, #16]
  12049. /* Wait till LSE is ready */
  12050. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
  12051. 8004aea: e00a b.n 8004b02 <HAL_RCC_OscConfig+0x376>
  12052. {
  12053. if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE)
  12054. 8004aec: f7fe fb2c bl 8003148 <HAL_GetTick>
  12055. 8004af0: 4602 mov r2, r0
  12056. 8004af2: 693b ldr r3, [r7, #16]
  12057. 8004af4: 1ad3 subs r3, r2, r3
  12058. 8004af6: f241 3288 movw r2, #5000 @ 0x1388
  12059. 8004afa: 4293 cmp r3, r2
  12060. 8004afc: d901 bls.n 8004b02 <HAL_RCC_OscConfig+0x376>
  12061. {
  12062. return HAL_TIMEOUT;
  12063. 8004afe: 2303 movs r3, #3
  12064. 8004b00: e0b5 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  12065. while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET)
  12066. 8004b02: 4b3e ldr r3, [pc, #248] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12067. 8004b04: 6f1b ldr r3, [r3, #112] @ 0x70
  12068. 8004b06: f003 0302 and.w r3, r3, #2
  12069. 8004b0a: 2b00 cmp r3, #0
  12070. 8004b0c: d1ee bne.n 8004aec <HAL_RCC_OscConfig+0x360>
  12071. }
  12072. }
  12073. }
  12074. /* Restore clock configuration if changed */
  12075. if (pwrclkchanged == SET)
  12076. 8004b0e: 7dfb ldrb r3, [r7, #23]
  12077. 8004b10: 2b01 cmp r3, #1
  12078. 8004b12: d105 bne.n 8004b20 <HAL_RCC_OscConfig+0x394>
  12079. {
  12080. __HAL_RCC_PWR_CLK_DISABLE();
  12081. 8004b14: 4b39 ldr r3, [pc, #228] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12082. 8004b16: 6c1b ldr r3, [r3, #64] @ 0x40
  12083. 8004b18: 4a38 ldr r2, [pc, #224] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12084. 8004b1a: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000
  12085. 8004b1e: 6413 str r3, [r2, #64] @ 0x40
  12086. }
  12087. }
  12088. /*-------------------------------- PLL Configuration -----------------------*/
  12089. /* Check the parameters */
  12090. assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
  12091. if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
  12092. 8004b20: 687b ldr r3, [r7, #4]
  12093. 8004b22: 699b ldr r3, [r3, #24]
  12094. 8004b24: 2b00 cmp r3, #0
  12095. 8004b26: f000 80a1 beq.w 8004c6c <HAL_RCC_OscConfig+0x4e0>
  12096. {
  12097. /* Check if the PLL is used as system clock or not */
  12098. if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL)
  12099. 8004b2a: 4b34 ldr r3, [pc, #208] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12100. 8004b2c: 689b ldr r3, [r3, #8]
  12101. 8004b2e: f003 030c and.w r3, r3, #12
  12102. 8004b32: 2b08 cmp r3, #8
  12103. 8004b34: d05c beq.n 8004bf0 <HAL_RCC_OscConfig+0x464>
  12104. {
  12105. if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
  12106. 8004b36: 687b ldr r3, [r7, #4]
  12107. 8004b38: 699b ldr r3, [r3, #24]
  12108. 8004b3a: 2b02 cmp r3, #2
  12109. 8004b3c: d141 bne.n 8004bc2 <HAL_RCC_OscConfig+0x436>
  12110. assert_param(IS_RCC_PLLN_VALUE(RCC_OscInitStruct->PLL.PLLN));
  12111. assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP));
  12112. assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ));
  12113. /* Disable the main PLL. */
  12114. __HAL_RCC_PLL_DISABLE();
  12115. 8004b3e: 4b31 ldr r3, [pc, #196] @ (8004c04 <HAL_RCC_OscConfig+0x478>)
  12116. 8004b40: 2200 movs r2, #0
  12117. 8004b42: 601a str r2, [r3, #0]
  12118. /* Get Start Tick */
  12119. tickstart = HAL_GetTick();
  12120. 8004b44: f7fe fb00 bl 8003148 <HAL_GetTick>
  12121. 8004b48: 6138 str r0, [r7, #16]
  12122. /* Wait till PLL is disabled */
  12123. while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  12124. 8004b4a: e008 b.n 8004b5e <HAL_RCC_OscConfig+0x3d2>
  12125. {
  12126. if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
  12127. 8004b4c: f7fe fafc bl 8003148 <HAL_GetTick>
  12128. 8004b50: 4602 mov r2, r0
  12129. 8004b52: 693b ldr r3, [r7, #16]
  12130. 8004b54: 1ad3 subs r3, r2, r3
  12131. 8004b56: 2b02 cmp r3, #2
  12132. 8004b58: d901 bls.n 8004b5e <HAL_RCC_OscConfig+0x3d2>
  12133. {
  12134. return HAL_TIMEOUT;
  12135. 8004b5a: 2303 movs r3, #3
  12136. 8004b5c: e087 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  12137. while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  12138. 8004b5e: 4b27 ldr r3, [pc, #156] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12139. 8004b60: 681b ldr r3, [r3, #0]
  12140. 8004b62: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
  12141. 8004b66: 2b00 cmp r3, #0
  12142. 8004b68: d1f0 bne.n 8004b4c <HAL_RCC_OscConfig+0x3c0>
  12143. }
  12144. }
  12145. /* Configure the main PLL clock source, multiplication and division factors. */
  12146. WRITE_REG(RCC->PLLCFGR, (RCC_OscInitStruct->PLL.PLLSource | \
  12147. 8004b6a: 687b ldr r3, [r7, #4]
  12148. 8004b6c: 69da ldr r2, [r3, #28]
  12149. 8004b6e: 687b ldr r3, [r7, #4]
  12150. 8004b70: 6a1b ldr r3, [r3, #32]
  12151. 8004b72: 431a orrs r2, r3
  12152. 8004b74: 687b ldr r3, [r7, #4]
  12153. 8004b76: 6a5b ldr r3, [r3, #36] @ 0x24
  12154. 8004b78: 019b lsls r3, r3, #6
  12155. 8004b7a: 431a orrs r2, r3
  12156. 8004b7c: 687b ldr r3, [r7, #4]
  12157. 8004b7e: 6a9b ldr r3, [r3, #40] @ 0x28
  12158. 8004b80: 085b lsrs r3, r3, #1
  12159. 8004b82: 3b01 subs r3, #1
  12160. 8004b84: 041b lsls r3, r3, #16
  12161. 8004b86: 431a orrs r2, r3
  12162. 8004b88: 687b ldr r3, [r7, #4]
  12163. 8004b8a: 6adb ldr r3, [r3, #44] @ 0x2c
  12164. 8004b8c: 061b lsls r3, r3, #24
  12165. 8004b8e: 491b ldr r1, [pc, #108] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12166. 8004b90: 4313 orrs r3, r2
  12167. 8004b92: 604b str r3, [r1, #4]
  12168. RCC_OscInitStruct->PLL.PLLM | \
  12169. (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos) | \
  12170. (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos) | \
  12171. (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)));
  12172. /* Enable the main PLL. */
  12173. __HAL_RCC_PLL_ENABLE();
  12174. 8004b94: 4b1b ldr r3, [pc, #108] @ (8004c04 <HAL_RCC_OscConfig+0x478>)
  12175. 8004b96: 2201 movs r2, #1
  12176. 8004b98: 601a str r2, [r3, #0]
  12177. /* Get Start Tick */
  12178. tickstart = HAL_GetTick();
  12179. 8004b9a: f7fe fad5 bl 8003148 <HAL_GetTick>
  12180. 8004b9e: 6138 str r0, [r7, #16]
  12181. /* Wait till PLL is ready */
  12182. while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
  12183. 8004ba0: e008 b.n 8004bb4 <HAL_RCC_OscConfig+0x428>
  12184. {
  12185. if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
  12186. 8004ba2: f7fe fad1 bl 8003148 <HAL_GetTick>
  12187. 8004ba6: 4602 mov r2, r0
  12188. 8004ba8: 693b ldr r3, [r7, #16]
  12189. 8004baa: 1ad3 subs r3, r2, r3
  12190. 8004bac: 2b02 cmp r3, #2
  12191. 8004bae: d901 bls.n 8004bb4 <HAL_RCC_OscConfig+0x428>
  12192. {
  12193. return HAL_TIMEOUT;
  12194. 8004bb0: 2303 movs r3, #3
  12195. 8004bb2: e05c b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  12196. while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
  12197. 8004bb4: 4b11 ldr r3, [pc, #68] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12198. 8004bb6: 681b ldr r3, [r3, #0]
  12199. 8004bb8: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
  12200. 8004bbc: 2b00 cmp r3, #0
  12201. 8004bbe: d0f0 beq.n 8004ba2 <HAL_RCC_OscConfig+0x416>
  12202. 8004bc0: e054 b.n 8004c6c <HAL_RCC_OscConfig+0x4e0>
  12203. }
  12204. }
  12205. else
  12206. {
  12207. /* Disable the main PLL. */
  12208. __HAL_RCC_PLL_DISABLE();
  12209. 8004bc2: 4b10 ldr r3, [pc, #64] @ (8004c04 <HAL_RCC_OscConfig+0x478>)
  12210. 8004bc4: 2200 movs r2, #0
  12211. 8004bc6: 601a str r2, [r3, #0]
  12212. /* Get Start Tick */
  12213. tickstart = HAL_GetTick();
  12214. 8004bc8: f7fe fabe bl 8003148 <HAL_GetTick>
  12215. 8004bcc: 6138 str r0, [r7, #16]
  12216. /* Wait till PLL is disabled */
  12217. while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  12218. 8004bce: e008 b.n 8004be2 <HAL_RCC_OscConfig+0x456>
  12219. {
  12220. if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
  12221. 8004bd0: f7fe faba bl 8003148 <HAL_GetTick>
  12222. 8004bd4: 4602 mov r2, r0
  12223. 8004bd6: 693b ldr r3, [r7, #16]
  12224. 8004bd8: 1ad3 subs r3, r2, r3
  12225. 8004bda: 2b02 cmp r3, #2
  12226. 8004bdc: d901 bls.n 8004be2 <HAL_RCC_OscConfig+0x456>
  12227. {
  12228. return HAL_TIMEOUT;
  12229. 8004bde: 2303 movs r3, #3
  12230. 8004be0: e045 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  12231. while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
  12232. 8004be2: 4b06 ldr r3, [pc, #24] @ (8004bfc <HAL_RCC_OscConfig+0x470>)
  12233. 8004be4: 681b ldr r3, [r3, #0]
  12234. 8004be6: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
  12235. 8004bea: 2b00 cmp r3, #0
  12236. 8004bec: d1f0 bne.n 8004bd0 <HAL_RCC_OscConfig+0x444>
  12237. 8004bee: e03d b.n 8004c6c <HAL_RCC_OscConfig+0x4e0>
  12238. }
  12239. }
  12240. else
  12241. {
  12242. /* Check if there is a request to disable the PLL used as System clock source */
  12243. if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
  12244. 8004bf0: 687b ldr r3, [r7, #4]
  12245. 8004bf2: 699b ldr r3, [r3, #24]
  12246. 8004bf4: 2b01 cmp r3, #1
  12247. 8004bf6: d107 bne.n 8004c08 <HAL_RCC_OscConfig+0x47c>
  12248. {
  12249. return HAL_ERROR;
  12250. 8004bf8: 2301 movs r3, #1
  12251. 8004bfa: e038 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  12252. 8004bfc: 40023800 .word 0x40023800
  12253. 8004c00: 40007000 .word 0x40007000
  12254. 8004c04: 42470060 .word 0x42470060
  12255. }
  12256. else
  12257. {
  12258. /* Do not return HAL_ERROR if request repeats the current configuration */
  12259. pll_config = RCC->PLLCFGR;
  12260. 8004c08: 4b1b ldr r3, [pc, #108] @ (8004c78 <HAL_RCC_OscConfig+0x4ec>)
  12261. 8004c0a: 685b ldr r3, [r3, #4]
  12262. 8004c0c: 60fb str r3, [r7, #12]
  12263. (READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
  12264. (READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
  12265. (READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)) ||
  12266. (READ_BIT(pll_config, RCC_PLLCFGR_PLLR) != (RCC_OscInitStruct->PLL.PLLR << RCC_PLLCFGR_PLLR_Pos)))
  12267. #else
  12268. if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
  12269. 8004c0e: 687b ldr r3, [r7, #4]
  12270. 8004c10: 699b ldr r3, [r3, #24]
  12271. 8004c12: 2b01 cmp r3, #1
  12272. 8004c14: d028 beq.n 8004c68 <HAL_RCC_OscConfig+0x4dc>
  12273. (READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  12274. 8004c16: 68fb ldr r3, [r7, #12]
  12275. 8004c18: f403 0280 and.w r2, r3, #4194304 @ 0x400000
  12276. 8004c1c: 687b ldr r3, [r7, #4]
  12277. 8004c1e: 69db ldr r3, [r3, #28]
  12278. if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
  12279. 8004c20: 429a cmp r2, r3
  12280. 8004c22: d121 bne.n 8004c68 <HAL_RCC_OscConfig+0x4dc>
  12281. (READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
  12282. 8004c24: 68fb ldr r3, [r7, #12]
  12283. 8004c26: f003 023f and.w r2, r3, #63 @ 0x3f
  12284. 8004c2a: 687b ldr r3, [r7, #4]
  12285. 8004c2c: 6a1b ldr r3, [r3, #32]
  12286. (READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  12287. 8004c2e: 429a cmp r2, r3
  12288. 8004c30: d11a bne.n 8004c68 <HAL_RCC_OscConfig+0x4dc>
  12289. (READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
  12290. 8004c32: 68fa ldr r2, [r7, #12]
  12291. 8004c34: f647 73c0 movw r3, #32704 @ 0x7fc0
  12292. 8004c38: 4013 ands r3, r2
  12293. 8004c3a: 687a ldr r2, [r7, #4]
  12294. 8004c3c: 6a52 ldr r2, [r2, #36] @ 0x24
  12295. 8004c3e: 0192 lsls r2, r2, #6
  12296. (READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) ||
  12297. 8004c40: 4293 cmp r3, r2
  12298. 8004c42: d111 bne.n 8004c68 <HAL_RCC_OscConfig+0x4dc>
  12299. (READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
  12300. 8004c44: 68fb ldr r3, [r7, #12]
  12301. 8004c46: f403 3240 and.w r2, r3, #196608 @ 0x30000
  12302. 8004c4a: 687b ldr r3, [r7, #4]
  12303. 8004c4c: 6a9b ldr r3, [r3, #40] @ 0x28
  12304. 8004c4e: 085b lsrs r3, r3, #1
  12305. 8004c50: 3b01 subs r3, #1
  12306. 8004c52: 041b lsls r3, r3, #16
  12307. (READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
  12308. 8004c54: 429a cmp r2, r3
  12309. 8004c56: d107 bne.n 8004c68 <HAL_RCC_OscConfig+0x4dc>
  12310. (READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
  12311. 8004c58: 68fb ldr r3, [r7, #12]
  12312. 8004c5a: f003 6270 and.w r2, r3, #251658240 @ 0xf000000
  12313. 8004c5e: 687b ldr r3, [r7, #4]
  12314. 8004c60: 6adb ldr r3, [r3, #44] @ 0x2c
  12315. 8004c62: 061b lsls r3, r3, #24
  12316. (READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
  12317. 8004c64: 429a cmp r2, r3
  12318. 8004c66: d001 beq.n 8004c6c <HAL_RCC_OscConfig+0x4e0>
  12319. #endif /* RCC_PLLCFGR_PLLR */
  12320. {
  12321. return HAL_ERROR;
  12322. 8004c68: 2301 movs r3, #1
  12323. 8004c6a: e000 b.n 8004c6e <HAL_RCC_OscConfig+0x4e2>
  12324. }
  12325. }
  12326. }
  12327. }
  12328. return HAL_OK;
  12329. 8004c6c: 2300 movs r3, #0
  12330. }
  12331. 8004c6e: 4618 mov r0, r3
  12332. 8004c70: 3718 adds r7, #24
  12333. 8004c72: 46bd mov sp, r7
  12334. 8004c74: bd80 pop {r7, pc}
  12335. 8004c76: bf00 nop
  12336. 8004c78: 40023800 .word 0x40023800
  12337. 08004c7c <HAL_RCC_ClockConfig>:
  12338. * HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
  12339. * (for more details refer to section above "Initialization/de-initialization functions")
  12340. * @retval None
  12341. */
  12342. HAL_StatusTypeDef HAL_RCC_ClockConfig(const RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
  12343. {
  12344. 8004c7c: b580 push {r7, lr}
  12345. 8004c7e: b084 sub sp, #16
  12346. 8004c80: af00 add r7, sp, #0
  12347. 8004c82: 6078 str r0, [r7, #4]
  12348. 8004c84: 6039 str r1, [r7, #0]
  12349. uint32_t tickstart;
  12350. /* Check Null pointer */
  12351. if (RCC_ClkInitStruct == NULL)
  12352. 8004c86: 687b ldr r3, [r7, #4]
  12353. 8004c88: 2b00 cmp r3, #0
  12354. 8004c8a: d101 bne.n 8004c90 <HAL_RCC_ClockConfig+0x14>
  12355. {
  12356. return HAL_ERROR;
  12357. 8004c8c: 2301 movs r3, #1
  12358. 8004c8e: e0cc b.n 8004e2a <HAL_RCC_ClockConfig+0x1ae>
  12359. /* To correctly read data from FLASH memory, the number of wait states (LATENCY)
  12360. must be correctly programmed according to the frequency of the CPU clock
  12361. (HCLK) and the supply voltage of the device. */
  12362. /* Increasing the number of wait states because of higher CPU frequency */
  12363. if (FLatency > __HAL_FLASH_GET_LATENCY())
  12364. 8004c90: 4b68 ldr r3, [pc, #416] @ (8004e34 <HAL_RCC_ClockConfig+0x1b8>)
  12365. 8004c92: 681b ldr r3, [r3, #0]
  12366. 8004c94: f003 0307 and.w r3, r3, #7
  12367. 8004c98: 683a ldr r2, [r7, #0]
  12368. 8004c9a: 429a cmp r2, r3
  12369. 8004c9c: d90c bls.n 8004cb8 <HAL_RCC_ClockConfig+0x3c>
  12370. {
  12371. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  12372. __HAL_FLASH_SET_LATENCY(FLatency);
  12373. 8004c9e: 4b65 ldr r3, [pc, #404] @ (8004e34 <HAL_RCC_ClockConfig+0x1b8>)
  12374. 8004ca0: 683a ldr r2, [r7, #0]
  12375. 8004ca2: b2d2 uxtb r2, r2
  12376. 8004ca4: 701a strb r2, [r3, #0]
  12377. /* Check that the new number of wait states is taken into account to access the Flash
  12378. memory by reading the FLASH_ACR register */
  12379. if (__HAL_FLASH_GET_LATENCY() != FLatency)
  12380. 8004ca6: 4b63 ldr r3, [pc, #396] @ (8004e34 <HAL_RCC_ClockConfig+0x1b8>)
  12381. 8004ca8: 681b ldr r3, [r3, #0]
  12382. 8004caa: f003 0307 and.w r3, r3, #7
  12383. 8004cae: 683a ldr r2, [r7, #0]
  12384. 8004cb0: 429a cmp r2, r3
  12385. 8004cb2: d001 beq.n 8004cb8 <HAL_RCC_ClockConfig+0x3c>
  12386. {
  12387. return HAL_ERROR;
  12388. 8004cb4: 2301 movs r3, #1
  12389. 8004cb6: e0b8 b.n 8004e2a <HAL_RCC_ClockConfig+0x1ae>
  12390. }
  12391. }
  12392. /*-------------------------- HCLK Configuration --------------------------*/
  12393. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
  12394. 8004cb8: 687b ldr r3, [r7, #4]
  12395. 8004cba: 681b ldr r3, [r3, #0]
  12396. 8004cbc: f003 0302 and.w r3, r3, #2
  12397. 8004cc0: 2b00 cmp r3, #0
  12398. 8004cc2: d020 beq.n 8004d06 <HAL_RCC_ClockConfig+0x8a>
  12399. {
  12400. /* Set the highest APBx dividers in order to ensure that we do not go through
  12401. a non-spec phase whatever we decrease or increase HCLK. */
  12402. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  12403. 8004cc4: 687b ldr r3, [r7, #4]
  12404. 8004cc6: 681b ldr r3, [r3, #0]
  12405. 8004cc8: f003 0304 and.w r3, r3, #4
  12406. 8004ccc: 2b00 cmp r3, #0
  12407. 8004cce: d005 beq.n 8004cdc <HAL_RCC_ClockConfig+0x60>
  12408. {
  12409. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16);
  12410. 8004cd0: 4b59 ldr r3, [pc, #356] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12411. 8004cd2: 689b ldr r3, [r3, #8]
  12412. 8004cd4: 4a58 ldr r2, [pc, #352] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12413. 8004cd6: f443 53e0 orr.w r3, r3, #7168 @ 0x1c00
  12414. 8004cda: 6093 str r3, [r2, #8]
  12415. }
  12416. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
  12417. 8004cdc: 687b ldr r3, [r7, #4]
  12418. 8004cde: 681b ldr r3, [r3, #0]
  12419. 8004ce0: f003 0308 and.w r3, r3, #8
  12420. 8004ce4: 2b00 cmp r3, #0
  12421. 8004ce6: d005 beq.n 8004cf4 <HAL_RCC_ClockConfig+0x78>
  12422. {
  12423. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3));
  12424. 8004ce8: 4b53 ldr r3, [pc, #332] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12425. 8004cea: 689b ldr r3, [r3, #8]
  12426. 8004cec: 4a52 ldr r2, [pc, #328] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12427. 8004cee: f443 4360 orr.w r3, r3, #57344 @ 0xe000
  12428. 8004cf2: 6093 str r3, [r2, #8]
  12429. }
  12430. assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
  12431. MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
  12432. 8004cf4: 4b50 ldr r3, [pc, #320] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12433. 8004cf6: 689b ldr r3, [r3, #8]
  12434. 8004cf8: f023 02f0 bic.w r2, r3, #240 @ 0xf0
  12435. 8004cfc: 687b ldr r3, [r7, #4]
  12436. 8004cfe: 689b ldr r3, [r3, #8]
  12437. 8004d00: 494d ldr r1, [pc, #308] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12438. 8004d02: 4313 orrs r3, r2
  12439. 8004d04: 608b str r3, [r1, #8]
  12440. }
  12441. /*------------------------- SYSCLK Configuration ---------------------------*/
  12442. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
  12443. 8004d06: 687b ldr r3, [r7, #4]
  12444. 8004d08: 681b ldr r3, [r3, #0]
  12445. 8004d0a: f003 0301 and.w r3, r3, #1
  12446. 8004d0e: 2b00 cmp r3, #0
  12447. 8004d10: d044 beq.n 8004d9c <HAL_RCC_ClockConfig+0x120>
  12448. {
  12449. assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
  12450. /* HSE is selected as System Clock Source */
  12451. if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
  12452. 8004d12: 687b ldr r3, [r7, #4]
  12453. 8004d14: 685b ldr r3, [r3, #4]
  12454. 8004d16: 2b01 cmp r3, #1
  12455. 8004d18: d107 bne.n 8004d2a <HAL_RCC_ClockConfig+0xae>
  12456. {
  12457. /* Check the HSE ready flag */
  12458. if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
  12459. 8004d1a: 4b47 ldr r3, [pc, #284] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12460. 8004d1c: 681b ldr r3, [r3, #0]
  12461. 8004d1e: f403 3300 and.w r3, r3, #131072 @ 0x20000
  12462. 8004d22: 2b00 cmp r3, #0
  12463. 8004d24: d119 bne.n 8004d5a <HAL_RCC_ClockConfig+0xde>
  12464. {
  12465. return HAL_ERROR;
  12466. 8004d26: 2301 movs r3, #1
  12467. 8004d28: e07f b.n 8004e2a <HAL_RCC_ClockConfig+0x1ae>
  12468. }
  12469. }
  12470. /* PLL is selected as System Clock Source */
  12471. else if ((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
  12472. 8004d2a: 687b ldr r3, [r7, #4]
  12473. 8004d2c: 685b ldr r3, [r3, #4]
  12474. 8004d2e: 2b02 cmp r3, #2
  12475. 8004d30: d003 beq.n 8004d3a <HAL_RCC_ClockConfig+0xbe>
  12476. (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLRCLK))
  12477. 8004d32: 687b ldr r3, [r7, #4]
  12478. 8004d34: 685b ldr r3, [r3, #4]
  12479. else if ((RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) ||
  12480. 8004d36: 2b03 cmp r3, #3
  12481. 8004d38: d107 bne.n 8004d4a <HAL_RCC_ClockConfig+0xce>
  12482. {
  12483. /* Check the PLL ready flag */
  12484. if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)
  12485. 8004d3a: 4b3f ldr r3, [pc, #252] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12486. 8004d3c: 681b ldr r3, [r3, #0]
  12487. 8004d3e: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
  12488. 8004d42: 2b00 cmp r3, #0
  12489. 8004d44: d109 bne.n 8004d5a <HAL_RCC_ClockConfig+0xde>
  12490. {
  12491. return HAL_ERROR;
  12492. 8004d46: 2301 movs r3, #1
  12493. 8004d48: e06f b.n 8004e2a <HAL_RCC_ClockConfig+0x1ae>
  12494. }
  12495. /* HSI is selected as System Clock Source */
  12496. else
  12497. {
  12498. /* Check the HSI ready flag */
  12499. if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET)
  12500. 8004d4a: 4b3b ldr r3, [pc, #236] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12501. 8004d4c: 681b ldr r3, [r3, #0]
  12502. 8004d4e: f003 0302 and.w r3, r3, #2
  12503. 8004d52: 2b00 cmp r3, #0
  12504. 8004d54: d101 bne.n 8004d5a <HAL_RCC_ClockConfig+0xde>
  12505. {
  12506. return HAL_ERROR;
  12507. 8004d56: 2301 movs r3, #1
  12508. 8004d58: e067 b.n 8004e2a <HAL_RCC_ClockConfig+0x1ae>
  12509. }
  12510. }
  12511. __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
  12512. 8004d5a: 4b37 ldr r3, [pc, #220] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12513. 8004d5c: 689b ldr r3, [r3, #8]
  12514. 8004d5e: f023 0203 bic.w r2, r3, #3
  12515. 8004d62: 687b ldr r3, [r7, #4]
  12516. 8004d64: 685b ldr r3, [r3, #4]
  12517. 8004d66: 4934 ldr r1, [pc, #208] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12518. 8004d68: 4313 orrs r3, r2
  12519. 8004d6a: 608b str r3, [r1, #8]
  12520. /* Get Start Tick */
  12521. tickstart = HAL_GetTick();
  12522. 8004d6c: f7fe f9ec bl 8003148 <HAL_GetTick>
  12523. 8004d70: 60f8 str r0, [r7, #12]
  12524. while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
  12525. 8004d72: e00a b.n 8004d8a <HAL_RCC_ClockConfig+0x10e>
  12526. {
  12527. if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE)
  12528. 8004d74: f7fe f9e8 bl 8003148 <HAL_GetTick>
  12529. 8004d78: 4602 mov r2, r0
  12530. 8004d7a: 68fb ldr r3, [r7, #12]
  12531. 8004d7c: 1ad3 subs r3, r2, r3
  12532. 8004d7e: f241 3288 movw r2, #5000 @ 0x1388
  12533. 8004d82: 4293 cmp r3, r2
  12534. 8004d84: d901 bls.n 8004d8a <HAL_RCC_ClockConfig+0x10e>
  12535. {
  12536. return HAL_TIMEOUT;
  12537. 8004d86: 2303 movs r3, #3
  12538. 8004d88: e04f b.n 8004e2a <HAL_RCC_ClockConfig+0x1ae>
  12539. while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
  12540. 8004d8a: 4b2b ldr r3, [pc, #172] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12541. 8004d8c: 689b ldr r3, [r3, #8]
  12542. 8004d8e: f003 020c and.w r2, r3, #12
  12543. 8004d92: 687b ldr r3, [r7, #4]
  12544. 8004d94: 685b ldr r3, [r3, #4]
  12545. 8004d96: 009b lsls r3, r3, #2
  12546. 8004d98: 429a cmp r2, r3
  12547. 8004d9a: d1eb bne.n 8004d74 <HAL_RCC_ClockConfig+0xf8>
  12548. }
  12549. }
  12550. }
  12551. /* Decreasing the number of wait states because of lower CPU frequency */
  12552. if (FLatency < __HAL_FLASH_GET_LATENCY())
  12553. 8004d9c: 4b25 ldr r3, [pc, #148] @ (8004e34 <HAL_RCC_ClockConfig+0x1b8>)
  12554. 8004d9e: 681b ldr r3, [r3, #0]
  12555. 8004da0: f003 0307 and.w r3, r3, #7
  12556. 8004da4: 683a ldr r2, [r7, #0]
  12557. 8004da6: 429a cmp r2, r3
  12558. 8004da8: d20c bcs.n 8004dc4 <HAL_RCC_ClockConfig+0x148>
  12559. {
  12560. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  12561. __HAL_FLASH_SET_LATENCY(FLatency);
  12562. 8004daa: 4b22 ldr r3, [pc, #136] @ (8004e34 <HAL_RCC_ClockConfig+0x1b8>)
  12563. 8004dac: 683a ldr r2, [r7, #0]
  12564. 8004dae: b2d2 uxtb r2, r2
  12565. 8004db0: 701a strb r2, [r3, #0]
  12566. /* Check that the new number of wait states is taken into account to access the Flash
  12567. memory by reading the FLASH_ACR register */
  12568. if (__HAL_FLASH_GET_LATENCY() != FLatency)
  12569. 8004db2: 4b20 ldr r3, [pc, #128] @ (8004e34 <HAL_RCC_ClockConfig+0x1b8>)
  12570. 8004db4: 681b ldr r3, [r3, #0]
  12571. 8004db6: f003 0307 and.w r3, r3, #7
  12572. 8004dba: 683a ldr r2, [r7, #0]
  12573. 8004dbc: 429a cmp r2, r3
  12574. 8004dbe: d001 beq.n 8004dc4 <HAL_RCC_ClockConfig+0x148>
  12575. {
  12576. return HAL_ERROR;
  12577. 8004dc0: 2301 movs r3, #1
  12578. 8004dc2: e032 b.n 8004e2a <HAL_RCC_ClockConfig+0x1ae>
  12579. }
  12580. }
  12581. /*-------------------------- PCLK1 Configuration ---------------------------*/
  12582. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  12583. 8004dc4: 687b ldr r3, [r7, #4]
  12584. 8004dc6: 681b ldr r3, [r3, #0]
  12585. 8004dc8: f003 0304 and.w r3, r3, #4
  12586. 8004dcc: 2b00 cmp r3, #0
  12587. 8004dce: d008 beq.n 8004de2 <HAL_RCC_ClockConfig+0x166>
  12588. {
  12589. assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
  12590. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
  12591. 8004dd0: 4b19 ldr r3, [pc, #100] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12592. 8004dd2: 689b ldr r3, [r3, #8]
  12593. 8004dd4: f423 52e0 bic.w r2, r3, #7168 @ 0x1c00
  12594. 8004dd8: 687b ldr r3, [r7, #4]
  12595. 8004dda: 68db ldr r3, [r3, #12]
  12596. 8004ddc: 4916 ldr r1, [pc, #88] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12597. 8004dde: 4313 orrs r3, r2
  12598. 8004de0: 608b str r3, [r1, #8]
  12599. }
  12600. /*-------------------------- PCLK2 Configuration ---------------------------*/
  12601. if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
  12602. 8004de2: 687b ldr r3, [r7, #4]
  12603. 8004de4: 681b ldr r3, [r3, #0]
  12604. 8004de6: f003 0308 and.w r3, r3, #8
  12605. 8004dea: 2b00 cmp r3, #0
  12606. 8004dec: d009 beq.n 8004e02 <HAL_RCC_ClockConfig+0x186>
  12607. {
  12608. assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
  12609. MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
  12610. 8004dee: 4b12 ldr r3, [pc, #72] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12611. 8004df0: 689b ldr r3, [r3, #8]
  12612. 8004df2: f423 4260 bic.w r2, r3, #57344 @ 0xe000
  12613. 8004df6: 687b ldr r3, [r7, #4]
  12614. 8004df8: 691b ldr r3, [r3, #16]
  12615. 8004dfa: 00db lsls r3, r3, #3
  12616. 8004dfc: 490e ldr r1, [pc, #56] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12617. 8004dfe: 4313 orrs r3, r2
  12618. 8004e00: 608b str r3, [r1, #8]
  12619. }
  12620. /* Update the SystemCoreClock global variable */
  12621. SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos];
  12622. 8004e02: f000 f821 bl 8004e48 <HAL_RCC_GetSysClockFreq>
  12623. 8004e06: 4602 mov r2, r0
  12624. 8004e08: 4b0b ldr r3, [pc, #44] @ (8004e38 <HAL_RCC_ClockConfig+0x1bc>)
  12625. 8004e0a: 689b ldr r3, [r3, #8]
  12626. 8004e0c: 091b lsrs r3, r3, #4
  12627. 8004e0e: f003 030f and.w r3, r3, #15
  12628. 8004e12: 490a ldr r1, [pc, #40] @ (8004e3c <HAL_RCC_ClockConfig+0x1c0>)
  12629. 8004e14: 5ccb ldrb r3, [r1, r3]
  12630. 8004e16: fa22 f303 lsr.w r3, r2, r3
  12631. 8004e1a: 4a09 ldr r2, [pc, #36] @ (8004e40 <HAL_RCC_ClockConfig+0x1c4>)
  12632. 8004e1c: 6013 str r3, [r2, #0]
  12633. /* Configure the source of time base considering new system clocks settings */
  12634. HAL_InitTick(uwTickPrio);
  12635. 8004e1e: 4b09 ldr r3, [pc, #36] @ (8004e44 <HAL_RCC_ClockConfig+0x1c8>)
  12636. 8004e20: 681b ldr r3, [r3, #0]
  12637. 8004e22: 4618 mov r0, r3
  12638. 8004e24: f7fe f94c bl 80030c0 <HAL_InitTick>
  12639. return HAL_OK;
  12640. 8004e28: 2300 movs r3, #0
  12641. }
  12642. 8004e2a: 4618 mov r0, r3
  12643. 8004e2c: 3710 adds r7, #16
  12644. 8004e2e: 46bd mov sp, r7
  12645. 8004e30: bd80 pop {r7, pc}
  12646. 8004e32: bf00 nop
  12647. 8004e34: 40023c00 .word 0x40023c00
  12648. 8004e38: 40023800 .word 0x40023800
  12649. 8004e3c: 080059c0 .word 0x080059c0
  12650. 8004e40: 20000000 .word 0x20000000
  12651. 8004e44: 2000000c .word 0x2000000c
  12652. 08004e48 <HAL_RCC_GetSysClockFreq>:
  12653. *
  12654. *
  12655. * @retval SYSCLK frequency
  12656. */
  12657. __weak uint32_t HAL_RCC_GetSysClockFreq(void)
  12658. {
  12659. 8004e48: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr}
  12660. 8004e4c: b094 sub sp, #80 @ 0x50
  12661. 8004e4e: af00 add r7, sp, #0
  12662. uint32_t pllm = 0U;
  12663. 8004e50: 2300 movs r3, #0
  12664. 8004e52: 647b str r3, [r7, #68] @ 0x44
  12665. uint32_t pllvco = 0U;
  12666. 8004e54: 2300 movs r3, #0
  12667. 8004e56: 64fb str r3, [r7, #76] @ 0x4c
  12668. uint32_t pllp = 0U;
  12669. 8004e58: 2300 movs r3, #0
  12670. 8004e5a: 643b str r3, [r7, #64] @ 0x40
  12671. uint32_t sysclockfreq = 0U;
  12672. 8004e5c: 2300 movs r3, #0
  12673. 8004e5e: 64bb str r3, [r7, #72] @ 0x48
  12674. /* Get SYSCLK source -------------------------------------------------------*/
  12675. switch (RCC->CFGR & RCC_CFGR_SWS)
  12676. 8004e60: 4b79 ldr r3, [pc, #484] @ (8005048 <HAL_RCC_GetSysClockFreq+0x200>)
  12677. 8004e62: 689b ldr r3, [r3, #8]
  12678. 8004e64: f003 030c and.w r3, r3, #12
  12679. 8004e68: 2b08 cmp r3, #8
  12680. 8004e6a: d00d beq.n 8004e88 <HAL_RCC_GetSysClockFreq+0x40>
  12681. 8004e6c: 2b08 cmp r3, #8
  12682. 8004e6e: f200 80e1 bhi.w 8005034 <HAL_RCC_GetSysClockFreq+0x1ec>
  12683. 8004e72: 2b00 cmp r3, #0
  12684. 8004e74: d002 beq.n 8004e7c <HAL_RCC_GetSysClockFreq+0x34>
  12685. 8004e76: 2b04 cmp r3, #4
  12686. 8004e78: d003 beq.n 8004e82 <HAL_RCC_GetSysClockFreq+0x3a>
  12687. 8004e7a: e0db b.n 8005034 <HAL_RCC_GetSysClockFreq+0x1ec>
  12688. {
  12689. case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
  12690. {
  12691. sysclockfreq = HSI_VALUE;
  12692. 8004e7c: 4b73 ldr r3, [pc, #460] @ (800504c <HAL_RCC_GetSysClockFreq+0x204>)
  12693. 8004e7e: 64bb str r3, [r7, #72] @ 0x48
  12694. break;
  12695. 8004e80: e0db b.n 800503a <HAL_RCC_GetSysClockFreq+0x1f2>
  12696. }
  12697. case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */
  12698. {
  12699. sysclockfreq = HSE_VALUE;
  12700. 8004e82: 4b73 ldr r3, [pc, #460] @ (8005050 <HAL_RCC_GetSysClockFreq+0x208>)
  12701. 8004e84: 64bb str r3, [r7, #72] @ 0x48
  12702. break;
  12703. 8004e86: e0d8 b.n 800503a <HAL_RCC_GetSysClockFreq+0x1f2>
  12704. }
  12705. case RCC_CFGR_SWS_PLL: /* PLL used as system clock source */
  12706. {
  12707. /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN
  12708. SYSCLK = PLL_VCO / PLLP */
  12709. pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
  12710. 8004e88: 4b6f ldr r3, [pc, #444] @ (8005048 <HAL_RCC_GetSysClockFreq+0x200>)
  12711. 8004e8a: 685b ldr r3, [r3, #4]
  12712. 8004e8c: f003 033f and.w r3, r3, #63 @ 0x3f
  12713. 8004e90: 647b str r3, [r7, #68] @ 0x44
  12714. if (__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
  12715. 8004e92: 4b6d ldr r3, [pc, #436] @ (8005048 <HAL_RCC_GetSysClockFreq+0x200>)
  12716. 8004e94: 685b ldr r3, [r3, #4]
  12717. 8004e96: f403 0380 and.w r3, r3, #4194304 @ 0x400000
  12718. 8004e9a: 2b00 cmp r3, #0
  12719. 8004e9c: d063 beq.n 8004f66 <HAL_RCC_GetSysClockFreq+0x11e>
  12720. {
  12721. /* HSE used as PLL clock source */
  12722. pllvco = (uint32_t)((((uint64_t) HSE_VALUE * ((uint64_t)((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
  12723. 8004e9e: 4b6a ldr r3, [pc, #424] @ (8005048 <HAL_RCC_GetSysClockFreq+0x200>)
  12724. 8004ea0: 685b ldr r3, [r3, #4]
  12725. 8004ea2: 099b lsrs r3, r3, #6
  12726. 8004ea4: 2200 movs r2, #0
  12727. 8004ea6: 63bb str r3, [r7, #56] @ 0x38
  12728. 8004ea8: 63fa str r2, [r7, #60] @ 0x3c
  12729. 8004eaa: 6bbb ldr r3, [r7, #56] @ 0x38
  12730. 8004eac: f3c3 0308 ubfx r3, r3, #0, #9
  12731. 8004eb0: 633b str r3, [r7, #48] @ 0x30
  12732. 8004eb2: 2300 movs r3, #0
  12733. 8004eb4: 637b str r3, [r7, #52] @ 0x34
  12734. 8004eb6: e9d7 450c ldrd r4, r5, [r7, #48] @ 0x30
  12735. 8004eba: 4622 mov r2, r4
  12736. 8004ebc: 462b mov r3, r5
  12737. 8004ebe: f04f 0000 mov.w r0, #0
  12738. 8004ec2: f04f 0100 mov.w r1, #0
  12739. 8004ec6: 0159 lsls r1, r3, #5
  12740. 8004ec8: ea41 61d2 orr.w r1, r1, r2, lsr #27
  12741. 8004ecc: 0150 lsls r0, r2, #5
  12742. 8004ece: 4602 mov r2, r0
  12743. 8004ed0: 460b mov r3, r1
  12744. 8004ed2: 4621 mov r1, r4
  12745. 8004ed4: 1a51 subs r1, r2, r1
  12746. 8004ed6: 6139 str r1, [r7, #16]
  12747. 8004ed8: 4629 mov r1, r5
  12748. 8004eda: eb63 0301 sbc.w r3, r3, r1
  12749. 8004ede: 617b str r3, [r7, #20]
  12750. 8004ee0: f04f 0200 mov.w r2, #0
  12751. 8004ee4: f04f 0300 mov.w r3, #0
  12752. 8004ee8: e9d7 ab04 ldrd sl, fp, [r7, #16]
  12753. 8004eec: 4659 mov r1, fp
  12754. 8004eee: 018b lsls r3, r1, #6
  12755. 8004ef0: 4651 mov r1, sl
  12756. 8004ef2: ea43 6391 orr.w r3, r3, r1, lsr #26
  12757. 8004ef6: 4651 mov r1, sl
  12758. 8004ef8: 018a lsls r2, r1, #6
  12759. 8004efa: 4651 mov r1, sl
  12760. 8004efc: ebb2 0801 subs.w r8, r2, r1
  12761. 8004f00: 4659 mov r1, fp
  12762. 8004f02: eb63 0901 sbc.w r9, r3, r1
  12763. 8004f06: f04f 0200 mov.w r2, #0
  12764. 8004f0a: f04f 0300 mov.w r3, #0
  12765. 8004f0e: ea4f 03c9 mov.w r3, r9, lsl #3
  12766. 8004f12: ea43 7358 orr.w r3, r3, r8, lsr #29
  12767. 8004f16: ea4f 02c8 mov.w r2, r8, lsl #3
  12768. 8004f1a: 4690 mov r8, r2
  12769. 8004f1c: 4699 mov r9, r3
  12770. 8004f1e: 4623 mov r3, r4
  12771. 8004f20: eb18 0303 adds.w r3, r8, r3
  12772. 8004f24: 60bb str r3, [r7, #8]
  12773. 8004f26: 462b mov r3, r5
  12774. 8004f28: eb49 0303 adc.w r3, r9, r3
  12775. 8004f2c: 60fb str r3, [r7, #12]
  12776. 8004f2e: f04f 0200 mov.w r2, #0
  12777. 8004f32: f04f 0300 mov.w r3, #0
  12778. 8004f36: e9d7 4502 ldrd r4, r5, [r7, #8]
  12779. 8004f3a: 4629 mov r1, r5
  12780. 8004f3c: 024b lsls r3, r1, #9
  12781. 8004f3e: 4621 mov r1, r4
  12782. 8004f40: ea43 53d1 orr.w r3, r3, r1, lsr #23
  12783. 8004f44: 4621 mov r1, r4
  12784. 8004f46: 024a lsls r2, r1, #9
  12785. 8004f48: 4610 mov r0, r2
  12786. 8004f4a: 4619 mov r1, r3
  12787. 8004f4c: 6c7b ldr r3, [r7, #68] @ 0x44
  12788. 8004f4e: 2200 movs r2, #0
  12789. 8004f50: 62bb str r3, [r7, #40] @ 0x28
  12790. 8004f52: 62fa str r2, [r7, #44] @ 0x2c
  12791. 8004f54: e9d7 230a ldrd r2, r3, [r7, #40] @ 0x28
  12792. 8004f58: f7fb f938 bl 80001cc <__aeabi_uldivmod>
  12793. 8004f5c: 4602 mov r2, r0
  12794. 8004f5e: 460b mov r3, r1
  12795. 8004f60: 4613 mov r3, r2
  12796. 8004f62: 64fb str r3, [r7, #76] @ 0x4c
  12797. 8004f64: e058 b.n 8005018 <HAL_RCC_GetSysClockFreq+0x1d0>
  12798. }
  12799. else
  12800. {
  12801. /* HSI used as PLL clock source */
  12802. pllvco = (uint32_t)((((uint64_t) HSI_VALUE * ((uint64_t)((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm);
  12803. 8004f66: 4b38 ldr r3, [pc, #224] @ (8005048 <HAL_RCC_GetSysClockFreq+0x200>)
  12804. 8004f68: 685b ldr r3, [r3, #4]
  12805. 8004f6a: 099b lsrs r3, r3, #6
  12806. 8004f6c: 2200 movs r2, #0
  12807. 8004f6e: 4618 mov r0, r3
  12808. 8004f70: 4611 mov r1, r2
  12809. 8004f72: f3c0 0308 ubfx r3, r0, #0, #9
  12810. 8004f76: 623b str r3, [r7, #32]
  12811. 8004f78: 2300 movs r3, #0
  12812. 8004f7a: 627b str r3, [r7, #36] @ 0x24
  12813. 8004f7c: e9d7 8908 ldrd r8, r9, [r7, #32]
  12814. 8004f80: 4642 mov r2, r8
  12815. 8004f82: 464b mov r3, r9
  12816. 8004f84: f04f 0000 mov.w r0, #0
  12817. 8004f88: f04f 0100 mov.w r1, #0
  12818. 8004f8c: 0159 lsls r1, r3, #5
  12819. 8004f8e: ea41 61d2 orr.w r1, r1, r2, lsr #27
  12820. 8004f92: 0150 lsls r0, r2, #5
  12821. 8004f94: 4602 mov r2, r0
  12822. 8004f96: 460b mov r3, r1
  12823. 8004f98: 4641 mov r1, r8
  12824. 8004f9a: ebb2 0a01 subs.w sl, r2, r1
  12825. 8004f9e: 4649 mov r1, r9
  12826. 8004fa0: eb63 0b01 sbc.w fp, r3, r1
  12827. 8004fa4: f04f 0200 mov.w r2, #0
  12828. 8004fa8: f04f 0300 mov.w r3, #0
  12829. 8004fac: ea4f 138b mov.w r3, fp, lsl #6
  12830. 8004fb0: ea43 639a orr.w r3, r3, sl, lsr #26
  12831. 8004fb4: ea4f 128a mov.w r2, sl, lsl #6
  12832. 8004fb8: ebb2 040a subs.w r4, r2, sl
  12833. 8004fbc: eb63 050b sbc.w r5, r3, fp
  12834. 8004fc0: f04f 0200 mov.w r2, #0
  12835. 8004fc4: f04f 0300 mov.w r3, #0
  12836. 8004fc8: 00eb lsls r3, r5, #3
  12837. 8004fca: ea43 7354 orr.w r3, r3, r4, lsr #29
  12838. 8004fce: 00e2 lsls r2, r4, #3
  12839. 8004fd0: 4614 mov r4, r2
  12840. 8004fd2: 461d mov r5, r3
  12841. 8004fd4: 4643 mov r3, r8
  12842. 8004fd6: 18e3 adds r3, r4, r3
  12843. 8004fd8: 603b str r3, [r7, #0]
  12844. 8004fda: 464b mov r3, r9
  12845. 8004fdc: eb45 0303 adc.w r3, r5, r3
  12846. 8004fe0: 607b str r3, [r7, #4]
  12847. 8004fe2: f04f 0200 mov.w r2, #0
  12848. 8004fe6: f04f 0300 mov.w r3, #0
  12849. 8004fea: e9d7 4500 ldrd r4, r5, [r7]
  12850. 8004fee: 4629 mov r1, r5
  12851. 8004ff0: 028b lsls r3, r1, #10
  12852. 8004ff2: 4621 mov r1, r4
  12853. 8004ff4: ea43 5391 orr.w r3, r3, r1, lsr #22
  12854. 8004ff8: 4621 mov r1, r4
  12855. 8004ffa: 028a lsls r2, r1, #10
  12856. 8004ffc: 4610 mov r0, r2
  12857. 8004ffe: 4619 mov r1, r3
  12858. 8005000: 6c7b ldr r3, [r7, #68] @ 0x44
  12859. 8005002: 2200 movs r2, #0
  12860. 8005004: 61bb str r3, [r7, #24]
  12861. 8005006: 61fa str r2, [r7, #28]
  12862. 8005008: e9d7 2306 ldrd r2, r3, [r7, #24]
  12863. 800500c: f7fb f8de bl 80001cc <__aeabi_uldivmod>
  12864. 8005010: 4602 mov r2, r0
  12865. 8005012: 460b mov r3, r1
  12866. 8005014: 4613 mov r3, r2
  12867. 8005016: 64fb str r3, [r7, #76] @ 0x4c
  12868. }
  12869. pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) * 2U);
  12870. 8005018: 4b0b ldr r3, [pc, #44] @ (8005048 <HAL_RCC_GetSysClockFreq+0x200>)
  12871. 800501a: 685b ldr r3, [r3, #4]
  12872. 800501c: 0c1b lsrs r3, r3, #16
  12873. 800501e: f003 0303 and.w r3, r3, #3
  12874. 8005022: 3301 adds r3, #1
  12875. 8005024: 005b lsls r3, r3, #1
  12876. 8005026: 643b str r3, [r7, #64] @ 0x40
  12877. sysclockfreq = pllvco / pllp;
  12878. 8005028: 6cfa ldr r2, [r7, #76] @ 0x4c
  12879. 800502a: 6c3b ldr r3, [r7, #64] @ 0x40
  12880. 800502c: fbb2 f3f3 udiv r3, r2, r3
  12881. 8005030: 64bb str r3, [r7, #72] @ 0x48
  12882. break;
  12883. 8005032: e002 b.n 800503a <HAL_RCC_GetSysClockFreq+0x1f2>
  12884. }
  12885. default:
  12886. {
  12887. sysclockfreq = HSI_VALUE;
  12888. 8005034: 4b05 ldr r3, [pc, #20] @ (800504c <HAL_RCC_GetSysClockFreq+0x204>)
  12889. 8005036: 64bb str r3, [r7, #72] @ 0x48
  12890. break;
  12891. 8005038: bf00 nop
  12892. }
  12893. }
  12894. return sysclockfreq;
  12895. 800503a: 6cbb ldr r3, [r7, #72] @ 0x48
  12896. }
  12897. 800503c: 4618 mov r0, r3
  12898. 800503e: 3750 adds r7, #80 @ 0x50
  12899. 8005040: 46bd mov sp, r7
  12900. 8005042: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc}
  12901. 8005046: bf00 nop
  12902. 8005048: 40023800 .word 0x40023800
  12903. 800504c: 00f42400 .word 0x00f42400
  12904. 8005050: 007a1200 .word 0x007a1200
  12905. 08005054 <HAL_TIM_Base_Init>:
  12906. * Ex: call @ref HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init()
  12907. * @param htim TIM Base handle
  12908. * @retval HAL status
  12909. */
  12910. HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)
  12911. {
  12912. 8005054: b580 push {r7, lr}
  12913. 8005056: b082 sub sp, #8
  12914. 8005058: af00 add r7, sp, #0
  12915. 800505a: 6078 str r0, [r7, #4]
  12916. /* Check the TIM handle allocation */
  12917. if (htim == NULL)
  12918. 800505c: 687b ldr r3, [r7, #4]
  12919. 800505e: 2b00 cmp r3, #0
  12920. 8005060: d101 bne.n 8005066 <HAL_TIM_Base_Init+0x12>
  12921. {
  12922. return HAL_ERROR;
  12923. 8005062: 2301 movs r3, #1
  12924. 8005064: e041 b.n 80050ea <HAL_TIM_Base_Init+0x96>
  12925. assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
  12926. assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
  12927. assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
  12928. assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
  12929. if (htim->State == HAL_TIM_STATE_RESET)
  12930. 8005066: 687b ldr r3, [r7, #4]
  12931. 8005068: f893 303d ldrb.w r3, [r3, #61] @ 0x3d
  12932. 800506c: b2db uxtb r3, r3
  12933. 800506e: 2b00 cmp r3, #0
  12934. 8005070: d106 bne.n 8005080 <HAL_TIM_Base_Init+0x2c>
  12935. {
  12936. /* Allocate lock resource and initialize it */
  12937. htim->Lock = HAL_UNLOCKED;
  12938. 8005072: 687b ldr r3, [r7, #4]
  12939. 8005074: 2200 movs r2, #0
  12940. 8005076: f883 203c strb.w r2, [r3, #60] @ 0x3c
  12941. }
  12942. /* Init the low level hardware : GPIO, CLOCK, NVIC */
  12943. htim->Base_MspInitCallback(htim);
  12944. #else
  12945. /* Init the low level hardware : GPIO, CLOCK, NVIC */
  12946. HAL_TIM_Base_MspInit(htim);
  12947. 800507a: 6878 ldr r0, [r7, #4]
  12948. 800507c: f7fc f932 bl 80012e4 <HAL_TIM_Base_MspInit>
  12949. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  12950. }
  12951. /* Set the TIM state */
  12952. htim->State = HAL_TIM_STATE_BUSY;
  12953. 8005080: 687b ldr r3, [r7, #4]
  12954. 8005082: 2202 movs r2, #2
  12955. 8005084: f883 203d strb.w r2, [r3, #61] @ 0x3d
  12956. /* Set the Time Base configuration */
  12957. TIM_Base_SetConfig(htim->Instance, &htim->Init);
  12958. 8005088: 687b ldr r3, [r7, #4]
  12959. 800508a: 681a ldr r2, [r3, #0]
  12960. 800508c: 687b ldr r3, [r7, #4]
  12961. 800508e: 3304 adds r3, #4
  12962. 8005090: 4619 mov r1, r3
  12963. 8005092: 4610 mov r0, r2
  12964. 8005094: f000 fa7e bl 8005594 <TIM_Base_SetConfig>
  12965. /* Initialize the DMA burst operation state */
  12966. htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
  12967. 8005098: 687b ldr r3, [r7, #4]
  12968. 800509a: 2201 movs r2, #1
  12969. 800509c: f883 2046 strb.w r2, [r3, #70] @ 0x46
  12970. /* Initialize the TIM channels state */
  12971. TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  12972. 80050a0: 687b ldr r3, [r7, #4]
  12973. 80050a2: 2201 movs r2, #1
  12974. 80050a4: f883 203e strb.w r2, [r3, #62] @ 0x3e
  12975. 80050a8: 687b ldr r3, [r7, #4]
  12976. 80050aa: 2201 movs r2, #1
  12977. 80050ac: f883 203f strb.w r2, [r3, #63] @ 0x3f
  12978. 80050b0: 687b ldr r3, [r7, #4]
  12979. 80050b2: 2201 movs r2, #1
  12980. 80050b4: f883 2040 strb.w r2, [r3, #64] @ 0x40
  12981. 80050b8: 687b ldr r3, [r7, #4]
  12982. 80050ba: 2201 movs r2, #1
  12983. 80050bc: f883 2041 strb.w r2, [r3, #65] @ 0x41
  12984. TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  12985. 80050c0: 687b ldr r3, [r7, #4]
  12986. 80050c2: 2201 movs r2, #1
  12987. 80050c4: f883 2042 strb.w r2, [r3, #66] @ 0x42
  12988. 80050c8: 687b ldr r3, [r7, #4]
  12989. 80050ca: 2201 movs r2, #1
  12990. 80050cc: f883 2043 strb.w r2, [r3, #67] @ 0x43
  12991. 80050d0: 687b ldr r3, [r7, #4]
  12992. 80050d2: 2201 movs r2, #1
  12993. 80050d4: f883 2044 strb.w r2, [r3, #68] @ 0x44
  12994. 80050d8: 687b ldr r3, [r7, #4]
  12995. 80050da: 2201 movs r2, #1
  12996. 80050dc: f883 2045 strb.w r2, [r3, #69] @ 0x45
  12997. /* Initialize the TIM state*/
  12998. htim->State = HAL_TIM_STATE_READY;
  12999. 80050e0: 687b ldr r3, [r7, #4]
  13000. 80050e2: 2201 movs r2, #1
  13001. 80050e4: f883 203d strb.w r2, [r3, #61] @ 0x3d
  13002. return HAL_OK;
  13003. 80050e8: 2300 movs r3, #0
  13004. }
  13005. 80050ea: 4618 mov r0, r3
  13006. 80050ec: 3708 adds r7, #8
  13007. 80050ee: 46bd mov sp, r7
  13008. 80050f0: bd80 pop {r7, pc}
  13009. ...
  13010. 080050f4 <HAL_TIM_Base_Start_IT>:
  13011. * @brief Starts the TIM Base generation in interrupt mode.
  13012. * @param htim TIM Base handle
  13013. * @retval HAL status
  13014. */
  13015. HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim)
  13016. {
  13017. 80050f4: b480 push {r7}
  13018. 80050f6: b085 sub sp, #20
  13019. 80050f8: af00 add r7, sp, #0
  13020. 80050fa: 6078 str r0, [r7, #4]
  13021. /* Check the parameters */
  13022. assert_param(IS_TIM_INSTANCE(htim->Instance));
  13023. /* Check the TIM state */
  13024. if (htim->State != HAL_TIM_STATE_READY)
  13025. 80050fc: 687b ldr r3, [r7, #4]
  13026. 80050fe: f893 303d ldrb.w r3, [r3, #61] @ 0x3d
  13027. 8005102: b2db uxtb r3, r3
  13028. 8005104: 2b01 cmp r3, #1
  13029. 8005106: d001 beq.n 800510c <HAL_TIM_Base_Start_IT+0x18>
  13030. {
  13031. return HAL_ERROR;
  13032. 8005108: 2301 movs r3, #1
  13033. 800510a: e04e b.n 80051aa <HAL_TIM_Base_Start_IT+0xb6>
  13034. }
  13035. /* Set the TIM state */
  13036. htim->State = HAL_TIM_STATE_BUSY;
  13037. 800510c: 687b ldr r3, [r7, #4]
  13038. 800510e: 2202 movs r2, #2
  13039. 8005110: f883 203d strb.w r2, [r3, #61] @ 0x3d
  13040. /* Enable the TIM Update interrupt */
  13041. __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE);
  13042. 8005114: 687b ldr r3, [r7, #4]
  13043. 8005116: 681b ldr r3, [r3, #0]
  13044. 8005118: 68da ldr r2, [r3, #12]
  13045. 800511a: 687b ldr r3, [r7, #4]
  13046. 800511c: 681b ldr r3, [r3, #0]
  13047. 800511e: f042 0201 orr.w r2, r2, #1
  13048. 8005122: 60da str r2, [r3, #12]
  13049. /* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
  13050. if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
  13051. 8005124: 687b ldr r3, [r7, #4]
  13052. 8005126: 681b ldr r3, [r3, #0]
  13053. 8005128: 4a23 ldr r2, [pc, #140] @ (80051b8 <HAL_TIM_Base_Start_IT+0xc4>)
  13054. 800512a: 4293 cmp r3, r2
  13055. 800512c: d022 beq.n 8005174 <HAL_TIM_Base_Start_IT+0x80>
  13056. 800512e: 687b ldr r3, [r7, #4]
  13057. 8005130: 681b ldr r3, [r3, #0]
  13058. 8005132: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
  13059. 8005136: d01d beq.n 8005174 <HAL_TIM_Base_Start_IT+0x80>
  13060. 8005138: 687b ldr r3, [r7, #4]
  13061. 800513a: 681b ldr r3, [r3, #0]
  13062. 800513c: 4a1f ldr r2, [pc, #124] @ (80051bc <HAL_TIM_Base_Start_IT+0xc8>)
  13063. 800513e: 4293 cmp r3, r2
  13064. 8005140: d018 beq.n 8005174 <HAL_TIM_Base_Start_IT+0x80>
  13065. 8005142: 687b ldr r3, [r7, #4]
  13066. 8005144: 681b ldr r3, [r3, #0]
  13067. 8005146: 4a1e ldr r2, [pc, #120] @ (80051c0 <HAL_TIM_Base_Start_IT+0xcc>)
  13068. 8005148: 4293 cmp r3, r2
  13069. 800514a: d013 beq.n 8005174 <HAL_TIM_Base_Start_IT+0x80>
  13070. 800514c: 687b ldr r3, [r7, #4]
  13071. 800514e: 681b ldr r3, [r3, #0]
  13072. 8005150: 4a1c ldr r2, [pc, #112] @ (80051c4 <HAL_TIM_Base_Start_IT+0xd0>)
  13073. 8005152: 4293 cmp r3, r2
  13074. 8005154: d00e beq.n 8005174 <HAL_TIM_Base_Start_IT+0x80>
  13075. 8005156: 687b ldr r3, [r7, #4]
  13076. 8005158: 681b ldr r3, [r3, #0]
  13077. 800515a: 4a1b ldr r2, [pc, #108] @ (80051c8 <HAL_TIM_Base_Start_IT+0xd4>)
  13078. 800515c: 4293 cmp r3, r2
  13079. 800515e: d009 beq.n 8005174 <HAL_TIM_Base_Start_IT+0x80>
  13080. 8005160: 687b ldr r3, [r7, #4]
  13081. 8005162: 681b ldr r3, [r3, #0]
  13082. 8005164: 4a19 ldr r2, [pc, #100] @ (80051cc <HAL_TIM_Base_Start_IT+0xd8>)
  13083. 8005166: 4293 cmp r3, r2
  13084. 8005168: d004 beq.n 8005174 <HAL_TIM_Base_Start_IT+0x80>
  13085. 800516a: 687b ldr r3, [r7, #4]
  13086. 800516c: 681b ldr r3, [r3, #0]
  13087. 800516e: 4a18 ldr r2, [pc, #96] @ (80051d0 <HAL_TIM_Base_Start_IT+0xdc>)
  13088. 8005170: 4293 cmp r3, r2
  13089. 8005172: d111 bne.n 8005198 <HAL_TIM_Base_Start_IT+0xa4>
  13090. {
  13091. tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
  13092. 8005174: 687b ldr r3, [r7, #4]
  13093. 8005176: 681b ldr r3, [r3, #0]
  13094. 8005178: 689b ldr r3, [r3, #8]
  13095. 800517a: f003 0307 and.w r3, r3, #7
  13096. 800517e: 60fb str r3, [r7, #12]
  13097. if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
  13098. 8005180: 68fb ldr r3, [r7, #12]
  13099. 8005182: 2b06 cmp r3, #6
  13100. 8005184: d010 beq.n 80051a8 <HAL_TIM_Base_Start_IT+0xb4>
  13101. {
  13102. __HAL_TIM_ENABLE(htim);
  13103. 8005186: 687b ldr r3, [r7, #4]
  13104. 8005188: 681b ldr r3, [r3, #0]
  13105. 800518a: 681a ldr r2, [r3, #0]
  13106. 800518c: 687b ldr r3, [r7, #4]
  13107. 800518e: 681b ldr r3, [r3, #0]
  13108. 8005190: f042 0201 orr.w r2, r2, #1
  13109. 8005194: 601a str r2, [r3, #0]
  13110. if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
  13111. 8005196: e007 b.n 80051a8 <HAL_TIM_Base_Start_IT+0xb4>
  13112. }
  13113. }
  13114. else
  13115. {
  13116. __HAL_TIM_ENABLE(htim);
  13117. 8005198: 687b ldr r3, [r7, #4]
  13118. 800519a: 681b ldr r3, [r3, #0]
  13119. 800519c: 681a ldr r2, [r3, #0]
  13120. 800519e: 687b ldr r3, [r7, #4]
  13121. 80051a0: 681b ldr r3, [r3, #0]
  13122. 80051a2: f042 0201 orr.w r2, r2, #1
  13123. 80051a6: 601a str r2, [r3, #0]
  13124. }
  13125. /* Return function status */
  13126. return HAL_OK;
  13127. 80051a8: 2300 movs r3, #0
  13128. }
  13129. 80051aa: 4618 mov r0, r3
  13130. 80051ac: 3714 adds r7, #20
  13131. 80051ae: 46bd mov sp, r7
  13132. 80051b0: f85d 7b04 ldr.w r7, [sp], #4
  13133. 80051b4: 4770 bx lr
  13134. 80051b6: bf00 nop
  13135. 80051b8: 40010000 .word 0x40010000
  13136. 80051bc: 40000400 .word 0x40000400
  13137. 80051c0: 40000800 .word 0x40000800
  13138. 80051c4: 40000c00 .word 0x40000c00
  13139. 80051c8: 40010400 .word 0x40010400
  13140. 80051cc: 40014000 .word 0x40014000
  13141. 80051d0: 40001800 .word 0x40001800
  13142. 080051d4 <HAL_TIM_IRQHandler>:
  13143. * @brief This function handles TIM interrupts requests.
  13144. * @param htim TIM handle
  13145. * @retval None
  13146. */
  13147. void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
  13148. {
  13149. 80051d4: b580 push {r7, lr}
  13150. 80051d6: b084 sub sp, #16
  13151. 80051d8: af00 add r7, sp, #0
  13152. 80051da: 6078 str r0, [r7, #4]
  13153. uint32_t itsource = htim->Instance->DIER;
  13154. 80051dc: 687b ldr r3, [r7, #4]
  13155. 80051de: 681b ldr r3, [r3, #0]
  13156. 80051e0: 68db ldr r3, [r3, #12]
  13157. 80051e2: 60fb str r3, [r7, #12]
  13158. uint32_t itflag = htim->Instance->SR;
  13159. 80051e4: 687b ldr r3, [r7, #4]
  13160. 80051e6: 681b ldr r3, [r3, #0]
  13161. 80051e8: 691b ldr r3, [r3, #16]
  13162. 80051ea: 60bb str r3, [r7, #8]
  13163. /* Capture compare 1 event */
  13164. if ((itflag & (TIM_FLAG_CC1)) == (TIM_FLAG_CC1))
  13165. 80051ec: 68bb ldr r3, [r7, #8]
  13166. 80051ee: f003 0302 and.w r3, r3, #2
  13167. 80051f2: 2b00 cmp r3, #0
  13168. 80051f4: d020 beq.n 8005238 <HAL_TIM_IRQHandler+0x64>
  13169. {
  13170. if ((itsource & (TIM_IT_CC1)) == (TIM_IT_CC1))
  13171. 80051f6: 68fb ldr r3, [r7, #12]
  13172. 80051f8: f003 0302 and.w r3, r3, #2
  13173. 80051fc: 2b00 cmp r3, #0
  13174. 80051fe: d01b beq.n 8005238 <HAL_TIM_IRQHandler+0x64>
  13175. {
  13176. {
  13177. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC1);
  13178. 8005200: 687b ldr r3, [r7, #4]
  13179. 8005202: 681b ldr r3, [r3, #0]
  13180. 8005204: f06f 0202 mvn.w r2, #2
  13181. 8005208: 611a str r2, [r3, #16]
  13182. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
  13183. 800520a: 687b ldr r3, [r7, #4]
  13184. 800520c: 2201 movs r2, #1
  13185. 800520e: 771a strb r2, [r3, #28]
  13186. /* Input capture event */
  13187. if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
  13188. 8005210: 687b ldr r3, [r7, #4]
  13189. 8005212: 681b ldr r3, [r3, #0]
  13190. 8005214: 699b ldr r3, [r3, #24]
  13191. 8005216: f003 0303 and.w r3, r3, #3
  13192. 800521a: 2b00 cmp r3, #0
  13193. 800521c: d003 beq.n 8005226 <HAL_TIM_IRQHandler+0x52>
  13194. {
  13195. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13196. htim->IC_CaptureCallback(htim);
  13197. #else
  13198. HAL_TIM_IC_CaptureCallback(htim);
  13199. 800521e: 6878 ldr r0, [r7, #4]
  13200. 8005220: f000 f999 bl 8005556 <HAL_TIM_IC_CaptureCallback>
  13201. 8005224: e005 b.n 8005232 <HAL_TIM_IRQHandler+0x5e>
  13202. {
  13203. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13204. htim->OC_DelayElapsedCallback(htim);
  13205. htim->PWM_PulseFinishedCallback(htim);
  13206. #else
  13207. HAL_TIM_OC_DelayElapsedCallback(htim);
  13208. 8005226: 6878 ldr r0, [r7, #4]
  13209. 8005228: f000 f98b bl 8005542 <HAL_TIM_OC_DelayElapsedCallback>
  13210. HAL_TIM_PWM_PulseFinishedCallback(htim);
  13211. 800522c: 6878 ldr r0, [r7, #4]
  13212. 800522e: f000 f99c bl 800556a <HAL_TIM_PWM_PulseFinishedCallback>
  13213. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13214. }
  13215. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  13216. 8005232: 687b ldr r3, [r7, #4]
  13217. 8005234: 2200 movs r2, #0
  13218. 8005236: 771a strb r2, [r3, #28]
  13219. }
  13220. }
  13221. }
  13222. /* Capture compare 2 event */
  13223. if ((itflag & (TIM_FLAG_CC2)) == (TIM_FLAG_CC2))
  13224. 8005238: 68bb ldr r3, [r7, #8]
  13225. 800523a: f003 0304 and.w r3, r3, #4
  13226. 800523e: 2b00 cmp r3, #0
  13227. 8005240: d020 beq.n 8005284 <HAL_TIM_IRQHandler+0xb0>
  13228. {
  13229. if ((itsource & (TIM_IT_CC2)) == (TIM_IT_CC2))
  13230. 8005242: 68fb ldr r3, [r7, #12]
  13231. 8005244: f003 0304 and.w r3, r3, #4
  13232. 8005248: 2b00 cmp r3, #0
  13233. 800524a: d01b beq.n 8005284 <HAL_TIM_IRQHandler+0xb0>
  13234. {
  13235. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC2);
  13236. 800524c: 687b ldr r3, [r7, #4]
  13237. 800524e: 681b ldr r3, [r3, #0]
  13238. 8005250: f06f 0204 mvn.w r2, #4
  13239. 8005254: 611a str r2, [r3, #16]
  13240. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
  13241. 8005256: 687b ldr r3, [r7, #4]
  13242. 8005258: 2202 movs r2, #2
  13243. 800525a: 771a strb r2, [r3, #28]
  13244. /* Input capture event */
  13245. if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
  13246. 800525c: 687b ldr r3, [r7, #4]
  13247. 800525e: 681b ldr r3, [r3, #0]
  13248. 8005260: 699b ldr r3, [r3, #24]
  13249. 8005262: f403 7340 and.w r3, r3, #768 @ 0x300
  13250. 8005266: 2b00 cmp r3, #0
  13251. 8005268: d003 beq.n 8005272 <HAL_TIM_IRQHandler+0x9e>
  13252. {
  13253. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13254. htim->IC_CaptureCallback(htim);
  13255. #else
  13256. HAL_TIM_IC_CaptureCallback(htim);
  13257. 800526a: 6878 ldr r0, [r7, #4]
  13258. 800526c: f000 f973 bl 8005556 <HAL_TIM_IC_CaptureCallback>
  13259. 8005270: e005 b.n 800527e <HAL_TIM_IRQHandler+0xaa>
  13260. {
  13261. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13262. htim->OC_DelayElapsedCallback(htim);
  13263. htim->PWM_PulseFinishedCallback(htim);
  13264. #else
  13265. HAL_TIM_OC_DelayElapsedCallback(htim);
  13266. 8005272: 6878 ldr r0, [r7, #4]
  13267. 8005274: f000 f965 bl 8005542 <HAL_TIM_OC_DelayElapsedCallback>
  13268. HAL_TIM_PWM_PulseFinishedCallback(htim);
  13269. 8005278: 6878 ldr r0, [r7, #4]
  13270. 800527a: f000 f976 bl 800556a <HAL_TIM_PWM_PulseFinishedCallback>
  13271. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13272. }
  13273. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  13274. 800527e: 687b ldr r3, [r7, #4]
  13275. 8005280: 2200 movs r2, #0
  13276. 8005282: 771a strb r2, [r3, #28]
  13277. }
  13278. }
  13279. /* Capture compare 3 event */
  13280. if ((itflag & (TIM_FLAG_CC3)) == (TIM_FLAG_CC3))
  13281. 8005284: 68bb ldr r3, [r7, #8]
  13282. 8005286: f003 0308 and.w r3, r3, #8
  13283. 800528a: 2b00 cmp r3, #0
  13284. 800528c: d020 beq.n 80052d0 <HAL_TIM_IRQHandler+0xfc>
  13285. {
  13286. if ((itsource & (TIM_IT_CC3)) == (TIM_IT_CC3))
  13287. 800528e: 68fb ldr r3, [r7, #12]
  13288. 8005290: f003 0308 and.w r3, r3, #8
  13289. 8005294: 2b00 cmp r3, #0
  13290. 8005296: d01b beq.n 80052d0 <HAL_TIM_IRQHandler+0xfc>
  13291. {
  13292. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC3);
  13293. 8005298: 687b ldr r3, [r7, #4]
  13294. 800529a: 681b ldr r3, [r3, #0]
  13295. 800529c: f06f 0208 mvn.w r2, #8
  13296. 80052a0: 611a str r2, [r3, #16]
  13297. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
  13298. 80052a2: 687b ldr r3, [r7, #4]
  13299. 80052a4: 2204 movs r2, #4
  13300. 80052a6: 771a strb r2, [r3, #28]
  13301. /* Input capture event */
  13302. if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
  13303. 80052a8: 687b ldr r3, [r7, #4]
  13304. 80052aa: 681b ldr r3, [r3, #0]
  13305. 80052ac: 69db ldr r3, [r3, #28]
  13306. 80052ae: f003 0303 and.w r3, r3, #3
  13307. 80052b2: 2b00 cmp r3, #0
  13308. 80052b4: d003 beq.n 80052be <HAL_TIM_IRQHandler+0xea>
  13309. {
  13310. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13311. htim->IC_CaptureCallback(htim);
  13312. #else
  13313. HAL_TIM_IC_CaptureCallback(htim);
  13314. 80052b6: 6878 ldr r0, [r7, #4]
  13315. 80052b8: f000 f94d bl 8005556 <HAL_TIM_IC_CaptureCallback>
  13316. 80052bc: e005 b.n 80052ca <HAL_TIM_IRQHandler+0xf6>
  13317. {
  13318. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13319. htim->OC_DelayElapsedCallback(htim);
  13320. htim->PWM_PulseFinishedCallback(htim);
  13321. #else
  13322. HAL_TIM_OC_DelayElapsedCallback(htim);
  13323. 80052be: 6878 ldr r0, [r7, #4]
  13324. 80052c0: f000 f93f bl 8005542 <HAL_TIM_OC_DelayElapsedCallback>
  13325. HAL_TIM_PWM_PulseFinishedCallback(htim);
  13326. 80052c4: 6878 ldr r0, [r7, #4]
  13327. 80052c6: f000 f950 bl 800556a <HAL_TIM_PWM_PulseFinishedCallback>
  13328. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13329. }
  13330. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  13331. 80052ca: 687b ldr r3, [r7, #4]
  13332. 80052cc: 2200 movs r2, #0
  13333. 80052ce: 771a strb r2, [r3, #28]
  13334. }
  13335. }
  13336. /* Capture compare 4 event */
  13337. if ((itflag & (TIM_FLAG_CC4)) == (TIM_FLAG_CC4))
  13338. 80052d0: 68bb ldr r3, [r7, #8]
  13339. 80052d2: f003 0310 and.w r3, r3, #16
  13340. 80052d6: 2b00 cmp r3, #0
  13341. 80052d8: d020 beq.n 800531c <HAL_TIM_IRQHandler+0x148>
  13342. {
  13343. if ((itsource & (TIM_IT_CC4)) == (TIM_IT_CC4))
  13344. 80052da: 68fb ldr r3, [r7, #12]
  13345. 80052dc: f003 0310 and.w r3, r3, #16
  13346. 80052e0: 2b00 cmp r3, #0
  13347. 80052e2: d01b beq.n 800531c <HAL_TIM_IRQHandler+0x148>
  13348. {
  13349. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC4);
  13350. 80052e4: 687b ldr r3, [r7, #4]
  13351. 80052e6: 681b ldr r3, [r3, #0]
  13352. 80052e8: f06f 0210 mvn.w r2, #16
  13353. 80052ec: 611a str r2, [r3, #16]
  13354. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
  13355. 80052ee: 687b ldr r3, [r7, #4]
  13356. 80052f0: 2208 movs r2, #8
  13357. 80052f2: 771a strb r2, [r3, #28]
  13358. /* Input capture event */
  13359. if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
  13360. 80052f4: 687b ldr r3, [r7, #4]
  13361. 80052f6: 681b ldr r3, [r3, #0]
  13362. 80052f8: 69db ldr r3, [r3, #28]
  13363. 80052fa: f403 7340 and.w r3, r3, #768 @ 0x300
  13364. 80052fe: 2b00 cmp r3, #0
  13365. 8005300: d003 beq.n 800530a <HAL_TIM_IRQHandler+0x136>
  13366. {
  13367. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13368. htim->IC_CaptureCallback(htim);
  13369. #else
  13370. HAL_TIM_IC_CaptureCallback(htim);
  13371. 8005302: 6878 ldr r0, [r7, #4]
  13372. 8005304: f000 f927 bl 8005556 <HAL_TIM_IC_CaptureCallback>
  13373. 8005308: e005 b.n 8005316 <HAL_TIM_IRQHandler+0x142>
  13374. {
  13375. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13376. htim->OC_DelayElapsedCallback(htim);
  13377. htim->PWM_PulseFinishedCallback(htim);
  13378. #else
  13379. HAL_TIM_OC_DelayElapsedCallback(htim);
  13380. 800530a: 6878 ldr r0, [r7, #4]
  13381. 800530c: f000 f919 bl 8005542 <HAL_TIM_OC_DelayElapsedCallback>
  13382. HAL_TIM_PWM_PulseFinishedCallback(htim);
  13383. 8005310: 6878 ldr r0, [r7, #4]
  13384. 8005312: f000 f92a bl 800556a <HAL_TIM_PWM_PulseFinishedCallback>
  13385. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13386. }
  13387. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  13388. 8005316: 687b ldr r3, [r7, #4]
  13389. 8005318: 2200 movs r2, #0
  13390. 800531a: 771a strb r2, [r3, #28]
  13391. }
  13392. }
  13393. /* TIM Update event */
  13394. if ((itflag & (TIM_FLAG_UPDATE)) == (TIM_FLAG_UPDATE))
  13395. 800531c: 68bb ldr r3, [r7, #8]
  13396. 800531e: f003 0301 and.w r3, r3, #1
  13397. 8005322: 2b00 cmp r3, #0
  13398. 8005324: d00c beq.n 8005340 <HAL_TIM_IRQHandler+0x16c>
  13399. {
  13400. if ((itsource & (TIM_IT_UPDATE)) == (TIM_IT_UPDATE))
  13401. 8005326: 68fb ldr r3, [r7, #12]
  13402. 8005328: f003 0301 and.w r3, r3, #1
  13403. 800532c: 2b00 cmp r3, #0
  13404. 800532e: d007 beq.n 8005340 <HAL_TIM_IRQHandler+0x16c>
  13405. {
  13406. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE);
  13407. 8005330: 687b ldr r3, [r7, #4]
  13408. 8005332: 681b ldr r3, [r3, #0]
  13409. 8005334: f06f 0201 mvn.w r2, #1
  13410. 8005338: 611a str r2, [r3, #16]
  13411. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13412. htim->PeriodElapsedCallback(htim);
  13413. #else
  13414. HAL_TIM_PeriodElapsedCallback(htim);
  13415. 800533a: 6878 ldr r0, [r7, #4]
  13416. 800533c: f7fb fff8 bl 8001330 <HAL_TIM_PeriodElapsedCallback>
  13417. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13418. }
  13419. }
  13420. /* TIM Break input event */
  13421. if ((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK))
  13422. 8005340: 68bb ldr r3, [r7, #8]
  13423. 8005342: f003 0380 and.w r3, r3, #128 @ 0x80
  13424. 8005346: 2b00 cmp r3, #0
  13425. 8005348: d00c beq.n 8005364 <HAL_TIM_IRQHandler+0x190>
  13426. {
  13427. if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK))
  13428. 800534a: 68fb ldr r3, [r7, #12]
  13429. 800534c: f003 0380 and.w r3, r3, #128 @ 0x80
  13430. 8005350: 2b00 cmp r3, #0
  13431. 8005352: d007 beq.n 8005364 <HAL_TIM_IRQHandler+0x190>
  13432. {
  13433. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK);
  13434. 8005354: 687b ldr r3, [r7, #4]
  13435. 8005356: 681b ldr r3, [r3, #0]
  13436. 8005358: f06f 0280 mvn.w r2, #128 @ 0x80
  13437. 800535c: 611a str r2, [r3, #16]
  13438. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13439. htim->BreakCallback(htim);
  13440. #else
  13441. HAL_TIMEx_BreakCallback(htim);
  13442. 800535e: 6878 ldr r0, [r7, #4]
  13443. 8005360: f000 fade bl 8005920 <HAL_TIMEx_BreakCallback>
  13444. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13445. }
  13446. }
  13447. /* TIM Trigger detection event */
  13448. if ((itflag & (TIM_FLAG_TRIGGER)) == (TIM_FLAG_TRIGGER))
  13449. 8005364: 68bb ldr r3, [r7, #8]
  13450. 8005366: f003 0340 and.w r3, r3, #64 @ 0x40
  13451. 800536a: 2b00 cmp r3, #0
  13452. 800536c: d00c beq.n 8005388 <HAL_TIM_IRQHandler+0x1b4>
  13453. {
  13454. if ((itsource & (TIM_IT_TRIGGER)) == (TIM_IT_TRIGGER))
  13455. 800536e: 68fb ldr r3, [r7, #12]
  13456. 8005370: f003 0340 and.w r3, r3, #64 @ 0x40
  13457. 8005374: 2b00 cmp r3, #0
  13458. 8005376: d007 beq.n 8005388 <HAL_TIM_IRQHandler+0x1b4>
  13459. {
  13460. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_TRIGGER);
  13461. 8005378: 687b ldr r3, [r7, #4]
  13462. 800537a: 681b ldr r3, [r3, #0]
  13463. 800537c: f06f 0240 mvn.w r2, #64 @ 0x40
  13464. 8005380: 611a str r2, [r3, #16]
  13465. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13466. htim->TriggerCallback(htim);
  13467. #else
  13468. HAL_TIM_TriggerCallback(htim);
  13469. 8005382: 6878 ldr r0, [r7, #4]
  13470. 8005384: f000 f8fb bl 800557e <HAL_TIM_TriggerCallback>
  13471. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13472. }
  13473. }
  13474. /* TIM commutation event */
  13475. if ((itflag & (TIM_FLAG_COM)) == (TIM_FLAG_COM))
  13476. 8005388: 68bb ldr r3, [r7, #8]
  13477. 800538a: f003 0320 and.w r3, r3, #32
  13478. 800538e: 2b00 cmp r3, #0
  13479. 8005390: d00c beq.n 80053ac <HAL_TIM_IRQHandler+0x1d8>
  13480. {
  13481. if ((itsource & (TIM_IT_COM)) == (TIM_IT_COM))
  13482. 8005392: 68fb ldr r3, [r7, #12]
  13483. 8005394: f003 0320 and.w r3, r3, #32
  13484. 8005398: 2b00 cmp r3, #0
  13485. 800539a: d007 beq.n 80053ac <HAL_TIM_IRQHandler+0x1d8>
  13486. {
  13487. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_COM);
  13488. 800539c: 687b ldr r3, [r7, #4]
  13489. 800539e: 681b ldr r3, [r3, #0]
  13490. 80053a0: f06f 0220 mvn.w r2, #32
  13491. 80053a4: 611a str r2, [r3, #16]
  13492. #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
  13493. htim->CommutationCallback(htim);
  13494. #else
  13495. HAL_TIMEx_CommutCallback(htim);
  13496. 80053a6: 6878 ldr r0, [r7, #4]
  13497. 80053a8: f000 fab0 bl 800590c <HAL_TIMEx_CommutCallback>
  13498. #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
  13499. }
  13500. }
  13501. }
  13502. 80053ac: bf00 nop
  13503. 80053ae: 3710 adds r7, #16
  13504. 80053b0: 46bd mov sp, r7
  13505. 80053b2: bd80 pop {r7, pc}
  13506. 080053b4 <HAL_TIM_ConfigClockSource>:
  13507. * @param sClockSourceConfig pointer to a TIM_ClockConfigTypeDef structure that
  13508. * contains the clock source information for the TIM peripheral.
  13509. * @retval HAL status
  13510. */
  13511. HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, const TIM_ClockConfigTypeDef *sClockSourceConfig)
  13512. {
  13513. 80053b4: b580 push {r7, lr}
  13514. 80053b6: b084 sub sp, #16
  13515. 80053b8: af00 add r7, sp, #0
  13516. 80053ba: 6078 str r0, [r7, #4]
  13517. 80053bc: 6039 str r1, [r7, #0]
  13518. HAL_StatusTypeDef status = HAL_OK;
  13519. 80053be: 2300 movs r3, #0
  13520. 80053c0: 73fb strb r3, [r7, #15]
  13521. uint32_t tmpsmcr;
  13522. /* Process Locked */
  13523. __HAL_LOCK(htim);
  13524. 80053c2: 687b ldr r3, [r7, #4]
  13525. 80053c4: f893 303c ldrb.w r3, [r3, #60] @ 0x3c
  13526. 80053c8: 2b01 cmp r3, #1
  13527. 80053ca: d101 bne.n 80053d0 <HAL_TIM_ConfigClockSource+0x1c>
  13528. 80053cc: 2302 movs r3, #2
  13529. 80053ce: e0b4 b.n 800553a <HAL_TIM_ConfigClockSource+0x186>
  13530. 80053d0: 687b ldr r3, [r7, #4]
  13531. 80053d2: 2201 movs r2, #1
  13532. 80053d4: f883 203c strb.w r2, [r3, #60] @ 0x3c
  13533. htim->State = HAL_TIM_STATE_BUSY;
  13534. 80053d8: 687b ldr r3, [r7, #4]
  13535. 80053da: 2202 movs r2, #2
  13536. 80053dc: f883 203d strb.w r2, [r3, #61] @ 0x3d
  13537. /* Check the parameters */
  13538. assert_param(IS_TIM_CLOCKSOURCE(sClockSourceConfig->ClockSource));
  13539. /* Reset the SMS, TS, ECE, ETPS and ETRF bits */
  13540. tmpsmcr = htim->Instance->SMCR;
  13541. 80053e0: 687b ldr r3, [r7, #4]
  13542. 80053e2: 681b ldr r3, [r3, #0]
  13543. 80053e4: 689b ldr r3, [r3, #8]
  13544. 80053e6: 60bb str r3, [r7, #8]
  13545. tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS);
  13546. 80053e8: 68bb ldr r3, [r7, #8]
  13547. 80053ea: f023 0377 bic.w r3, r3, #119 @ 0x77
  13548. 80053ee: 60bb str r3, [r7, #8]
  13549. tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
  13550. 80053f0: 68bb ldr r3, [r7, #8]
  13551. 80053f2: f423 437f bic.w r3, r3, #65280 @ 0xff00
  13552. 80053f6: 60bb str r3, [r7, #8]
  13553. htim->Instance->SMCR = tmpsmcr;
  13554. 80053f8: 687b ldr r3, [r7, #4]
  13555. 80053fa: 681b ldr r3, [r3, #0]
  13556. 80053fc: 68ba ldr r2, [r7, #8]
  13557. 80053fe: 609a str r2, [r3, #8]
  13558. switch (sClockSourceConfig->ClockSource)
  13559. 8005400: 683b ldr r3, [r7, #0]
  13560. 8005402: 681b ldr r3, [r3, #0]
  13561. 8005404: f5b3 5f00 cmp.w r3, #8192 @ 0x2000
  13562. 8005408: d03e beq.n 8005488 <HAL_TIM_ConfigClockSource+0xd4>
  13563. 800540a: f5b3 5f00 cmp.w r3, #8192 @ 0x2000
  13564. 800540e: f200 8087 bhi.w 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13565. 8005412: f5b3 5f80 cmp.w r3, #4096 @ 0x1000
  13566. 8005416: f000 8086 beq.w 8005526 <HAL_TIM_ConfigClockSource+0x172>
  13567. 800541a: f5b3 5f80 cmp.w r3, #4096 @ 0x1000
  13568. 800541e: d87f bhi.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13569. 8005420: 2b70 cmp r3, #112 @ 0x70
  13570. 8005422: d01a beq.n 800545a <HAL_TIM_ConfigClockSource+0xa6>
  13571. 8005424: 2b70 cmp r3, #112 @ 0x70
  13572. 8005426: d87b bhi.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13573. 8005428: 2b60 cmp r3, #96 @ 0x60
  13574. 800542a: d050 beq.n 80054ce <HAL_TIM_ConfigClockSource+0x11a>
  13575. 800542c: 2b60 cmp r3, #96 @ 0x60
  13576. 800542e: d877 bhi.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13577. 8005430: 2b50 cmp r3, #80 @ 0x50
  13578. 8005432: d03c beq.n 80054ae <HAL_TIM_ConfigClockSource+0xfa>
  13579. 8005434: 2b50 cmp r3, #80 @ 0x50
  13580. 8005436: d873 bhi.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13581. 8005438: 2b40 cmp r3, #64 @ 0x40
  13582. 800543a: d058 beq.n 80054ee <HAL_TIM_ConfigClockSource+0x13a>
  13583. 800543c: 2b40 cmp r3, #64 @ 0x40
  13584. 800543e: d86f bhi.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13585. 8005440: 2b30 cmp r3, #48 @ 0x30
  13586. 8005442: d064 beq.n 800550e <HAL_TIM_ConfigClockSource+0x15a>
  13587. 8005444: 2b30 cmp r3, #48 @ 0x30
  13588. 8005446: d86b bhi.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13589. 8005448: 2b20 cmp r3, #32
  13590. 800544a: d060 beq.n 800550e <HAL_TIM_ConfigClockSource+0x15a>
  13591. 800544c: 2b20 cmp r3, #32
  13592. 800544e: d867 bhi.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13593. 8005450: 2b00 cmp r3, #0
  13594. 8005452: d05c beq.n 800550e <HAL_TIM_ConfigClockSource+0x15a>
  13595. 8005454: 2b10 cmp r3, #16
  13596. 8005456: d05a beq.n 800550e <HAL_TIM_ConfigClockSource+0x15a>
  13597. 8005458: e062 b.n 8005520 <HAL_TIM_ConfigClockSource+0x16c>
  13598. assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler));
  13599. assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
  13600. assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
  13601. /* Configure the ETR Clock source */
  13602. TIM_ETR_SetConfig(htim->Instance,
  13603. 800545a: 687b ldr r3, [r7, #4]
  13604. 800545c: 6818 ldr r0, [r3, #0]
  13605. sClockSourceConfig->ClockPrescaler,
  13606. 800545e: 683b ldr r3, [r7, #0]
  13607. 8005460: 6899 ldr r1, [r3, #8]
  13608. sClockSourceConfig->ClockPolarity,
  13609. 8005462: 683b ldr r3, [r7, #0]
  13610. 8005464: 685a ldr r2, [r3, #4]
  13611. sClockSourceConfig->ClockFilter);
  13612. 8005466: 683b ldr r3, [r7, #0]
  13613. 8005468: 68db ldr r3, [r3, #12]
  13614. TIM_ETR_SetConfig(htim->Instance,
  13615. 800546a: f000 f9b3 bl 80057d4 <TIM_ETR_SetConfig>
  13616. /* Select the External clock mode1 and the ETRF trigger */
  13617. tmpsmcr = htim->Instance->SMCR;
  13618. 800546e: 687b ldr r3, [r7, #4]
  13619. 8005470: 681b ldr r3, [r3, #0]
  13620. 8005472: 689b ldr r3, [r3, #8]
  13621. 8005474: 60bb str r3, [r7, #8]
  13622. tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1);
  13623. 8005476: 68bb ldr r3, [r7, #8]
  13624. 8005478: f043 0377 orr.w r3, r3, #119 @ 0x77
  13625. 800547c: 60bb str r3, [r7, #8]
  13626. /* Write to TIMx SMCR */
  13627. htim->Instance->SMCR = tmpsmcr;
  13628. 800547e: 687b ldr r3, [r7, #4]
  13629. 8005480: 681b ldr r3, [r3, #0]
  13630. 8005482: 68ba ldr r2, [r7, #8]
  13631. 8005484: 609a str r2, [r3, #8]
  13632. break;
  13633. 8005486: e04f b.n 8005528 <HAL_TIM_ConfigClockSource+0x174>
  13634. assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler));
  13635. assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
  13636. assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
  13637. /* Configure the ETR Clock source */
  13638. TIM_ETR_SetConfig(htim->Instance,
  13639. 8005488: 687b ldr r3, [r7, #4]
  13640. 800548a: 6818 ldr r0, [r3, #0]
  13641. sClockSourceConfig->ClockPrescaler,
  13642. 800548c: 683b ldr r3, [r7, #0]
  13643. 800548e: 6899 ldr r1, [r3, #8]
  13644. sClockSourceConfig->ClockPolarity,
  13645. 8005490: 683b ldr r3, [r7, #0]
  13646. 8005492: 685a ldr r2, [r3, #4]
  13647. sClockSourceConfig->ClockFilter);
  13648. 8005494: 683b ldr r3, [r7, #0]
  13649. 8005496: 68db ldr r3, [r3, #12]
  13650. TIM_ETR_SetConfig(htim->Instance,
  13651. 8005498: f000 f99c bl 80057d4 <TIM_ETR_SetConfig>
  13652. /* Enable the External clock mode2 */
  13653. htim->Instance->SMCR |= TIM_SMCR_ECE;
  13654. 800549c: 687b ldr r3, [r7, #4]
  13655. 800549e: 681b ldr r3, [r3, #0]
  13656. 80054a0: 689a ldr r2, [r3, #8]
  13657. 80054a2: 687b ldr r3, [r7, #4]
  13658. 80054a4: 681b ldr r3, [r3, #0]
  13659. 80054a6: f442 4280 orr.w r2, r2, #16384 @ 0x4000
  13660. 80054aa: 609a str r2, [r3, #8]
  13661. break;
  13662. 80054ac: e03c b.n 8005528 <HAL_TIM_ConfigClockSource+0x174>
  13663. /* Check TI1 input conditioning related parameters */
  13664. assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
  13665. assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
  13666. TIM_TI1_ConfigInputStage(htim->Instance,
  13667. 80054ae: 687b ldr r3, [r7, #4]
  13668. 80054b0: 6818 ldr r0, [r3, #0]
  13669. sClockSourceConfig->ClockPolarity,
  13670. 80054b2: 683b ldr r3, [r7, #0]
  13671. 80054b4: 6859 ldr r1, [r3, #4]
  13672. sClockSourceConfig->ClockFilter);
  13673. 80054b6: 683b ldr r3, [r7, #0]
  13674. 80054b8: 68db ldr r3, [r3, #12]
  13675. TIM_TI1_ConfigInputStage(htim->Instance,
  13676. 80054ba: 461a mov r2, r3
  13677. 80054bc: f000 f910 bl 80056e0 <TIM_TI1_ConfigInputStage>
  13678. TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1);
  13679. 80054c0: 687b ldr r3, [r7, #4]
  13680. 80054c2: 681b ldr r3, [r3, #0]
  13681. 80054c4: 2150 movs r1, #80 @ 0x50
  13682. 80054c6: 4618 mov r0, r3
  13683. 80054c8: f000 f969 bl 800579e <TIM_ITRx_SetConfig>
  13684. break;
  13685. 80054cc: e02c b.n 8005528 <HAL_TIM_ConfigClockSource+0x174>
  13686. /* Check TI2 input conditioning related parameters */
  13687. assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
  13688. assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
  13689. TIM_TI2_ConfigInputStage(htim->Instance,
  13690. 80054ce: 687b ldr r3, [r7, #4]
  13691. 80054d0: 6818 ldr r0, [r3, #0]
  13692. sClockSourceConfig->ClockPolarity,
  13693. 80054d2: 683b ldr r3, [r7, #0]
  13694. 80054d4: 6859 ldr r1, [r3, #4]
  13695. sClockSourceConfig->ClockFilter);
  13696. 80054d6: 683b ldr r3, [r7, #0]
  13697. 80054d8: 68db ldr r3, [r3, #12]
  13698. TIM_TI2_ConfigInputStage(htim->Instance,
  13699. 80054da: 461a mov r2, r3
  13700. 80054dc: f000 f92f bl 800573e <TIM_TI2_ConfigInputStage>
  13701. TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2);
  13702. 80054e0: 687b ldr r3, [r7, #4]
  13703. 80054e2: 681b ldr r3, [r3, #0]
  13704. 80054e4: 2160 movs r1, #96 @ 0x60
  13705. 80054e6: 4618 mov r0, r3
  13706. 80054e8: f000 f959 bl 800579e <TIM_ITRx_SetConfig>
  13707. break;
  13708. 80054ec: e01c b.n 8005528 <HAL_TIM_ConfigClockSource+0x174>
  13709. /* Check TI1 input conditioning related parameters */
  13710. assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity));
  13711. assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter));
  13712. TIM_TI1_ConfigInputStage(htim->Instance,
  13713. 80054ee: 687b ldr r3, [r7, #4]
  13714. 80054f0: 6818 ldr r0, [r3, #0]
  13715. sClockSourceConfig->ClockPolarity,
  13716. 80054f2: 683b ldr r3, [r7, #0]
  13717. 80054f4: 6859 ldr r1, [r3, #4]
  13718. sClockSourceConfig->ClockFilter);
  13719. 80054f6: 683b ldr r3, [r7, #0]
  13720. 80054f8: 68db ldr r3, [r3, #12]
  13721. TIM_TI1_ConfigInputStage(htim->Instance,
  13722. 80054fa: 461a mov r2, r3
  13723. 80054fc: f000 f8f0 bl 80056e0 <TIM_TI1_ConfigInputStage>
  13724. TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED);
  13725. 8005500: 687b ldr r3, [r7, #4]
  13726. 8005502: 681b ldr r3, [r3, #0]
  13727. 8005504: 2140 movs r1, #64 @ 0x40
  13728. 8005506: 4618 mov r0, r3
  13729. 8005508: f000 f949 bl 800579e <TIM_ITRx_SetConfig>
  13730. break;
  13731. 800550c: e00c b.n 8005528 <HAL_TIM_ConfigClockSource+0x174>
  13732. case TIM_CLOCKSOURCE_ITR3:
  13733. {
  13734. /* Check whether or not the timer instance supports internal trigger input */
  13735. assert_param(IS_TIM_CLOCKSOURCE_ITRX_INSTANCE(htim->Instance));
  13736. TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource);
  13737. 800550e: 687b ldr r3, [r7, #4]
  13738. 8005510: 681a ldr r2, [r3, #0]
  13739. 8005512: 683b ldr r3, [r7, #0]
  13740. 8005514: 681b ldr r3, [r3, #0]
  13741. 8005516: 4619 mov r1, r3
  13742. 8005518: 4610 mov r0, r2
  13743. 800551a: f000 f940 bl 800579e <TIM_ITRx_SetConfig>
  13744. break;
  13745. 800551e: e003 b.n 8005528 <HAL_TIM_ConfigClockSource+0x174>
  13746. }
  13747. default:
  13748. status = HAL_ERROR;
  13749. 8005520: 2301 movs r3, #1
  13750. 8005522: 73fb strb r3, [r7, #15]
  13751. break;
  13752. 8005524: e000 b.n 8005528 <HAL_TIM_ConfigClockSource+0x174>
  13753. break;
  13754. 8005526: bf00 nop
  13755. }
  13756. htim->State = HAL_TIM_STATE_READY;
  13757. 8005528: 687b ldr r3, [r7, #4]
  13758. 800552a: 2201 movs r2, #1
  13759. 800552c: f883 203d strb.w r2, [r3, #61] @ 0x3d
  13760. __HAL_UNLOCK(htim);
  13761. 8005530: 687b ldr r3, [r7, #4]
  13762. 8005532: 2200 movs r2, #0
  13763. 8005534: f883 203c strb.w r2, [r3, #60] @ 0x3c
  13764. return status;
  13765. 8005538: 7bfb ldrb r3, [r7, #15]
  13766. }
  13767. 800553a: 4618 mov r0, r3
  13768. 800553c: 3710 adds r7, #16
  13769. 800553e: 46bd mov sp, r7
  13770. 8005540: bd80 pop {r7, pc}
  13771. 08005542 <HAL_TIM_OC_DelayElapsedCallback>:
  13772. * @brief Output Compare callback in non-blocking mode
  13773. * @param htim TIM OC handle
  13774. * @retval None
  13775. */
  13776. __weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim)
  13777. {
  13778. 8005542: b480 push {r7}
  13779. 8005544: b083 sub sp, #12
  13780. 8005546: af00 add r7, sp, #0
  13781. 8005548: 6078 str r0, [r7, #4]
  13782. UNUSED(htim);
  13783. /* NOTE : This function should not be modified, when the callback is needed,
  13784. the HAL_TIM_OC_DelayElapsedCallback could be implemented in the user file
  13785. */
  13786. }
  13787. 800554a: bf00 nop
  13788. 800554c: 370c adds r7, #12
  13789. 800554e: 46bd mov sp, r7
  13790. 8005550: f85d 7b04 ldr.w r7, [sp], #4
  13791. 8005554: 4770 bx lr
  13792. 08005556 <HAL_TIM_IC_CaptureCallback>:
  13793. * @brief Input Capture callback in non-blocking mode
  13794. * @param htim TIM IC handle
  13795. * @retval None
  13796. */
  13797. __weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
  13798. {
  13799. 8005556: b480 push {r7}
  13800. 8005558: b083 sub sp, #12
  13801. 800555a: af00 add r7, sp, #0
  13802. 800555c: 6078 str r0, [r7, #4]
  13803. UNUSED(htim);
  13804. /* NOTE : This function should not be modified, when the callback is needed,
  13805. the HAL_TIM_IC_CaptureCallback could be implemented in the user file
  13806. */
  13807. }
  13808. 800555e: bf00 nop
  13809. 8005560: 370c adds r7, #12
  13810. 8005562: 46bd mov sp, r7
  13811. 8005564: f85d 7b04 ldr.w r7, [sp], #4
  13812. 8005568: 4770 bx lr
  13813. 0800556a <HAL_TIM_PWM_PulseFinishedCallback>:
  13814. * @brief PWM Pulse finished callback in non-blocking mode
  13815. * @param htim TIM handle
  13816. * @retval None
  13817. */
  13818. __weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
  13819. {
  13820. 800556a: b480 push {r7}
  13821. 800556c: b083 sub sp, #12
  13822. 800556e: af00 add r7, sp, #0
  13823. 8005570: 6078 str r0, [r7, #4]
  13824. UNUSED(htim);
  13825. /* NOTE : This function should not be modified, when the callback is needed,
  13826. the HAL_TIM_PWM_PulseFinishedCallback could be implemented in the user file
  13827. */
  13828. }
  13829. 8005572: bf00 nop
  13830. 8005574: 370c adds r7, #12
  13831. 8005576: 46bd mov sp, r7
  13832. 8005578: f85d 7b04 ldr.w r7, [sp], #4
  13833. 800557c: 4770 bx lr
  13834. 0800557e <HAL_TIM_TriggerCallback>:
  13835. * @brief Hall Trigger detection callback in non-blocking mode
  13836. * @param htim TIM handle
  13837. * @retval None
  13838. */
  13839. __weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim)
  13840. {
  13841. 800557e: b480 push {r7}
  13842. 8005580: b083 sub sp, #12
  13843. 8005582: af00 add r7, sp, #0
  13844. 8005584: 6078 str r0, [r7, #4]
  13845. UNUSED(htim);
  13846. /* NOTE : This function should not be modified, when the callback is needed,
  13847. the HAL_TIM_TriggerCallback could be implemented in the user file
  13848. */
  13849. }
  13850. 8005586: bf00 nop
  13851. 8005588: 370c adds r7, #12
  13852. 800558a: 46bd mov sp, r7
  13853. 800558c: f85d 7b04 ldr.w r7, [sp], #4
  13854. 8005590: 4770 bx lr
  13855. ...
  13856. 08005594 <TIM_Base_SetConfig>:
  13857. * @param TIMx TIM peripheral
  13858. * @param Structure TIM Base configuration structure
  13859. * @retval None
  13860. */
  13861. void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure)
  13862. {
  13863. 8005594: b480 push {r7}
  13864. 8005596: b085 sub sp, #20
  13865. 8005598: af00 add r7, sp, #0
  13866. 800559a: 6078 str r0, [r7, #4]
  13867. 800559c: 6039 str r1, [r7, #0]
  13868. uint32_t tmpcr1;
  13869. tmpcr1 = TIMx->CR1;
  13870. 800559e: 687b ldr r3, [r7, #4]
  13871. 80055a0: 681b ldr r3, [r3, #0]
  13872. 80055a2: 60fb str r3, [r7, #12]
  13873. /* Set TIM Time Base Unit parameters ---------------------------------------*/
  13874. if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
  13875. 80055a4: 687b ldr r3, [r7, #4]
  13876. 80055a6: 4a43 ldr r2, [pc, #268] @ (80056b4 <TIM_Base_SetConfig+0x120>)
  13877. 80055a8: 4293 cmp r3, r2
  13878. 80055aa: d013 beq.n 80055d4 <TIM_Base_SetConfig+0x40>
  13879. 80055ac: 687b ldr r3, [r7, #4]
  13880. 80055ae: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
  13881. 80055b2: d00f beq.n 80055d4 <TIM_Base_SetConfig+0x40>
  13882. 80055b4: 687b ldr r3, [r7, #4]
  13883. 80055b6: 4a40 ldr r2, [pc, #256] @ (80056b8 <TIM_Base_SetConfig+0x124>)
  13884. 80055b8: 4293 cmp r3, r2
  13885. 80055ba: d00b beq.n 80055d4 <TIM_Base_SetConfig+0x40>
  13886. 80055bc: 687b ldr r3, [r7, #4]
  13887. 80055be: 4a3f ldr r2, [pc, #252] @ (80056bc <TIM_Base_SetConfig+0x128>)
  13888. 80055c0: 4293 cmp r3, r2
  13889. 80055c2: d007 beq.n 80055d4 <TIM_Base_SetConfig+0x40>
  13890. 80055c4: 687b ldr r3, [r7, #4]
  13891. 80055c6: 4a3e ldr r2, [pc, #248] @ (80056c0 <TIM_Base_SetConfig+0x12c>)
  13892. 80055c8: 4293 cmp r3, r2
  13893. 80055ca: d003 beq.n 80055d4 <TIM_Base_SetConfig+0x40>
  13894. 80055cc: 687b ldr r3, [r7, #4]
  13895. 80055ce: 4a3d ldr r2, [pc, #244] @ (80056c4 <TIM_Base_SetConfig+0x130>)
  13896. 80055d0: 4293 cmp r3, r2
  13897. 80055d2: d108 bne.n 80055e6 <TIM_Base_SetConfig+0x52>
  13898. {
  13899. /* Select the Counter Mode */
  13900. tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
  13901. 80055d4: 68fb ldr r3, [r7, #12]
  13902. 80055d6: f023 0370 bic.w r3, r3, #112 @ 0x70
  13903. 80055da: 60fb str r3, [r7, #12]
  13904. tmpcr1 |= Structure->CounterMode;
  13905. 80055dc: 683b ldr r3, [r7, #0]
  13906. 80055de: 685b ldr r3, [r3, #4]
  13907. 80055e0: 68fa ldr r2, [r7, #12]
  13908. 80055e2: 4313 orrs r3, r2
  13909. 80055e4: 60fb str r3, [r7, #12]
  13910. }
  13911. if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
  13912. 80055e6: 687b ldr r3, [r7, #4]
  13913. 80055e8: 4a32 ldr r2, [pc, #200] @ (80056b4 <TIM_Base_SetConfig+0x120>)
  13914. 80055ea: 4293 cmp r3, r2
  13915. 80055ec: d02b beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13916. 80055ee: 687b ldr r3, [r7, #4]
  13917. 80055f0: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
  13918. 80055f4: d027 beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13919. 80055f6: 687b ldr r3, [r7, #4]
  13920. 80055f8: 4a2f ldr r2, [pc, #188] @ (80056b8 <TIM_Base_SetConfig+0x124>)
  13921. 80055fa: 4293 cmp r3, r2
  13922. 80055fc: d023 beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13923. 80055fe: 687b ldr r3, [r7, #4]
  13924. 8005600: 4a2e ldr r2, [pc, #184] @ (80056bc <TIM_Base_SetConfig+0x128>)
  13925. 8005602: 4293 cmp r3, r2
  13926. 8005604: d01f beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13927. 8005606: 687b ldr r3, [r7, #4]
  13928. 8005608: 4a2d ldr r2, [pc, #180] @ (80056c0 <TIM_Base_SetConfig+0x12c>)
  13929. 800560a: 4293 cmp r3, r2
  13930. 800560c: d01b beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13931. 800560e: 687b ldr r3, [r7, #4]
  13932. 8005610: 4a2c ldr r2, [pc, #176] @ (80056c4 <TIM_Base_SetConfig+0x130>)
  13933. 8005612: 4293 cmp r3, r2
  13934. 8005614: d017 beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13935. 8005616: 687b ldr r3, [r7, #4]
  13936. 8005618: 4a2b ldr r2, [pc, #172] @ (80056c8 <TIM_Base_SetConfig+0x134>)
  13937. 800561a: 4293 cmp r3, r2
  13938. 800561c: d013 beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13939. 800561e: 687b ldr r3, [r7, #4]
  13940. 8005620: 4a2a ldr r2, [pc, #168] @ (80056cc <TIM_Base_SetConfig+0x138>)
  13941. 8005622: 4293 cmp r3, r2
  13942. 8005624: d00f beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13943. 8005626: 687b ldr r3, [r7, #4]
  13944. 8005628: 4a29 ldr r2, [pc, #164] @ (80056d0 <TIM_Base_SetConfig+0x13c>)
  13945. 800562a: 4293 cmp r3, r2
  13946. 800562c: d00b beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13947. 800562e: 687b ldr r3, [r7, #4]
  13948. 8005630: 4a28 ldr r2, [pc, #160] @ (80056d4 <TIM_Base_SetConfig+0x140>)
  13949. 8005632: 4293 cmp r3, r2
  13950. 8005634: d007 beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13951. 8005636: 687b ldr r3, [r7, #4]
  13952. 8005638: 4a27 ldr r2, [pc, #156] @ (80056d8 <TIM_Base_SetConfig+0x144>)
  13953. 800563a: 4293 cmp r3, r2
  13954. 800563c: d003 beq.n 8005646 <TIM_Base_SetConfig+0xb2>
  13955. 800563e: 687b ldr r3, [r7, #4]
  13956. 8005640: 4a26 ldr r2, [pc, #152] @ (80056dc <TIM_Base_SetConfig+0x148>)
  13957. 8005642: 4293 cmp r3, r2
  13958. 8005644: d108 bne.n 8005658 <TIM_Base_SetConfig+0xc4>
  13959. {
  13960. /* Set the clock division */
  13961. tmpcr1 &= ~TIM_CR1_CKD;
  13962. 8005646: 68fb ldr r3, [r7, #12]
  13963. 8005648: f423 7340 bic.w r3, r3, #768 @ 0x300
  13964. 800564c: 60fb str r3, [r7, #12]
  13965. tmpcr1 |= (uint32_t)Structure->ClockDivision;
  13966. 800564e: 683b ldr r3, [r7, #0]
  13967. 8005650: 68db ldr r3, [r3, #12]
  13968. 8005652: 68fa ldr r2, [r7, #12]
  13969. 8005654: 4313 orrs r3, r2
  13970. 8005656: 60fb str r3, [r7, #12]
  13971. }
  13972. /* Set the auto-reload preload */
  13973. MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
  13974. 8005658: 68fb ldr r3, [r7, #12]
  13975. 800565a: f023 0280 bic.w r2, r3, #128 @ 0x80
  13976. 800565e: 683b ldr r3, [r7, #0]
  13977. 8005660: 695b ldr r3, [r3, #20]
  13978. 8005662: 4313 orrs r3, r2
  13979. 8005664: 60fb str r3, [r7, #12]
  13980. /* Set the Autoreload value */
  13981. TIMx->ARR = (uint32_t)Structure->Period ;
  13982. 8005666: 683b ldr r3, [r7, #0]
  13983. 8005668: 689a ldr r2, [r3, #8]
  13984. 800566a: 687b ldr r3, [r7, #4]
  13985. 800566c: 62da str r2, [r3, #44] @ 0x2c
  13986. /* Set the Prescaler value */
  13987. TIMx->PSC = Structure->Prescaler;
  13988. 800566e: 683b ldr r3, [r7, #0]
  13989. 8005670: 681a ldr r2, [r3, #0]
  13990. 8005672: 687b ldr r3, [r7, #4]
  13991. 8005674: 629a str r2, [r3, #40] @ 0x28
  13992. if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
  13993. 8005676: 687b ldr r3, [r7, #4]
  13994. 8005678: 4a0e ldr r2, [pc, #56] @ (80056b4 <TIM_Base_SetConfig+0x120>)
  13995. 800567a: 4293 cmp r3, r2
  13996. 800567c: d003 beq.n 8005686 <TIM_Base_SetConfig+0xf2>
  13997. 800567e: 687b ldr r3, [r7, #4]
  13998. 8005680: 4a10 ldr r2, [pc, #64] @ (80056c4 <TIM_Base_SetConfig+0x130>)
  13999. 8005682: 4293 cmp r3, r2
  14000. 8005684: d103 bne.n 800568e <TIM_Base_SetConfig+0xfa>
  14001. {
  14002. /* Set the Repetition Counter value */
  14003. TIMx->RCR = Structure->RepetitionCounter;
  14004. 8005686: 683b ldr r3, [r7, #0]
  14005. 8005688: 691a ldr r2, [r3, #16]
  14006. 800568a: 687b ldr r3, [r7, #4]
  14007. 800568c: 631a str r2, [r3, #48] @ 0x30
  14008. }
  14009. /* Disable Update Event (UEV) with Update Generation (UG)
  14010. by changing Update Request Source (URS) to avoid Update flag (UIF) */
  14011. SET_BIT(TIMx->CR1, TIM_CR1_URS);
  14012. 800568e: 687b ldr r3, [r7, #4]
  14013. 8005690: 681b ldr r3, [r3, #0]
  14014. 8005692: f043 0204 orr.w r2, r3, #4
  14015. 8005696: 687b ldr r3, [r7, #4]
  14016. 8005698: 601a str r2, [r3, #0]
  14017. /* Generate an update event to reload the Prescaler
  14018. and the repetition counter (only for advanced timer) value immediately */
  14019. TIMx->EGR = TIM_EGR_UG;
  14020. 800569a: 687b ldr r3, [r7, #4]
  14021. 800569c: 2201 movs r2, #1
  14022. 800569e: 615a str r2, [r3, #20]
  14023. TIMx->CR1 = tmpcr1;
  14024. 80056a0: 687b ldr r3, [r7, #4]
  14025. 80056a2: 68fa ldr r2, [r7, #12]
  14026. 80056a4: 601a str r2, [r3, #0]
  14027. }
  14028. 80056a6: bf00 nop
  14029. 80056a8: 3714 adds r7, #20
  14030. 80056aa: 46bd mov sp, r7
  14031. 80056ac: f85d 7b04 ldr.w r7, [sp], #4
  14032. 80056b0: 4770 bx lr
  14033. 80056b2: bf00 nop
  14034. 80056b4: 40010000 .word 0x40010000
  14035. 80056b8: 40000400 .word 0x40000400
  14036. 80056bc: 40000800 .word 0x40000800
  14037. 80056c0: 40000c00 .word 0x40000c00
  14038. 80056c4: 40010400 .word 0x40010400
  14039. 80056c8: 40014000 .word 0x40014000
  14040. 80056cc: 40014400 .word 0x40014400
  14041. 80056d0: 40014800 .word 0x40014800
  14042. 80056d4: 40001800 .word 0x40001800
  14043. 80056d8: 40001c00 .word 0x40001c00
  14044. 80056dc: 40002000 .word 0x40002000
  14045. 080056e0 <TIM_TI1_ConfigInputStage>:
  14046. * @param TIM_ICFilter Specifies the Input Capture Filter.
  14047. * This parameter must be a value between 0x00 and 0x0F.
  14048. * @retval None
  14049. */
  14050. static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
  14051. {
  14052. 80056e0: b480 push {r7}
  14053. 80056e2: b087 sub sp, #28
  14054. 80056e4: af00 add r7, sp, #0
  14055. 80056e6: 60f8 str r0, [r7, #12]
  14056. 80056e8: 60b9 str r1, [r7, #8]
  14057. 80056ea: 607a str r2, [r7, #4]
  14058. uint32_t tmpccmr1;
  14059. uint32_t tmpccer;
  14060. /* Disable the Channel 1: Reset the CC1E Bit */
  14061. tmpccer = TIMx->CCER;
  14062. 80056ec: 68fb ldr r3, [r7, #12]
  14063. 80056ee: 6a1b ldr r3, [r3, #32]
  14064. 80056f0: 617b str r3, [r7, #20]
  14065. TIMx->CCER &= ~TIM_CCER_CC1E;
  14066. 80056f2: 68fb ldr r3, [r7, #12]
  14067. 80056f4: 6a1b ldr r3, [r3, #32]
  14068. 80056f6: f023 0201 bic.w r2, r3, #1
  14069. 80056fa: 68fb ldr r3, [r7, #12]
  14070. 80056fc: 621a str r2, [r3, #32]
  14071. tmpccmr1 = TIMx->CCMR1;
  14072. 80056fe: 68fb ldr r3, [r7, #12]
  14073. 8005700: 699b ldr r3, [r3, #24]
  14074. 8005702: 613b str r3, [r7, #16]
  14075. /* Set the filter */
  14076. tmpccmr1 &= ~TIM_CCMR1_IC1F;
  14077. 8005704: 693b ldr r3, [r7, #16]
  14078. 8005706: f023 03f0 bic.w r3, r3, #240 @ 0xf0
  14079. 800570a: 613b str r3, [r7, #16]
  14080. tmpccmr1 |= (TIM_ICFilter << 4U);
  14081. 800570c: 687b ldr r3, [r7, #4]
  14082. 800570e: 011b lsls r3, r3, #4
  14083. 8005710: 693a ldr r2, [r7, #16]
  14084. 8005712: 4313 orrs r3, r2
  14085. 8005714: 613b str r3, [r7, #16]
  14086. /* Select the Polarity and set the CC1E Bit */
  14087. tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP);
  14088. 8005716: 697b ldr r3, [r7, #20]
  14089. 8005718: f023 030a bic.w r3, r3, #10
  14090. 800571c: 617b str r3, [r7, #20]
  14091. tmpccer |= TIM_ICPolarity;
  14092. 800571e: 697a ldr r2, [r7, #20]
  14093. 8005720: 68bb ldr r3, [r7, #8]
  14094. 8005722: 4313 orrs r3, r2
  14095. 8005724: 617b str r3, [r7, #20]
  14096. /* Write to TIMx CCMR1 and CCER registers */
  14097. TIMx->CCMR1 = tmpccmr1;
  14098. 8005726: 68fb ldr r3, [r7, #12]
  14099. 8005728: 693a ldr r2, [r7, #16]
  14100. 800572a: 619a str r2, [r3, #24]
  14101. TIMx->CCER = tmpccer;
  14102. 800572c: 68fb ldr r3, [r7, #12]
  14103. 800572e: 697a ldr r2, [r7, #20]
  14104. 8005730: 621a str r2, [r3, #32]
  14105. }
  14106. 8005732: bf00 nop
  14107. 8005734: 371c adds r7, #28
  14108. 8005736: 46bd mov sp, r7
  14109. 8005738: f85d 7b04 ldr.w r7, [sp], #4
  14110. 800573c: 4770 bx lr
  14111. 0800573e <TIM_TI2_ConfigInputStage>:
  14112. * @param TIM_ICFilter Specifies the Input Capture Filter.
  14113. * This parameter must be a value between 0x00 and 0x0F.
  14114. * @retval None
  14115. */
  14116. static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
  14117. {
  14118. 800573e: b480 push {r7}
  14119. 8005740: b087 sub sp, #28
  14120. 8005742: af00 add r7, sp, #0
  14121. 8005744: 60f8 str r0, [r7, #12]
  14122. 8005746: 60b9 str r1, [r7, #8]
  14123. 8005748: 607a str r2, [r7, #4]
  14124. uint32_t tmpccmr1;
  14125. uint32_t tmpccer;
  14126. /* Disable the Channel 2: Reset the CC2E Bit */
  14127. tmpccer = TIMx->CCER;
  14128. 800574a: 68fb ldr r3, [r7, #12]
  14129. 800574c: 6a1b ldr r3, [r3, #32]
  14130. 800574e: 617b str r3, [r7, #20]
  14131. TIMx->CCER &= ~TIM_CCER_CC2E;
  14132. 8005750: 68fb ldr r3, [r7, #12]
  14133. 8005752: 6a1b ldr r3, [r3, #32]
  14134. 8005754: f023 0210 bic.w r2, r3, #16
  14135. 8005758: 68fb ldr r3, [r7, #12]
  14136. 800575a: 621a str r2, [r3, #32]
  14137. tmpccmr1 = TIMx->CCMR1;
  14138. 800575c: 68fb ldr r3, [r7, #12]
  14139. 800575e: 699b ldr r3, [r3, #24]
  14140. 8005760: 613b str r3, [r7, #16]
  14141. /* Set the filter */
  14142. tmpccmr1 &= ~TIM_CCMR1_IC2F;
  14143. 8005762: 693b ldr r3, [r7, #16]
  14144. 8005764: f423 4370 bic.w r3, r3, #61440 @ 0xf000
  14145. 8005768: 613b str r3, [r7, #16]
  14146. tmpccmr1 |= (TIM_ICFilter << 12U);
  14147. 800576a: 687b ldr r3, [r7, #4]
  14148. 800576c: 031b lsls r3, r3, #12
  14149. 800576e: 693a ldr r2, [r7, #16]
  14150. 8005770: 4313 orrs r3, r2
  14151. 8005772: 613b str r3, [r7, #16]
  14152. /* Select the Polarity and set the CC2E Bit */
  14153. tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP);
  14154. 8005774: 697b ldr r3, [r7, #20]
  14155. 8005776: f023 03a0 bic.w r3, r3, #160 @ 0xa0
  14156. 800577a: 617b str r3, [r7, #20]
  14157. tmpccer |= (TIM_ICPolarity << 4U);
  14158. 800577c: 68bb ldr r3, [r7, #8]
  14159. 800577e: 011b lsls r3, r3, #4
  14160. 8005780: 697a ldr r2, [r7, #20]
  14161. 8005782: 4313 orrs r3, r2
  14162. 8005784: 617b str r3, [r7, #20]
  14163. /* Write to TIMx CCMR1 and CCER registers */
  14164. TIMx->CCMR1 = tmpccmr1 ;
  14165. 8005786: 68fb ldr r3, [r7, #12]
  14166. 8005788: 693a ldr r2, [r7, #16]
  14167. 800578a: 619a str r2, [r3, #24]
  14168. TIMx->CCER = tmpccer;
  14169. 800578c: 68fb ldr r3, [r7, #12]
  14170. 800578e: 697a ldr r2, [r7, #20]
  14171. 8005790: 621a str r2, [r3, #32]
  14172. }
  14173. 8005792: bf00 nop
  14174. 8005794: 371c adds r7, #28
  14175. 8005796: 46bd mov sp, r7
  14176. 8005798: f85d 7b04 ldr.w r7, [sp], #4
  14177. 800579c: 4770 bx lr
  14178. 0800579e <TIM_ITRx_SetConfig>:
  14179. * @arg TIM_TS_TI2FP2: Filtered Timer Input 2
  14180. * @arg TIM_TS_ETRF: External Trigger input
  14181. * @retval None
  14182. */
  14183. static void TIM_ITRx_SetConfig(TIM_TypeDef *TIMx, uint32_t InputTriggerSource)
  14184. {
  14185. 800579e: b480 push {r7}
  14186. 80057a0: b085 sub sp, #20
  14187. 80057a2: af00 add r7, sp, #0
  14188. 80057a4: 6078 str r0, [r7, #4]
  14189. 80057a6: 6039 str r1, [r7, #0]
  14190. uint32_t tmpsmcr;
  14191. /* Get the TIMx SMCR register value */
  14192. tmpsmcr = TIMx->SMCR;
  14193. 80057a8: 687b ldr r3, [r7, #4]
  14194. 80057aa: 689b ldr r3, [r3, #8]
  14195. 80057ac: 60fb str r3, [r7, #12]
  14196. /* Reset the TS Bits */
  14197. tmpsmcr &= ~TIM_SMCR_TS;
  14198. 80057ae: 68fb ldr r3, [r7, #12]
  14199. 80057b0: f023 0370 bic.w r3, r3, #112 @ 0x70
  14200. 80057b4: 60fb str r3, [r7, #12]
  14201. /* Set the Input Trigger source and the slave mode*/
  14202. tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1);
  14203. 80057b6: 683a ldr r2, [r7, #0]
  14204. 80057b8: 68fb ldr r3, [r7, #12]
  14205. 80057ba: 4313 orrs r3, r2
  14206. 80057bc: f043 0307 orr.w r3, r3, #7
  14207. 80057c0: 60fb str r3, [r7, #12]
  14208. /* Write to TIMx SMCR */
  14209. TIMx->SMCR = tmpsmcr;
  14210. 80057c2: 687b ldr r3, [r7, #4]
  14211. 80057c4: 68fa ldr r2, [r7, #12]
  14212. 80057c6: 609a str r2, [r3, #8]
  14213. }
  14214. 80057c8: bf00 nop
  14215. 80057ca: 3714 adds r7, #20
  14216. 80057cc: 46bd mov sp, r7
  14217. 80057ce: f85d 7b04 ldr.w r7, [sp], #4
  14218. 80057d2: 4770 bx lr
  14219. 080057d4 <TIM_ETR_SetConfig>:
  14220. * This parameter must be a value between 0x00 and 0x0F
  14221. * @retval None
  14222. */
  14223. void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
  14224. uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter)
  14225. {
  14226. 80057d4: b480 push {r7}
  14227. 80057d6: b087 sub sp, #28
  14228. 80057d8: af00 add r7, sp, #0
  14229. 80057da: 60f8 str r0, [r7, #12]
  14230. 80057dc: 60b9 str r1, [r7, #8]
  14231. 80057de: 607a str r2, [r7, #4]
  14232. 80057e0: 603b str r3, [r7, #0]
  14233. uint32_t tmpsmcr;
  14234. tmpsmcr = TIMx->SMCR;
  14235. 80057e2: 68fb ldr r3, [r7, #12]
  14236. 80057e4: 689b ldr r3, [r3, #8]
  14237. 80057e6: 617b str r3, [r7, #20]
  14238. /* Reset the ETR Bits */
  14239. tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP);
  14240. 80057e8: 697b ldr r3, [r7, #20]
  14241. 80057ea: f423 437f bic.w r3, r3, #65280 @ 0xff00
  14242. 80057ee: 617b str r3, [r7, #20]
  14243. /* Set the Prescaler, the Filter value and the Polarity */
  14244. tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U)));
  14245. 80057f0: 683b ldr r3, [r7, #0]
  14246. 80057f2: 021a lsls r2, r3, #8
  14247. 80057f4: 687b ldr r3, [r7, #4]
  14248. 80057f6: 431a orrs r2, r3
  14249. 80057f8: 68bb ldr r3, [r7, #8]
  14250. 80057fa: 4313 orrs r3, r2
  14251. 80057fc: 697a ldr r2, [r7, #20]
  14252. 80057fe: 4313 orrs r3, r2
  14253. 8005800: 617b str r3, [r7, #20]
  14254. /* Write to TIMx SMCR */
  14255. TIMx->SMCR = tmpsmcr;
  14256. 8005802: 68fb ldr r3, [r7, #12]
  14257. 8005804: 697a ldr r2, [r7, #20]
  14258. 8005806: 609a str r2, [r3, #8]
  14259. }
  14260. 8005808: bf00 nop
  14261. 800580a: 371c adds r7, #28
  14262. 800580c: 46bd mov sp, r7
  14263. 800580e: f85d 7b04 ldr.w r7, [sp], #4
  14264. 8005812: 4770 bx lr
  14265. 08005814 <HAL_TIMEx_MasterConfigSynchronization>:
  14266. * mode.
  14267. * @retval HAL status
  14268. */
  14269. HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
  14270. const TIM_MasterConfigTypeDef *sMasterConfig)
  14271. {
  14272. 8005814: b480 push {r7}
  14273. 8005816: b085 sub sp, #20
  14274. 8005818: af00 add r7, sp, #0
  14275. 800581a: 6078 str r0, [r7, #4]
  14276. 800581c: 6039 str r1, [r7, #0]
  14277. assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance));
  14278. assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger));
  14279. assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode));
  14280. /* Check input state */
  14281. __HAL_LOCK(htim);
  14282. 800581e: 687b ldr r3, [r7, #4]
  14283. 8005820: f893 303c ldrb.w r3, [r3, #60] @ 0x3c
  14284. 8005824: 2b01 cmp r3, #1
  14285. 8005826: d101 bne.n 800582c <HAL_TIMEx_MasterConfigSynchronization+0x18>
  14286. 8005828: 2302 movs r3, #2
  14287. 800582a: e05a b.n 80058e2 <HAL_TIMEx_MasterConfigSynchronization+0xce>
  14288. 800582c: 687b ldr r3, [r7, #4]
  14289. 800582e: 2201 movs r2, #1
  14290. 8005830: f883 203c strb.w r2, [r3, #60] @ 0x3c
  14291. /* Change the handler state */
  14292. htim->State = HAL_TIM_STATE_BUSY;
  14293. 8005834: 687b ldr r3, [r7, #4]
  14294. 8005836: 2202 movs r2, #2
  14295. 8005838: f883 203d strb.w r2, [r3, #61] @ 0x3d
  14296. /* Get the TIMx CR2 register value */
  14297. tmpcr2 = htim->Instance->CR2;
  14298. 800583c: 687b ldr r3, [r7, #4]
  14299. 800583e: 681b ldr r3, [r3, #0]
  14300. 8005840: 685b ldr r3, [r3, #4]
  14301. 8005842: 60fb str r3, [r7, #12]
  14302. /* Get the TIMx SMCR register value */
  14303. tmpsmcr = htim->Instance->SMCR;
  14304. 8005844: 687b ldr r3, [r7, #4]
  14305. 8005846: 681b ldr r3, [r3, #0]
  14306. 8005848: 689b ldr r3, [r3, #8]
  14307. 800584a: 60bb str r3, [r7, #8]
  14308. /* Reset the MMS Bits */
  14309. tmpcr2 &= ~TIM_CR2_MMS;
  14310. 800584c: 68fb ldr r3, [r7, #12]
  14311. 800584e: f023 0370 bic.w r3, r3, #112 @ 0x70
  14312. 8005852: 60fb str r3, [r7, #12]
  14313. /* Select the TRGO source */
  14314. tmpcr2 |= sMasterConfig->MasterOutputTrigger;
  14315. 8005854: 683b ldr r3, [r7, #0]
  14316. 8005856: 681b ldr r3, [r3, #0]
  14317. 8005858: 68fa ldr r2, [r7, #12]
  14318. 800585a: 4313 orrs r3, r2
  14319. 800585c: 60fb str r3, [r7, #12]
  14320. /* Update TIMx CR2 */
  14321. htim->Instance->CR2 = tmpcr2;
  14322. 800585e: 687b ldr r3, [r7, #4]
  14323. 8005860: 681b ldr r3, [r3, #0]
  14324. 8005862: 68fa ldr r2, [r7, #12]
  14325. 8005864: 605a str r2, [r3, #4]
  14326. if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
  14327. 8005866: 687b ldr r3, [r7, #4]
  14328. 8005868: 681b ldr r3, [r3, #0]
  14329. 800586a: 4a21 ldr r2, [pc, #132] @ (80058f0 <HAL_TIMEx_MasterConfigSynchronization+0xdc>)
  14330. 800586c: 4293 cmp r3, r2
  14331. 800586e: d022 beq.n 80058b6 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  14332. 8005870: 687b ldr r3, [r7, #4]
  14333. 8005872: 681b ldr r3, [r3, #0]
  14334. 8005874: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
  14335. 8005878: d01d beq.n 80058b6 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  14336. 800587a: 687b ldr r3, [r7, #4]
  14337. 800587c: 681b ldr r3, [r3, #0]
  14338. 800587e: 4a1d ldr r2, [pc, #116] @ (80058f4 <HAL_TIMEx_MasterConfigSynchronization+0xe0>)
  14339. 8005880: 4293 cmp r3, r2
  14340. 8005882: d018 beq.n 80058b6 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  14341. 8005884: 687b ldr r3, [r7, #4]
  14342. 8005886: 681b ldr r3, [r3, #0]
  14343. 8005888: 4a1b ldr r2, [pc, #108] @ (80058f8 <HAL_TIMEx_MasterConfigSynchronization+0xe4>)
  14344. 800588a: 4293 cmp r3, r2
  14345. 800588c: d013 beq.n 80058b6 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  14346. 800588e: 687b ldr r3, [r7, #4]
  14347. 8005890: 681b ldr r3, [r3, #0]
  14348. 8005892: 4a1a ldr r2, [pc, #104] @ (80058fc <HAL_TIMEx_MasterConfigSynchronization+0xe8>)
  14349. 8005894: 4293 cmp r3, r2
  14350. 8005896: d00e beq.n 80058b6 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  14351. 8005898: 687b ldr r3, [r7, #4]
  14352. 800589a: 681b ldr r3, [r3, #0]
  14353. 800589c: 4a18 ldr r2, [pc, #96] @ (8005900 <HAL_TIMEx_MasterConfigSynchronization+0xec>)
  14354. 800589e: 4293 cmp r3, r2
  14355. 80058a0: d009 beq.n 80058b6 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  14356. 80058a2: 687b ldr r3, [r7, #4]
  14357. 80058a4: 681b ldr r3, [r3, #0]
  14358. 80058a6: 4a17 ldr r2, [pc, #92] @ (8005904 <HAL_TIMEx_MasterConfigSynchronization+0xf0>)
  14359. 80058a8: 4293 cmp r3, r2
  14360. 80058aa: d004 beq.n 80058b6 <HAL_TIMEx_MasterConfigSynchronization+0xa2>
  14361. 80058ac: 687b ldr r3, [r7, #4]
  14362. 80058ae: 681b ldr r3, [r3, #0]
  14363. 80058b0: 4a15 ldr r2, [pc, #84] @ (8005908 <HAL_TIMEx_MasterConfigSynchronization+0xf4>)
  14364. 80058b2: 4293 cmp r3, r2
  14365. 80058b4: d10c bne.n 80058d0 <HAL_TIMEx_MasterConfigSynchronization+0xbc>
  14366. {
  14367. /* Reset the MSM Bit */
  14368. tmpsmcr &= ~TIM_SMCR_MSM;
  14369. 80058b6: 68bb ldr r3, [r7, #8]
  14370. 80058b8: f023 0380 bic.w r3, r3, #128 @ 0x80
  14371. 80058bc: 60bb str r3, [r7, #8]
  14372. /* Set master mode */
  14373. tmpsmcr |= sMasterConfig->MasterSlaveMode;
  14374. 80058be: 683b ldr r3, [r7, #0]
  14375. 80058c0: 685b ldr r3, [r3, #4]
  14376. 80058c2: 68ba ldr r2, [r7, #8]
  14377. 80058c4: 4313 orrs r3, r2
  14378. 80058c6: 60bb str r3, [r7, #8]
  14379. /* Update TIMx SMCR */
  14380. htim->Instance->SMCR = tmpsmcr;
  14381. 80058c8: 687b ldr r3, [r7, #4]
  14382. 80058ca: 681b ldr r3, [r3, #0]
  14383. 80058cc: 68ba ldr r2, [r7, #8]
  14384. 80058ce: 609a str r2, [r3, #8]
  14385. }
  14386. /* Change the htim state */
  14387. htim->State = HAL_TIM_STATE_READY;
  14388. 80058d0: 687b ldr r3, [r7, #4]
  14389. 80058d2: 2201 movs r2, #1
  14390. 80058d4: f883 203d strb.w r2, [r3, #61] @ 0x3d
  14391. __HAL_UNLOCK(htim);
  14392. 80058d8: 687b ldr r3, [r7, #4]
  14393. 80058da: 2200 movs r2, #0
  14394. 80058dc: f883 203c strb.w r2, [r3, #60] @ 0x3c
  14395. return HAL_OK;
  14396. 80058e0: 2300 movs r3, #0
  14397. }
  14398. 80058e2: 4618 mov r0, r3
  14399. 80058e4: 3714 adds r7, #20
  14400. 80058e6: 46bd mov sp, r7
  14401. 80058e8: f85d 7b04 ldr.w r7, [sp], #4
  14402. 80058ec: 4770 bx lr
  14403. 80058ee: bf00 nop
  14404. 80058f0: 40010000 .word 0x40010000
  14405. 80058f4: 40000400 .word 0x40000400
  14406. 80058f8: 40000800 .word 0x40000800
  14407. 80058fc: 40000c00 .word 0x40000c00
  14408. 8005900: 40010400 .word 0x40010400
  14409. 8005904: 40014000 .word 0x40014000
  14410. 8005908: 40001800 .word 0x40001800
  14411. 0800590c <HAL_TIMEx_CommutCallback>:
  14412. * @brief Commutation callback in non-blocking mode
  14413. * @param htim TIM handle
  14414. * @retval None
  14415. */
  14416. __weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim)
  14417. {
  14418. 800590c: b480 push {r7}
  14419. 800590e: b083 sub sp, #12
  14420. 8005910: af00 add r7, sp, #0
  14421. 8005912: 6078 str r0, [r7, #4]
  14422. UNUSED(htim);
  14423. /* NOTE : This function should not be modified, when the callback is needed,
  14424. the HAL_TIMEx_CommutCallback could be implemented in the user file
  14425. */
  14426. }
  14427. 8005914: bf00 nop
  14428. 8005916: 370c adds r7, #12
  14429. 8005918: 46bd mov sp, r7
  14430. 800591a: f85d 7b04 ldr.w r7, [sp], #4
  14431. 800591e: 4770 bx lr
  14432. 08005920 <HAL_TIMEx_BreakCallback>:
  14433. * @brief Break detection callback in non-blocking mode
  14434. * @param htim TIM handle
  14435. * @retval None
  14436. */
  14437. __weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim)
  14438. {
  14439. 8005920: b480 push {r7}
  14440. 8005922: b083 sub sp, #12
  14441. 8005924: af00 add r7, sp, #0
  14442. 8005926: 6078 str r0, [r7, #4]
  14443. UNUSED(htim);
  14444. /* NOTE : This function should not be modified, when the callback is needed,
  14445. the HAL_TIMEx_BreakCallback could be implemented in the user file
  14446. */
  14447. }
  14448. 8005928: bf00 nop
  14449. 800592a: 370c adds r7, #12
  14450. 800592c: 46bd mov sp, r7
  14451. 800592e: f85d 7b04 ldr.w r7, [sp], #4
  14452. 8005932: 4770 bx lr
  14453. 08005934 <memset>:
  14454. 8005934: 4402 add r2, r0
  14455. 8005936: 4603 mov r3, r0
  14456. 8005938: 4293 cmp r3, r2
  14457. 800593a: d100 bne.n 800593e <memset+0xa>
  14458. 800593c: 4770 bx lr
  14459. 800593e: f803 1b01 strb.w r1, [r3], #1
  14460. 8005942: e7f9 b.n 8005938 <memset+0x4>
  14461. 08005944 <__libc_init_array>:
  14462. 8005944: b570 push {r4, r5, r6, lr}
  14463. 8005946: 4d0d ldr r5, [pc, #52] @ (800597c <__libc_init_array+0x38>)
  14464. 8005948: 4c0d ldr r4, [pc, #52] @ (8005980 <__libc_init_array+0x3c>)
  14465. 800594a: 1b64 subs r4, r4, r5
  14466. 800594c: 10a4 asrs r4, r4, #2
  14467. 800594e: 2600 movs r6, #0
  14468. 8005950: 42a6 cmp r6, r4
  14469. 8005952: d109 bne.n 8005968 <__libc_init_array+0x24>
  14470. 8005954: 4d0b ldr r5, [pc, #44] @ (8005984 <__libc_init_array+0x40>)
  14471. 8005956: 4c0c ldr r4, [pc, #48] @ (8005988 <__libc_init_array+0x44>)
  14472. 8005958: f000 f826 bl 80059a8 <_init>
  14473. 800595c: 1b64 subs r4, r4, r5
  14474. 800595e: 10a4 asrs r4, r4, #2
  14475. 8005960: 2600 movs r6, #0
  14476. 8005962: 42a6 cmp r6, r4
  14477. 8005964: d105 bne.n 8005972 <__libc_init_array+0x2e>
  14478. 8005966: bd70 pop {r4, r5, r6, pc}
  14479. 8005968: f855 3b04 ldr.w r3, [r5], #4
  14480. 800596c: 4798 blx r3
  14481. 800596e: 3601 adds r6, #1
  14482. 8005970: e7ee b.n 8005950 <__libc_init_array+0xc>
  14483. 8005972: f855 3b04 ldr.w r3, [r5], #4
  14484. 8005976: 4798 blx r3
  14485. 8005978: 3601 adds r6, #1
  14486. 800597a: e7f2 b.n 8005962 <__libc_init_array+0x1e>
  14487. 800597c: 08005df8 .word 0x08005df8
  14488. 8005980: 08005df8 .word 0x08005df8
  14489. 8005984: 08005df8 .word 0x08005df8
  14490. 8005988: 08005dfc .word 0x08005dfc
  14491. 0800598c <memcpy>:
  14492. 800598c: 440a add r2, r1
  14493. 800598e: 4291 cmp r1, r2
  14494. 8005990: f100 33ff add.w r3, r0, #4294967295
  14495. 8005994: d100 bne.n 8005998 <memcpy+0xc>
  14496. 8005996: 4770 bx lr
  14497. 8005998: b510 push {r4, lr}
  14498. 800599a: f811 4b01 ldrb.w r4, [r1], #1
  14499. 800599e: f803 4f01 strb.w r4, [r3, #1]!
  14500. 80059a2: 4291 cmp r1, r2
  14501. 80059a4: d1f9 bne.n 800599a <memcpy+0xe>
  14502. 80059a6: bd10 pop {r4, pc}
  14503. 080059a8 <_init>:
  14504. 80059a8: b5f8 push {r3, r4, r5, r6, r7, lr}
  14505. 80059aa: bf00 nop
  14506. 80059ac: bcf8 pop {r3, r4, r5, r6, r7}
  14507. 80059ae: bc08 pop {r3}
  14508. 80059b0: 469e mov lr, r3
  14509. 80059b2: 4770 bx lr
  14510. 080059b4 <_fini>:
  14511. 80059b4: b5f8 push {r3, r4, r5, r6, r7, lr}
  14512. 80059b6: bf00 nop
  14513. 80059b8: bcf8 pop {r3, r4, r5, r6, r7}
  14514. 80059ba: bc08 pop {r3}
  14515. 80059bc: 469e mov lr, r3
  14516. 80059be: 4770 bx lr