main.lst 113 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240
  1. build/main.elf: file format elf32-littlearm
  2. Disassembly of section .text:
  3. 0800010c <NVIC_SetPriority>:
  4. * interrupt, or negative to specify an internal (core) interrupt.
  5. *
  6. * Note: The priority cannot be set for every core interrupt.
  7. */
  8. static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
  9. {
  10. 800010c: b480 push {r7}
  11. 800010e: b083 sub sp, #12
  12. 8000110: af00 add r7, sp, #0
  13. 8000112: 4603 mov r3, r0
  14. 8000114: 6039 str r1, [r7, #0]
  15. 8000116: 71fb strb r3, [r7, #7]
  16. if(IRQn < 0) {
  17. 8000118: f997 3007 ldrsb.w r3, [r7, #7]
  18. 800011c: 2b00 cmp r3, #0
  19. 800011e: da0b bge.n 8000138 <NVIC_SetPriority+0x2c>
  20. SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
  21. 8000120: 490d ldr r1, [pc, #52] ; (8000158 <NVIC_SetPriority+0x4c>)
  22. 8000122: 79fb ldrb r3, [r7, #7]
  23. 8000124: f003 030f and.w r3, r3, #15
  24. 8000128: 3b04 subs r3, #4
  25. 800012a: 683a ldr r2, [r7, #0]
  26. 800012c: b2d2 uxtb r2, r2
  27. 800012e: 0112 lsls r2, r2, #4
  28. 8000130: b2d2 uxtb r2, r2
  29. 8000132: 440b add r3, r1
  30. 8000134: 761a strb r2, [r3, #24]
  31. else {
  32. NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
  33. }
  34. 8000136: e009 b.n 800014c <NVIC_SetPriority+0x40>
  35. static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
  36. {
  37. if(IRQn < 0) {
  38. SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
  39. else {
  40. NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
  41. 8000138: 4908 ldr r1, [pc, #32] ; (800015c <NVIC_SetPriority+0x50>)
  42. 800013a: f997 3007 ldrsb.w r3, [r7, #7]
  43. 800013e: 683a ldr r2, [r7, #0]
  44. 8000140: b2d2 uxtb r2, r2
  45. 8000142: 0112 lsls r2, r2, #4
  46. 8000144: b2d2 uxtb r2, r2
  47. 8000146: 440b add r3, r1
  48. 8000148: f883 2300 strb.w r2, [r3, #768] ; 0x300
  49. }
  50. 800014c: bf00 nop
  51. 800014e: 370c adds r7, #12
  52. 8000150: 46bd mov sp, r7
  53. 8000152: bc80 pop {r7}
  54. 8000154: 4770 bx lr
  55. 8000156: bf00 nop
  56. 8000158: e000ed00 .word 0xe000ed00
  57. 800015c: e000e100 .word 0xe000e100
  58. 08000160 <SysTick_Config>:
  59. * Initialise the system tick timer and its interrupt and start the
  60. * system tick timer / counter in free running mode to generate
  61. * periodical interrupts.
  62. */
  63. static __INLINE uint32_t SysTick_Config(uint32_t ticks)
  64. {
  65. 8000160: b580 push {r7, lr}
  66. 8000162: b082 sub sp, #8
  67. 8000164: af00 add r7, sp, #0
  68. 8000166: 6078 str r0, [r7, #4]
  69. if (ticks > SysTick_LOAD_RELOAD_Msk) return (1); /* Reload value impossible */
  70. 8000168: 687b ldr r3, [r7, #4]
  71. 800016a: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
  72. 800016e: d301 bcc.n 8000174 <SysTick_Config+0x14>
  73. 8000170: 2301 movs r3, #1
  74. 8000172: e011 b.n 8000198 <SysTick_Config+0x38>
  75. SysTick->LOAD = (ticks & SysTick_LOAD_RELOAD_Msk) - 1; /* set reload register */
  76. 8000174: 4a0a ldr r2, [pc, #40] ; (80001a0 <SysTick_Config+0x40>)
  77. 8000176: 687b ldr r3, [r7, #4]
  78. 8000178: f023 437f bic.w r3, r3, #4278190080 ; 0xff000000
  79. 800017c: 3b01 subs r3, #1
  80. 800017e: 6053 str r3, [r2, #4]
  81. NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1); /* set Priority for Cortex-M0 System Interrupts */
  82. 8000180: 210f movs r1, #15
  83. 8000182: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
  84. 8000186: f7ff ffc1 bl 800010c <NVIC_SetPriority>
  85. SysTick->VAL = 0; /* Load the SysTick Counter Value */
  86. 800018a: 4b05 ldr r3, [pc, #20] ; (80001a0 <SysTick_Config+0x40>)
  87. 800018c: 2200 movs r2, #0
  88. 800018e: 609a str r2, [r3, #8]
  89. SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
  90. 8000190: 4b03 ldr r3, [pc, #12] ; (80001a0 <SysTick_Config+0x40>)
  91. 8000192: 2207 movs r2, #7
  92. 8000194: 601a str r2, [r3, #0]
  93. SysTick_CTRL_TICKINT_Msk |
  94. SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
  95. return (0); /* Function successful */
  96. 8000196: 2300 movs r3, #0
  97. }
  98. 8000198: 4618 mov r0, r3
  99. 800019a: 3708 adds r7, #8
  100. 800019c: 46bd mov sp, r7
  101. 800019e: bd80 pop {r7, pc}
  102. 80001a0: e000e010 .word 0xe000e010
  103. 080001a4 <SystemInit>:
  104. * @note This function should be used only after reset.
  105. * @param None
  106. * @retval None
  107. */
  108. void SystemInit (void)
  109. {
  110. 80001a4: b580 push {r7, lr}
  111. 80001a6: af00 add r7, sp, #0
  112. /* Reset the RCC clock configuration to the default reset state(for debug purpose) */
  113. /* Set HSION bit */
  114. RCC->CR |= (uint32_t)0x00000001;
  115. 80001a8: 4a15 ldr r2, [pc, #84] ; (8000200 <SystemInit+0x5c>)
  116. 80001aa: 4b15 ldr r3, [pc, #84] ; (8000200 <SystemInit+0x5c>)
  117. 80001ac: 681b ldr r3, [r3, #0]
  118. 80001ae: f043 0301 orr.w r3, r3, #1
  119. 80001b2: 6013 str r3, [r2, #0]
  120. /* Reset SW, HPRE, PPRE1, PPRE2, ADCPRE and MCO bits */
  121. #ifndef STM32F10X_CL
  122. RCC->CFGR &= (uint32_t)0xF8FF0000;
  123. 80001b4: 4912 ldr r1, [pc, #72] ; (8000200 <SystemInit+0x5c>)
  124. 80001b6: 4b12 ldr r3, [pc, #72] ; (8000200 <SystemInit+0x5c>)
  125. 80001b8: 685a ldr r2, [r3, #4]
  126. 80001ba: 4b12 ldr r3, [pc, #72] ; (8000204 <SystemInit+0x60>)
  127. 80001bc: 4013 ands r3, r2
  128. 80001be: 604b str r3, [r1, #4]
  129. #else
  130. RCC->CFGR &= (uint32_t)0xF0FF0000;
  131. #endif /* STM32F10X_CL */
  132. /* Reset HSEON, CSSON and PLLON bits */
  133. RCC->CR &= (uint32_t)0xFEF6FFFF;
  134. 80001c0: 4a0f ldr r2, [pc, #60] ; (8000200 <SystemInit+0x5c>)
  135. 80001c2: 4b0f ldr r3, [pc, #60] ; (8000200 <SystemInit+0x5c>)
  136. 80001c4: 681b ldr r3, [r3, #0]
  137. 80001c6: f023 7384 bic.w r3, r3, #17301504 ; 0x1080000
  138. 80001ca: f423 3380 bic.w r3, r3, #65536 ; 0x10000
  139. 80001ce: 6013 str r3, [r2, #0]
  140. /* Reset HSEBYP bit */
  141. RCC->CR &= (uint32_t)0xFFFBFFFF;
  142. 80001d0: 4a0b ldr r2, [pc, #44] ; (8000200 <SystemInit+0x5c>)
  143. 80001d2: 4b0b ldr r3, [pc, #44] ; (8000200 <SystemInit+0x5c>)
  144. 80001d4: 681b ldr r3, [r3, #0]
  145. 80001d6: f423 2380 bic.w r3, r3, #262144 ; 0x40000
  146. 80001da: 6013 str r3, [r2, #0]
  147. /* Reset PLLSRC, PLLXTPRE, PLLMUL and USBPRE/OTGFSPRE bits */
  148. RCC->CFGR &= (uint32_t)0xFF80FFFF;
  149. 80001dc: 4a08 ldr r2, [pc, #32] ; (8000200 <SystemInit+0x5c>)
  150. 80001de: 4b08 ldr r3, [pc, #32] ; (8000200 <SystemInit+0x5c>)
  151. 80001e0: 685b ldr r3, [r3, #4]
  152. 80001e2: f423 03fe bic.w r3, r3, #8323072 ; 0x7f0000
  153. 80001e6: 6053 str r3, [r2, #4]
  154. /* Reset CFGR2 register */
  155. RCC->CFGR2 = 0x00000000;
  156. #else
  157. /* Disable all interrupts and clear pending bits */
  158. RCC->CIR = 0x009F0000;
  159. 80001e8: 4b05 ldr r3, [pc, #20] ; (8000200 <SystemInit+0x5c>)
  160. 80001ea: f44f 021f mov.w r2, #10420224 ; 0x9f0000
  161. 80001ee: 609a str r2, [r3, #8]
  162. #endif /* DATA_IN_ExtSRAM */
  163. #endif
  164. /* Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers */
  165. /* Configure the Flash Latency cycles and enable prefetch buffer */
  166. SetSysClock();
  167. 80001f0: f000 f878 bl 80002e4 <SetSysClock>
  168. #ifdef VECT_TAB_SRAM
  169. SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
  170. #else
  171. SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
  172. 80001f4: 4b04 ldr r3, [pc, #16] ; (8000208 <SystemInit+0x64>)
  173. 80001f6: f04f 6200 mov.w r2, #134217728 ; 0x8000000
  174. 80001fa: 609a str r2, [r3, #8]
  175. #endif
  176. }
  177. 80001fc: bf00 nop
  178. 80001fe: bd80 pop {r7, pc}
  179. 8000200: 40021000 .word 0x40021000
  180. 8000204: f8ff0000 .word 0xf8ff0000
  181. 8000208: e000ed00 .word 0xe000ed00
  182. 0800020c <SystemCoreClockUpdate>:
  183. * value for HSE crystal.
  184. * @param None
  185. * @retval None
  186. */
  187. void SystemCoreClockUpdate (void)
  188. {
  189. 800020c: b480 push {r7}
  190. 800020e: b085 sub sp, #20
  191. 8000210: af00 add r7, sp, #0
  192. uint32_t tmp = 0, pllmull = 0, pllsource = 0;
  193. 8000212: 2300 movs r3, #0
  194. 8000214: 60fb str r3, [r7, #12]
  195. 8000216: 2300 movs r3, #0
  196. 8000218: 60bb str r3, [r7, #8]
  197. 800021a: 2300 movs r3, #0
  198. 800021c: 607b str r3, [r7, #4]
  199. #if defined (STM32F10X_LD_VL) || defined (STM32F10X_MD_VL) || (defined STM32F10X_HD_VL)
  200. uint32_t prediv1factor = 0;
  201. #endif /* STM32F10X_LD_VL or STM32F10X_MD_VL or STM32F10X_HD_VL */
  202. /* Get SYSCLK source -------------------------------------------------------*/
  203. tmp = RCC->CFGR & RCC_CFGR_SWS;
  204. 800021e: 4b2c ldr r3, [pc, #176] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  205. 8000220: 685b ldr r3, [r3, #4]
  206. 8000222: f003 030c and.w r3, r3, #12
  207. 8000226: 60fb str r3, [r7, #12]
  208. switch (tmp)
  209. 8000228: 68fb ldr r3, [r7, #12]
  210. 800022a: 2b04 cmp r3, #4
  211. 800022c: d007 beq.n 800023e <SystemCoreClockUpdate+0x32>
  212. 800022e: 2b08 cmp r3, #8
  213. 8000230: d009 beq.n 8000246 <SystemCoreClockUpdate+0x3a>
  214. 8000232: 2b00 cmp r3, #0
  215. 8000234: d133 bne.n 800029e <SystemCoreClockUpdate+0x92>
  216. {
  217. case 0x00: /* HSI used as system clock */
  218. SystemCoreClock = HSI_VALUE;
  219. 8000236: 4b27 ldr r3, [pc, #156] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  220. 8000238: 4a27 ldr r2, [pc, #156] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  221. 800023a: 601a str r2, [r3, #0]
  222. break;
  223. 800023c: e033 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  224. case 0x04: /* HSE used as system clock */
  225. SystemCoreClock = HSE_VALUE;
  226. 800023e: 4b25 ldr r3, [pc, #148] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  227. 8000240: 4a25 ldr r2, [pc, #148] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  228. 8000242: 601a str r2, [r3, #0]
  229. break;
  230. 8000244: e02f b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  231. case 0x08: /* PLL used as system clock */
  232. /* Get PLL clock source and multiplication factor ----------------------*/
  233. pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
  234. 8000246: 4b22 ldr r3, [pc, #136] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  235. 8000248: 685b ldr r3, [r3, #4]
  236. 800024a: f403 1370 and.w r3, r3, #3932160 ; 0x3c0000
  237. 800024e: 60bb str r3, [r7, #8]
  238. pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  239. 8000250: 4b1f ldr r3, [pc, #124] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  240. 8000252: 685b ldr r3, [r3, #4]
  241. 8000254: f403 3380 and.w r3, r3, #65536 ; 0x10000
  242. 8000258: 607b str r3, [r7, #4]
  243. #ifndef STM32F10X_CL
  244. pllmull = ( pllmull >> 18) + 2;
  245. 800025a: 68bb ldr r3, [r7, #8]
  246. 800025c: 0c9b lsrs r3, r3, #18
  247. 800025e: 3302 adds r3, #2
  248. 8000260: 60bb str r3, [r7, #8]
  249. if (pllsource == 0x00)
  250. 8000262: 687b ldr r3, [r7, #4]
  251. 8000264: 2b00 cmp r3, #0
  252. 8000266: d106 bne.n 8000276 <SystemCoreClockUpdate+0x6a>
  253. {
  254. /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  255. SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
  256. 8000268: 68bb ldr r3, [r7, #8]
  257. 800026a: 4a1c ldr r2, [pc, #112] ; (80002dc <SystemCoreClockUpdate+0xd0>)
  258. 800026c: fb02 f303 mul.w r3, r2, r3
  259. 8000270: 4a18 ldr r2, [pc, #96] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  260. 8000272: 6013 str r3, [r2, #0]
  261. pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
  262. SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
  263. }
  264. }
  265. #endif /* STM32F10X_CL */
  266. break;
  267. 8000274: e017 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  268. prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
  269. /* HSE oscillator clock selected as PREDIV1 clock entry */
  270. SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  271. #else
  272. /* HSE selected as PLL clock entry */
  273. if ((RCC->CFGR & RCC_CFGR_PLLXTPRE) != (uint32_t)RESET)
  274. 8000276: 4b16 ldr r3, [pc, #88] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  275. 8000278: 685b ldr r3, [r3, #4]
  276. 800027a: f403 3300 and.w r3, r3, #131072 ; 0x20000
  277. 800027e: 2b00 cmp r3, #0
  278. 8000280: d006 beq.n 8000290 <SystemCoreClockUpdate+0x84>
  279. {/* HSE oscillator clock divided by 2 */
  280. SystemCoreClock = (HSE_VALUE >> 1) * pllmull;
  281. 8000282: 68bb ldr r3, [r7, #8]
  282. 8000284: 4a15 ldr r2, [pc, #84] ; (80002dc <SystemCoreClockUpdate+0xd0>)
  283. 8000286: fb02 f303 mul.w r3, r2, r3
  284. 800028a: 4a12 ldr r2, [pc, #72] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  285. 800028c: 6013 str r3, [r2, #0]
  286. pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
  287. SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
  288. }
  289. }
  290. #endif /* STM32F10X_CL */
  291. break;
  292. 800028e: e00a b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  293. {/* HSE oscillator clock divided by 2 */
  294. SystemCoreClock = (HSE_VALUE >> 1) * pllmull;
  295. }
  296. else
  297. {
  298. SystemCoreClock = HSE_VALUE * pllmull;
  299. 8000290: 68bb ldr r3, [r7, #8]
  300. 8000292: 4a11 ldr r2, [pc, #68] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  301. 8000294: fb02 f303 mul.w r3, r2, r3
  302. 8000298: 4a0e ldr r2, [pc, #56] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  303. 800029a: 6013 str r3, [r2, #0]
  304. pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
  305. SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
  306. }
  307. }
  308. #endif /* STM32F10X_CL */
  309. break;
  310. 800029c: e003 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  311. default:
  312. SystemCoreClock = HSI_VALUE;
  313. 800029e: 4b0d ldr r3, [pc, #52] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  314. 80002a0: 4a0d ldr r2, [pc, #52] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  315. 80002a2: 601a str r2, [r3, #0]
  316. break;
  317. 80002a4: bf00 nop
  318. }
  319. /* Compute HCLK clock frequency ----------------*/
  320. /* Get HCLK prescaler */
  321. tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
  322. 80002a6: 4b0a ldr r3, [pc, #40] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  323. 80002a8: 685b ldr r3, [r3, #4]
  324. 80002aa: f003 03f0 and.w r3, r3, #240 ; 0xf0
  325. 80002ae: 091b lsrs r3, r3, #4
  326. 80002b0: 4a0b ldr r2, [pc, #44] ; (80002e0 <SystemCoreClockUpdate+0xd4>)
  327. 80002b2: 5cd3 ldrb r3, [r2, r3]
  328. 80002b4: b2db uxtb r3, r3
  329. 80002b6: 60fb str r3, [r7, #12]
  330. /* HCLK clock frequency */
  331. SystemCoreClock >>= tmp;
  332. 80002b8: 4b06 ldr r3, [pc, #24] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  333. 80002ba: 681a ldr r2, [r3, #0]
  334. 80002bc: 68fb ldr r3, [r7, #12]
  335. 80002be: fa22 f303 lsr.w r3, r2, r3
  336. 80002c2: 4a04 ldr r2, [pc, #16] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  337. 80002c4: 6013 str r3, [r2, #0]
  338. }
  339. 80002c6: bf00 nop
  340. 80002c8: 3714 adds r7, #20
  341. 80002ca: 46bd mov sp, r7
  342. 80002cc: bc80 pop {r7}
  343. 80002ce: 4770 bx lr
  344. 80002d0: 40021000 .word 0x40021000
  345. 80002d4: 20000000 .word 0x20000000
  346. 80002d8: 007a1200 .word 0x007a1200
  347. 80002dc: 003d0900 .word 0x003d0900
  348. 80002e0: 20000004 .word 0x20000004
  349. 080002e4 <SetSysClock>:
  350. * @brief Configures the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers.
  351. * @param None
  352. * @retval None
  353. */
  354. static void SetSysClock(void)
  355. {
  356. 80002e4: b580 push {r7, lr}
  357. 80002e6: af00 add r7, sp, #0
  358. #elif defined SYSCLK_FREQ_48MHz
  359. SetSysClockTo48();
  360. #elif defined SYSCLK_FREQ_56MHz
  361. SetSysClockTo56();
  362. #elif defined SYSCLK_FREQ_72MHz
  363. SetSysClockTo72();
  364. 80002e8: f000 f802 bl 80002f0 <SetSysClockTo72>
  365. #endif
  366. /* If none of the define above is enabled, the HSI is used as System clock
  367. source (default after reset) */
  368. }
  369. 80002ec: bf00 nop
  370. 80002ee: bd80 pop {r7, pc}
  371. 080002f0 <SetSysClockTo72>:
  372. * @note This function should be used only after reset.
  373. * @param None
  374. * @retval None
  375. */
  376. static void SetSysClockTo72(void)
  377. {
  378. 80002f0: b480 push {r7}
  379. 80002f2: b083 sub sp, #12
  380. 80002f4: af00 add r7, sp, #0
  381. __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
  382. 80002f6: 2300 movs r3, #0
  383. 80002f8: 607b str r3, [r7, #4]
  384. 80002fa: 2300 movs r3, #0
  385. 80002fc: 603b str r3, [r7, #0]
  386. /* SYSCLK, HCLK, PCLK2 and PCLK1 configuration ---------------------------*/
  387. /* Enable HSE */
  388. RCC->CR |= ((uint32_t)RCC_CR_HSEON);
  389. 80002fe: 4a3a ldr r2, [pc, #232] ; (80003e8 <SetSysClockTo72+0xf8>)
  390. 8000300: 4b39 ldr r3, [pc, #228] ; (80003e8 <SetSysClockTo72+0xf8>)
  391. 8000302: 681b ldr r3, [r3, #0]
  392. 8000304: f443 3380 orr.w r3, r3, #65536 ; 0x10000
  393. 8000308: 6013 str r3, [r2, #0]
  394. /* Wait till HSE is ready and if Time out is reached exit */
  395. do
  396. {
  397. HSEStatus = RCC->CR & RCC_CR_HSERDY;
  398. 800030a: 4b37 ldr r3, [pc, #220] ; (80003e8 <SetSysClockTo72+0xf8>)
  399. 800030c: 681b ldr r3, [r3, #0]
  400. 800030e: f403 3300 and.w r3, r3, #131072 ; 0x20000
  401. 8000312: 603b str r3, [r7, #0]
  402. StartUpCounter++;
  403. 8000314: 687b ldr r3, [r7, #4]
  404. 8000316: 3301 adds r3, #1
  405. 8000318: 607b str r3, [r7, #4]
  406. } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
  407. 800031a: 683b ldr r3, [r7, #0]
  408. 800031c: 2b00 cmp r3, #0
  409. 800031e: d103 bne.n 8000328 <SetSysClockTo72+0x38>
  410. 8000320: 687b ldr r3, [r7, #4]
  411. 8000322: f5b3 6fa0 cmp.w r3, #1280 ; 0x500
  412. 8000326: d1f0 bne.n 800030a <SetSysClockTo72+0x1a>
  413. if ((RCC->CR & RCC_CR_HSERDY) != RESET)
  414. 8000328: 4b2f ldr r3, [pc, #188] ; (80003e8 <SetSysClockTo72+0xf8>)
  415. 800032a: 681b ldr r3, [r3, #0]
  416. 800032c: f403 3300 and.w r3, r3, #131072 ; 0x20000
  417. 8000330: 2b00 cmp r3, #0
  418. 8000332: d002 beq.n 800033a <SetSysClockTo72+0x4a>
  419. {
  420. HSEStatus = (uint32_t)0x01;
  421. 8000334: 2301 movs r3, #1
  422. 8000336: 603b str r3, [r7, #0]
  423. 8000338: e001 b.n 800033e <SetSysClockTo72+0x4e>
  424. }
  425. else
  426. {
  427. HSEStatus = (uint32_t)0x00;
  428. 800033a: 2300 movs r3, #0
  429. 800033c: 603b str r3, [r7, #0]
  430. }
  431. if (HSEStatus == (uint32_t)0x01)
  432. 800033e: 683b ldr r3, [r7, #0]
  433. 8000340: 2b01 cmp r3, #1
  434. 8000342: d14b bne.n 80003dc <SetSysClockTo72+0xec>
  435. {
  436. /* Enable Prefetch Buffer */
  437. FLASH->ACR |= FLASH_ACR_PRFTBE;
  438. 8000344: 4a29 ldr r2, [pc, #164] ; (80003ec <SetSysClockTo72+0xfc>)
  439. 8000346: 4b29 ldr r3, [pc, #164] ; (80003ec <SetSysClockTo72+0xfc>)
  440. 8000348: 681b ldr r3, [r3, #0]
  441. 800034a: f043 0310 orr.w r3, r3, #16
  442. 800034e: 6013 str r3, [r2, #0]
  443. /* Flash 2 wait state */
  444. FLASH->ACR &= (uint32_t)((uint32_t)~FLASH_ACR_LATENCY);
  445. 8000350: 4a26 ldr r2, [pc, #152] ; (80003ec <SetSysClockTo72+0xfc>)
  446. 8000352: 4b26 ldr r3, [pc, #152] ; (80003ec <SetSysClockTo72+0xfc>)
  447. 8000354: 681b ldr r3, [r3, #0]
  448. 8000356: f023 0303 bic.w r3, r3, #3
  449. 800035a: 6013 str r3, [r2, #0]
  450. FLASH->ACR |= (uint32_t)FLASH_ACR_LATENCY_2;
  451. 800035c: 4a23 ldr r2, [pc, #140] ; (80003ec <SetSysClockTo72+0xfc>)
  452. 800035e: 4b23 ldr r3, [pc, #140] ; (80003ec <SetSysClockTo72+0xfc>)
  453. 8000360: 681b ldr r3, [r3, #0]
  454. 8000362: f043 0302 orr.w r3, r3, #2
  455. 8000366: 6013 str r3, [r2, #0]
  456. /* HCLK = SYSCLK */
  457. RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
  458. 8000368: 4a1f ldr r2, [pc, #124] ; (80003e8 <SetSysClockTo72+0xf8>)
  459. 800036a: 4b1f ldr r3, [pc, #124] ; (80003e8 <SetSysClockTo72+0xf8>)
  460. 800036c: 685b ldr r3, [r3, #4]
  461. 800036e: 6053 str r3, [r2, #4]
  462. /* PCLK2 = HCLK */
  463. RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
  464. 8000370: 4a1d ldr r2, [pc, #116] ; (80003e8 <SetSysClockTo72+0xf8>)
  465. 8000372: 4b1d ldr r3, [pc, #116] ; (80003e8 <SetSysClockTo72+0xf8>)
  466. 8000374: 685b ldr r3, [r3, #4]
  467. 8000376: 6053 str r3, [r2, #4]
  468. /* PCLK1 = HCLK */
  469. RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV2;
  470. 8000378: 4a1b ldr r2, [pc, #108] ; (80003e8 <SetSysClockTo72+0xf8>)
  471. 800037a: 4b1b ldr r3, [pc, #108] ; (80003e8 <SetSysClockTo72+0xf8>)
  472. 800037c: 685b ldr r3, [r3, #4]
  473. 800037e: f443 6380 orr.w r3, r3, #1024 ; 0x400
  474. 8000382: 6053 str r3, [r2, #4]
  475. RCC->CFGR &= (uint32_t)~(RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLSRC | RCC_CFGR_PLLMULL);
  476. RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLSRC_PREDIV1 |
  477. RCC_CFGR_PLLMULL9);
  478. #else
  479. /* PLL configuration: PLLCLK = HSE * 9 = 72 MHz */
  480. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE |
  481. 8000384: 4a18 ldr r2, [pc, #96] ; (80003e8 <SetSysClockTo72+0xf8>)
  482. 8000386: 4b18 ldr r3, [pc, #96] ; (80003e8 <SetSysClockTo72+0xf8>)
  483. 8000388: 685b ldr r3, [r3, #4]
  484. 800038a: f423 137c bic.w r3, r3, #4128768 ; 0x3f0000
  485. 800038e: 6053 str r3, [r2, #4]
  486. RCC_CFGR_PLLMULL));
  487. RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE | RCC_CFGR_PLLMULL9);
  488. 8000390: 4a15 ldr r2, [pc, #84] ; (80003e8 <SetSysClockTo72+0xf8>)
  489. 8000392: 4b15 ldr r3, [pc, #84] ; (80003e8 <SetSysClockTo72+0xf8>)
  490. 8000394: 685b ldr r3, [r3, #4]
  491. 8000396: f443 13e8 orr.w r3, r3, #1900544 ; 0x1d0000
  492. 800039a: 6053 str r3, [r2, #4]
  493. #endif /* STM32F10X_CL */
  494. /* Enable PLL */
  495. RCC->CR |= RCC_CR_PLLON;
  496. 800039c: 4a12 ldr r2, [pc, #72] ; (80003e8 <SetSysClockTo72+0xf8>)
  497. 800039e: 4b12 ldr r3, [pc, #72] ; (80003e8 <SetSysClockTo72+0xf8>)
  498. 80003a0: 681b ldr r3, [r3, #0]
  499. 80003a2: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
  500. 80003a6: 6013 str r3, [r2, #0]
  501. /* Wait till PLL is ready */
  502. while((RCC->CR & RCC_CR_PLLRDY) == 0)
  503. 80003a8: bf00 nop
  504. 80003aa: 4b0f ldr r3, [pc, #60] ; (80003e8 <SetSysClockTo72+0xf8>)
  505. 80003ac: 681b ldr r3, [r3, #0]
  506. 80003ae: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
  507. 80003b2: 2b00 cmp r3, #0
  508. 80003b4: d0f9 beq.n 80003aa <SetSysClockTo72+0xba>
  509. {
  510. }
  511. /* Select PLL as system clock source */
  512. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
  513. 80003b6: 4a0c ldr r2, [pc, #48] ; (80003e8 <SetSysClockTo72+0xf8>)
  514. 80003b8: 4b0b ldr r3, [pc, #44] ; (80003e8 <SetSysClockTo72+0xf8>)
  515. 80003ba: 685b ldr r3, [r3, #4]
  516. 80003bc: f023 0303 bic.w r3, r3, #3
  517. 80003c0: 6053 str r3, [r2, #4]
  518. RCC->CFGR |= (uint32_t)RCC_CFGR_SW_PLL;
  519. 80003c2: 4a09 ldr r2, [pc, #36] ; (80003e8 <SetSysClockTo72+0xf8>)
  520. 80003c4: 4b08 ldr r3, [pc, #32] ; (80003e8 <SetSysClockTo72+0xf8>)
  521. 80003c6: 685b ldr r3, [r3, #4]
  522. 80003c8: f043 0302 orr.w r3, r3, #2
  523. 80003cc: 6053 str r3, [r2, #4]
  524. /* Wait till PLL is used as system clock source */
  525. while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)0x08)
  526. 80003ce: bf00 nop
  527. 80003d0: 4b05 ldr r3, [pc, #20] ; (80003e8 <SetSysClockTo72+0xf8>)
  528. 80003d2: 685b ldr r3, [r3, #4]
  529. 80003d4: f003 030c and.w r3, r3, #12
  530. 80003d8: 2b08 cmp r3, #8
  531. 80003da: d1f9 bne.n 80003d0 <SetSysClockTo72+0xe0>
  532. }
  533. else
  534. { /* If HSE fails to start-up, the application will have wrong clock
  535. configuration. User can add here some code to deal with this error */
  536. }
  537. }
  538. 80003dc: bf00 nop
  539. 80003de: 370c adds r7, #12
  540. 80003e0: 46bd mov sp, r7
  541. 80003e2: bc80 pop {r7}
  542. 80003e4: 4770 bx lr
  543. 80003e6: bf00 nop
  544. 80003e8: 40021000 .word 0x40021000
  545. 80003ec: 40022000 .word 0x40022000
  546. 080003f0 <GPIO_Init>:
  547. void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
  548. {
  549. 80003f0: b480 push {r7}
  550. 80003f2: b089 sub sp, #36 ; 0x24
  551. 80003f4: af00 add r7, sp, #0
  552. 80003f6: 6078 str r0, [r7, #4]
  553. 80003f8: 6039 str r1, [r7, #0]
  554. uint32_t currentmode = 0x00, currentpin = 0x00, pinpos = 0x00, pos = 0x00;
  555. 80003fa: 2300 movs r3, #0
  556. 80003fc: 61fb str r3, [r7, #28]
  557. 80003fe: 2300 movs r3, #0
  558. 8000400: 613b str r3, [r7, #16]
  559. 8000402: 2300 movs r3, #0
  560. 8000404: 61bb str r3, [r7, #24]
  561. 8000406: 2300 movs r3, #0
  562. 8000408: 60fb str r3, [r7, #12]
  563. uint32_t tmpreg = 0x00, pinmask = 0x00;
  564. 800040a: 2300 movs r3, #0
  565. 800040c: 617b str r3, [r7, #20]
  566. 800040e: 2300 movs r3, #0
  567. 8000410: 60bb str r3, [r7, #8]
  568. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  569. assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
  570. assert_param(IS_GPIO_PIN(GPIO_InitStruct->GPIO_Pin));
  571. /*---------------------------- GPIO Mode Configuration -----------------------*/
  572. currentmode = ((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x0F);
  573. 8000412: 683b ldr r3, [r7, #0]
  574. 8000414: 78db ldrb r3, [r3, #3]
  575. 8000416: f003 030f and.w r3, r3, #15
  576. 800041a: 61fb str r3, [r7, #28]
  577. if ((((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x10)) != 0x00)
  578. 800041c: 683b ldr r3, [r7, #0]
  579. 800041e: 78db ldrb r3, [r3, #3]
  580. 8000420: f003 0310 and.w r3, r3, #16
  581. 8000424: 2b00 cmp r3, #0
  582. 8000426: d005 beq.n 8000434 <GPIO_Init+0x44>
  583. {
  584. /* Check the parameters */
  585. assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
  586. /* Output mode */
  587. currentmode |= (uint32_t)GPIO_InitStruct->GPIO_Speed;
  588. 8000428: 683b ldr r3, [r7, #0]
  589. 800042a: 789b ldrb r3, [r3, #2]
  590. 800042c: 461a mov r2, r3
  591. 800042e: 69fb ldr r3, [r7, #28]
  592. 8000430: 4313 orrs r3, r2
  593. 8000432: 61fb str r3, [r7, #28]
  594. }
  595. /*---------------------------- GPIO CRL Configuration ------------------------*/
  596. /* Configure the eight low port pins */
  597. if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
  598. 8000434: 683b ldr r3, [r7, #0]
  599. 8000436: 881b ldrh r3, [r3, #0]
  600. 8000438: b2db uxtb r3, r3
  601. 800043a: 2b00 cmp r3, #0
  602. 800043c: d044 beq.n 80004c8 <GPIO_Init+0xd8>
  603. {
  604. tmpreg = GPIOx->CRL;
  605. 800043e: 687b ldr r3, [r7, #4]
  606. 8000440: 681b ldr r3, [r3, #0]
  607. 8000442: 617b str r3, [r7, #20]
  608. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  609. 8000444: 2300 movs r3, #0
  610. 8000446: 61bb str r3, [r7, #24]
  611. 8000448: e038 b.n 80004bc <GPIO_Init+0xcc>
  612. {
  613. pos = ((uint32_t)0x01) << pinpos;
  614. 800044a: 2201 movs r2, #1
  615. 800044c: 69bb ldr r3, [r7, #24]
  616. 800044e: fa02 f303 lsl.w r3, r2, r3
  617. 8000452: 60fb str r3, [r7, #12]
  618. /* Get the port pins position */
  619. currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
  620. 8000454: 683b ldr r3, [r7, #0]
  621. 8000456: 881b ldrh r3, [r3, #0]
  622. 8000458: 461a mov r2, r3
  623. 800045a: 68fb ldr r3, [r7, #12]
  624. 800045c: 4013 ands r3, r2
  625. 800045e: 613b str r3, [r7, #16]
  626. if (currentpin == pos)
  627. 8000460: 693a ldr r2, [r7, #16]
  628. 8000462: 68fb ldr r3, [r7, #12]
  629. 8000464: 429a cmp r2, r3
  630. 8000466: d126 bne.n 80004b6 <GPIO_Init+0xc6>
  631. {
  632. pos = pinpos << 2;
  633. 8000468: 69bb ldr r3, [r7, #24]
  634. 800046a: 009b lsls r3, r3, #2
  635. 800046c: 60fb str r3, [r7, #12]
  636. /* Clear the corresponding low control register bits */
  637. pinmask = ((uint32_t)0x0F) << pos;
  638. 800046e: 220f movs r2, #15
  639. 8000470: 68fb ldr r3, [r7, #12]
  640. 8000472: fa02 f303 lsl.w r3, r2, r3
  641. 8000476: 60bb str r3, [r7, #8]
  642. tmpreg &= ~pinmask;
  643. 8000478: 68bb ldr r3, [r7, #8]
  644. 800047a: 43db mvns r3, r3
  645. 800047c: 697a ldr r2, [r7, #20]
  646. 800047e: 4013 ands r3, r2
  647. 8000480: 617b str r3, [r7, #20]
  648. /* Write the mode configuration in the corresponding bits */
  649. tmpreg |= (currentmode << pos);
  650. 8000482: 69fa ldr r2, [r7, #28]
  651. 8000484: 68fb ldr r3, [r7, #12]
  652. 8000486: fa02 f303 lsl.w r3, r2, r3
  653. 800048a: 697a ldr r2, [r7, #20]
  654. 800048c: 4313 orrs r3, r2
  655. 800048e: 617b str r3, [r7, #20]
  656. /* Reset the corresponding ODR bit */
  657. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
  658. 8000490: 683b ldr r3, [r7, #0]
  659. 8000492: 78db ldrb r3, [r3, #3]
  660. 8000494: 2b28 cmp r3, #40 ; 0x28
  661. 8000496: d105 bne.n 80004a4 <GPIO_Init+0xb4>
  662. {
  663. GPIOx->BRR = (((uint32_t)0x01) << pinpos);
  664. 8000498: 2201 movs r2, #1
  665. 800049a: 69bb ldr r3, [r7, #24]
  666. 800049c: 409a lsls r2, r3
  667. 800049e: 687b ldr r3, [r7, #4]
  668. 80004a0: 615a str r2, [r3, #20]
  669. 80004a2: e008 b.n 80004b6 <GPIO_Init+0xc6>
  670. }
  671. else
  672. {
  673. /* Set the corresponding ODR bit */
  674. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
  675. 80004a4: 683b ldr r3, [r7, #0]
  676. 80004a6: 78db ldrb r3, [r3, #3]
  677. 80004a8: 2b48 cmp r3, #72 ; 0x48
  678. 80004aa: d104 bne.n 80004b6 <GPIO_Init+0xc6>
  679. {
  680. GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
  681. 80004ac: 2201 movs r2, #1
  682. 80004ae: 69bb ldr r3, [r7, #24]
  683. 80004b0: 409a lsls r2, r3
  684. 80004b2: 687b ldr r3, [r7, #4]
  685. 80004b4: 611a str r2, [r3, #16]
  686. /*---------------------------- GPIO CRL Configuration ------------------------*/
  687. /* Configure the eight low port pins */
  688. if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
  689. {
  690. tmpreg = GPIOx->CRL;
  691. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  692. 80004b6: 69bb ldr r3, [r7, #24]
  693. 80004b8: 3301 adds r3, #1
  694. 80004ba: 61bb str r3, [r7, #24]
  695. 80004bc: 69bb ldr r3, [r7, #24]
  696. 80004be: 2b07 cmp r3, #7
  697. 80004c0: d9c3 bls.n 800044a <GPIO_Init+0x5a>
  698. GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
  699. }
  700. }
  701. }
  702. }
  703. GPIOx->CRL = tmpreg;
  704. 80004c2: 687b ldr r3, [r7, #4]
  705. 80004c4: 697a ldr r2, [r7, #20]
  706. 80004c6: 601a str r2, [r3, #0]
  707. }
  708. /*---------------------------- GPIO CRH Configuration ------------------------*/
  709. /* Configure the eight high port pins */
  710. if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
  711. 80004c8: 683b ldr r3, [r7, #0]
  712. 80004ca: 881b ldrh r3, [r3, #0]
  713. 80004cc: 2bff cmp r3, #255 ; 0xff
  714. 80004ce: d946 bls.n 800055e <GPIO_Init+0x16e>
  715. {
  716. tmpreg = GPIOx->CRH;
  717. 80004d0: 687b ldr r3, [r7, #4]
  718. 80004d2: 685b ldr r3, [r3, #4]
  719. 80004d4: 617b str r3, [r7, #20]
  720. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  721. 80004d6: 2300 movs r3, #0
  722. 80004d8: 61bb str r3, [r7, #24]
  723. 80004da: e03a b.n 8000552 <GPIO_Init+0x162>
  724. {
  725. pos = (((uint32_t)0x01) << (pinpos + 0x08));
  726. 80004dc: 69bb ldr r3, [r7, #24]
  727. 80004de: 3308 adds r3, #8
  728. 80004e0: 2201 movs r2, #1
  729. 80004e2: fa02 f303 lsl.w r3, r2, r3
  730. 80004e6: 60fb str r3, [r7, #12]
  731. /* Get the port pins position */
  732. currentpin = ((GPIO_InitStruct->GPIO_Pin) & pos);
  733. 80004e8: 683b ldr r3, [r7, #0]
  734. 80004ea: 881b ldrh r3, [r3, #0]
  735. 80004ec: 461a mov r2, r3
  736. 80004ee: 68fb ldr r3, [r7, #12]
  737. 80004f0: 4013 ands r3, r2
  738. 80004f2: 613b str r3, [r7, #16]
  739. if (currentpin == pos)
  740. 80004f4: 693a ldr r2, [r7, #16]
  741. 80004f6: 68fb ldr r3, [r7, #12]
  742. 80004f8: 429a cmp r2, r3
  743. 80004fa: d127 bne.n 800054c <GPIO_Init+0x15c>
  744. {
  745. pos = pinpos << 2;
  746. 80004fc: 69bb ldr r3, [r7, #24]
  747. 80004fe: 009b lsls r3, r3, #2
  748. 8000500: 60fb str r3, [r7, #12]
  749. /* Clear the corresponding high control register bits */
  750. pinmask = ((uint32_t)0x0F) << pos;
  751. 8000502: 220f movs r2, #15
  752. 8000504: 68fb ldr r3, [r7, #12]
  753. 8000506: fa02 f303 lsl.w r3, r2, r3
  754. 800050a: 60bb str r3, [r7, #8]
  755. tmpreg &= ~pinmask;
  756. 800050c: 68bb ldr r3, [r7, #8]
  757. 800050e: 43db mvns r3, r3
  758. 8000510: 697a ldr r2, [r7, #20]
  759. 8000512: 4013 ands r3, r2
  760. 8000514: 617b str r3, [r7, #20]
  761. /* Write the mode configuration in the corresponding bits */
  762. tmpreg |= (currentmode << pos);
  763. 8000516: 69fa ldr r2, [r7, #28]
  764. 8000518: 68fb ldr r3, [r7, #12]
  765. 800051a: fa02 f303 lsl.w r3, r2, r3
  766. 800051e: 697a ldr r2, [r7, #20]
  767. 8000520: 4313 orrs r3, r2
  768. 8000522: 617b str r3, [r7, #20]
  769. /* Reset the corresponding ODR bit */
  770. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
  771. 8000524: 683b ldr r3, [r7, #0]
  772. 8000526: 78db ldrb r3, [r3, #3]
  773. 8000528: 2b28 cmp r3, #40 ; 0x28
  774. 800052a: d105 bne.n 8000538 <GPIO_Init+0x148>
  775. {
  776. GPIOx->BRR = (((uint32_t)0x01) << (pinpos + 0x08));
  777. 800052c: 69bb ldr r3, [r7, #24]
  778. 800052e: 3308 adds r3, #8
  779. 8000530: 2201 movs r2, #1
  780. 8000532: 409a lsls r2, r3
  781. 8000534: 687b ldr r3, [r7, #4]
  782. 8000536: 615a str r2, [r3, #20]
  783. }
  784. /* Set the corresponding ODR bit */
  785. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
  786. 8000538: 683b ldr r3, [r7, #0]
  787. 800053a: 78db ldrb r3, [r3, #3]
  788. 800053c: 2b48 cmp r3, #72 ; 0x48
  789. 800053e: d105 bne.n 800054c <GPIO_Init+0x15c>
  790. {
  791. GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
  792. 8000540: 69bb ldr r3, [r7, #24]
  793. 8000542: 3308 adds r3, #8
  794. 8000544: 2201 movs r2, #1
  795. 8000546: 409a lsls r2, r3
  796. 8000548: 687b ldr r3, [r7, #4]
  797. 800054a: 611a str r2, [r3, #16]
  798. /*---------------------------- GPIO CRH Configuration ------------------------*/
  799. /* Configure the eight high port pins */
  800. if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
  801. {
  802. tmpreg = GPIOx->CRH;
  803. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  804. 800054c: 69bb ldr r3, [r7, #24]
  805. 800054e: 3301 adds r3, #1
  806. 8000550: 61bb str r3, [r7, #24]
  807. 8000552: 69bb ldr r3, [r7, #24]
  808. 8000554: 2b07 cmp r3, #7
  809. 8000556: d9c1 bls.n 80004dc <GPIO_Init+0xec>
  810. {
  811. GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
  812. }
  813. }
  814. }
  815. GPIOx->CRH = tmpreg;
  816. 8000558: 687b ldr r3, [r7, #4]
  817. 800055a: 697a ldr r2, [r7, #20]
  818. 800055c: 605a str r2, [r3, #4]
  819. }
  820. }
  821. 800055e: bf00 nop
  822. 8000560: 3724 adds r7, #36 ; 0x24
  823. 8000562: 46bd mov sp, r7
  824. 8000564: bc80 pop {r7}
  825. 8000566: 4770 bx lr
  826. 08000568 <GPIO_SetBits>:
  827. void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  828. {
  829. 8000568: b480 push {r7}
  830. 800056a: b083 sub sp, #12
  831. 800056c: af00 add r7, sp, #0
  832. 800056e: 6078 str r0, [r7, #4]
  833. 8000570: 460b mov r3, r1
  834. 8000572: 807b strh r3, [r7, #2]
  835. /* Check the parameters */
  836. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  837. assert_param(IS_GPIO_PIN(GPIO_Pin));
  838. GPIOx->BSRR = GPIO_Pin;
  839. 8000574: 887a ldrh r2, [r7, #2]
  840. 8000576: 687b ldr r3, [r7, #4]
  841. 8000578: 611a str r2, [r3, #16]
  842. }
  843. 800057a: bf00 nop
  844. 800057c: 370c adds r7, #12
  845. 800057e: 46bd mov sp, r7
  846. 8000580: bc80 pop {r7}
  847. 8000582: 4770 bx lr
  848. 08000584 <GPIO_ResetBits>:
  849. void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  850. {
  851. 8000584: b480 push {r7}
  852. 8000586: b083 sub sp, #12
  853. 8000588: af00 add r7, sp, #0
  854. 800058a: 6078 str r0, [r7, #4]
  855. 800058c: 460b mov r3, r1
  856. 800058e: 807b strh r3, [r7, #2]
  857. /* Check the parameters */
  858. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  859. assert_param(IS_GPIO_PIN(GPIO_Pin));
  860. GPIOx->BRR = GPIO_Pin;
  861. 8000590: 887a ldrh r2, [r7, #2]
  862. 8000592: 687b ldr r3, [r7, #4]
  863. 8000594: 615a str r2, [r3, #20]
  864. }
  865. 8000596: bf00 nop
  866. 8000598: 370c adds r7, #12
  867. 800059a: 46bd mov sp, r7
  868. 800059c: bc80 pop {r7}
  869. 800059e: 4770 bx lr
  870. 080005a0 <RCC_APB2PeriphClockCmd>:
  871. void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
  872. {
  873. 80005a0: b480 push {r7}
  874. 80005a2: b083 sub sp, #12
  875. 80005a4: af00 add r7, sp, #0
  876. 80005a6: 6078 str r0, [r7, #4]
  877. 80005a8: 460b mov r3, r1
  878. 80005aa: 70fb strb r3, [r7, #3]
  879. /* Check the parameters */
  880. assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  881. assert_param(IS_FUNCTIONAL_STATE(NewState));
  882. if (NewState != DISABLE)
  883. 80005ac: 78fb ldrb r3, [r7, #3]
  884. 80005ae: 2b00 cmp r3, #0
  885. 80005b0: d006 beq.n 80005c0 <RCC_APB2PeriphClockCmd+0x20>
  886. {
  887. RCC->APB2ENR |= RCC_APB2Periph;
  888. 80005b2: 4909 ldr r1, [pc, #36] ; (80005d8 <RCC_APB2PeriphClockCmd+0x38>)
  889. 80005b4: 4b08 ldr r3, [pc, #32] ; (80005d8 <RCC_APB2PeriphClockCmd+0x38>)
  890. 80005b6: 699a ldr r2, [r3, #24]
  891. 80005b8: 687b ldr r3, [r7, #4]
  892. 80005ba: 4313 orrs r3, r2
  893. 80005bc: 618b str r3, [r1, #24]
  894. }
  895. else
  896. {
  897. RCC->APB2ENR &= ~RCC_APB2Periph;
  898. }
  899. }
  900. 80005be: e006 b.n 80005ce <RCC_APB2PeriphClockCmd+0x2e>
  901. {
  902. RCC->APB2ENR |= RCC_APB2Periph;
  903. }
  904. else
  905. {
  906. RCC->APB2ENR &= ~RCC_APB2Periph;
  907. 80005c0: 4905 ldr r1, [pc, #20] ; (80005d8 <RCC_APB2PeriphClockCmd+0x38>)
  908. 80005c2: 4b05 ldr r3, [pc, #20] ; (80005d8 <RCC_APB2PeriphClockCmd+0x38>)
  909. 80005c4: 699a ldr r2, [r3, #24]
  910. 80005c6: 687b ldr r3, [r7, #4]
  911. 80005c8: 43db mvns r3, r3
  912. 80005ca: 4013 ands r3, r2
  913. 80005cc: 618b str r3, [r1, #24]
  914. }
  915. }
  916. 80005ce: bf00 nop
  917. 80005d0: 370c adds r7, #12
  918. 80005d2: 46bd mov sp, r7
  919. 80005d4: bc80 pop {r7}
  920. 80005d6: 4770 bx lr
  921. 80005d8: 40021000 .word 0x40021000
  922. 080005dc <SPI_I2S_GetFlagStatus>:
  923. FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
  924. {
  925. 80005dc: b480 push {r7}
  926. 80005de: b085 sub sp, #20
  927. 80005e0: af00 add r7, sp, #0
  928. 80005e2: 6078 str r0, [r7, #4]
  929. 80005e4: 460b mov r3, r1
  930. 80005e6: 807b strh r3, [r7, #2]
  931. FlagStatus bitstatus = RESET;
  932. 80005e8: 2300 movs r3, #0
  933. 80005ea: 73fb strb r3, [r7, #15]
  934. /* Check the parameters */
  935. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  936. assert_param(IS_SPI_I2S_GET_FLAG(SPI_I2S_FLAG));
  937. /* Check the status of the specified SPI/I2S flag */
  938. if ((SPIx->SR & SPI_I2S_FLAG) != (uint16_t)RESET)
  939. 80005ec: 687b ldr r3, [r7, #4]
  940. 80005ee: 891b ldrh r3, [r3, #8]
  941. 80005f0: b29a uxth r2, r3
  942. 80005f2: 887b ldrh r3, [r7, #2]
  943. 80005f4: 4013 ands r3, r2
  944. 80005f6: b29b uxth r3, r3
  945. 80005f8: 2b00 cmp r3, #0
  946. 80005fa: d002 beq.n 8000602 <SPI_I2S_GetFlagStatus+0x26>
  947. {
  948. /* SPI_I2S_FLAG is set */
  949. bitstatus = SET;
  950. 80005fc: 2301 movs r3, #1
  951. 80005fe: 73fb strb r3, [r7, #15]
  952. 8000600: e001 b.n 8000606 <SPI_I2S_GetFlagStatus+0x2a>
  953. }
  954. else
  955. {
  956. /* SPI_I2S_FLAG is reset */
  957. bitstatus = RESET;
  958. 8000602: 2300 movs r3, #0
  959. 8000604: 73fb strb r3, [r7, #15]
  960. }
  961. /* Return the SPI_I2S_FLAG status */
  962. return bitstatus;
  963. 8000606: 7bfb ldrb r3, [r7, #15]
  964. }
  965. 8000608: 4618 mov r0, r3
  966. 800060a: 3714 adds r7, #20
  967. 800060c: 46bd mov sp, r7
  968. 800060e: bc80 pop {r7}
  969. 8000610: 4770 bx lr
  970. 8000612: bf00 nop
  971. 08000614 <SPI_I2S_SendData>:
  972. void SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data)
  973. {
  974. 8000614: b480 push {r7}
  975. 8000616: b083 sub sp, #12
  976. 8000618: af00 add r7, sp, #0
  977. 800061a: 6078 str r0, [r7, #4]
  978. 800061c: 460b mov r3, r1
  979. 800061e: 807b strh r3, [r7, #2]
  980. /* Check the parameters */
  981. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  982. /* Write in the DR register the data to be sent */
  983. SPIx->DR = Data;
  984. 8000620: 687b ldr r3, [r7, #4]
  985. 8000622: 887a ldrh r2, [r7, #2]
  986. 8000624: 819a strh r2, [r3, #12]
  987. }
  988. 8000626: bf00 nop
  989. 8000628: 370c adds r7, #12
  990. 800062a: 46bd mov sp, r7
  991. 800062c: bc80 pop {r7}
  992. 800062e: 4770 bx lr
  993. 08000630 <SPI_I2S_ReceiveData>:
  994. uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx)
  995. {
  996. 8000630: b480 push {r7}
  997. 8000632: b083 sub sp, #12
  998. 8000634: af00 add r7, sp, #0
  999. 8000636: 6078 str r0, [r7, #4]
  1000. /* Check the parameters */
  1001. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  1002. /* Return the data in the DR register */
  1003. return SPIx->DR;
  1004. 8000638: 687b ldr r3, [r7, #4]
  1005. 800063a: 899b ldrh r3, [r3, #12]
  1006. 800063c: b29b uxth r3, r3
  1007. }
  1008. 800063e: 4618 mov r0, r3
  1009. 8000640: 370c adds r7, #12
  1010. 8000642: 46bd mov sp, r7
  1011. 8000644: bc80 pop {r7}
  1012. 8000646: 4770 bx lr
  1013. 08000648 <SPI_Init>:
  1014. void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct)
  1015. {
  1016. 8000648: b480 push {r7}
  1017. 800064a: b085 sub sp, #20
  1018. 800064c: af00 add r7, sp, #0
  1019. 800064e: 6078 str r0, [r7, #4]
  1020. 8000650: 6039 str r1, [r7, #0]
  1021. uint16_t tmpreg = 0;
  1022. 8000652: 2300 movs r3, #0
  1023. 8000654: 81fb strh r3, [r7, #14]
  1024. assert_param(IS_SPI_CRC_POLYNOMIAL(SPI_InitStruct->SPI_CRCPolynomial));
  1025. /*---------------------------- SPIx CR1 Configuration ------------------------*/
  1026. /* Get the SPIx CR1 value */
  1027. tmpreg = SPIx->CR1;
  1028. 8000656: 687b ldr r3, [r7, #4]
  1029. 8000658: 881b ldrh r3, [r3, #0]
  1030. 800065a: 81fb strh r3, [r7, #14]
  1031. /* Clear BIDIMode, BIDIOE, RxONLY, SSM, SSI, LSBFirst, BR, MSTR, CPOL and CPHA bits */
  1032. tmpreg &= CR1_CLEAR_Mask;
  1033. 800065c: 89fb ldrh r3, [r7, #14]
  1034. 800065e: f403 5341 and.w r3, r3, #12352 ; 0x3040
  1035. 8000662: 81fb strh r3, [r7, #14]
  1036. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1037. /* Set LSBFirst bit according to SPI_FirstBit value */
  1038. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1039. /* Set CPOL bit according to SPI_CPOL value */
  1040. /* Set CPHA bit according to SPI_CPHA value */
  1041. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1042. 8000664: 683b ldr r3, [r7, #0]
  1043. 8000666: 881a ldrh r2, [r3, #0]
  1044. 8000668: 683b ldr r3, [r7, #0]
  1045. 800066a: 885b ldrh r3, [r3, #2]
  1046. 800066c: 4313 orrs r3, r2
  1047. 800066e: b29a uxth r2, r3
  1048. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1049. 8000670: 683b ldr r3, [r7, #0]
  1050. 8000672: 889b ldrh r3, [r3, #4]
  1051. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1052. /* Set LSBFirst bit according to SPI_FirstBit value */
  1053. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1054. /* Set CPOL bit according to SPI_CPOL value */
  1055. /* Set CPHA bit according to SPI_CPHA value */
  1056. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1057. 8000674: 4313 orrs r3, r2
  1058. 8000676: b29a uxth r2, r3
  1059. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1060. 8000678: 683b ldr r3, [r7, #0]
  1061. 800067a: 88db ldrh r3, [r3, #6]
  1062. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1063. /* Set LSBFirst bit according to SPI_FirstBit value */
  1064. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1065. /* Set CPOL bit according to SPI_CPOL value */
  1066. /* Set CPHA bit according to SPI_CPHA value */
  1067. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1068. 800067c: 4313 orrs r3, r2
  1069. 800067e: b29a uxth r2, r3
  1070. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1071. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1072. 8000680: 683b ldr r3, [r7, #0]
  1073. 8000682: 891b ldrh r3, [r3, #8]
  1074. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1075. /* Set LSBFirst bit according to SPI_FirstBit value */
  1076. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1077. /* Set CPOL bit according to SPI_CPOL value */
  1078. /* Set CPHA bit according to SPI_CPHA value */
  1079. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1080. 8000684: 4313 orrs r3, r2
  1081. 8000686: b29a uxth r2, r3
  1082. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1083. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1084. 8000688: 683b ldr r3, [r7, #0]
  1085. 800068a: 895b ldrh r3, [r3, #10]
  1086. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1087. /* Set LSBFirst bit according to SPI_FirstBit value */
  1088. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1089. /* Set CPOL bit according to SPI_CPOL value */
  1090. /* Set CPHA bit according to SPI_CPHA value */
  1091. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1092. 800068c: 4313 orrs r3, r2
  1093. 800068e: b29a uxth r2, r3
  1094. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1095. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1096. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1097. 8000690: 683b ldr r3, [r7, #0]
  1098. 8000692: 899b ldrh r3, [r3, #12]
  1099. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1100. /* Set LSBFirst bit according to SPI_FirstBit value */
  1101. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1102. /* Set CPOL bit according to SPI_CPOL value */
  1103. /* Set CPHA bit according to SPI_CPHA value */
  1104. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1105. 8000694: 4313 orrs r3, r2
  1106. 8000696: b29a uxth r2, r3
  1107. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1108. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1109. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1110. 8000698: 683b ldr r3, [r7, #0]
  1111. 800069a: 89db ldrh r3, [r3, #14]
  1112. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1113. /* Set LSBFirst bit according to SPI_FirstBit value */
  1114. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1115. /* Set CPOL bit according to SPI_CPOL value */
  1116. /* Set CPHA bit according to SPI_CPHA value */
  1117. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1118. 800069c: 4313 orrs r3, r2
  1119. 800069e: b29a uxth r2, r3
  1120. 80006a0: 89fb ldrh r3, [r7, #14]
  1121. 80006a2: 4313 orrs r3, r2
  1122. 80006a4: 81fb strh r3, [r7, #14]
  1123. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1124. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1125. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1126. /* Write to SPIx CR1 */
  1127. SPIx->CR1 = tmpreg;
  1128. 80006a6: 687b ldr r3, [r7, #4]
  1129. 80006a8: 89fa ldrh r2, [r7, #14]
  1130. 80006aa: 801a strh r2, [r3, #0]
  1131. /* Activate the SPI mode (Reset I2SMOD bit in I2SCFGR register) */
  1132. SPIx->I2SCFGR &= SPI_Mode_Select;
  1133. 80006ac: 687b ldr r3, [r7, #4]
  1134. 80006ae: 8b9b ldrh r3, [r3, #28]
  1135. 80006b0: b29b uxth r3, r3
  1136. 80006b2: f423 6300 bic.w r3, r3, #2048 ; 0x800
  1137. 80006b6: b29a uxth r2, r3
  1138. 80006b8: 687b ldr r3, [r7, #4]
  1139. 80006ba: 839a strh r2, [r3, #28]
  1140. /*---------------------------- SPIx CRCPOLY Configuration --------------------*/
  1141. /* Write to SPIx CRCPOLY */
  1142. SPIx->CRCPR = SPI_InitStruct->SPI_CRCPolynomial;
  1143. 80006bc: 683b ldr r3, [r7, #0]
  1144. 80006be: 8a1a ldrh r2, [r3, #16]
  1145. 80006c0: 687b ldr r3, [r7, #4]
  1146. 80006c2: 821a strh r2, [r3, #16]
  1147. }
  1148. 80006c4: bf00 nop
  1149. 80006c6: 3714 adds r7, #20
  1150. 80006c8: 46bd mov sp, r7
  1151. 80006ca: bc80 pop {r7}
  1152. 80006cc: 4770 bx lr
  1153. 80006ce: bf00 nop
  1154. 080006d0 <SPI_Cmd>:
  1155. void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  1156. {
  1157. 80006d0: b480 push {r7}
  1158. 80006d2: b083 sub sp, #12
  1159. 80006d4: af00 add r7, sp, #0
  1160. 80006d6: 6078 str r0, [r7, #4]
  1161. 80006d8: 460b mov r3, r1
  1162. 80006da: 70fb strb r3, [r7, #3]
  1163. /* Check the parameters */
  1164. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  1165. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1166. if (NewState != DISABLE)
  1167. 80006dc: 78fb ldrb r3, [r7, #3]
  1168. 80006de: 2b00 cmp r3, #0
  1169. 80006e0: d008 beq.n 80006f4 <SPI_Cmd+0x24>
  1170. {
  1171. /* Enable the selected SPI peripheral */
  1172. SPIx->CR1 |= CR1_SPE_Set;
  1173. 80006e2: 687b ldr r3, [r7, #4]
  1174. 80006e4: 881b ldrh r3, [r3, #0]
  1175. 80006e6: b29b uxth r3, r3
  1176. 80006e8: f043 0340 orr.w r3, r3, #64 ; 0x40
  1177. 80006ec: b29a uxth r2, r3
  1178. 80006ee: 687b ldr r3, [r7, #4]
  1179. 80006f0: 801a strh r2, [r3, #0]
  1180. else
  1181. {
  1182. /* Disable the selected SPI peripheral */
  1183. SPIx->CR1 &= CR1_SPE_Reset;
  1184. }
  1185. }
  1186. 80006f2: e007 b.n 8000704 <SPI_Cmd+0x34>
  1187. SPIx->CR1 |= CR1_SPE_Set;
  1188. }
  1189. else
  1190. {
  1191. /* Disable the selected SPI peripheral */
  1192. SPIx->CR1 &= CR1_SPE_Reset;
  1193. 80006f4: 687b ldr r3, [r7, #4]
  1194. 80006f6: 881b ldrh r3, [r3, #0]
  1195. 80006f8: b29b uxth r3, r3
  1196. 80006fa: f023 0340 bic.w r3, r3, #64 ; 0x40
  1197. 80006fe: b29a uxth r2, r3
  1198. 8000700: 687b ldr r3, [r7, #4]
  1199. 8000702: 801a strh r2, [r3, #0]
  1200. }
  1201. }
  1202. 8000704: bf00 nop
  1203. 8000706: 370c adds r7, #12
  1204. 8000708: 46bd mov sp, r7
  1205. 800070a: bc80 pop {r7}
  1206. 800070c: 4770 bx lr
  1207. 800070e: bf00 nop
  1208. 08000710 <ADC_Cmd>:
  1209. void ADC_Cmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  1210. {
  1211. 8000710: b480 push {r7}
  1212. 8000712: b083 sub sp, #12
  1213. 8000714: af00 add r7, sp, #0
  1214. 8000716: 6078 str r0, [r7, #4]
  1215. 8000718: 460b mov r3, r1
  1216. 800071a: 70fb strb r3, [r7, #3]
  1217. /* Check the parameters */
  1218. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  1219. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1220. if (NewState != DISABLE)
  1221. 800071c: 78fb ldrb r3, [r7, #3]
  1222. 800071e: 2b00 cmp r3, #0
  1223. 8000720: d006 beq.n 8000730 <ADC_Cmd+0x20>
  1224. {
  1225. /* Set the ADON bit to wake up the ADC from power down mode */
  1226. ADCx->CR2 |= CR2_ADON_Set;
  1227. 8000722: 687b ldr r3, [r7, #4]
  1228. 8000724: 689b ldr r3, [r3, #8]
  1229. 8000726: f043 0201 orr.w r2, r3, #1
  1230. 800072a: 687b ldr r3, [r7, #4]
  1231. 800072c: 609a str r2, [r3, #8]
  1232. else
  1233. {
  1234. /* Disable the selected ADC peripheral */
  1235. ADCx->CR2 &= CR2_ADON_Reset;
  1236. }
  1237. }
  1238. 800072e: e005 b.n 800073c <ADC_Cmd+0x2c>
  1239. ADCx->CR2 |= CR2_ADON_Set;
  1240. }
  1241. else
  1242. {
  1243. /* Disable the selected ADC peripheral */
  1244. ADCx->CR2 &= CR2_ADON_Reset;
  1245. 8000730: 687b ldr r3, [r7, #4]
  1246. 8000732: 689b ldr r3, [r3, #8]
  1247. 8000734: f023 0201 bic.w r2, r3, #1
  1248. 8000738: 687b ldr r3, [r7, #4]
  1249. 800073a: 609a str r2, [r3, #8]
  1250. }
  1251. }
  1252. 800073c: bf00 nop
  1253. 800073e: 370c adds r7, #12
  1254. 8000740: 46bd mov sp, r7
  1255. 8000742: bc80 pop {r7}
  1256. 8000744: 4770 bx lr
  1257. 8000746: bf00 nop
  1258. 08000748 <ADC_ResetCalibration>:
  1259. void ADC_ResetCalibration(ADC_TypeDef* ADCx)
  1260. {
  1261. 8000748: b480 push {r7}
  1262. 800074a: b083 sub sp, #12
  1263. 800074c: af00 add r7, sp, #0
  1264. 800074e: 6078 str r0, [r7, #4]
  1265. /* Check the parameters */
  1266. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  1267. /* Resets the selected ADC calibration registers */
  1268. ADCx->CR2 |= CR2_RSTCAL_Set;
  1269. 8000750: 687b ldr r3, [r7, #4]
  1270. 8000752: 689b ldr r3, [r3, #8]
  1271. 8000754: f043 0208 orr.w r2, r3, #8
  1272. 8000758: 687b ldr r3, [r7, #4]
  1273. 800075a: 609a str r2, [r3, #8]
  1274. }
  1275. 800075c: bf00 nop
  1276. 800075e: 370c adds r7, #12
  1277. 8000760: 46bd mov sp, r7
  1278. 8000762: bc80 pop {r7}
  1279. 8000764: 4770 bx lr
  1280. 8000766: bf00 nop
  1281. 08000768 <ADC_GetResetCalibrationStatus>:
  1282. FlagStatus ADC_GetResetCalibrationStatus(ADC_TypeDef* ADCx)
  1283. {
  1284. 8000768: b480 push {r7}
  1285. 800076a: b085 sub sp, #20
  1286. 800076c: af00 add r7, sp, #0
  1287. 800076e: 6078 str r0, [r7, #4]
  1288. FlagStatus bitstatus = RESET;
  1289. 8000770: 2300 movs r3, #0
  1290. 8000772: 73fb strb r3, [r7, #15]
  1291. /* Check the parameters */
  1292. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  1293. /* Check the status of RSTCAL bit */
  1294. if ((ADCx->CR2 & CR2_RSTCAL_Set) != (uint32_t)RESET)
  1295. 8000774: 687b ldr r3, [r7, #4]
  1296. 8000776: 689b ldr r3, [r3, #8]
  1297. 8000778: f003 0308 and.w r3, r3, #8
  1298. 800077c: 2b00 cmp r3, #0
  1299. 800077e: d002 beq.n 8000786 <ADC_GetResetCalibrationStatus+0x1e>
  1300. {
  1301. /* RSTCAL bit is set */
  1302. bitstatus = SET;
  1303. 8000780: 2301 movs r3, #1
  1304. 8000782: 73fb strb r3, [r7, #15]
  1305. 8000784: e001 b.n 800078a <ADC_GetResetCalibrationStatus+0x22>
  1306. }
  1307. else
  1308. {
  1309. /* RSTCAL bit is reset */
  1310. bitstatus = RESET;
  1311. 8000786: 2300 movs r3, #0
  1312. 8000788: 73fb strb r3, [r7, #15]
  1313. }
  1314. /* Return the RSTCAL bit status */
  1315. return bitstatus;
  1316. 800078a: 7bfb ldrb r3, [r7, #15]
  1317. }
  1318. 800078c: 4618 mov r0, r3
  1319. 800078e: 3714 adds r7, #20
  1320. 8000790: 46bd mov sp, r7
  1321. 8000792: bc80 pop {r7}
  1322. 8000794: 4770 bx lr
  1323. 8000796: bf00 nop
  1324. 08000798 <ADC_StartCalibration>:
  1325. void ADC_StartCalibration(ADC_TypeDef* ADCx)
  1326. {
  1327. 8000798: b480 push {r7}
  1328. 800079a: b083 sub sp, #12
  1329. 800079c: af00 add r7, sp, #0
  1330. 800079e: 6078 str r0, [r7, #4]
  1331. /* Check the parameters */
  1332. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  1333. /* Enable the selected ADC calibration process */
  1334. ADCx->CR2 |= CR2_CAL_Set;
  1335. 80007a0: 687b ldr r3, [r7, #4]
  1336. 80007a2: 689b ldr r3, [r3, #8]
  1337. 80007a4: f043 0204 orr.w r2, r3, #4
  1338. 80007a8: 687b ldr r3, [r7, #4]
  1339. 80007aa: 609a str r2, [r3, #8]
  1340. }
  1341. 80007ac: bf00 nop
  1342. 80007ae: 370c adds r7, #12
  1343. 80007b0: 46bd mov sp, r7
  1344. 80007b2: bc80 pop {r7}
  1345. 80007b4: 4770 bx lr
  1346. 80007b6: bf00 nop
  1347. 080007b8 <ADC_GetCalibrationStatus>:
  1348. FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx)
  1349. {
  1350. 80007b8: b480 push {r7}
  1351. 80007ba: b085 sub sp, #20
  1352. 80007bc: af00 add r7, sp, #0
  1353. 80007be: 6078 str r0, [r7, #4]
  1354. FlagStatus bitstatus = RESET;
  1355. 80007c0: 2300 movs r3, #0
  1356. 80007c2: 73fb strb r3, [r7, #15]
  1357. /* Check the parameters */
  1358. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  1359. /* Check the status of CAL bit */
  1360. if ((ADCx->CR2 & CR2_CAL_Set) != (uint32_t)RESET)
  1361. 80007c4: 687b ldr r3, [r7, #4]
  1362. 80007c6: 689b ldr r3, [r3, #8]
  1363. 80007c8: f003 0304 and.w r3, r3, #4
  1364. 80007cc: 2b00 cmp r3, #0
  1365. 80007ce: d002 beq.n 80007d6 <ADC_GetCalibrationStatus+0x1e>
  1366. {
  1367. /* CAL bit is set: calibration on going */
  1368. bitstatus = SET;
  1369. 80007d0: 2301 movs r3, #1
  1370. 80007d2: 73fb strb r3, [r7, #15]
  1371. 80007d4: e001 b.n 80007da <ADC_GetCalibrationStatus+0x22>
  1372. }
  1373. else
  1374. {
  1375. /* CAL bit is reset: end of calibration */
  1376. bitstatus = RESET;
  1377. 80007d6: 2300 movs r3, #0
  1378. 80007d8: 73fb strb r3, [r7, #15]
  1379. }
  1380. /* Return the CAL bit status */
  1381. return bitstatus;
  1382. 80007da: 7bfb ldrb r3, [r7, #15]
  1383. }
  1384. 80007dc: 4618 mov r0, r3
  1385. 80007de: 3714 adds r7, #20
  1386. 80007e0: 46bd mov sp, r7
  1387. 80007e2: bc80 pop {r7}
  1388. 80007e4: 4770 bx lr
  1389. 80007e6: bf00 nop
  1390. 080007e8 <ADC_SoftwareStartConvCmd>:
  1391. void ADC_SoftwareStartConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  1392. {
  1393. 80007e8: b480 push {r7}
  1394. 80007ea: b083 sub sp, #12
  1395. 80007ec: af00 add r7, sp, #0
  1396. 80007ee: 6078 str r0, [r7, #4]
  1397. 80007f0: 460b mov r3, r1
  1398. 80007f2: 70fb strb r3, [r7, #3]
  1399. /* Check the parameters */
  1400. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  1401. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1402. if (NewState != DISABLE)
  1403. 80007f4: 78fb ldrb r3, [r7, #3]
  1404. 80007f6: 2b00 cmp r3, #0
  1405. 80007f8: d006 beq.n 8000808 <ADC_SoftwareStartConvCmd+0x20>
  1406. {
  1407. /* Enable the selected ADC conversion on external event and start the selected
  1408. ADC conversion */
  1409. ADCx->CR2 |= CR2_EXTTRIG_SWSTART_Set;
  1410. 80007fa: 687b ldr r3, [r7, #4]
  1411. 80007fc: 689b ldr r3, [r3, #8]
  1412. 80007fe: f443 02a0 orr.w r2, r3, #5242880 ; 0x500000
  1413. 8000802: 687b ldr r3, [r7, #4]
  1414. 8000804: 609a str r2, [r3, #8]
  1415. {
  1416. /* Disable the selected ADC conversion on external event and stop the selected
  1417. ADC conversion */
  1418. ADCx->CR2 &= CR2_EXTTRIG_SWSTART_Reset;
  1419. }
  1420. }
  1421. 8000806: e005 b.n 8000814 <ADC_SoftwareStartConvCmd+0x2c>
  1422. }
  1423. else
  1424. {
  1425. /* Disable the selected ADC conversion on external event and stop the selected
  1426. ADC conversion */
  1427. ADCx->CR2 &= CR2_EXTTRIG_SWSTART_Reset;
  1428. 8000808: 687b ldr r3, [r7, #4]
  1429. 800080a: 689b ldr r3, [r3, #8]
  1430. 800080c: f423 02a0 bic.w r2, r3, #5242880 ; 0x500000
  1431. 8000810: 687b ldr r3, [r7, #4]
  1432. 8000812: 609a str r2, [r3, #8]
  1433. }
  1434. }
  1435. 8000814: bf00 nop
  1436. 8000816: 370c adds r7, #12
  1437. 8000818: 46bd mov sp, r7
  1438. 800081a: bc80 pop {r7}
  1439. 800081c: 4770 bx lr
  1440. 800081e: bf00 nop
  1441. 08000820 <ADC_Init>:
  1442. void ADC_Init(ADC_TypeDef* ADCx, ADC_InitTypeDef* ADC_InitStruct)
  1443. {
  1444. 8000820: b480 push {r7}
  1445. 8000822: b085 sub sp, #20
  1446. 8000824: af00 add r7, sp, #0
  1447. 8000826: 6078 str r0, [r7, #4]
  1448. 8000828: 6039 str r1, [r7, #0]
  1449. uint32_t tmpreg1 = 0;
  1450. 800082a: 2300 movs r3, #0
  1451. 800082c: 60fb str r3, [r7, #12]
  1452. uint8_t tmpreg2 = 0;
  1453. 800082e: 2300 movs r3, #0
  1454. 8000830: 72fb strb r3, [r7, #11]
  1455. assert_param(IS_ADC_DATA_ALIGN(ADC_InitStruct->ADC_DataAlign));
  1456. assert_param(IS_ADC_REGULAR_LENGTH(ADC_InitStruct->ADC_NbrOfChannel));
  1457. /*---------------------------- ADCx CR1 Configuration -----------------*/
  1458. /* Get the ADCx CR1 value */
  1459. tmpreg1 = ADCx->CR1;
  1460. 8000832: 687b ldr r3, [r7, #4]
  1461. 8000834: 685b ldr r3, [r3, #4]
  1462. 8000836: 60fb str r3, [r7, #12]
  1463. /* Clear DUALMOD and SCAN bits */
  1464. tmpreg1 &= CR1_CLEAR_Mask;
  1465. 8000838: 68fb ldr r3, [r7, #12]
  1466. 800083a: f403 5341 and.w r3, r3, #12352 ; 0x3040
  1467. 800083e: 60fb str r3, [r7, #12]
  1468. /* Configure ADCx: Dual mode and scan conversion mode */
  1469. /* Set DUALMOD bits according to ADC_Mode value */
  1470. /* Set SCAN bit according to ADC_ScanConvMode value */
  1471. tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_Mode | ((uint32_t)ADC_InitStruct->ADC_ScanConvMode << 8));
  1472. 8000840: 683b ldr r3, [r7, #0]
  1473. 8000842: 681a ldr r2, [r3, #0]
  1474. 8000844: 683b ldr r3, [r7, #0]
  1475. 8000846: 791b ldrb r3, [r3, #4]
  1476. 8000848: 021b lsls r3, r3, #8
  1477. 800084a: 4313 orrs r3, r2
  1478. 800084c: 68fa ldr r2, [r7, #12]
  1479. 800084e: 4313 orrs r3, r2
  1480. 8000850: 60fb str r3, [r7, #12]
  1481. /* Write to ADCx CR1 */
  1482. ADCx->CR1 = tmpreg1;
  1483. 8000852: 687b ldr r3, [r7, #4]
  1484. 8000854: 68fa ldr r2, [r7, #12]
  1485. 8000856: 605a str r2, [r3, #4]
  1486. /*---------------------------- ADCx CR2 Configuration -----------------*/
  1487. /* Get the ADCx CR2 value */
  1488. tmpreg1 = ADCx->CR2;
  1489. 8000858: 687b ldr r3, [r7, #4]
  1490. 800085a: 689b ldr r3, [r3, #8]
  1491. 800085c: 60fb str r3, [r7, #12]
  1492. /* Clear CONT, ALIGN and EXTSEL bits */
  1493. tmpreg1 &= CR2_CLEAR_Mask;
  1494. 800085e: 68fa ldr r2, [r7, #12]
  1495. 8000860: 4b16 ldr r3, [pc, #88] ; (80008bc <ADC_Init+0x9c>)
  1496. 8000862: 4013 ands r3, r2
  1497. 8000864: 60fb str r3, [r7, #12]
  1498. /* Configure ADCx: external trigger event and continuous conversion mode */
  1499. /* Set ALIGN bit according to ADC_DataAlign value */
  1500. /* Set EXTSEL bits according to ADC_ExternalTrigConv value */
  1501. /* Set CONT bit according to ADC_ContinuousConvMode value */
  1502. tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ExternalTrigConv |
  1503. 8000866: 683b ldr r3, [r7, #0]
  1504. 8000868: 68da ldr r2, [r3, #12]
  1505. 800086a: 683b ldr r3, [r7, #0]
  1506. 800086c: 689b ldr r3, [r3, #8]
  1507. 800086e: 431a orrs r2, r3
  1508. ((uint32_t)ADC_InitStruct->ADC_ContinuousConvMode << 1));
  1509. 8000870: 683b ldr r3, [r7, #0]
  1510. 8000872: 795b ldrb r3, [r3, #5]
  1511. 8000874: 005b lsls r3, r3, #1
  1512. tmpreg1 &= CR2_CLEAR_Mask;
  1513. /* Configure ADCx: external trigger event and continuous conversion mode */
  1514. /* Set ALIGN bit according to ADC_DataAlign value */
  1515. /* Set EXTSEL bits according to ADC_ExternalTrigConv value */
  1516. /* Set CONT bit according to ADC_ContinuousConvMode value */
  1517. tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ExternalTrigConv |
  1518. 8000876: 4313 orrs r3, r2
  1519. 8000878: 68fa ldr r2, [r7, #12]
  1520. 800087a: 4313 orrs r3, r2
  1521. 800087c: 60fb str r3, [r7, #12]
  1522. ((uint32_t)ADC_InitStruct->ADC_ContinuousConvMode << 1));
  1523. /* Write to ADCx CR2 */
  1524. ADCx->CR2 = tmpreg1;
  1525. 800087e: 687b ldr r3, [r7, #4]
  1526. 8000880: 68fa ldr r2, [r7, #12]
  1527. 8000882: 609a str r2, [r3, #8]
  1528. /*---------------------------- ADCx SQR1 Configuration -----------------*/
  1529. /* Get the ADCx SQR1 value */
  1530. tmpreg1 = ADCx->SQR1;
  1531. 8000884: 687b ldr r3, [r7, #4]
  1532. 8000886: 6adb ldr r3, [r3, #44] ; 0x2c
  1533. 8000888: 60fb str r3, [r7, #12]
  1534. /* Clear L bits */
  1535. tmpreg1 &= SQR1_CLEAR_Mask;
  1536. 800088a: 68fb ldr r3, [r7, #12]
  1537. 800088c: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000
  1538. 8000890: 60fb str r3, [r7, #12]
  1539. /* Configure ADCx: regular channel sequence length */
  1540. /* Set L bits according to ADC_NbrOfChannel value */
  1541. tmpreg2 |= (uint8_t) (ADC_InitStruct->ADC_NbrOfChannel - (uint8_t)1);
  1542. 8000892: 683b ldr r3, [r7, #0]
  1543. 8000894: 7c1b ldrb r3, [r3, #16]
  1544. 8000896: 3b01 subs r3, #1
  1545. 8000898: b2da uxtb r2, r3
  1546. 800089a: 7afb ldrb r3, [r7, #11]
  1547. 800089c: 4313 orrs r3, r2
  1548. 800089e: 72fb strb r3, [r7, #11]
  1549. tmpreg1 |= (uint32_t)tmpreg2 << 20;
  1550. 80008a0: 7afb ldrb r3, [r7, #11]
  1551. 80008a2: 051b lsls r3, r3, #20
  1552. 80008a4: 68fa ldr r2, [r7, #12]
  1553. 80008a6: 4313 orrs r3, r2
  1554. 80008a8: 60fb str r3, [r7, #12]
  1555. /* Write to ADCx SQR1 */
  1556. ADCx->SQR1 = tmpreg1;
  1557. 80008aa: 687b ldr r3, [r7, #4]
  1558. 80008ac: 68fa ldr r2, [r7, #12]
  1559. 80008ae: 62da str r2, [r3, #44] ; 0x2c
  1560. }
  1561. 80008b0: bf00 nop
  1562. 80008b2: 3714 adds r7, #20
  1563. 80008b4: 46bd mov sp, r7
  1564. 80008b6: bc80 pop {r7}
  1565. 80008b8: 4770 bx lr
  1566. 80008ba: bf00 nop
  1567. 80008bc: fff1f7fd .word 0xfff1f7fd
  1568. 080008c0 <ADC_GetConversionValue>:
  1569. uint16_t ADC_GetConversionValue(ADC_TypeDef* ADCx)
  1570. {
  1571. 80008c0: b480 push {r7}
  1572. 80008c2: b083 sub sp, #12
  1573. 80008c4: af00 add r7, sp, #0
  1574. 80008c6: 6078 str r0, [r7, #4]
  1575. /* Check the parameters */
  1576. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  1577. /* Return the selected ADC conversion value */
  1578. return (uint16_t) ADCx->DR;
  1579. 80008c8: 687b ldr r3, [r7, #4]
  1580. 80008ca: 6cdb ldr r3, [r3, #76] ; 0x4c
  1581. 80008cc: b29b uxth r3, r3
  1582. }
  1583. 80008ce: 4618 mov r0, r3
  1584. 80008d0: 370c adds r7, #12
  1585. 80008d2: 46bd mov sp, r7
  1586. 80008d4: bc80 pop {r7}
  1587. 80008d6: 4770 bx lr
  1588. 080008d8 <SD_WriteByte>:
  1589. uint8_t SD_WriteByte(uint8_t Data)
  1590. {
  1591. 80008d8: b580 push {r7, lr}
  1592. 80008da: b082 sub sp, #8
  1593. 80008dc: af00 add r7, sp, #0
  1594. 80008de: 4603 mov r3, r0
  1595. 80008e0: 71fb strb r3, [r7, #7]
  1596. /*!< Wait until the transmit buffer is empty */
  1597. while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
  1598. 80008e2: bf00 nop
  1599. 80008e4: 2102 movs r1, #2
  1600. 80008e6: 480e ldr r0, [pc, #56] ; (8000920 <SD_WriteByte+0x48>)
  1601. 80008e8: f7ff fe78 bl 80005dc <SPI_I2S_GetFlagStatus>
  1602. 80008ec: 4603 mov r3, r0
  1603. 80008ee: 2b00 cmp r3, #0
  1604. 80008f0: d0f8 beq.n 80008e4 <SD_WriteByte+0xc>
  1605. {
  1606. }
  1607. /*!< Send the byte */
  1608. SPI_I2S_SendData(SD_SPI, Data);
  1609. 80008f2: 79fb ldrb r3, [r7, #7]
  1610. 80008f4: b29b uxth r3, r3
  1611. 80008f6: 4619 mov r1, r3
  1612. 80008f8: 4809 ldr r0, [pc, #36] ; (8000920 <SD_WriteByte+0x48>)
  1613. 80008fa: f7ff fe8b bl 8000614 <SPI_I2S_SendData>
  1614. /*!< Wait to receive a byte*/
  1615. while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
  1616. 80008fe: bf00 nop
  1617. 8000900: 2101 movs r1, #1
  1618. 8000902: 4807 ldr r0, [pc, #28] ; (8000920 <SD_WriteByte+0x48>)
  1619. 8000904: f7ff fe6a bl 80005dc <SPI_I2S_GetFlagStatus>
  1620. 8000908: 4603 mov r3, r0
  1621. 800090a: 2b00 cmp r3, #0
  1622. 800090c: d0f8 beq.n 8000900 <SD_WriteByte+0x28>
  1623. {
  1624. }
  1625. /*!< Return the byte read from the SPI bus */
  1626. return SPI_I2S_ReceiveData(SD_SPI);
  1627. 800090e: 4804 ldr r0, [pc, #16] ; (8000920 <SD_WriteByte+0x48>)
  1628. 8000910: f7ff fe8e bl 8000630 <SPI_I2S_ReceiveData>
  1629. 8000914: 4603 mov r3, r0
  1630. 8000916: b2db uxtb r3, r3
  1631. }
  1632. 8000918: 4618 mov r0, r3
  1633. 800091a: 3708 adds r7, #8
  1634. 800091c: 46bd mov sp, r7
  1635. 800091e: bd80 pop {r7, pc}
  1636. 8000920: 40003800 .word 0x40003800
  1637. 08000924 <SD_LowLevel_Init>:
  1638. void SD_LowLevel_Init(void)
  1639. {
  1640. 8000924: b580 push {r7, lr}
  1641. 8000926: b086 sub sp, #24
  1642. 8000928: af00 add r7, sp, #0
  1643. GPIO_InitTypeDef GPIO_InitStructure;
  1644. SPI_InitTypeDef SPI_InitStructure;
  1645. /*!< SD_SPI_CS_GPIO, SD_SPI_MOSI_GPIO, SD_SPI_MISO_GPIO, SD_SPI_DETECT_GPIO
  1646. and SD_SPI_SCK_GPIO Periph clock enable */
  1647. RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
  1648. 800092a: 2101 movs r1, #1
  1649. 800092c: 2004 movs r0, #4
  1650. 800092e: f7ff fe37 bl 80005a0 <RCC_APB2PeriphClockCmd>
  1651. /*!< SD_SPI Periph clock enable */
  1652. RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE);
  1653. 8000932: 2101 movs r1, #1
  1654. 8000934: f44f 5080 mov.w r0, #4096 ; 0x1000
  1655. 8000938: f7ff fe32 bl 80005a0 <RCC_APB2PeriphClockCmd>
  1656. /*!< Configure SD_SPI pins: SCK */
  1657. GPIO_InitStructure.GPIO_Pin = SD_SPI_SCK_PIN | SD_SPI_MOSI_PIN | SD_SPI_MISO_PIN;
  1658. 800093c: f44f 4360 mov.w r3, #57344 ; 0xe000
  1659. 8000940: 82bb strh r3, [r7, #20]
  1660. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  1661. 8000942: 2303 movs r3, #3
  1662. 8000944: 75bb strb r3, [r7, #22]
  1663. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  1664. 8000946: 2318 movs r3, #24
  1665. 8000948: 75fb strb r3, [r7, #23]
  1666. GPIO_Init(SD_SPI_SCK_GPIO_PORT, &GPIO_InitStructure);
  1667. 800094a: f107 0314 add.w r3, r7, #20
  1668. 800094e: 4619 mov r1, r3
  1669. 8000950: 4817 ldr r0, [pc, #92] ; (80009b0 <SD_LowLevel_Init+0x8c>)
  1670. 8000952: f7ff fd4d bl 80003f0 <GPIO_Init>
  1671. /*!< Configure SD_SPI_CS_PIN pin: SD Card CS pin */
  1672. GPIO_InitStructure.GPIO_Pin = SD_CS_PIN;
  1673. 8000956: f44f 5380 mov.w r3, #4096 ; 0x1000
  1674. 800095a: 82bb strh r3, [r7, #20]
  1675. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  1676. 800095c: 2310 movs r3, #16
  1677. 800095e: 75fb strb r3, [r7, #23]
  1678. GPIO_Init(SD_CS_GPIO_PORT, &GPIO_InitStructure);
  1679. 8000960: f107 0314 add.w r3, r7, #20
  1680. 8000964: 4619 mov r1, r3
  1681. 8000966: 4812 ldr r0, [pc, #72] ; (80009b0 <SD_LowLevel_Init+0x8c>)
  1682. 8000968: f7ff fd42 bl 80003f0 <GPIO_Init>
  1683. /*!< SD_SPI Config */
  1684. SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
  1685. 800096c: 2300 movs r3, #0
  1686. 800096e: 803b strh r3, [r7, #0]
  1687. SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
  1688. 8000970: f44f 7382 mov.w r3, #260 ; 0x104
  1689. 8000974: 807b strh r3, [r7, #2]
  1690. SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
  1691. 8000976: 2300 movs r3, #0
  1692. 8000978: 80bb strh r3, [r7, #4]
  1693. SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
  1694. 800097a: 2302 movs r3, #2
  1695. 800097c: 80fb strh r3, [r7, #6]
  1696. SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge;
  1697. 800097e: 2301 movs r3, #1
  1698. 8000980: 813b strh r3, [r7, #8]
  1699. SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
  1700. 8000982: f44f 7300 mov.w r3, #512 ; 0x200
  1701. 8000986: 817b strh r3, [r7, #10]
  1702. SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_2;
  1703. 8000988: 2300 movs r3, #0
  1704. 800098a: 81bb strh r3, [r7, #12]
  1705. SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
  1706. 800098c: 2300 movs r3, #0
  1707. 800098e: 81fb strh r3, [r7, #14]
  1708. SPI_InitStructure.SPI_CRCPolynomial = 7;
  1709. 8000990: 2307 movs r3, #7
  1710. 8000992: 823b strh r3, [r7, #16]
  1711. SPI_Init(SD_SPI, &SPI_InitStructure);
  1712. 8000994: 463b mov r3, r7
  1713. 8000996: 4619 mov r1, r3
  1714. 8000998: 4806 ldr r0, [pc, #24] ; (80009b4 <SD_LowLevel_Init+0x90>)
  1715. 800099a: f7ff fe55 bl 8000648 <SPI_Init>
  1716. SPI_Cmd(SD_SPI, ENABLE); /*!< SD_SPI enable */
  1717. 800099e: 2101 movs r1, #1
  1718. 80009a0: 4804 ldr r0, [pc, #16] ; (80009b4 <SD_LowLevel_Init+0x90>)
  1719. 80009a2: f7ff fe95 bl 80006d0 <SPI_Cmd>
  1720. }
  1721. 80009a6: bf00 nop
  1722. 80009a8: 3718 adds r7, #24
  1723. 80009aa: 46bd mov sp, r7
  1724. 80009ac: bd80 pop {r7, pc}
  1725. 80009ae: bf00 nop
  1726. 80009b0: 40010c00 .word 0x40010c00
  1727. 80009b4: 40003800 .word 0x40003800
  1728. 080009b8 <SD_GoIdleState>:
  1729. SD_Error SD_GoIdleState(void)
  1730. {
  1731. 80009b8: b580 push {r7, lr}
  1732. 80009ba: af00 add r7, sp, #0
  1733. /*!< SD chip select low */
  1734. SD_CS_LOW();
  1735. 80009bc: f44f 5180 mov.w r1, #4096 ; 0x1000
  1736. 80009c0: 4819 ldr r0, [pc, #100] ; (8000a28 <SD_GoIdleState+0x70>)
  1737. 80009c2: f7ff fddf bl 8000584 <GPIO_ResetBits>
  1738. /*!< Send CMD0 (SD_CMD_GO_IDLE_STATE) to put SD in SPI mode */
  1739. SD_SendCmd(SD_CMD_GO_IDLE_STATE, 0, 0x95);
  1740. 80009c6: 2295 movs r2, #149 ; 0x95
  1741. 80009c8: 2100 movs r1, #0
  1742. 80009ca: 2000 movs r0, #0
  1743. 80009cc: f000 f82e bl 8000a2c <SD_SendCmd>
  1744. /*!< Wait for In Idle State Response (R1 Format) equal to 0x01 */
  1745. if (SD_GetResponse(SD_IN_IDLE_STATE))
  1746. 80009d0: 2001 movs r0, #1
  1747. 80009d2: f000 f861 bl 8000a98 <SD_GetResponse>
  1748. 80009d6: 4603 mov r3, r0
  1749. 80009d8: 2b00 cmp r3, #0
  1750. 80009da: d001 beq.n 80009e0 <SD_GoIdleState+0x28>
  1751. {
  1752. /*!< No Idle State Response: return response failue */
  1753. return SD_RESPONSE_FAILURE;
  1754. 80009dc: 23ff movs r3, #255 ; 0xff
  1755. 80009de: e020 b.n 8000a22 <SD_GoIdleState+0x6a>
  1756. }
  1757. /*----------Activates the card initialization process-----------*/
  1758. do
  1759. {
  1760. /*!< SD chip select high */
  1761. SD_CS_HIGH();
  1762. 80009e0: f44f 5180 mov.w r1, #4096 ; 0x1000
  1763. 80009e4: 4810 ldr r0, [pc, #64] ; (8000a28 <SD_GoIdleState+0x70>)
  1764. 80009e6: f7ff fdbf bl 8000568 <GPIO_SetBits>
  1765. /*!< Send Dummy byte 0xFF */
  1766. SD_WriteByte(SD_DUMMY_BYTE);
  1767. 80009ea: 20ff movs r0, #255 ; 0xff
  1768. 80009ec: f7ff ff74 bl 80008d8 <SD_WriteByte>
  1769. /*!< SD chip select low */
  1770. SD_CS_LOW();
  1771. 80009f0: f44f 5180 mov.w r1, #4096 ; 0x1000
  1772. 80009f4: 480c ldr r0, [pc, #48] ; (8000a28 <SD_GoIdleState+0x70>)
  1773. 80009f6: f7ff fdc5 bl 8000584 <GPIO_ResetBits>
  1774. /*!< Send CMD1 (Activates the card process) until response equal to 0x0 */
  1775. SD_SendCmd(SD_CMD_SEND_OP_COND, 0, 0xFF);
  1776. 80009fa: 22ff movs r2, #255 ; 0xff
  1777. 80009fc: 2100 movs r1, #0
  1778. 80009fe: 2001 movs r0, #1
  1779. 8000a00: f000 f814 bl 8000a2c <SD_SendCmd>
  1780. /*!< Wait for no error Response (R1 Format) equal to 0x00 */
  1781. }
  1782. while (SD_GetResponse(SD_RESPONSE_NO_ERROR));
  1783. 8000a04: 2000 movs r0, #0
  1784. 8000a06: f000 f847 bl 8000a98 <SD_GetResponse>
  1785. 8000a0a: 4603 mov r3, r0
  1786. 8000a0c: 2b00 cmp r3, #0
  1787. 8000a0e: d1e7 bne.n 80009e0 <SD_GoIdleState+0x28>
  1788. /*!< SD chip select high */
  1789. SD_CS_HIGH();
  1790. 8000a10: f44f 5180 mov.w r1, #4096 ; 0x1000
  1791. 8000a14: 4804 ldr r0, [pc, #16] ; (8000a28 <SD_GoIdleState+0x70>)
  1792. 8000a16: f7ff fda7 bl 8000568 <GPIO_SetBits>
  1793. /*!< Send dummy byte 0xFF */
  1794. SD_WriteByte(SD_DUMMY_BYTE);
  1795. 8000a1a: 20ff movs r0, #255 ; 0xff
  1796. 8000a1c: f7ff ff5c bl 80008d8 <SD_WriteByte>
  1797. return SD_RESPONSE_NO_ERROR;
  1798. 8000a20: 2300 movs r3, #0
  1799. }
  1800. 8000a22: 4618 mov r0, r3
  1801. 8000a24: bd80 pop {r7, pc}
  1802. 8000a26: bf00 nop
  1803. 8000a28: 40010c00 .word 0x40010c00
  1804. 08000a2c <SD_SendCmd>:
  1805. void SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc)
  1806. {
  1807. 8000a2c: b580 push {r7, lr}
  1808. 8000a2e: b086 sub sp, #24
  1809. 8000a30: af00 add r7, sp, #0
  1810. 8000a32: 4603 mov r3, r0
  1811. 8000a34: 6039 str r1, [r7, #0]
  1812. 8000a36: 71fb strb r3, [r7, #7]
  1813. 8000a38: 4613 mov r3, r2
  1814. 8000a3a: 71bb strb r3, [r7, #6]
  1815. uint32_t i = 0x00;
  1816. 8000a3c: 2300 movs r3, #0
  1817. 8000a3e: 617b str r3, [r7, #20]
  1818. uint8_t Frame[6];
  1819. Frame[0] = (Cmd | 0x40); /*!< Construct byte 1 */
  1820. 8000a40: 79fb ldrb r3, [r7, #7]
  1821. 8000a42: f043 0340 orr.w r3, r3, #64 ; 0x40
  1822. 8000a46: b2db uxtb r3, r3
  1823. 8000a48: 733b strb r3, [r7, #12]
  1824. Frame[1] = (uint8_t)(Arg >> 24); /*!< Construct byte 2 */
  1825. 8000a4a: 683b ldr r3, [r7, #0]
  1826. 8000a4c: 0e1b lsrs r3, r3, #24
  1827. 8000a4e: b2db uxtb r3, r3
  1828. 8000a50: 737b strb r3, [r7, #13]
  1829. Frame[2] = (uint8_t)(Arg >> 16); /*!< Construct byte 3 */
  1830. 8000a52: 683b ldr r3, [r7, #0]
  1831. 8000a54: 0c1b lsrs r3, r3, #16
  1832. 8000a56: b2db uxtb r3, r3
  1833. 8000a58: 73bb strb r3, [r7, #14]
  1834. Frame[3] = (uint8_t)(Arg >> 8); /*!< Construct byte 4 */
  1835. 8000a5a: 683b ldr r3, [r7, #0]
  1836. 8000a5c: 0a1b lsrs r3, r3, #8
  1837. 8000a5e: b2db uxtb r3, r3
  1838. 8000a60: 73fb strb r3, [r7, #15]
  1839. Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
  1840. 8000a62: 683b ldr r3, [r7, #0]
  1841. 8000a64: b2db uxtb r3, r3
  1842. 8000a66: 743b strb r3, [r7, #16]
  1843. Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
  1844. 8000a68: 79bb ldrb r3, [r7, #6]
  1845. 8000a6a: 747b strb r3, [r7, #17]
  1846. for (i = 0; i < 6; i++)
  1847. 8000a6c: 2300 movs r3, #0
  1848. 8000a6e: 617b str r3, [r7, #20]
  1849. 8000a70: e00a b.n 8000a88 <SD_SendCmd+0x5c>
  1850. {
  1851. SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
  1852. 8000a72: f107 020c add.w r2, r7, #12
  1853. 8000a76: 697b ldr r3, [r7, #20]
  1854. 8000a78: 4413 add r3, r2
  1855. 8000a7a: 781b ldrb r3, [r3, #0]
  1856. 8000a7c: 4618 mov r0, r3
  1857. 8000a7e: f7ff ff2b bl 80008d8 <SD_WriteByte>
  1858. Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
  1859. Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
  1860. for (i = 0; i < 6; i++)
  1861. 8000a82: 697b ldr r3, [r7, #20]
  1862. 8000a84: 3301 adds r3, #1
  1863. 8000a86: 617b str r3, [r7, #20]
  1864. 8000a88: 697b ldr r3, [r7, #20]
  1865. 8000a8a: 2b05 cmp r3, #5
  1866. 8000a8c: d9f1 bls.n 8000a72 <SD_SendCmd+0x46>
  1867. {
  1868. SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
  1869. }
  1870. }
  1871. 8000a8e: bf00 nop
  1872. 8000a90: 3718 adds r7, #24
  1873. 8000a92: 46bd mov sp, r7
  1874. 8000a94: bd80 pop {r7, pc}
  1875. 8000a96: bf00 nop
  1876. 08000a98 <SD_GetResponse>:
  1877. SD_Error SD_GetResponse(uint8_t Response)
  1878. {
  1879. 8000a98: b580 push {r7, lr}
  1880. 8000a9a: b084 sub sp, #16
  1881. 8000a9c: af00 add r7, sp, #0
  1882. 8000a9e: 4603 mov r3, r0
  1883. 8000aa0: 71fb strb r3, [r7, #7]
  1884. uint32_t Count = 0xFFF;
  1885. 8000aa2: f640 73ff movw r3, #4095 ; 0xfff
  1886. 8000aa6: 60fb str r3, [r7, #12]
  1887. /*!< Check if response is got or a timeout is happen */
  1888. while ((SD_ReadByte() != Response) && Count)
  1889. 8000aa8: e002 b.n 8000ab0 <SD_GetResponse+0x18>
  1890. {
  1891. Count--;
  1892. 8000aaa: 68fb ldr r3, [r7, #12]
  1893. 8000aac: 3b01 subs r3, #1
  1894. 8000aae: 60fb str r3, [r7, #12]
  1895. SD_Error SD_GetResponse(uint8_t Response)
  1896. {
  1897. uint32_t Count = 0xFFF;
  1898. /*!< Check if response is got or a timeout is happen */
  1899. while ((SD_ReadByte() != Response) && Count)
  1900. 8000ab0: f000 f812 bl 8000ad8 <SD_ReadByte>
  1901. 8000ab4: 4603 mov r3, r0
  1902. 8000ab6: 461a mov r2, r3
  1903. 8000ab8: 79fb ldrb r3, [r7, #7]
  1904. 8000aba: 4293 cmp r3, r2
  1905. 8000abc: d002 beq.n 8000ac4 <SD_GetResponse+0x2c>
  1906. 8000abe: 68fb ldr r3, [r7, #12]
  1907. 8000ac0: 2b00 cmp r3, #0
  1908. 8000ac2: d1f2 bne.n 8000aaa <SD_GetResponse+0x12>
  1909. {
  1910. Count--;
  1911. }
  1912. if (Count == 0)
  1913. 8000ac4: 68fb ldr r3, [r7, #12]
  1914. 8000ac6: 2b00 cmp r3, #0
  1915. 8000ac8: d101 bne.n 8000ace <SD_GetResponse+0x36>
  1916. {
  1917. /*!< After time out */
  1918. return SD_RESPONSE_FAILURE;
  1919. 8000aca: 23ff movs r3, #255 ; 0xff
  1920. 8000acc: e000 b.n 8000ad0 <SD_GetResponse+0x38>
  1921. }
  1922. else
  1923. {
  1924. /*!< Right response got */
  1925. return SD_RESPONSE_NO_ERROR;
  1926. 8000ace: 2300 movs r3, #0
  1927. }
  1928. }
  1929. 8000ad0: 4618 mov r0, r3
  1930. 8000ad2: 3710 adds r7, #16
  1931. 8000ad4: 46bd mov sp, r7
  1932. 8000ad6: bd80 pop {r7, pc}
  1933. 08000ad8 <SD_ReadByte>:
  1934. uint8_t SD_ReadByte(void)
  1935. {
  1936. 8000ad8: b580 push {r7, lr}
  1937. 8000ada: b082 sub sp, #8
  1938. 8000adc: af00 add r7, sp, #0
  1939. uint8_t Data = 0;
  1940. 8000ade: 2300 movs r3, #0
  1941. 8000ae0: 71fb strb r3, [r7, #7]
  1942. /*!< Wait until the transmit buffer is empty */
  1943. while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
  1944. 8000ae2: bf00 nop
  1945. 8000ae4: 2102 movs r1, #2
  1946. 8000ae6: 480e ldr r0, [pc, #56] ; (8000b20 <SD_ReadByte+0x48>)
  1947. 8000ae8: f7ff fd78 bl 80005dc <SPI_I2S_GetFlagStatus>
  1948. 8000aec: 4603 mov r3, r0
  1949. 8000aee: 2b00 cmp r3, #0
  1950. 8000af0: d0f8 beq.n 8000ae4 <SD_ReadByte+0xc>
  1951. {
  1952. }
  1953. /*!< Send the byte */
  1954. SPI_I2S_SendData(SD_SPI, SD_DUMMY_BYTE);
  1955. 8000af2: 21ff movs r1, #255 ; 0xff
  1956. 8000af4: 480a ldr r0, [pc, #40] ; (8000b20 <SD_ReadByte+0x48>)
  1957. 8000af6: f7ff fd8d bl 8000614 <SPI_I2S_SendData>
  1958. /*!< Wait until a data is received */
  1959. while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
  1960. 8000afa: bf00 nop
  1961. 8000afc: 2101 movs r1, #1
  1962. 8000afe: 4808 ldr r0, [pc, #32] ; (8000b20 <SD_ReadByte+0x48>)
  1963. 8000b00: f7ff fd6c bl 80005dc <SPI_I2S_GetFlagStatus>
  1964. 8000b04: 4603 mov r3, r0
  1965. 8000b06: 2b00 cmp r3, #0
  1966. 8000b08: d0f8 beq.n 8000afc <SD_ReadByte+0x24>
  1967. {
  1968. }
  1969. /*!< Get the received data */
  1970. Data = SPI_I2S_ReceiveData(SD_SPI);
  1971. 8000b0a: 4805 ldr r0, [pc, #20] ; (8000b20 <SD_ReadByte+0x48>)
  1972. 8000b0c: f7ff fd90 bl 8000630 <SPI_I2S_ReceiveData>
  1973. 8000b10: 4603 mov r3, r0
  1974. 8000b12: 71fb strb r3, [r7, #7]
  1975. /*!< Return the shifted data */
  1976. return Data;
  1977. 8000b14: 79fb ldrb r3, [r7, #7]
  1978. }
  1979. 8000b16: 4618 mov r0, r3
  1980. 8000b18: 3708 adds r7, #8
  1981. 8000b1a: 46bd mov sp, r7
  1982. 8000b1c: bd80 pop {r7, pc}
  1983. 8000b1e: bf00 nop
  1984. 8000b20: 40003800 .word 0x40003800
  1985. 08000b24 <SD_GetDataResponse>:
  1986. uint8_t SD_GetDataResponse(void)
  1987. {
  1988. 8000b24: b580 push {r7, lr}
  1989. 8000b26: b082 sub sp, #8
  1990. 8000b28: af00 add r7, sp, #0
  1991. uint32_t i = 0;
  1992. 8000b2a: 2300 movs r3, #0
  1993. 8000b2c: 607b str r3, [r7, #4]
  1994. uint8_t response, rvalue;
  1995. while (i <= 64)
  1996. 8000b2e: e01e b.n 8000b6e <SD_GetDataResponse+0x4a>
  1997. {
  1998. /*!< Read resonse */
  1999. response = SD_ReadByte();
  2000. 8000b30: f7ff ffd2 bl 8000ad8 <SD_ReadByte>
  2001. 8000b34: 4603 mov r3, r0
  2002. 8000b36: 70fb strb r3, [r7, #3]
  2003. /*!< Mask unused bits */
  2004. response &= 0x1F;
  2005. 8000b38: 78fb ldrb r3, [r7, #3]
  2006. 8000b3a: f003 031f and.w r3, r3, #31
  2007. 8000b3e: 70fb strb r3, [r7, #3]
  2008. switch (response)
  2009. 8000b40: 78fb ldrb r3, [r7, #3]
  2010. 8000b42: 2b0b cmp r3, #11
  2011. 8000b44: d006 beq.n 8000b54 <SD_GetDataResponse+0x30>
  2012. 8000b46: 2b0d cmp r3, #13
  2013. 8000b48: d006 beq.n 8000b58 <SD_GetDataResponse+0x34>
  2014. 8000b4a: 2b05 cmp r3, #5
  2015. 8000b4c: d106 bne.n 8000b5c <SD_GetDataResponse+0x38>
  2016. {
  2017. case SD_DATA_OK:
  2018. {
  2019. rvalue = SD_DATA_OK;
  2020. 8000b4e: 2305 movs r3, #5
  2021. 8000b50: 70bb strb r3, [r7, #2]
  2022. break;
  2023. 8000b52: e006 b.n 8000b62 <SD_GetDataResponse+0x3e>
  2024. }
  2025. case SD_DATA_CRC_ERROR:
  2026. return SD_DATA_CRC_ERROR;
  2027. 8000b54: 230b movs r3, #11
  2028. 8000b56: e016 b.n 8000b86 <SD_GetDataResponse+0x62>
  2029. case SD_DATA_WRITE_ERROR:
  2030. return SD_DATA_WRITE_ERROR;
  2031. 8000b58: 230d movs r3, #13
  2032. 8000b5a: e014 b.n 8000b86 <SD_GetDataResponse+0x62>
  2033. default:
  2034. {
  2035. rvalue = SD_DATA_OTHER_ERROR;
  2036. 8000b5c: 23ff movs r3, #255 ; 0xff
  2037. 8000b5e: 70bb strb r3, [r7, #2]
  2038. break;
  2039. 8000b60: bf00 nop
  2040. }
  2041. }
  2042. /*!< Exit loop in case of data ok */
  2043. if (rvalue == SD_DATA_OK)
  2044. 8000b62: 78bb ldrb r3, [r7, #2]
  2045. 8000b64: 2b05 cmp r3, #5
  2046. 8000b66: d006 beq.n 8000b76 <SD_GetDataResponse+0x52>
  2047. break;
  2048. /*!< Increment loop counter */
  2049. i++;
  2050. 8000b68: 687b ldr r3, [r7, #4]
  2051. 8000b6a: 3301 adds r3, #1
  2052. 8000b6c: 607b str r3, [r7, #4]
  2053. uint8_t SD_GetDataResponse(void)
  2054. {
  2055. uint32_t i = 0;
  2056. uint8_t response, rvalue;
  2057. while (i <= 64)
  2058. 8000b6e: 687b ldr r3, [r7, #4]
  2059. 8000b70: 2b40 cmp r3, #64 ; 0x40
  2060. 8000b72: d9dd bls.n 8000b30 <SD_GetDataResponse+0xc>
  2061. 8000b74: e000 b.n 8000b78 <SD_GetDataResponse+0x54>
  2062. break;
  2063. }
  2064. }
  2065. /*!< Exit loop in case of data ok */
  2066. if (rvalue == SD_DATA_OK)
  2067. break;
  2068. 8000b76: bf00 nop
  2069. /*!< Increment loop counter */
  2070. i++;
  2071. }
  2072. /*!< Wait null data */
  2073. while (SD_ReadByte() == 0);
  2074. 8000b78: bf00 nop
  2075. 8000b7a: f7ff ffad bl 8000ad8 <SD_ReadByte>
  2076. 8000b7e: 4603 mov r3, r0
  2077. 8000b80: 2b00 cmp r3, #0
  2078. 8000b82: d0fa beq.n 8000b7a <SD_GetDataResponse+0x56>
  2079. /*!< Return response */
  2080. return response;
  2081. 8000b84: 78fb ldrb r3, [r7, #3]
  2082. }
  2083. 8000b86: 4618 mov r0, r3
  2084. 8000b88: 3708 adds r7, #8
  2085. 8000b8a: 46bd mov sp, r7
  2086. 8000b8c: bd80 pop {r7, pc}
  2087. 8000b8e: bf00 nop
  2088. 08000b90 <SD_Init>:
  2089. SD_Error SD_Init(void)
  2090. {
  2091. 8000b90: b580 push {r7, lr}
  2092. 8000b92: b082 sub sp, #8
  2093. 8000b94: af00 add r7, sp, #0
  2094. uint32_t i = 0;
  2095. 8000b96: 2300 movs r3, #0
  2096. 8000b98: 607b str r3, [r7, #4]
  2097. /*!< Initialize SD_SPI */
  2098. SD_LowLevel_Init();
  2099. 8000b9a: f7ff fec3 bl 8000924 <SD_LowLevel_Init>
  2100. /*!< SD chip select high */
  2101. SD_CS_HIGH();
  2102. 8000b9e: f44f 5180 mov.w r1, #4096 ; 0x1000
  2103. 8000ba2: 480b ldr r0, [pc, #44] ; (8000bd0 <SD_Init+0x40>)
  2104. 8000ba4: f7ff fce0 bl 8000568 <GPIO_SetBits>
  2105. /*!< Send dummy byte 0xFF, 10 times with CS high */
  2106. /*!< Rise CS and MOSI for 80 clocks cycles */
  2107. for (i = 0; i <= 9; i++)
  2108. 8000ba8: 2300 movs r3, #0
  2109. 8000baa: 607b str r3, [r7, #4]
  2110. 8000bac: e005 b.n 8000bba <SD_Init+0x2a>
  2111. {
  2112. /*!< Send dummy byte 0xFF */
  2113. SD_WriteByte(SD_DUMMY_BYTE);
  2114. 8000bae: 20ff movs r0, #255 ; 0xff
  2115. 8000bb0: f7ff fe92 bl 80008d8 <SD_WriteByte>
  2116. /*!< SD chip select high */
  2117. SD_CS_HIGH();
  2118. /*!< Send dummy byte 0xFF, 10 times with CS high */
  2119. /*!< Rise CS and MOSI for 80 clocks cycles */
  2120. for (i = 0; i <= 9; i++)
  2121. 8000bb4: 687b ldr r3, [r7, #4]
  2122. 8000bb6: 3301 adds r3, #1
  2123. 8000bb8: 607b str r3, [r7, #4]
  2124. 8000bba: 687b ldr r3, [r7, #4]
  2125. 8000bbc: 2b09 cmp r3, #9
  2126. 8000bbe: d9f6 bls.n 8000bae <SD_Init+0x1e>
  2127. /*!< Send dummy byte 0xFF */
  2128. SD_WriteByte(SD_DUMMY_BYTE);
  2129. }
  2130. /*------------Put SD in SPI mode--------------*/
  2131. /*!< SD initialized and set to SPI mode properly */
  2132. return (SD_GoIdleState());
  2133. 8000bc0: f7ff fefa bl 80009b8 <SD_GoIdleState>
  2134. 8000bc4: 4603 mov r3, r0
  2135. }
  2136. 8000bc6: 4618 mov r0, r3
  2137. 8000bc8: 3708 adds r7, #8
  2138. 8000bca: 46bd mov sp, r7
  2139. 8000bcc: bd80 pop {r7, pc}
  2140. 8000bce: bf00 nop
  2141. 8000bd0: 40010c00 .word 0x40010c00
  2142. 08000bd4 <_checkSDStatus>:
  2143. uint8_t _checkSDStatus() {
  2144. 8000bd4: b580 push {r7, lr}
  2145. 8000bd6: af00 add r7, sp, #0
  2146. if (SD_Status == SD_RESPONSE_NO_ERROR)
  2147. 8000bd8: 4b09 ldr r3, [pc, #36] ; (8000c00 <_checkSDStatus+0x2c>)
  2148. 8000bda: 881b ldrh r3, [r3, #0]
  2149. 8000bdc: 2b00 cmp r3, #0
  2150. 8000bde: d101 bne.n 8000be4 <_checkSDStatus+0x10>
  2151. return 0;
  2152. 8000be0: 2300 movs r3, #0
  2153. 8000be2: e00a b.n 8000bfa <_checkSDStatus+0x26>
  2154. do
  2155. SD_Status = SD_Init();
  2156. 8000be4: f7ff ffd4 bl 8000b90 <SD_Init>
  2157. 8000be8: 4603 mov r3, r0
  2158. 8000bea: b29a uxth r2, r3
  2159. 8000bec: 4b04 ldr r3, [pc, #16] ; (8000c00 <_checkSDStatus+0x2c>)
  2160. 8000bee: 801a strh r2, [r3, #0]
  2161. while (SD_Status != SD_RESPONSE_NO_ERROR);
  2162. 8000bf0: 4b03 ldr r3, [pc, #12] ; (8000c00 <_checkSDStatus+0x2c>)
  2163. 8000bf2: 881b ldrh r3, [r3, #0]
  2164. 8000bf4: 2b00 cmp r3, #0
  2165. 8000bf6: d1f5 bne.n 8000be4 <_checkSDStatus+0x10>
  2166. return 1;
  2167. 8000bf8: 2301 movs r3, #1
  2168. }
  2169. 8000bfa: 4618 mov r0, r3
  2170. 8000bfc: bd80 pop {r7, pc}
  2171. 8000bfe: bf00 nop
  2172. 8000c00: 20000018 .word 0x20000018
  2173. 08000c04 <checkSDStatus>:
  2174. void checkSDStatus() {
  2175. 8000c04: b580 push {r7, lr}
  2176. 8000c06: af00 add r7, sp, #0
  2177. while (_checkSDStatus()) {
  2178. 8000c08: bf00 nop
  2179. 8000c0a: f7ff ffe3 bl 8000bd4 <_checkSDStatus>
  2180. 8000c0e: 4603 mov r3, r0
  2181. 8000c10: 2b00 cmp r3, #0
  2182. 8000c12: d1fa bne.n 8000c0a <checkSDStatus+0x6>
  2183. //<----><------>writeBufFilled = 0;
  2184. //<----><------>SDWriteOffset = SD_WriteHeaders();
  2185. }
  2186. }
  2187. 8000c14: bf00 nop
  2188. 8000c16: bd80 pop {r7, pc}
  2189. 08000c18 <SD_WriteBlock>:
  2190. SD_Error SD_WriteBlock(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t BlockSize)
  2191. {
  2192. 8000c18: b580 push {r7, lr}
  2193. 8000c1a: b086 sub sp, #24
  2194. 8000c1c: af00 add r7, sp, #0
  2195. 8000c1e: 60f8 str r0, [r7, #12]
  2196. 8000c20: 60b9 str r1, [r7, #8]
  2197. 8000c22: 4613 mov r3, r2
  2198. 8000c24: 80fb strh r3, [r7, #6]
  2199. uint32_t i = 0;
  2200. 8000c26: 2300 movs r3, #0
  2201. 8000c28: 617b str r3, [r7, #20]
  2202. SD_Error rvalue = SD_RESPONSE_FAILURE;
  2203. 8000c2a: 23ff movs r3, #255 ; 0xff
  2204. 8000c2c: 74fb strb r3, [r7, #19]
  2205. /*!< SD chip select low */
  2206. SD_CS_LOW();
  2207. 8000c2e: f44f 5180 mov.w r1, #4096 ; 0x1000
  2208. 8000c32: 481f ldr r0, [pc, #124] ; (8000cb0 <SD_WriteBlock+0x98>)
  2209. 8000c34: f7ff fca6 bl 8000584 <GPIO_ResetBits>
  2210. /*!< Send CMD24 (SD_CMD_WRITE_SINGLE_BLOCK) to write multiple block */
  2211. SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, WriteAddr, 0xFF);
  2212. 8000c38: 22ff movs r2, #255 ; 0xff
  2213. 8000c3a: 68b9 ldr r1, [r7, #8]
  2214. 8000c3c: 2018 movs r0, #24
  2215. 8000c3e: f7ff fef5 bl 8000a2c <SD_SendCmd>
  2216. /*!< Check if the SD acknowledged the write block command: R1 response (0x00: no errors) */
  2217. if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
  2218. 8000c42: 2000 movs r0, #0
  2219. 8000c44: f7ff ff28 bl 8000a98 <SD_GetResponse>
  2220. 8000c48: 4603 mov r3, r0
  2221. 8000c4a: 2b00 cmp r3, #0
  2222. 8000c4c: d122 bne.n 8000c94 <SD_WriteBlock+0x7c>
  2223. {
  2224. /*!< Send a dummy byte */
  2225. SD_WriteByte(SD_DUMMY_BYTE);
  2226. 8000c4e: 20ff movs r0, #255 ; 0xff
  2227. 8000c50: f7ff fe42 bl 80008d8 <SD_WriteByte>
  2228. /*!< Send the data token to signify the start of the data */
  2229. SD_WriteByte(0xFE);
  2230. 8000c54: 20fe movs r0, #254 ; 0xfe
  2231. 8000c56: f7ff fe3f bl 80008d8 <SD_WriteByte>
  2232. /*!< Write the block data to SD : write count data by block */
  2233. for (i = 0; i < BlockSize; i++)
  2234. 8000c5a: 2300 movs r3, #0
  2235. 8000c5c: 617b str r3, [r7, #20]
  2236. 8000c5e: e00a b.n 8000c76 <SD_WriteBlock+0x5e>
  2237. {
  2238. /*!< Send the pointed byte */
  2239. SD_WriteByte(*pBuffer);
  2240. 8000c60: 68fb ldr r3, [r7, #12]
  2241. 8000c62: 781b ldrb r3, [r3, #0]
  2242. 8000c64: 4618 mov r0, r3
  2243. 8000c66: f7ff fe37 bl 80008d8 <SD_WriteByte>
  2244. /*!< Point to the next location where the byte read will be saved */
  2245. pBuffer++;
  2246. 8000c6a: 68fb ldr r3, [r7, #12]
  2247. 8000c6c: 3301 adds r3, #1
  2248. 8000c6e: 60fb str r3, [r7, #12]
  2249. /*!< Send the data token to signify the start of the data */
  2250. SD_WriteByte(0xFE);
  2251. /*!< Write the block data to SD : write count data by block */
  2252. for (i = 0; i < BlockSize; i++)
  2253. 8000c70: 697b ldr r3, [r7, #20]
  2254. 8000c72: 3301 adds r3, #1
  2255. 8000c74: 617b str r3, [r7, #20]
  2256. 8000c76: 88fa ldrh r2, [r7, #6]
  2257. 8000c78: 697b ldr r3, [r7, #20]
  2258. 8000c7a: 429a cmp r2, r3
  2259. 8000c7c: d8f0 bhi.n 8000c60 <SD_WriteBlock+0x48>
  2260. SD_WriteByte(*pBuffer);
  2261. /*!< Point to the next location where the byte read will be saved */
  2262. pBuffer++;
  2263. }
  2264. /*!< Put CRC bytes (not really needed by us, but required by SD) */
  2265. SD_ReadByte();
  2266. 8000c7e: f7ff ff2b bl 8000ad8 <SD_ReadByte>
  2267. SD_ReadByte();
  2268. 8000c82: f7ff ff29 bl 8000ad8 <SD_ReadByte>
  2269. /*!< Read data response */
  2270. if (SD_GetDataResponse() == SD_DATA_OK)
  2271. 8000c86: f7ff ff4d bl 8000b24 <SD_GetDataResponse>
  2272. 8000c8a: 4603 mov r3, r0
  2273. 8000c8c: 2b05 cmp r3, #5
  2274. 8000c8e: d101 bne.n 8000c94 <SD_WriteBlock+0x7c>
  2275. {
  2276. rvalue = SD_RESPONSE_NO_ERROR;
  2277. 8000c90: 2300 movs r3, #0
  2278. 8000c92: 74fb strb r3, [r7, #19]
  2279. }
  2280. }
  2281. /*!< SD chip select high */
  2282. SD_CS_HIGH();
  2283. 8000c94: f44f 5180 mov.w r1, #4096 ; 0x1000
  2284. 8000c98: 4805 ldr r0, [pc, #20] ; (8000cb0 <SD_WriteBlock+0x98>)
  2285. 8000c9a: f7ff fc65 bl 8000568 <GPIO_SetBits>
  2286. /*!< Send dummy byte: 8 Clock pulses of delay */
  2287. SD_WriteByte(SD_DUMMY_BYTE);
  2288. 8000c9e: 20ff movs r0, #255 ; 0xff
  2289. 8000ca0: f7ff fe1a bl 80008d8 <SD_WriteByte>
  2290. /*!< Returns the reponse */
  2291. return rvalue;
  2292. 8000ca4: 7cfb ldrb r3, [r7, #19]
  2293. }
  2294. 8000ca6: 4618 mov r0, r3
  2295. 8000ca8: 3718 adds r7, #24
  2296. 8000caa: 46bd mov sp, r7
  2297. 8000cac: bd80 pop {r7, pc}
  2298. 8000cae: bf00 nop
  2299. 8000cb0: 40010c00 .word 0x40010c00
  2300. 08000cb4 <SD_WriteBlock_1>:
  2301. #define SD_HEADERS "\000voltlogger\000\001\001\000\000Voltlogger0000\0000\0000"
  2302. SD_Error SD_WriteBlock_1(uint32_t WriteAddr)
  2303. {
  2304. 8000cb4: b580 push {r7, lr}
  2305. 8000cb6: b084 sub sp, #16
  2306. 8000cb8: af00 add r7, sp, #0
  2307. 8000cba: 6078 str r0, [r7, #4]
  2308. Wstatus = BuffReady;
  2309. 8000cbc: 4b3c ldr r3, [pc, #240] ; (8000db0 <SD_WriteBlock_1+0xfc>)
  2310. 8000cbe: 781a ldrb r2, [r3, #0]
  2311. 8000cc0: 4b3c ldr r3, [pc, #240] ; (8000db4 <SD_WriteBlock_1+0x100>)
  2312. 8000cc2: 701a strb r2, [r3, #0]
  2313. BuffReady = 0;
  2314. 8000cc4: 4b3a ldr r3, [pc, #232] ; (8000db0 <SD_WriteBlock_1+0xfc>)
  2315. 8000cc6: 2200 movs r2, #0
  2316. 8000cc8: 701a strb r2, [r3, #0]
  2317. uint32_t i = 0;
  2318. 8000cca: 2300 movs r3, #0
  2319. 8000ccc: 60fb str r3, [r7, #12]
  2320. SD_Error rvalue = SD_RESPONSE_FAILURE;
  2321. 8000cce: 23ff movs r3, #255 ; 0xff
  2322. 8000cd0: 72fb strb r3, [r7, #11]
  2323. SD_CS_LOW();
  2324. 8000cd2: f44f 5180 mov.w r1, #4096 ; 0x1000
  2325. 8000cd6: 4838 ldr r0, [pc, #224] ; (8000db8 <SD_WriteBlock_1+0x104>)
  2326. 8000cd8: f7ff fc54 bl 8000584 <GPIO_ResetBits>
  2327. SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, WriteAddr, 0xFF);
  2328. 8000cdc: 22ff movs r2, #255 ; 0xff
  2329. 8000cde: 6879 ldr r1, [r7, #4]
  2330. 8000ce0: 2018 movs r0, #24
  2331. 8000ce2: f7ff fea3 bl 8000a2c <SD_SendCmd>
  2332. if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
  2333. 8000ce6: 2000 movs r0, #0
  2334. 8000ce8: f7ff fed6 bl 8000a98 <SD_GetResponse>
  2335. 8000cec: 4603 mov r3, r0
  2336. 8000cee: 2b00 cmp r3, #0
  2337. 8000cf0: d14e bne.n 8000d90 <SD_WriteBlock_1+0xdc>
  2338. {
  2339. SD_WriteByte(SD_DUMMY_BYTE);
  2340. 8000cf2: 20ff movs r0, #255 ; 0xff
  2341. 8000cf4: f7ff fdf0 bl 80008d8 <SD_WriteByte>
  2342. SD_WriteByte(0xFE);
  2343. 8000cf8: 20fe movs r0, #254 ; 0xfe
  2344. 8000cfa: f7ff fded bl 80008d8 <SD_WriteByte>
  2345. if (Wstatus == 1){
  2346. 8000cfe: 4b2d ldr r3, [pc, #180] ; (8000db4 <SD_WriteBlock_1+0x100>)
  2347. 8000d00: 781b ldrb r3, [r3, #0]
  2348. 8000d02: 2b01 cmp r3, #1
  2349. 8000d04: d11a bne.n 8000d3c <SD_WriteBlock_1+0x88>
  2350. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2351. 8000d06: 2300 movs r3, #0
  2352. 8000d08: 60fb str r3, [r7, #12]
  2353. 8000d0a: e014 b.n 8000d36 <SD_WriteBlock_1+0x82>
  2354. {
  2355. SD_WriteByte(Buffer1[i]);
  2356. 8000d0c: 4a2b ldr r2, [pc, #172] ; (8000dbc <SD_WriteBlock_1+0x108>)
  2357. 8000d0e: 68fb ldr r3, [r7, #12]
  2358. 8000d10: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2359. 8000d14: b2db uxtb r3, r3
  2360. 8000d16: 4618 mov r0, r3
  2361. 8000d18: f7ff fdde bl 80008d8 <SD_WriteByte>
  2362. SD_WriteByte(Buffer1[i] >> 8);
  2363. 8000d1c: 4a27 ldr r2, [pc, #156] ; (8000dbc <SD_WriteBlock_1+0x108>)
  2364. 8000d1e: 68fb ldr r3, [r7, #12]
  2365. 8000d20: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2366. 8000d24: 0a1b lsrs r3, r3, #8
  2367. 8000d26: b29b uxth r3, r3
  2368. 8000d28: b2db uxtb r3, r3
  2369. 8000d2a: 4618 mov r0, r3
  2370. 8000d2c: f7ff fdd4 bl 80008d8 <SD_WriteByte>
  2371. if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
  2372. {
  2373. SD_WriteByte(SD_DUMMY_BYTE);
  2374. SD_WriteByte(0xFE);
  2375. if (Wstatus == 1){
  2376. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2377. 8000d30: 68fb ldr r3, [r7, #12]
  2378. 8000d32: 3301 adds r3, #1
  2379. 8000d34: 60fb str r3, [r7, #12]
  2380. 8000d36: 68fb ldr r3, [r7, #12]
  2381. 8000d38: 2bff cmp r3, #255 ; 0xff
  2382. 8000d3a: d9e7 bls.n 8000d0c <SD_WriteBlock_1+0x58>
  2383. SD_WriteByte(Buffer1[i]);
  2384. SD_WriteByte(Buffer1[i] >> 8);
  2385. }
  2386. }
  2387. if (Wstatus == 2){
  2388. 8000d3c: 4b1d ldr r3, [pc, #116] ; (8000db4 <SD_WriteBlock_1+0x100>)
  2389. 8000d3e: 781b ldrb r3, [r3, #0]
  2390. 8000d40: 2b02 cmp r3, #2
  2391. 8000d42: d11a bne.n 8000d7a <SD_WriteBlock_1+0xc6>
  2392. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2393. 8000d44: 2300 movs r3, #0
  2394. 8000d46: 60fb str r3, [r7, #12]
  2395. 8000d48: e014 b.n 8000d74 <SD_WriteBlock_1+0xc0>
  2396. {
  2397. SD_WriteByte(Buffer2[i]);
  2398. 8000d4a: 4a1d ldr r2, [pc, #116] ; (8000dc0 <SD_WriteBlock_1+0x10c>)
  2399. 8000d4c: 68fb ldr r3, [r7, #12]
  2400. 8000d4e: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2401. 8000d52: b2db uxtb r3, r3
  2402. 8000d54: 4618 mov r0, r3
  2403. 8000d56: f7ff fdbf bl 80008d8 <SD_WriteByte>
  2404. SD_WriteByte(Buffer2[i] >> 8);
  2405. 8000d5a: 4a19 ldr r2, [pc, #100] ; (8000dc0 <SD_WriteBlock_1+0x10c>)
  2406. 8000d5c: 68fb ldr r3, [r7, #12]
  2407. 8000d5e: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2408. 8000d62: 0a1b lsrs r3, r3, #8
  2409. 8000d64: b29b uxth r3, r3
  2410. 8000d66: b2db uxtb r3, r3
  2411. 8000d68: 4618 mov r0, r3
  2412. 8000d6a: f7ff fdb5 bl 80008d8 <SD_WriteByte>
  2413. SD_WriteByte(Buffer1[i] >> 8);
  2414. }
  2415. }
  2416. if (Wstatus == 2){
  2417. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2418. 8000d6e: 68fb ldr r3, [r7, #12]
  2419. 8000d70: 3301 adds r3, #1
  2420. 8000d72: 60fb str r3, [r7, #12]
  2421. 8000d74: 68fb ldr r3, [r7, #12]
  2422. 8000d76: 2bff cmp r3, #255 ; 0xff
  2423. 8000d78: d9e7 bls.n 8000d4a <SD_WriteBlock_1+0x96>
  2424. SD_WriteByte(Buffer2[i]);
  2425. SD_WriteByte(Buffer2[i] >> 8);
  2426. }
  2427. }
  2428. SD_ReadByte();
  2429. 8000d7a: f7ff fead bl 8000ad8 <SD_ReadByte>
  2430. SD_ReadByte();
  2431. 8000d7e: f7ff feab bl 8000ad8 <SD_ReadByte>
  2432. if (SD_GetDataResponse() == SD_DATA_OK)
  2433. 8000d82: f7ff fecf bl 8000b24 <SD_GetDataResponse>
  2434. 8000d86: 4603 mov r3, r0
  2435. 8000d88: 2b05 cmp r3, #5
  2436. 8000d8a: d101 bne.n 8000d90 <SD_WriteBlock_1+0xdc>
  2437. {
  2438. rvalue = SD_RESPONSE_NO_ERROR;
  2439. 8000d8c: 2300 movs r3, #0
  2440. 8000d8e: 72fb strb r3, [r7, #11]
  2441. }
  2442. }
  2443. SD_CS_HIGH();
  2444. 8000d90: f44f 5180 mov.w r1, #4096 ; 0x1000
  2445. 8000d94: 4808 ldr r0, [pc, #32] ; (8000db8 <SD_WriteBlock_1+0x104>)
  2446. 8000d96: f7ff fbe7 bl 8000568 <GPIO_SetBits>
  2447. SD_WriteByte(SD_DUMMY_BYTE);
  2448. 8000d9a: 20ff movs r0, #255 ; 0xff
  2449. 8000d9c: f7ff fd9c bl 80008d8 <SD_WriteByte>
  2450. Wstatus = 0;
  2451. 8000da0: 4b04 ldr r3, [pc, #16] ; (8000db4 <SD_WriteBlock_1+0x100>)
  2452. 8000da2: 2200 movs r2, #0
  2453. 8000da4: 701a strb r2, [r3, #0]
  2454. return rvalue;
  2455. 8000da6: 7afb ldrb r3, [r7, #11]
  2456. }
  2457. 8000da8: 4618 mov r0, r3
  2458. 8000daa: 3710 adds r7, #16
  2459. 8000dac: 46bd mov sp, r7
  2460. 8000dae: bd80 pop {r7, pc}
  2461. 8000db0: 20000630 .word 0x20000630
  2462. 8000db4: 2000001b .word 0x2000001b
  2463. 8000db8: 40010c00 .word 0x40010c00
  2464. 8000dbc: 20000230 .word 0x20000230
  2465. 8000dc0: 20000430 .word 0x20000430
  2466. 08000dc4 <ADC_Start>:
  2467. void ADC_Start (void){
  2468. 8000dc4: b580 push {r7, lr}
  2469. 8000dc6: b086 sub sp, #24
  2470. 8000dc8: af00 add r7, sp, #0
  2471. ADC_InitTypeDef ADC_InitStructure;
  2472. GPIO_InitTypeDef GPIO_InitStructure;
  2473. RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
  2474. 8000dca: 2101 movs r1, #1
  2475. 8000dcc: f44f 7000 mov.w r0, #512 ; 0x200
  2476. 8000dd0: f7ff fbe6 bl 80005a0 <RCC_APB2PeriphClockCmd>
  2477. GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 ;
  2478. 8000dd4: 2301 movs r3, #1
  2479. 8000dd6: 803b strh r3, [r7, #0]
  2480. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  2481. 8000dd8: 2300 movs r3, #0
  2482. 8000dda: 70fb strb r3, [r7, #3]
  2483. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz ;
  2484. 8000ddc: 2302 movs r3, #2
  2485. 8000dde: 70bb strb r3, [r7, #2]
  2486. GPIO_Init(GPIOA, &GPIO_InitStructure);
  2487. 8000de0: 463b mov r3, r7
  2488. 8000de2: 4619 mov r1, r3
  2489. 8000de4: 481a ldr r0, [pc, #104] ; (8000e50 <ADC_Start+0x8c>)
  2490. 8000de6: f7ff fb03 bl 80003f0 <GPIO_Init>
  2491. ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
  2492. 8000dea: 2300 movs r3, #0
  2493. 8000dec: 607b str r3, [r7, #4]
  2494. ADC_InitStructure.ADC_ScanConvMode = ENABLE;
  2495. 8000dee: 2301 movs r3, #1
  2496. 8000df0: 723b strb r3, [r7, #8]
  2497. ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
  2498. 8000df2: 2301 movs r3, #1
  2499. 8000df4: 727b strb r3, [r7, #9]
  2500. ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
  2501. 8000df6: f44f 2360 mov.w r3, #917504 ; 0xe0000
  2502. 8000dfa: 60fb str r3, [r7, #12]
  2503. ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
  2504. 8000dfc: 2300 movs r3, #0
  2505. 8000dfe: 613b str r3, [r7, #16]
  2506. ADC_InitStructure.ADC_NbrOfChannel = 0;
  2507. 8000e00: 2300 movs r3, #0
  2508. 8000e02: 753b strb r3, [r7, #20]
  2509. ADC_Init(ADC1, &ADC_InitStructure);
  2510. 8000e04: 1d3b adds r3, r7, #4
  2511. 8000e06: 4619 mov r1, r3
  2512. 8000e08: 4812 ldr r0, [pc, #72] ; (8000e54 <ADC_Start+0x90>)
  2513. 8000e0a: f7ff fd09 bl 8000820 <ADC_Init>
  2514. ADC_Cmd(ADC1, ENABLE);
  2515. 8000e0e: 2101 movs r1, #1
  2516. 8000e10: 4810 ldr r0, [pc, #64] ; (8000e54 <ADC_Start+0x90>)
  2517. 8000e12: f7ff fc7d bl 8000710 <ADC_Cmd>
  2518. ADC_ResetCalibration(ADC1);
  2519. 8000e16: 480f ldr r0, [pc, #60] ; (8000e54 <ADC_Start+0x90>)
  2520. 8000e18: f7ff fc96 bl 8000748 <ADC_ResetCalibration>
  2521. while(ADC_GetResetCalibrationStatus(ADC1));
  2522. 8000e1c: bf00 nop
  2523. 8000e1e: 480d ldr r0, [pc, #52] ; (8000e54 <ADC_Start+0x90>)
  2524. 8000e20: f7ff fca2 bl 8000768 <ADC_GetResetCalibrationStatus>
  2525. 8000e24: 4603 mov r3, r0
  2526. 8000e26: 2b00 cmp r3, #0
  2527. 8000e28: d1f9 bne.n 8000e1e <ADC_Start+0x5a>
  2528. ADC_StartCalibration(ADC1);
  2529. 8000e2a: 480a ldr r0, [pc, #40] ; (8000e54 <ADC_Start+0x90>)
  2530. 8000e2c: f7ff fcb4 bl 8000798 <ADC_StartCalibration>
  2531. while(ADC_GetCalibrationStatus(ADC1));
  2532. 8000e30: bf00 nop
  2533. 8000e32: 4808 ldr r0, [pc, #32] ; (8000e54 <ADC_Start+0x90>)
  2534. 8000e34: f7ff fcc0 bl 80007b8 <ADC_GetCalibrationStatus>
  2535. 8000e38: 4603 mov r3, r0
  2536. 8000e3a: 2b00 cmp r3, #0
  2537. 8000e3c: d1f9 bne.n 8000e32 <ADC_Start+0x6e>
  2538. ADC_SoftwareStartConvCmd(ADC1, ENABLE);
  2539. 8000e3e: 2101 movs r1, #1
  2540. 8000e40: 4804 ldr r0, [pc, #16] ; (8000e54 <ADC_Start+0x90>)
  2541. 8000e42: f7ff fcd1 bl 80007e8 <ADC_SoftwareStartConvCmd>
  2542. }
  2543. 8000e46: bf00 nop
  2544. 8000e48: 3718 adds r7, #24
  2545. 8000e4a: 46bd mov sp, r7
  2546. 8000e4c: bd80 pop {r7, pc}
  2547. 8000e4e: bf00 nop
  2548. 8000e50: 40010800 .word 0x40010800
  2549. 8000e54: 40012400 .word 0x40012400
  2550. 08000e58 <SD_WriteHeaders>:
  2551. uint32_t SD_WriteHeaders() {
  2552. 8000e58: b580 push {r7, lr}
  2553. 8000e5a: af00 add r7, sp, #0
  2554. //uint8_t header[SD_BUFSIZE];
  2555. memset(Buffer1, 0, SD_BUFSIZE);
  2556. 8000e5c: f44f 7200 mov.w r2, #512 ; 0x200
  2557. 8000e60: 2100 movs r1, #0
  2558. 8000e62: 4809 ldr r0, [pc, #36] ; (8000e88 <SD_WriteHeaders+0x30>)
  2559. 8000e64: f000 f980 bl 8001168 <memset>
  2560. memcpy(Buffer1, SD_HEADERS, sizeof(SD_HEADERS));
  2561. 8000e68: 2223 movs r2, #35 ; 0x23
  2562. 8000e6a: 4908 ldr r1, [pc, #32] ; (8000e8c <SD_WriteHeaders+0x34>)
  2563. 8000e6c: 4806 ldr r0, [pc, #24] ; (8000e88 <SD_WriteHeaders+0x30>)
  2564. 8000e6e: f000 f903 bl 8001078 <memcpy>
  2565. SD_Status = SD_WriteBlock_1(0);
  2566. 8000e72: 2000 movs r0, #0
  2567. 8000e74: f7ff ff1e bl 8000cb4 <SD_WriteBlock_1>
  2568. 8000e78: 4603 mov r3, r0
  2569. 8000e7a: b29a uxth r2, r3
  2570. 8000e7c: 4b04 ldr r3, [pc, #16] ; (8000e90 <SD_WriteHeaders+0x38>)
  2571. 8000e7e: 801a strh r2, [r3, #0]
  2572. return 1; // SD_BUFSIZE;
  2573. 8000e80: 2301 movs r3, #1
  2574. }
  2575. 8000e82: 4618 mov r0, r3
  2576. 8000e84: bd80 pop {r7, pc}
  2577. 8000e86: bf00 nop
  2578. 8000e88: 20000230 .word 0x20000230
  2579. 8000e8c: 0800125c .word 0x0800125c
  2580. 8000e90: 20000018 .word 0x20000018
  2581. 08000e94 <main>:
  2582. int main(void) {
  2583. 8000e94: b580 push {r7, lr}
  2584. 8000e96: af00 add r7, sp, #0
  2585. status = SD_Init();
  2586. 8000e98: f7ff fe7a bl 8000b90 <SD_Init>
  2587. 8000e9c: 4603 mov r3, r0
  2588. 8000e9e: 461a mov r2, r3
  2589. 8000ea0: 4b15 ldr r3, [pc, #84] ; (8000ef8 <main+0x64>)
  2590. 8000ea2: 601a str r2, [r3, #0]
  2591. checkSDStatus();
  2592. 8000ea4: f7ff feae bl 8000c04 <checkSDStatus>
  2593. writeBufFilled = 0;
  2594. 8000ea8: 4b14 ldr r3, [pc, #80] ; (8000efc <main+0x68>)
  2595. 8000eaa: 2200 movs r2, #0
  2596. 8000eac: 801a strh r2, [r3, #0]
  2597. // SD_WriteHeaders();
  2598. SDWriteOffset = SD_BUFSIZE;
  2599. 8000eae: 4b14 ldr r3, [pc, #80] ; (8000f00 <main+0x6c>)
  2600. 8000eb0: f44f 7200 mov.w r2, #512 ; 0x200
  2601. 8000eb4: 601a str r2, [r3, #0]
  2602. SystemCoreClockUpdate();
  2603. 8000eb6: f7ff f9a9 bl 800020c <SystemCoreClockUpdate>
  2604. SysTick_Config(SystemCoreClock/5000);
  2605. 8000eba: 4b12 ldr r3, [pc, #72] ; (8000f04 <main+0x70>)
  2606. 8000ebc: 681b ldr r3, [r3, #0]
  2607. 8000ebe: 4a12 ldr r2, [pc, #72] ; (8000f08 <main+0x74>)
  2608. 8000ec0: fba2 2303 umull r2, r3, r2, r3
  2609. 8000ec4: 0b1b lsrs r3, r3, #12
  2610. 8000ec6: 4618 mov r0, r3
  2611. 8000ec8: f7ff f94a bl 8000160 <SysTick_Config>
  2612. ADC_Start();
  2613. 8000ecc: f7ff ff7a bl 8000dc4 <ADC_Start>
  2614. while (1)
  2615. {
  2616. if (BuffReady != 0){
  2617. 8000ed0: 4b0e ldr r3, [pc, #56] ; (8000f0c <main+0x78>)
  2618. 8000ed2: 781b ldrb r3, [r3, #0]
  2619. 8000ed4: 2b00 cmp r3, #0
  2620. 8000ed6: d0fb beq.n 8000ed0 <main+0x3c>
  2621. check=1;
  2622. 8000ed8: 4b0d ldr r3, [pc, #52] ; (8000f10 <main+0x7c>)
  2623. 8000eda: 2201 movs r2, #1
  2624. 8000edc: 701a strb r2, [r3, #0]
  2625. SD_WriteBlock_1(SDWriteOffset);
  2626. 8000ede: 4b08 ldr r3, [pc, #32] ; (8000f00 <main+0x6c>)
  2627. 8000ee0: 681b ldr r3, [r3, #0]
  2628. 8000ee2: 4618 mov r0, r3
  2629. 8000ee4: f7ff fee6 bl 8000cb4 <SD_WriteBlock_1>
  2630. SDWriteOffset = SDWriteOffset + SD_BUFSIZE;
  2631. 8000ee8: 4b05 ldr r3, [pc, #20] ; (8000f00 <main+0x6c>)
  2632. 8000eea: 681b ldr r3, [r3, #0]
  2633. 8000eec: f503 7300 add.w r3, r3, #512 ; 0x200
  2634. 8000ef0: 4a03 ldr r2, [pc, #12] ; (8000f00 <main+0x6c>)
  2635. 8000ef2: 6013 str r3, [r2, #0]
  2636. }
  2637. }
  2638. 8000ef4: e7ec b.n 8000ed0 <main+0x3c>
  2639. 8000ef6: bf00 nop
  2640. 8000ef8: 20000014 .word 0x20000014
  2641. 8000efc: 20000226 .word 0x20000226
  2642. 8000f00: 20000228 .word 0x20000228
  2643. 8000f04: 20000000 .word 0x20000000
  2644. 8000f08: d1b71759 .word 0xd1b71759
  2645. 8000f0c: 20000630 .word 0x20000630
  2646. 8000f10: 20000632 .word 0x20000632
  2647. 08000f14 <SysTick_Handler>:
  2648. }
  2649. void SysTick_Handler(void) {
  2650. 8000f14: b480 push {r7}
  2651. 8000f16: af00 add r7, sp, #0
  2652. //ADC1ConvertedValue = ADC_GetConversionValue(ADC1);
  2653. ADC1ConvertedValue = 0xAA;
  2654. 8000f18: 4b38 ldr r3, [pc, #224] ; (8000ffc <SysTick_Handler+0xe8>)
  2655. 8000f1a: 22aa movs r2, #170 ; 0xaa
  2656. 8000f1c: 801a strh r2, [r3, #0]
  2657. if (Rstatus == 1 && Wstatus != 1){
  2658. 8000f1e: 4b38 ldr r3, [pc, #224] ; (8001000 <SysTick_Handler+0xec>)
  2659. 8000f20: 781b ldrb r3, [r3, #0]
  2660. 8000f22: 2b01 cmp r3, #1
  2661. 8000f24: d130 bne.n 8000f88 <SysTick_Handler+0x74>
  2662. 8000f26: 4b37 ldr r3, [pc, #220] ; (8001004 <SysTick_Handler+0xf0>)
  2663. 8000f28: 781b ldrb r3, [r3, #0]
  2664. 8000f2a: 2b01 cmp r3, #1
  2665. 8000f2c: d02c beq.n 8000f88 <SysTick_Handler+0x74>
  2666. Buffer1[BuffCount] = TMSTP;
  2667. 8000f2e: 4b36 ldr r3, [pc, #216] ; (8001008 <SysTick_Handler+0xf4>)
  2668. 8000f30: 781b ldrb r3, [r3, #0]
  2669. 8000f32: 461a mov r2, r3
  2670. 8000f34: 4b35 ldr r3, [pc, #212] ; (800100c <SysTick_Handler+0xf8>)
  2671. 8000f36: 8819 ldrh r1, [r3, #0]
  2672. 8000f38: 4b35 ldr r3, [pc, #212] ; (8001010 <SysTick_Handler+0xfc>)
  2673. 8000f3a: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2674. BuffCount++;
  2675. 8000f3e: 4b32 ldr r3, [pc, #200] ; (8001008 <SysTick_Handler+0xf4>)
  2676. 8000f40: 781b ldrb r3, [r3, #0]
  2677. 8000f42: 3301 adds r3, #1
  2678. 8000f44: b2da uxtb r2, r3
  2679. 8000f46: 4b30 ldr r3, [pc, #192] ; (8001008 <SysTick_Handler+0xf4>)
  2680. 8000f48: 701a strb r2, [r3, #0]
  2681. Buffer1[BuffCount] = ADC1ConvertedValue;
  2682. 8000f4a: 4b2f ldr r3, [pc, #188] ; (8001008 <SysTick_Handler+0xf4>)
  2683. 8000f4c: 781b ldrb r3, [r3, #0]
  2684. 8000f4e: 461a mov r2, r3
  2685. 8000f50: 4b2a ldr r3, [pc, #168] ; (8000ffc <SysTick_Handler+0xe8>)
  2686. 8000f52: 881b ldrh r3, [r3, #0]
  2687. 8000f54: b299 uxth r1, r3
  2688. 8000f56: 4b2e ldr r3, [pc, #184] ; (8001010 <SysTick_Handler+0xfc>)
  2689. 8000f58: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2690. BuffCount++;
  2691. 8000f5c: 4b2a ldr r3, [pc, #168] ; (8001008 <SysTick_Handler+0xf4>)
  2692. 8000f5e: 781b ldrb r3, [r3, #0]
  2693. 8000f60: 3301 adds r3, #1
  2694. 8000f62: b2da uxtb r2, r3
  2695. 8000f64: 4b28 ldr r3, [pc, #160] ; (8001008 <SysTick_Handler+0xf4>)
  2696. 8000f66: 701a strb r2, [r3, #0]
  2697. TMSTP++;
  2698. 8000f68: 4b28 ldr r3, [pc, #160] ; (800100c <SysTick_Handler+0xf8>)
  2699. 8000f6a: 881b ldrh r3, [r3, #0]
  2700. 8000f6c: 3301 adds r3, #1
  2701. 8000f6e: b29a uxth r2, r3
  2702. 8000f70: 4b26 ldr r3, [pc, #152] ; (800100c <SysTick_Handler+0xf8>)
  2703. 8000f72: 801a strh r2, [r3, #0]
  2704. if ( BuffCount == 0){
  2705. 8000f74: 4b24 ldr r3, [pc, #144] ; (8001008 <SysTick_Handler+0xf4>)
  2706. 8000f76: 781b ldrb r3, [r3, #0]
  2707. 8000f78: 2b00 cmp r3, #0
  2708. 8000f7a: d105 bne.n 8000f88 <SysTick_Handler+0x74>
  2709. Rstatus = 2;
  2710. 8000f7c: 4b20 ldr r3, [pc, #128] ; (8001000 <SysTick_Handler+0xec>)
  2711. 8000f7e: 2202 movs r2, #2
  2712. 8000f80: 701a strb r2, [r3, #0]
  2713. BuffReady = 1;
  2714. 8000f82: 4b24 ldr r3, [pc, #144] ; (8001014 <SysTick_Handler+0x100>)
  2715. 8000f84: 2201 movs r2, #1
  2716. 8000f86: 701a strb r2, [r3, #0]
  2717. }
  2718. }
  2719. if (Rstatus == 2 && Wstatus != 2){
  2720. 8000f88: 4b1d ldr r3, [pc, #116] ; (8001000 <SysTick_Handler+0xec>)
  2721. 8000f8a: 781b ldrb r3, [r3, #0]
  2722. 8000f8c: 2b02 cmp r3, #2
  2723. 8000f8e: d130 bne.n 8000ff2 <SysTick_Handler+0xde>
  2724. 8000f90: 4b1c ldr r3, [pc, #112] ; (8001004 <SysTick_Handler+0xf0>)
  2725. 8000f92: 781b ldrb r3, [r3, #0]
  2726. 8000f94: 2b02 cmp r3, #2
  2727. 8000f96: d02c beq.n 8000ff2 <SysTick_Handler+0xde>
  2728. Buffer2[BuffCount] = TMSTP;
  2729. 8000f98: 4b1b ldr r3, [pc, #108] ; (8001008 <SysTick_Handler+0xf4>)
  2730. 8000f9a: 781b ldrb r3, [r3, #0]
  2731. 8000f9c: 461a mov r2, r3
  2732. 8000f9e: 4b1b ldr r3, [pc, #108] ; (800100c <SysTick_Handler+0xf8>)
  2733. 8000fa0: 8819 ldrh r1, [r3, #0]
  2734. 8000fa2: 4b1d ldr r3, [pc, #116] ; (8001018 <SysTick_Handler+0x104>)
  2735. 8000fa4: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2736. BuffCount++;
  2737. 8000fa8: 4b17 ldr r3, [pc, #92] ; (8001008 <SysTick_Handler+0xf4>)
  2738. 8000faa: 781b ldrb r3, [r3, #0]
  2739. 8000fac: 3301 adds r3, #1
  2740. 8000fae: b2da uxtb r2, r3
  2741. 8000fb0: 4b15 ldr r3, [pc, #84] ; (8001008 <SysTick_Handler+0xf4>)
  2742. 8000fb2: 701a strb r2, [r3, #0]
  2743. Buffer2[BuffCount] = ADC1ConvertedValue;
  2744. 8000fb4: 4b14 ldr r3, [pc, #80] ; (8001008 <SysTick_Handler+0xf4>)
  2745. 8000fb6: 781b ldrb r3, [r3, #0]
  2746. 8000fb8: 461a mov r2, r3
  2747. 8000fba: 4b10 ldr r3, [pc, #64] ; (8000ffc <SysTick_Handler+0xe8>)
  2748. 8000fbc: 881b ldrh r3, [r3, #0]
  2749. 8000fbe: b299 uxth r1, r3
  2750. 8000fc0: 4b15 ldr r3, [pc, #84] ; (8001018 <SysTick_Handler+0x104>)
  2751. 8000fc2: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2752. BuffCount++;
  2753. 8000fc6: 4b10 ldr r3, [pc, #64] ; (8001008 <SysTick_Handler+0xf4>)
  2754. 8000fc8: 781b ldrb r3, [r3, #0]
  2755. 8000fca: 3301 adds r3, #1
  2756. 8000fcc: b2da uxtb r2, r3
  2757. 8000fce: 4b0e ldr r3, [pc, #56] ; (8001008 <SysTick_Handler+0xf4>)
  2758. 8000fd0: 701a strb r2, [r3, #0]
  2759. TMSTP++;
  2760. 8000fd2: 4b0e ldr r3, [pc, #56] ; (800100c <SysTick_Handler+0xf8>)
  2761. 8000fd4: 881b ldrh r3, [r3, #0]
  2762. 8000fd6: 3301 adds r3, #1
  2763. 8000fd8: b29a uxth r2, r3
  2764. 8000fda: 4b0c ldr r3, [pc, #48] ; (800100c <SysTick_Handler+0xf8>)
  2765. 8000fdc: 801a strh r2, [r3, #0]
  2766. if (BuffCount == 0){
  2767. 8000fde: 4b0a ldr r3, [pc, #40] ; (8001008 <SysTick_Handler+0xf4>)
  2768. 8000fe0: 781b ldrb r3, [r3, #0]
  2769. 8000fe2: 2b00 cmp r3, #0
  2770. 8000fe4: d105 bne.n 8000ff2 <SysTick_Handler+0xde>
  2771. Rstatus = 1;
  2772. 8000fe6: 4b06 ldr r3, [pc, #24] ; (8001000 <SysTick_Handler+0xec>)
  2773. 8000fe8: 2201 movs r2, #1
  2774. 8000fea: 701a strb r2, [r3, #0]
  2775. BuffReady = 2;
  2776. 8000fec: 4b09 ldr r3, [pc, #36] ; (8001014 <SysTick_Handler+0x100>)
  2777. 8000fee: 2202 movs r2, #2
  2778. 8000ff0: 701a strb r2, [r3, #0]
  2779. BuffReady = 2;
  2780. // BuffCount = 0;
  2781. }
  2782. */
  2783. }
  2784. 8000ff2: bf00 nop
  2785. 8000ff4: 46bd mov sp, r7
  2786. 8000ff6: bc80 pop {r7}
  2787. 8000ff8: 4770 bx lr
  2788. 8000ffa: bf00 nop
  2789. 8000ffc: 2000022c .word 0x2000022c
  2790. 8001000: 2000001a .word 0x2000001a
  2791. 8001004: 2000001b .word 0x2000001b
  2792. 8001008: 20000631 .word 0x20000631
  2793. 800100c: 20000634 .word 0x20000634
  2794. 8001010: 20000230 .word 0x20000230
  2795. 8001014: 20000630 .word 0x20000630
  2796. 8001018: 20000430 .word 0x20000430
  2797. 800101c: 08001280 .word 0x08001280
  2798. 8001020: 20000000 .word 0x20000000
  2799. 8001024: 2000001c .word 0x2000001c
  2800. 8001028: 2000001c .word 0x2000001c
  2801. 800102c: 20000638 .word 0x20000638
  2802. 08001030 <Reset_Handler>:
  2803. .weak Reset_Handler
  2804. .type Reset_Handler, %function
  2805. Reset_Handler:
  2806. /* Copy the data segment initializers from flash to SRAM */
  2807. movs r1, #0
  2808. 8001030: 2100 movs r1, #0
  2809. b LoopCopyDataInit
  2810. 8001032: e003 b.n 800103c <LoopCopyDataInit>
  2811. 08001034 <CopyDataInit>:
  2812. CopyDataInit:
  2813. ldr r3, =_sidata
  2814. 8001034: 4b0a ldr r3, [pc, #40] ; (8001060 <LoopFillZerobss+0x10>)
  2815. ldr r3, [r3, r1]
  2816. 8001036: 585b ldr r3, [r3, r1]
  2817. str r3, [r0, r1]
  2818. 8001038: 5043 str r3, [r0, r1]
  2819. adds r1, r1, #4
  2820. 800103a: 3104 adds r1, #4
  2821. 0800103c <LoopCopyDataInit>:
  2822. LoopCopyDataInit:
  2823. ldr r0, =_sdata
  2824. 800103c: 4809 ldr r0, [pc, #36] ; (8001064 <LoopFillZerobss+0x14>)
  2825. ldr r3, =_edata
  2826. 800103e: 4b0a ldr r3, [pc, #40] ; (8001068 <LoopFillZerobss+0x18>)
  2827. adds r2, r0, r1
  2828. 8001040: 1842 adds r2, r0, r1
  2829. cmp r2, r3
  2830. 8001042: 429a cmp r2, r3
  2831. bcc CopyDataInit
  2832. 8001044: d3f6 bcc.n 8001034 <CopyDataInit>
  2833. ldr r2, =_sbss
  2834. 8001046: 4a09 ldr r2, [pc, #36] ; (800106c <LoopFillZerobss+0x1c>)
  2835. b LoopFillZerobss
  2836. 8001048: e002 b.n 8001050 <LoopFillZerobss>
  2837. 0800104a <FillZerobss>:
  2838. /* Zero fill the bss segment. */
  2839. FillZerobss:
  2840. movs r3, #0
  2841. 800104a: 2300 movs r3, #0
  2842. str r3, [r2], #4
  2843. 800104c: f842 3b04 str.w r3, [r2], #4
  2844. 08001050 <LoopFillZerobss>:
  2845. LoopFillZerobss:
  2846. ldr r3, = _ebss
  2847. 8001050: 4b07 ldr r3, [pc, #28] ; (8001070 <LoopFillZerobss+0x20>)
  2848. cmp r2, r3
  2849. 8001052: 429a cmp r2, r3
  2850. bcc FillZerobss
  2851. 8001054: d3f9 bcc.n 800104a <FillZerobss>
  2852. /* Call the clock system intitialization function.*/
  2853. bl SystemInit
  2854. 8001056: f7ff f8a5 bl 80001a4 <SystemInit>
  2855. /* Call the application's entry point.*/
  2856. bl main
  2857. 800105a: f7ff ff1b bl 8000e94 <main>
  2858. bx lr
  2859. 800105e: 4770 bx lr
  2860. /* Copy the data segment initializers from flash to SRAM */
  2861. movs r1, #0
  2862. b LoopCopyDataInit
  2863. CopyDataInit:
  2864. ldr r3, =_sidata
  2865. 8001060: 08001280 .word 0x08001280
  2866. ldr r3, [r3, r1]
  2867. str r3, [r0, r1]
  2868. adds r1, r1, #4
  2869. LoopCopyDataInit:
  2870. ldr r0, =_sdata
  2871. 8001064: 20000000 .word 0x20000000
  2872. ldr r3, =_edata
  2873. 8001068: 2000001c .word 0x2000001c
  2874. adds r2, r0, r1
  2875. cmp r2, r3
  2876. bcc CopyDataInit
  2877. ldr r2, =_sbss
  2878. 800106c: 2000001c .word 0x2000001c
  2879. FillZerobss:
  2880. movs r3, #0
  2881. str r3, [r2], #4
  2882. LoopFillZerobss:
  2883. ldr r3, = _ebss
  2884. 8001070: 20000638 .word 0x20000638
  2885. 08001074 <ADC1_2_IRQHandler>:
  2886. * @retval None
  2887. */
  2888. .section .text.Default_Handler,"ax",%progbits
  2889. Default_Handler:
  2890. Infinite_Loop:
  2891. b Infinite_Loop
  2892. 8001074: e7fe b.n 8001074 <ADC1_2_IRQHandler>
  2893. ...
  2894. 08001078 <memcpy>:
  2895. 8001078: e352000f cmp r2, #15
  2896. 800107c: e92d40f0 push {r4, r5, r6, r7, lr}
  2897. 8001080: 9a000029 bls 800112c <memcpy+0xb4>
  2898. 8001084: e1813000 orr r3, r1, r0
  2899. 8001088: e3130003 tst r3, #3
  2900. 800108c: 1a000031 bne 8001158 <memcpy+0xe0>
  2901. 8001090: e1a0e002 mov lr, r2
  2902. 8001094: e280c010 add ip, r0, #16
  2903. 8001098: e2813010 add r3, r1, #16
  2904. 800109c: e5137010 ldr r7, [r3, #-16]
  2905. 80010a0: e513600c ldr r6, [r3, #-12]
  2906. 80010a4: e5135008 ldr r5, [r3, #-8]
  2907. 80010a8: e5134004 ldr r4, [r3, #-4]
  2908. 80010ac: e24ee010 sub lr, lr, #16
  2909. 80010b0: e35e000f cmp lr, #15
  2910. 80010b4: e50c7010 str r7, [ip, #-16]
  2911. 80010b8: e50c600c str r6, [ip, #-12]
  2912. 80010bc: e50c5008 str r5, [ip, #-8]
  2913. 80010c0: e50c4004 str r4, [ip, #-4]
  2914. 80010c4: e2833010 add r3, r3, #16
  2915. 80010c8: e28cc010 add ip, ip, #16
  2916. 80010cc: 8afffff2 bhi 800109c <memcpy+0x24>
  2917. 80010d0: e2423010 sub r3, r2, #16
  2918. 80010d4: e3c3300f bic r3, r3, #15
  2919. 80010d8: e202600f and r6, r2, #15
  2920. 80010dc: e2833010 add r3, r3, #16
  2921. 80010e0: e3560003 cmp r6, #3
  2922. 80010e4: e0811003 add r1, r1, r3
  2923. 80010e8: e0803003 add r3, r0, r3
  2924. 80010ec: 9a00001b bls 8001160 <memcpy+0xe8>
  2925. 80010f0: e1a04001 mov r4, r1
  2926. 80010f4: e1a0c006 mov ip, r6
  2927. 80010f8: e243e004 sub lr, r3, #4
  2928. 80010fc: e24cc004 sub ip, ip, #4
  2929. 8001100: e4945004 ldr r5, [r4], #4
  2930. 8001104: e35c0003 cmp ip, #3
  2931. 8001108: e5ae5004 str r5, [lr, #4]!
  2932. 800110c: 8afffffa bhi 80010fc <memcpy+0x84>
  2933. 8001110: e246c004 sub ip, r6, #4
  2934. 8001114: e3ccc003 bic ip, ip, #3
  2935. 8001118: e28cc004 add ip, ip, #4
  2936. 800111c: e083300c add r3, r3, ip
  2937. 8001120: e081100c add r1, r1, ip
  2938. 8001124: e2022003 and r2, r2, #3
  2939. 8001128: ea000000 b 8001130 <memcpy+0xb8>
  2940. 800112c: e1a03000 mov r3, r0
  2941. 8001130: e3520000 cmp r2, #0
  2942. 8001134: 0a000005 beq 8001150 <memcpy+0xd8>
  2943. 8001138: e2433001 sub r3, r3, #1
  2944. 800113c: e0812002 add r2, r1, r2
  2945. 8001140: e4d1c001 ldrb ip, [r1], #1
  2946. 8001144: e1510002 cmp r1, r2
  2947. 8001148: e5e3c001 strb ip, [r3, #1]!
  2948. 800114c: 1afffffb bne 8001140 <memcpy+0xc8>
  2949. 8001150: e8bd40f0 pop {r4, r5, r6, r7, lr}
  2950. 8001154: e12fff1e bx lr
  2951. 8001158: e1a03000 mov r3, r0
  2952. 800115c: eafffff5 b 8001138 <memcpy+0xc0>
  2953. 8001160: e1a02006 mov r2, r6
  2954. 8001164: eafffff1 b 8001130 <memcpy+0xb8>
  2955. 08001168 <memset>:
  2956. 8001168: e3100003 tst r0, #3
  2957. 800116c: e92d4010 push {r4, lr}
  2958. 8001170: 0a000037 beq 8001254 <memset+0xec>
  2959. 8001174: e3520000 cmp r2, #0
  2960. 8001178: e2422001 sub r2, r2, #1
  2961. 800117c: 0a000032 beq 800124c <memset+0xe4>
  2962. 8001180: e201c0ff and ip, r1, #255 ; 0xff
  2963. 8001184: e1a03000 mov r3, r0
  2964. 8001188: ea000002 b 8001198 <memset+0x30>
  2965. 800118c: e3520000 cmp r2, #0
  2966. 8001190: e2422001 sub r2, r2, #1
  2967. 8001194: 0a00002c beq 800124c <memset+0xe4>
  2968. 8001198: e4c3c001 strb ip, [r3], #1
  2969. 800119c: e3130003 tst r3, #3
  2970. 80011a0: 1afffff9 bne 800118c <memset+0x24>
  2971. 80011a4: e3520003 cmp r2, #3
  2972. 80011a8: 9a000020 bls 8001230 <memset+0xc8>
  2973. 80011ac: e201e0ff and lr, r1, #255 ; 0xff
  2974. 80011b0: e18ee40e orr lr, lr, lr, lsl #8
  2975. 80011b4: e352000f cmp r2, #15
  2976. 80011b8: e18ee80e orr lr, lr, lr, lsl #16
  2977. 80011bc: 9a000010 bls 8001204 <memset+0x9c>
  2978. 80011c0: e1a04002 mov r4, r2
  2979. 80011c4: e283c010 add ip, r3, #16
  2980. 80011c8: e2444010 sub r4, r4, #16
  2981. 80011cc: e354000f cmp r4, #15
  2982. 80011d0: e50ce010 str lr, [ip, #-16]
  2983. 80011d4: e50ce00c str lr, [ip, #-12]
  2984. 80011d8: e50ce008 str lr, [ip, #-8]
  2985. 80011dc: e50ce004 str lr, [ip, #-4]
  2986. 80011e0: e28cc010 add ip, ip, #16
  2987. 80011e4: 8afffff7 bhi 80011c8 <memset+0x60>
  2988. 80011e8: e242c010 sub ip, r2, #16
  2989. 80011ec: e3ccc00f bic ip, ip, #15
  2990. 80011f0: e202200f and r2, r2, #15
  2991. 80011f4: e28cc010 add ip, ip, #16
  2992. 80011f8: e3520003 cmp r2, #3
  2993. 80011fc: e083300c add r3, r3, ip
  2994. 8001200: 9a00000a bls 8001230 <memset+0xc8>
  2995. 8001204: e1a04003 mov r4, r3
  2996. 8001208: e1a0c002 mov ip, r2
  2997. 800120c: e24cc004 sub ip, ip, #4
  2998. 8001210: e35c0003 cmp ip, #3
  2999. 8001214: e484e004 str lr, [r4], #4
  3000. 8001218: 8afffffb bhi 800120c <memset+0xa4>
  3001. 800121c: e242c004 sub ip, r2, #4
  3002. 8001220: e3ccc003 bic ip, ip, #3
  3003. 8001224: e28cc004 add ip, ip, #4
  3004. 8001228: e083300c add r3, r3, ip
  3005. 800122c: e2022003 and r2, r2, #3
  3006. 8001230: e3520000 cmp r2, #0
  3007. 8001234: 120110ff andne r1, r1, #255 ; 0xff
  3008. 8001238: 10832002 addne r2, r3, r2
  3009. 800123c: 0a000002 beq 800124c <memset+0xe4>
  3010. 8001240: e4c31001 strb r1, [r3], #1
  3011. 8001244: e1530002 cmp r3, r2
  3012. 8001248: 1afffffc bne 8001240 <memset+0xd8>
  3013. 800124c: e8bd4010 pop {r4, lr}
  3014. 8001250: e12fff1e bx lr
  3015. 8001254: e1a03000 mov r3, r0
  3016. 8001258: eaffffd1 b 80011a4 <memset+0x3c>
  3017. 800125c: 6c6f7600 .word 0x6c6f7600
  3018. 8001260: 676f6c74 .word 0x676f6c74
  3019. 8001264: 00726567 .word 0x00726567
  3020. 8001268: 00000101 .word 0x00000101
  3021. 800126c: 746c6f56 .word 0x746c6f56
  3022. 8001270: 67676f6c .word 0x67676f6c
  3023. 8001274: 30307265 .word 0x30307265
  3024. 8001278: 30003030 .word 0x30003030
  3025. 800127c: 00003000 .word 0x00003000