main.lst 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493
  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 <SPI_I2S_GetFlagStatus>:
  547. FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
  548. {
  549. 80003f0: b480 push {r7}
  550. 80003f2: b085 sub sp, #20
  551. 80003f4: af00 add r7, sp, #0
  552. 80003f6: 6078 str r0, [r7, #4]
  553. 80003f8: 460b mov r3, r1
  554. 80003fa: 807b strh r3, [r7, #2]
  555. FlagStatus bitstatus = RESET;
  556. 80003fc: 2300 movs r3, #0
  557. 80003fe: 73fb strb r3, [r7, #15]
  558. /* Check the parameters */
  559. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  560. assert_param(IS_SPI_I2S_GET_FLAG(SPI_I2S_FLAG));
  561. /* Check the status of the specified SPI/I2S flag */
  562. if ((SPIx->SR & SPI_I2S_FLAG) != (uint16_t)RESET)
  563. 8000400: 687b ldr r3, [r7, #4]
  564. 8000402: 891b ldrh r3, [r3, #8]
  565. 8000404: b29a uxth r2, r3
  566. 8000406: 887b ldrh r3, [r7, #2]
  567. 8000408: 4013 ands r3, r2
  568. 800040a: b29b uxth r3, r3
  569. 800040c: 2b00 cmp r3, #0
  570. 800040e: d002 beq.n 8000416 <SPI_I2S_GetFlagStatus+0x26>
  571. {
  572. /* SPI_I2S_FLAG is set */
  573. bitstatus = SET;
  574. 8000410: 2301 movs r3, #1
  575. 8000412: 73fb strb r3, [r7, #15]
  576. 8000414: e001 b.n 800041a <SPI_I2S_GetFlagStatus+0x2a>
  577. }
  578. else
  579. {
  580. /* SPI_I2S_FLAG is reset */
  581. bitstatus = RESET;
  582. 8000416: 2300 movs r3, #0
  583. 8000418: 73fb strb r3, [r7, #15]
  584. }
  585. /* Return the SPI_I2S_FLAG status */
  586. return bitstatus;
  587. 800041a: 7bfb ldrb r3, [r7, #15]
  588. }
  589. 800041c: 4618 mov r0, r3
  590. 800041e: 3714 adds r7, #20
  591. 8000420: 46bd mov sp, r7
  592. 8000422: bc80 pop {r7}
  593. 8000424: 4770 bx lr
  594. 8000426: bf00 nop
  595. 08000428 <SPI_I2S_SendData>:
  596. void SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data)
  597. {
  598. 8000428: b480 push {r7}
  599. 800042a: b083 sub sp, #12
  600. 800042c: af00 add r7, sp, #0
  601. 800042e: 6078 str r0, [r7, #4]
  602. 8000430: 460b mov r3, r1
  603. 8000432: 807b strh r3, [r7, #2]
  604. /* Check the parameters */
  605. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  606. /* Write in the DR register the data to be sent */
  607. SPIx->DR = Data;
  608. 8000434: 687b ldr r3, [r7, #4]
  609. 8000436: 887a ldrh r2, [r7, #2]
  610. 8000438: 819a strh r2, [r3, #12]
  611. }
  612. 800043a: bf00 nop
  613. 800043c: 370c adds r7, #12
  614. 800043e: 46bd mov sp, r7
  615. 8000440: bc80 pop {r7}
  616. 8000442: 4770 bx lr
  617. 08000444 <SPI_I2S_ReceiveData>:
  618. uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx)
  619. {
  620. 8000444: b480 push {r7}
  621. 8000446: b083 sub sp, #12
  622. 8000448: af00 add r7, sp, #0
  623. 800044a: 6078 str r0, [r7, #4]
  624. /* Check the parameters */
  625. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  626. /* Return the data in the DR register */
  627. return SPIx->DR;
  628. 800044c: 687b ldr r3, [r7, #4]
  629. 800044e: 899b ldrh r3, [r3, #12]
  630. 8000450: b29b uxth r3, r3
  631. }
  632. 8000452: 4618 mov r0, r3
  633. 8000454: 370c adds r7, #12
  634. 8000456: 46bd mov sp, r7
  635. 8000458: bc80 pop {r7}
  636. 800045a: 4770 bx lr
  637. 0800045c <SD_WriteByte>:
  638. uint8_t SD_WriteByte(uint8_t Data)
  639. {
  640. 800045c: b580 push {r7, lr}
  641. 800045e: b082 sub sp, #8
  642. 8000460: af00 add r7, sp, #0
  643. 8000462: 4603 mov r3, r0
  644. 8000464: 71fb strb r3, [r7, #7]
  645. /*!< Wait until the transmit buffer is empty */
  646. while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
  647. 8000466: bf00 nop
  648. 8000468: 2102 movs r1, #2
  649. 800046a: 480e ldr r0, [pc, #56] ; (80004a4 <SD_WriteByte+0x48>)
  650. 800046c: f7ff ffc0 bl 80003f0 <SPI_I2S_GetFlagStatus>
  651. 8000470: 4603 mov r3, r0
  652. 8000472: 2b00 cmp r3, #0
  653. 8000474: d0f8 beq.n 8000468 <SD_WriteByte+0xc>
  654. {
  655. }
  656. /*!< Send the byte */
  657. SPI_I2S_SendData(SD_SPI, Data);
  658. 8000476: 79fb ldrb r3, [r7, #7]
  659. 8000478: b29b uxth r3, r3
  660. 800047a: 4619 mov r1, r3
  661. 800047c: 4809 ldr r0, [pc, #36] ; (80004a4 <SD_WriteByte+0x48>)
  662. 800047e: f7ff ffd3 bl 8000428 <SPI_I2S_SendData>
  663. /*!< Wait to receive a byte*/
  664. while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
  665. 8000482: bf00 nop
  666. 8000484: 2101 movs r1, #1
  667. 8000486: 4807 ldr r0, [pc, #28] ; (80004a4 <SD_WriteByte+0x48>)
  668. 8000488: f7ff ffb2 bl 80003f0 <SPI_I2S_GetFlagStatus>
  669. 800048c: 4603 mov r3, r0
  670. 800048e: 2b00 cmp r3, #0
  671. 8000490: d0f8 beq.n 8000484 <SD_WriteByte+0x28>
  672. {
  673. }
  674. /*!< Return the byte read from the SPI bus */
  675. return SPI_I2S_ReceiveData(SD_SPI);
  676. 8000492: 4804 ldr r0, [pc, #16] ; (80004a4 <SD_WriteByte+0x48>)
  677. 8000494: f7ff ffd6 bl 8000444 <SPI_I2S_ReceiveData>
  678. 8000498: 4603 mov r3, r0
  679. 800049a: b2db uxtb r3, r3
  680. }
  681. 800049c: 4618 mov r0, r3
  682. 800049e: 3708 adds r7, #8
  683. 80004a0: 46bd mov sp, r7
  684. 80004a2: bd80 pop {r7, pc}
  685. 80004a4: 40013000 .word 0x40013000
  686. 080004a8 <GPIO_Init>:
  687. void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
  688. {
  689. 80004a8: b480 push {r7}
  690. 80004aa: b089 sub sp, #36 ; 0x24
  691. 80004ac: af00 add r7, sp, #0
  692. 80004ae: 6078 str r0, [r7, #4]
  693. 80004b0: 6039 str r1, [r7, #0]
  694. uint32_t currentmode = 0x00, currentpin = 0x00, pinpos = 0x00, pos = 0x00;
  695. 80004b2: 2300 movs r3, #0
  696. 80004b4: 61fb str r3, [r7, #28]
  697. 80004b6: 2300 movs r3, #0
  698. 80004b8: 613b str r3, [r7, #16]
  699. 80004ba: 2300 movs r3, #0
  700. 80004bc: 61bb str r3, [r7, #24]
  701. 80004be: 2300 movs r3, #0
  702. 80004c0: 60fb str r3, [r7, #12]
  703. uint32_t tmpreg = 0x00, pinmask = 0x00;
  704. 80004c2: 2300 movs r3, #0
  705. 80004c4: 617b str r3, [r7, #20]
  706. 80004c6: 2300 movs r3, #0
  707. 80004c8: 60bb str r3, [r7, #8]
  708. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  709. assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
  710. assert_param(IS_GPIO_PIN(GPIO_InitStruct->GPIO_Pin));
  711. /*---------------------------- GPIO Mode Configuration -----------------------*/
  712. currentmode = ((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x0F);
  713. 80004ca: 683b ldr r3, [r7, #0]
  714. 80004cc: 78db ldrb r3, [r3, #3]
  715. 80004ce: f003 030f and.w r3, r3, #15
  716. 80004d2: 61fb str r3, [r7, #28]
  717. if ((((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x10)) != 0x00)
  718. 80004d4: 683b ldr r3, [r7, #0]
  719. 80004d6: 78db ldrb r3, [r3, #3]
  720. 80004d8: f003 0310 and.w r3, r3, #16
  721. 80004dc: 2b00 cmp r3, #0
  722. 80004de: d005 beq.n 80004ec <GPIO_Init+0x44>
  723. {
  724. /* Check the parameters */
  725. assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
  726. /* Output mode */
  727. currentmode |= (uint32_t)GPIO_InitStruct->GPIO_Speed;
  728. 80004e0: 683b ldr r3, [r7, #0]
  729. 80004e2: 789b ldrb r3, [r3, #2]
  730. 80004e4: 461a mov r2, r3
  731. 80004e6: 69fb ldr r3, [r7, #28]
  732. 80004e8: 4313 orrs r3, r2
  733. 80004ea: 61fb str r3, [r7, #28]
  734. }
  735. /*---------------------------- GPIO CRL Configuration ------------------------*/
  736. /* Configure the eight low port pins */
  737. if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
  738. 80004ec: 683b ldr r3, [r7, #0]
  739. 80004ee: 881b ldrh r3, [r3, #0]
  740. 80004f0: b2db uxtb r3, r3
  741. 80004f2: 2b00 cmp r3, #0
  742. 80004f4: d044 beq.n 8000580 <GPIO_Init+0xd8>
  743. {
  744. tmpreg = GPIOx->CRL;
  745. 80004f6: 687b ldr r3, [r7, #4]
  746. 80004f8: 681b ldr r3, [r3, #0]
  747. 80004fa: 617b str r3, [r7, #20]
  748. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  749. 80004fc: 2300 movs r3, #0
  750. 80004fe: 61bb str r3, [r7, #24]
  751. 8000500: e038 b.n 8000574 <GPIO_Init+0xcc>
  752. {
  753. pos = ((uint32_t)0x01) << pinpos;
  754. 8000502: 2201 movs r2, #1
  755. 8000504: 69bb ldr r3, [r7, #24]
  756. 8000506: fa02 f303 lsl.w r3, r2, r3
  757. 800050a: 60fb str r3, [r7, #12]
  758. /* Get the port pins position */
  759. currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
  760. 800050c: 683b ldr r3, [r7, #0]
  761. 800050e: 881b ldrh r3, [r3, #0]
  762. 8000510: 461a mov r2, r3
  763. 8000512: 68fb ldr r3, [r7, #12]
  764. 8000514: 4013 ands r3, r2
  765. 8000516: 613b str r3, [r7, #16]
  766. if (currentpin == pos)
  767. 8000518: 693a ldr r2, [r7, #16]
  768. 800051a: 68fb ldr r3, [r7, #12]
  769. 800051c: 429a cmp r2, r3
  770. 800051e: d126 bne.n 800056e <GPIO_Init+0xc6>
  771. {
  772. pos = pinpos << 2;
  773. 8000520: 69bb ldr r3, [r7, #24]
  774. 8000522: 009b lsls r3, r3, #2
  775. 8000524: 60fb str r3, [r7, #12]
  776. /* Clear the corresponding low control register bits */
  777. pinmask = ((uint32_t)0x0F) << pos;
  778. 8000526: 220f movs r2, #15
  779. 8000528: 68fb ldr r3, [r7, #12]
  780. 800052a: fa02 f303 lsl.w r3, r2, r3
  781. 800052e: 60bb str r3, [r7, #8]
  782. tmpreg &= ~pinmask;
  783. 8000530: 68bb ldr r3, [r7, #8]
  784. 8000532: 43db mvns r3, r3
  785. 8000534: 697a ldr r2, [r7, #20]
  786. 8000536: 4013 ands r3, r2
  787. 8000538: 617b str r3, [r7, #20]
  788. /* Write the mode configuration in the corresponding bits */
  789. tmpreg |= (currentmode << pos);
  790. 800053a: 69fa ldr r2, [r7, #28]
  791. 800053c: 68fb ldr r3, [r7, #12]
  792. 800053e: fa02 f303 lsl.w r3, r2, r3
  793. 8000542: 697a ldr r2, [r7, #20]
  794. 8000544: 4313 orrs r3, r2
  795. 8000546: 617b str r3, [r7, #20]
  796. /* Reset the corresponding ODR bit */
  797. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
  798. 8000548: 683b ldr r3, [r7, #0]
  799. 800054a: 78db ldrb r3, [r3, #3]
  800. 800054c: 2b28 cmp r3, #40 ; 0x28
  801. 800054e: d105 bne.n 800055c <GPIO_Init+0xb4>
  802. {
  803. GPIOx->BRR = (((uint32_t)0x01) << pinpos);
  804. 8000550: 2201 movs r2, #1
  805. 8000552: 69bb ldr r3, [r7, #24]
  806. 8000554: 409a lsls r2, r3
  807. 8000556: 687b ldr r3, [r7, #4]
  808. 8000558: 615a str r2, [r3, #20]
  809. 800055a: e008 b.n 800056e <GPIO_Init+0xc6>
  810. }
  811. else
  812. {
  813. /* Set the corresponding ODR bit */
  814. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
  815. 800055c: 683b ldr r3, [r7, #0]
  816. 800055e: 78db ldrb r3, [r3, #3]
  817. 8000560: 2b48 cmp r3, #72 ; 0x48
  818. 8000562: d104 bne.n 800056e <GPIO_Init+0xc6>
  819. {
  820. GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
  821. 8000564: 2201 movs r2, #1
  822. 8000566: 69bb ldr r3, [r7, #24]
  823. 8000568: 409a lsls r2, r3
  824. 800056a: 687b ldr r3, [r7, #4]
  825. 800056c: 611a str r2, [r3, #16]
  826. /*---------------------------- GPIO CRL Configuration ------------------------*/
  827. /* Configure the eight low port pins */
  828. if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
  829. {
  830. tmpreg = GPIOx->CRL;
  831. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  832. 800056e: 69bb ldr r3, [r7, #24]
  833. 8000570: 3301 adds r3, #1
  834. 8000572: 61bb str r3, [r7, #24]
  835. 8000574: 69bb ldr r3, [r7, #24]
  836. 8000576: 2b07 cmp r3, #7
  837. 8000578: d9c3 bls.n 8000502 <GPIO_Init+0x5a>
  838. GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
  839. }
  840. }
  841. }
  842. }
  843. GPIOx->CRL = tmpreg;
  844. 800057a: 687b ldr r3, [r7, #4]
  845. 800057c: 697a ldr r2, [r7, #20]
  846. 800057e: 601a str r2, [r3, #0]
  847. }
  848. /*---------------------------- GPIO CRH Configuration ------------------------*/
  849. /* Configure the eight high port pins */
  850. if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
  851. 8000580: 683b ldr r3, [r7, #0]
  852. 8000582: 881b ldrh r3, [r3, #0]
  853. 8000584: 2bff cmp r3, #255 ; 0xff
  854. 8000586: d946 bls.n 8000616 <GPIO_Init+0x16e>
  855. {
  856. tmpreg = GPIOx->CRH;
  857. 8000588: 687b ldr r3, [r7, #4]
  858. 800058a: 685b ldr r3, [r3, #4]
  859. 800058c: 617b str r3, [r7, #20]
  860. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  861. 800058e: 2300 movs r3, #0
  862. 8000590: 61bb str r3, [r7, #24]
  863. 8000592: e03a b.n 800060a <GPIO_Init+0x162>
  864. {
  865. pos = (((uint32_t)0x01) << (pinpos + 0x08));
  866. 8000594: 69bb ldr r3, [r7, #24]
  867. 8000596: 3308 adds r3, #8
  868. 8000598: 2201 movs r2, #1
  869. 800059a: fa02 f303 lsl.w r3, r2, r3
  870. 800059e: 60fb str r3, [r7, #12]
  871. /* Get the port pins position */
  872. currentpin = ((GPIO_InitStruct->GPIO_Pin) & pos);
  873. 80005a0: 683b ldr r3, [r7, #0]
  874. 80005a2: 881b ldrh r3, [r3, #0]
  875. 80005a4: 461a mov r2, r3
  876. 80005a6: 68fb ldr r3, [r7, #12]
  877. 80005a8: 4013 ands r3, r2
  878. 80005aa: 613b str r3, [r7, #16]
  879. if (currentpin == pos)
  880. 80005ac: 693a ldr r2, [r7, #16]
  881. 80005ae: 68fb ldr r3, [r7, #12]
  882. 80005b0: 429a cmp r2, r3
  883. 80005b2: d127 bne.n 8000604 <GPIO_Init+0x15c>
  884. {
  885. pos = pinpos << 2;
  886. 80005b4: 69bb ldr r3, [r7, #24]
  887. 80005b6: 009b lsls r3, r3, #2
  888. 80005b8: 60fb str r3, [r7, #12]
  889. /* Clear the corresponding high control register bits */
  890. pinmask = ((uint32_t)0x0F) << pos;
  891. 80005ba: 220f movs r2, #15
  892. 80005bc: 68fb ldr r3, [r7, #12]
  893. 80005be: fa02 f303 lsl.w r3, r2, r3
  894. 80005c2: 60bb str r3, [r7, #8]
  895. tmpreg &= ~pinmask;
  896. 80005c4: 68bb ldr r3, [r7, #8]
  897. 80005c6: 43db mvns r3, r3
  898. 80005c8: 697a ldr r2, [r7, #20]
  899. 80005ca: 4013 ands r3, r2
  900. 80005cc: 617b str r3, [r7, #20]
  901. /* Write the mode configuration in the corresponding bits */
  902. tmpreg |= (currentmode << pos);
  903. 80005ce: 69fa ldr r2, [r7, #28]
  904. 80005d0: 68fb ldr r3, [r7, #12]
  905. 80005d2: fa02 f303 lsl.w r3, r2, r3
  906. 80005d6: 697a ldr r2, [r7, #20]
  907. 80005d8: 4313 orrs r3, r2
  908. 80005da: 617b str r3, [r7, #20]
  909. /* Reset the corresponding ODR bit */
  910. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
  911. 80005dc: 683b ldr r3, [r7, #0]
  912. 80005de: 78db ldrb r3, [r3, #3]
  913. 80005e0: 2b28 cmp r3, #40 ; 0x28
  914. 80005e2: d105 bne.n 80005f0 <GPIO_Init+0x148>
  915. {
  916. GPIOx->BRR = (((uint32_t)0x01) << (pinpos + 0x08));
  917. 80005e4: 69bb ldr r3, [r7, #24]
  918. 80005e6: 3308 adds r3, #8
  919. 80005e8: 2201 movs r2, #1
  920. 80005ea: 409a lsls r2, r3
  921. 80005ec: 687b ldr r3, [r7, #4]
  922. 80005ee: 615a str r2, [r3, #20]
  923. }
  924. /* Set the corresponding ODR bit */
  925. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
  926. 80005f0: 683b ldr r3, [r7, #0]
  927. 80005f2: 78db ldrb r3, [r3, #3]
  928. 80005f4: 2b48 cmp r3, #72 ; 0x48
  929. 80005f6: d105 bne.n 8000604 <GPIO_Init+0x15c>
  930. {
  931. GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
  932. 80005f8: 69bb ldr r3, [r7, #24]
  933. 80005fa: 3308 adds r3, #8
  934. 80005fc: 2201 movs r2, #1
  935. 80005fe: 409a lsls r2, r3
  936. 8000600: 687b ldr r3, [r7, #4]
  937. 8000602: 611a str r2, [r3, #16]
  938. /*---------------------------- GPIO CRH Configuration ------------------------*/
  939. /* Configure the eight high port pins */
  940. if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
  941. {
  942. tmpreg = GPIOx->CRH;
  943. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  944. 8000604: 69bb ldr r3, [r7, #24]
  945. 8000606: 3301 adds r3, #1
  946. 8000608: 61bb str r3, [r7, #24]
  947. 800060a: 69bb ldr r3, [r7, #24]
  948. 800060c: 2b07 cmp r3, #7
  949. 800060e: d9c1 bls.n 8000594 <GPIO_Init+0xec>
  950. {
  951. GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
  952. }
  953. }
  954. }
  955. GPIOx->CRH = tmpreg;
  956. 8000610: 687b ldr r3, [r7, #4]
  957. 8000612: 697a ldr r2, [r7, #20]
  958. 8000614: 605a str r2, [r3, #4]
  959. }
  960. }
  961. 8000616: bf00 nop
  962. 8000618: 3724 adds r7, #36 ; 0x24
  963. 800061a: 46bd mov sp, r7
  964. 800061c: bc80 pop {r7}
  965. 800061e: 4770 bx lr
  966. 08000620 <SPI_Init>:
  967. void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct)
  968. {
  969. 8000620: b480 push {r7}
  970. 8000622: b085 sub sp, #20
  971. 8000624: af00 add r7, sp, #0
  972. 8000626: 6078 str r0, [r7, #4]
  973. 8000628: 6039 str r1, [r7, #0]
  974. uint16_t tmpreg = 0;
  975. 800062a: 2300 movs r3, #0
  976. 800062c: 81fb strh r3, [r7, #14]
  977. assert_param(IS_SPI_FIRST_BIT(SPI_InitStruct->SPI_FirstBit));
  978. assert_param(IS_SPI_CRC_POLYNOMIAL(SPI_InitStruct->SPI_CRCPolynomial));
  979. /*---------------------------- SPIx CR1 Configuration ------------------------*/
  980. /* Get the SPIx CR1 value */
  981. tmpreg = SPIx->CR1;
  982. 800062e: 687b ldr r3, [r7, #4]
  983. 8000630: 881b ldrh r3, [r3, #0]
  984. 8000632: 81fb strh r3, [r7, #14]
  985. /* Clear BIDIMode, BIDIOE, RxONLY, SSM, SSI, LSBFirst, BR, MSTR, CPOL and CPHA bits */
  986. tmpreg &= CR1_CLEAR_Mask;
  987. 8000634: 89fb ldrh r3, [r7, #14]
  988. 8000636: f403 5341 and.w r3, r3, #12352 ; 0x3040
  989. 800063a: 81fb strh r3, [r7, #14]
  990. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  991. /* Set LSBFirst bit according to SPI_FirstBit value */
  992. /* Set BR bits according to SPI_BaudRatePrescaler value */
  993. /* Set CPOL bit according to SPI_CPOL value */
  994. /* Set CPHA bit according to SPI_CPHA value */
  995. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  996. 800063c: 683b ldr r3, [r7, #0]
  997. 800063e: 881a ldrh r2, [r3, #0]
  998. 8000640: 683b ldr r3, [r7, #0]
  999. 8000642: 885b ldrh r3, [r3, #2]
  1000. 8000644: 4313 orrs r3, r2
  1001. 8000646: b29a uxth r2, r3
  1002. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1003. 8000648: 683b ldr r3, [r7, #0]
  1004. 800064a: 889b ldrh r3, [r3, #4]
  1005. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1006. /* Set LSBFirst bit according to SPI_FirstBit value */
  1007. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1008. /* Set CPOL bit according to SPI_CPOL value */
  1009. /* Set CPHA bit according to SPI_CPHA value */
  1010. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1011. 800064c: 4313 orrs r3, r2
  1012. 800064e: b29a uxth r2, r3
  1013. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1014. 8000650: 683b ldr r3, [r7, #0]
  1015. 8000652: 88db ldrh r3, [r3, #6]
  1016. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1017. /* Set LSBFirst bit according to SPI_FirstBit value */
  1018. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1019. /* Set CPOL bit according to SPI_CPOL value */
  1020. /* Set CPHA bit according to SPI_CPHA value */
  1021. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1022. 8000654: 4313 orrs r3, r2
  1023. 8000656: b29a uxth r2, r3
  1024. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1025. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1026. 8000658: 683b ldr r3, [r7, #0]
  1027. 800065a: 891b ldrh r3, [r3, #8]
  1028. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1029. /* Set LSBFirst bit according to SPI_FirstBit value */
  1030. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1031. /* Set CPOL bit according to SPI_CPOL value */
  1032. /* Set CPHA bit according to SPI_CPHA value */
  1033. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1034. 800065c: 4313 orrs r3, r2
  1035. 800065e: b29a uxth r2, r3
  1036. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1037. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1038. 8000660: 683b ldr r3, [r7, #0]
  1039. 8000662: 895b ldrh r3, [r3, #10]
  1040. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1041. /* Set LSBFirst bit according to SPI_FirstBit value */
  1042. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1043. /* Set CPOL bit according to SPI_CPOL value */
  1044. /* Set CPHA bit according to SPI_CPHA value */
  1045. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1046. 8000664: 4313 orrs r3, r2
  1047. 8000666: b29a uxth r2, r3
  1048. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1049. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1050. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1051. 8000668: 683b ldr r3, [r7, #0]
  1052. 800066a: 899b ldrh r3, [r3, #12]
  1053. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1054. /* Set LSBFirst bit according to SPI_FirstBit value */
  1055. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1056. /* Set CPOL bit according to SPI_CPOL value */
  1057. /* Set CPHA bit according to SPI_CPHA value */
  1058. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1059. 800066c: 4313 orrs r3, r2
  1060. 800066e: b29a uxth r2, r3
  1061. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1062. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1063. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1064. 8000670: 683b ldr r3, [r7, #0]
  1065. 8000672: 89db ldrh r3, [r3, #14]
  1066. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1067. /* Set LSBFirst bit according to SPI_FirstBit value */
  1068. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1069. /* Set CPOL bit according to SPI_CPOL value */
  1070. /* Set CPHA bit according to SPI_CPHA value */
  1071. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1072. 8000674: 4313 orrs r3, r2
  1073. 8000676: b29a uxth r2, r3
  1074. 8000678: 89fb ldrh r3, [r7, #14]
  1075. 800067a: 4313 orrs r3, r2
  1076. 800067c: 81fb strh r3, [r7, #14]
  1077. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1078. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1079. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1080. /* Write to SPIx CR1 */
  1081. SPIx->CR1 = tmpreg;
  1082. 800067e: 687b ldr r3, [r7, #4]
  1083. 8000680: 89fa ldrh r2, [r7, #14]
  1084. 8000682: 801a strh r2, [r3, #0]
  1085. /* Activate the SPI mode (Reset I2SMOD bit in I2SCFGR register) */
  1086. SPIx->I2SCFGR &= SPI_Mode_Select;
  1087. 8000684: 687b ldr r3, [r7, #4]
  1088. 8000686: 8b9b ldrh r3, [r3, #28]
  1089. 8000688: b29b uxth r3, r3
  1090. 800068a: f423 6300 bic.w r3, r3, #2048 ; 0x800
  1091. 800068e: b29a uxth r2, r3
  1092. 8000690: 687b ldr r3, [r7, #4]
  1093. 8000692: 839a strh r2, [r3, #28]
  1094. /*---------------------------- SPIx CRCPOLY Configuration --------------------*/
  1095. /* Write to SPIx CRCPOLY */
  1096. SPIx->CRCPR = SPI_InitStruct->SPI_CRCPolynomial;
  1097. 8000694: 683b ldr r3, [r7, #0]
  1098. 8000696: 8a1a ldrh r2, [r3, #16]
  1099. 8000698: 687b ldr r3, [r7, #4]
  1100. 800069a: 821a strh r2, [r3, #16]
  1101. }
  1102. 800069c: bf00 nop
  1103. 800069e: 3714 adds r7, #20
  1104. 80006a0: 46bd mov sp, r7
  1105. 80006a2: bc80 pop {r7}
  1106. 80006a4: 4770 bx lr
  1107. 80006a6: bf00 nop
  1108. 080006a8 <SPI_Cmd>:
  1109. void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  1110. {
  1111. 80006a8: b480 push {r7}
  1112. 80006aa: b083 sub sp, #12
  1113. 80006ac: af00 add r7, sp, #0
  1114. 80006ae: 6078 str r0, [r7, #4]
  1115. 80006b0: 460b mov r3, r1
  1116. 80006b2: 70fb strb r3, [r7, #3]
  1117. /* Check the parameters */
  1118. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  1119. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1120. if (NewState != DISABLE)
  1121. 80006b4: 78fb ldrb r3, [r7, #3]
  1122. 80006b6: 2b00 cmp r3, #0
  1123. 80006b8: d008 beq.n 80006cc <SPI_Cmd+0x24>
  1124. {
  1125. /* Enable the selected SPI peripheral */
  1126. SPIx->CR1 |= CR1_SPE_Set;
  1127. 80006ba: 687b ldr r3, [r7, #4]
  1128. 80006bc: 881b ldrh r3, [r3, #0]
  1129. 80006be: b29b uxth r3, r3
  1130. 80006c0: f043 0340 orr.w r3, r3, #64 ; 0x40
  1131. 80006c4: b29a uxth r2, r3
  1132. 80006c6: 687b ldr r3, [r7, #4]
  1133. 80006c8: 801a strh r2, [r3, #0]
  1134. else
  1135. {
  1136. /* Disable the selected SPI peripheral */
  1137. SPIx->CR1 &= CR1_SPE_Reset;
  1138. }
  1139. }
  1140. 80006ca: e007 b.n 80006dc <SPI_Cmd+0x34>
  1141. SPIx->CR1 |= CR1_SPE_Set;
  1142. }
  1143. else
  1144. {
  1145. /* Disable the selected SPI peripheral */
  1146. SPIx->CR1 &= CR1_SPE_Reset;
  1147. 80006cc: 687b ldr r3, [r7, #4]
  1148. 80006ce: 881b ldrh r3, [r3, #0]
  1149. 80006d0: b29b uxth r3, r3
  1150. 80006d2: f023 0340 bic.w r3, r3, #64 ; 0x40
  1151. 80006d6: b29a uxth r2, r3
  1152. 80006d8: 687b ldr r3, [r7, #4]
  1153. 80006da: 801a strh r2, [r3, #0]
  1154. }
  1155. }
  1156. 80006dc: bf00 nop
  1157. 80006de: 370c adds r7, #12
  1158. 80006e0: 46bd mov sp, r7
  1159. 80006e2: bc80 pop {r7}
  1160. 80006e4: 4770 bx lr
  1161. 80006e6: bf00 nop
  1162. 080006e8 <GPIO_SetBits>:
  1163. void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  1164. {
  1165. 80006e8: b480 push {r7}
  1166. 80006ea: b083 sub sp, #12
  1167. 80006ec: af00 add r7, sp, #0
  1168. 80006ee: 6078 str r0, [r7, #4]
  1169. 80006f0: 460b mov r3, r1
  1170. 80006f2: 807b strh r3, [r7, #2]
  1171. /* Check the parameters */
  1172. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  1173. assert_param(IS_GPIO_PIN(GPIO_Pin));
  1174. GPIOx->BSRR = GPIO_Pin;
  1175. 80006f4: 887a ldrh r2, [r7, #2]
  1176. 80006f6: 687b ldr r3, [r7, #4]
  1177. 80006f8: 611a str r2, [r3, #16]
  1178. }
  1179. 80006fa: bf00 nop
  1180. 80006fc: 370c adds r7, #12
  1181. 80006fe: 46bd mov sp, r7
  1182. 8000700: bc80 pop {r7}
  1183. 8000702: 4770 bx lr
  1184. 08000704 <RCC_APB2PeriphClockCmd>:
  1185. void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
  1186. {
  1187. 8000704: b480 push {r7}
  1188. 8000706: b083 sub sp, #12
  1189. 8000708: af00 add r7, sp, #0
  1190. 800070a: 6078 str r0, [r7, #4]
  1191. 800070c: 460b mov r3, r1
  1192. 800070e: 70fb strb r3, [r7, #3]
  1193. /* Check the parameters */
  1194. assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  1195. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1196. if (NewState != DISABLE)
  1197. 8000710: 78fb ldrb r3, [r7, #3]
  1198. 8000712: 2b00 cmp r3, #0
  1199. 8000714: d006 beq.n 8000724 <RCC_APB2PeriphClockCmd+0x20>
  1200. {
  1201. RCC->APB2ENR |= RCC_APB2Periph;
  1202. 8000716: 4909 ldr r1, [pc, #36] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
  1203. 8000718: 4b08 ldr r3, [pc, #32] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
  1204. 800071a: 699a ldr r2, [r3, #24]
  1205. 800071c: 687b ldr r3, [r7, #4]
  1206. 800071e: 4313 orrs r3, r2
  1207. 8000720: 618b str r3, [r1, #24]
  1208. }
  1209. else
  1210. {
  1211. RCC->APB2ENR &= ~RCC_APB2Periph;
  1212. }
  1213. }
  1214. 8000722: e006 b.n 8000732 <RCC_APB2PeriphClockCmd+0x2e>
  1215. {
  1216. RCC->APB2ENR |= RCC_APB2Periph;
  1217. }
  1218. else
  1219. {
  1220. RCC->APB2ENR &= ~RCC_APB2Periph;
  1221. 8000724: 4905 ldr r1, [pc, #20] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
  1222. 8000726: 4b05 ldr r3, [pc, #20] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
  1223. 8000728: 699a ldr r2, [r3, #24]
  1224. 800072a: 687b ldr r3, [r7, #4]
  1225. 800072c: 43db mvns r3, r3
  1226. 800072e: 4013 ands r3, r2
  1227. 8000730: 618b str r3, [r1, #24]
  1228. }
  1229. }
  1230. 8000732: bf00 nop
  1231. 8000734: 370c adds r7, #12
  1232. 8000736: 46bd mov sp, r7
  1233. 8000738: bc80 pop {r7}
  1234. 800073a: 4770 bx lr
  1235. 800073c: 40021000 .word 0x40021000
  1236. 08000740 <GPIO_ResetBits>:
  1237. void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  1238. {
  1239. 8000740: b480 push {r7}
  1240. 8000742: b083 sub sp, #12
  1241. 8000744: af00 add r7, sp, #0
  1242. 8000746: 6078 str r0, [r7, #4]
  1243. 8000748: 460b mov r3, r1
  1244. 800074a: 807b strh r3, [r7, #2]
  1245. /* Check the parameters */
  1246. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  1247. assert_param(IS_GPIO_PIN(GPIO_Pin));
  1248. GPIOx->BRR = GPIO_Pin;
  1249. 800074c: 887a ldrh r2, [r7, #2]
  1250. 800074e: 687b ldr r3, [r7, #4]
  1251. 8000750: 615a str r2, [r3, #20]
  1252. }
  1253. 8000752: bf00 nop
  1254. 8000754: 370c adds r7, #12
  1255. 8000756: 46bd mov sp, r7
  1256. 8000758: bc80 pop {r7}
  1257. 800075a: 4770 bx lr
  1258. 0800075c <SD_LowLevel_Init>:
  1259. void SD_LowLevel_Init(void)
  1260. {
  1261. 800075c: b580 push {r7, lr}
  1262. 800075e: b086 sub sp, #24
  1263. 8000760: af00 add r7, sp, #0
  1264. GPIO_InitTypeDef GPIO_InitStructure;
  1265. SPI_InitTypeDef SPI_InitStructure;
  1266. /*!< SD_SPI_CS_GPIO, SD_SPI_MOSI_GPIO, SD_SPI_MISO_GPIO, SD_SPI_DETECT_GPIO
  1267. and SD_SPI_SCK_GPIO Periph clock enable */
  1268. RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
  1269. 8000762: 2101 movs r1, #1
  1270. 8000764: 2004 movs r0, #4
  1271. 8000766: f7ff ffcd bl 8000704 <RCC_APB2PeriphClockCmd>
  1272. /*!< SD_SPI Periph clock enable */
  1273. RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE);
  1274. 800076a: 2101 movs r1, #1
  1275. 800076c: f44f 5080 mov.w r0, #4096 ; 0x1000
  1276. 8000770: f7ff ffc8 bl 8000704 <RCC_APB2PeriphClockCmd>
  1277. /*!< Configure SD_SPI pins: SCK */
  1278. GPIO_InitStructure.GPIO_Pin = SD_SPI_SCK_PIN | SD_SPI_MOSI_PIN | SD_SPI_MISO_PIN;
  1279. 8000774: 23e0 movs r3, #224 ; 0xe0
  1280. 8000776: 82bb strh r3, [r7, #20]
  1281. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  1282. 8000778: 2303 movs r3, #3
  1283. 800077a: 75bb strb r3, [r7, #22]
  1284. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  1285. 800077c: 2318 movs r3, #24
  1286. 800077e: 75fb strb r3, [r7, #23]
  1287. GPIO_Init(SD_SPI_SCK_GPIO_PORT, &GPIO_InitStructure);
  1288. 8000780: f107 0314 add.w r3, r7, #20
  1289. 8000784: 4619 mov r1, r3
  1290. 8000786: 4817 ldr r0, [pc, #92] ; (80007e4 <SD_LowLevel_Init+0x88>)
  1291. 8000788: f7ff fe8e bl 80004a8 <GPIO_Init>
  1292. /*!< Configure SD_SPI_CS_PIN pin: SD Card CS pin */
  1293. GPIO_InitStructure.GPIO_Pin = SD_CS_PIN;
  1294. 800078c: 2310 movs r3, #16
  1295. 800078e: 82bb strh r3, [r7, #20]
  1296. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  1297. 8000790: 2310 movs r3, #16
  1298. 8000792: 75fb strb r3, [r7, #23]
  1299. GPIO_Init(SD_CS_GPIO_PORT, &GPIO_InitStructure);
  1300. 8000794: f107 0314 add.w r3, r7, #20
  1301. 8000798: 4619 mov r1, r3
  1302. 800079a: 4812 ldr r0, [pc, #72] ; (80007e4 <SD_LowLevel_Init+0x88>)
  1303. 800079c: f7ff fe84 bl 80004a8 <GPIO_Init>
  1304. /*!< SD_SPI Config */
  1305. SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
  1306. 80007a0: 2300 movs r3, #0
  1307. 80007a2: 803b strh r3, [r7, #0]
  1308. SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
  1309. 80007a4: f44f 7382 mov.w r3, #260 ; 0x104
  1310. 80007a8: 807b strh r3, [r7, #2]
  1311. SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
  1312. 80007aa: 2300 movs r3, #0
  1313. 80007ac: 80bb strh r3, [r7, #4]
  1314. SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
  1315. 80007ae: 2302 movs r3, #2
  1316. 80007b0: 80fb strh r3, [r7, #6]
  1317. SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge;
  1318. 80007b2: 2301 movs r3, #1
  1319. 80007b4: 813b strh r3, [r7, #8]
  1320. SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
  1321. 80007b6: f44f 7300 mov.w r3, #512 ; 0x200
  1322. 80007ba: 817b strh r3, [r7, #10]
  1323. SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
  1324. 80007bc: 2308 movs r3, #8
  1325. 80007be: 81bb strh r3, [r7, #12]
  1326. SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
  1327. 80007c0: 2300 movs r3, #0
  1328. 80007c2: 81fb strh r3, [r7, #14]
  1329. SPI_InitStructure.SPI_CRCPolynomial = 7;
  1330. 80007c4: 2307 movs r3, #7
  1331. 80007c6: 823b strh r3, [r7, #16]
  1332. SPI_Init(SD_SPI, &SPI_InitStructure);
  1333. 80007c8: 463b mov r3, r7
  1334. 80007ca: 4619 mov r1, r3
  1335. 80007cc: 4806 ldr r0, [pc, #24] ; (80007e8 <SD_LowLevel_Init+0x8c>)
  1336. 80007ce: f7ff ff27 bl 8000620 <SPI_Init>
  1337. SPI_Cmd(SD_SPI, ENABLE); /*!< SD_SPI enable */
  1338. 80007d2: 2101 movs r1, #1
  1339. 80007d4: 4804 ldr r0, [pc, #16] ; (80007e8 <SD_LowLevel_Init+0x8c>)
  1340. 80007d6: f7ff ff67 bl 80006a8 <SPI_Cmd>
  1341. }
  1342. 80007da: bf00 nop
  1343. 80007dc: 3718 adds r7, #24
  1344. 80007de: 46bd mov sp, r7
  1345. 80007e0: bd80 pop {r7, pc}
  1346. 80007e2: bf00 nop
  1347. 80007e4: 40010800 .word 0x40010800
  1348. 80007e8: 40013000 .word 0x40013000
  1349. 080007ec <SD_GoIdleState>:
  1350. SD_Error SD_GoIdleState(void)
  1351. {
  1352. 80007ec: b580 push {r7, lr}
  1353. 80007ee: af00 add r7, sp, #0
  1354. /*!< SD chip select low */
  1355. SD_CS_LOW();
  1356. 80007f0: 2110 movs r1, #16
  1357. 80007f2: 4818 ldr r0, [pc, #96] ; (8000854 <SD_GoIdleState+0x68>)
  1358. 80007f4: f7ff ffa4 bl 8000740 <GPIO_ResetBits>
  1359. /*!< Send CMD0 (SD_CMD_GO_IDLE_STATE) to put SD in SPI mode */
  1360. SD_SendCmd(SD_CMD_GO_IDLE_STATE, 0, 0x95);
  1361. 80007f8: 2295 movs r2, #149 ; 0x95
  1362. 80007fa: 2100 movs r1, #0
  1363. 80007fc: 2000 movs r0, #0
  1364. 80007fe: f000 f82b bl 8000858 <SD_SendCmd>
  1365. /*!< Wait for In Idle State Response (R1 Format) equal to 0x01 */
  1366. if (SD_GetResponse(SD_IN_IDLE_STATE))
  1367. 8000802: 2001 movs r0, #1
  1368. 8000804: f000 f85e bl 80008c4 <SD_GetResponse>
  1369. 8000808: 4603 mov r3, r0
  1370. 800080a: 2b00 cmp r3, #0
  1371. 800080c: d001 beq.n 8000812 <SD_GoIdleState+0x26>
  1372. {
  1373. /*!< No Idle State Response: return response failue */
  1374. return SD_RESPONSE_FAILURE;
  1375. 800080e: 23ff movs r3, #255 ; 0xff
  1376. 8000810: e01d b.n 800084e <SD_GoIdleState+0x62>
  1377. }
  1378. /*----------Activates the card initialization process-----------*/
  1379. do
  1380. {
  1381. /*!< SD chip select high */
  1382. SD_CS_HIGH();
  1383. 8000812: 2110 movs r1, #16
  1384. 8000814: 480f ldr r0, [pc, #60] ; (8000854 <SD_GoIdleState+0x68>)
  1385. 8000816: f7ff ff67 bl 80006e8 <GPIO_SetBits>
  1386. /*!< Send Dummy byte 0xFF */
  1387. SD_WriteByte(SD_DUMMY_BYTE);
  1388. 800081a: 20ff movs r0, #255 ; 0xff
  1389. 800081c: f7ff fe1e bl 800045c <SD_WriteByte>
  1390. /*!< SD chip select low */
  1391. SD_CS_LOW();
  1392. 8000820: 2110 movs r1, #16
  1393. 8000822: 480c ldr r0, [pc, #48] ; (8000854 <SD_GoIdleState+0x68>)
  1394. 8000824: f7ff ff8c bl 8000740 <GPIO_ResetBits>
  1395. /*!< Send CMD1 (Activates the card process) until response equal to 0x0 */
  1396. SD_SendCmd(SD_CMD_SEND_OP_COND, 0, 0xFF);
  1397. 8000828: 22ff movs r2, #255 ; 0xff
  1398. 800082a: 2100 movs r1, #0
  1399. 800082c: 2001 movs r0, #1
  1400. 800082e: f000 f813 bl 8000858 <SD_SendCmd>
  1401. /*!< Wait for no error Response (R1 Format) equal to 0x00 */
  1402. }
  1403. while (SD_GetResponse(SD_RESPONSE_NO_ERROR));
  1404. 8000832: 2000 movs r0, #0
  1405. 8000834: f000 f846 bl 80008c4 <SD_GetResponse>
  1406. 8000838: 4603 mov r3, r0
  1407. 800083a: 2b00 cmp r3, #0
  1408. 800083c: d1e9 bne.n 8000812 <SD_GoIdleState+0x26>
  1409. /*!< SD chip select high */
  1410. SD_CS_HIGH();
  1411. 800083e: 2110 movs r1, #16
  1412. 8000840: 4804 ldr r0, [pc, #16] ; (8000854 <SD_GoIdleState+0x68>)
  1413. 8000842: f7ff ff51 bl 80006e8 <GPIO_SetBits>
  1414. /*!< Send dummy byte 0xFF */
  1415. SD_WriteByte(SD_DUMMY_BYTE);
  1416. 8000846: 20ff movs r0, #255 ; 0xff
  1417. 8000848: f7ff fe08 bl 800045c <SD_WriteByte>
  1418. return SD_RESPONSE_NO_ERROR;
  1419. 800084c: 2300 movs r3, #0
  1420. }
  1421. 800084e: 4618 mov r0, r3
  1422. 8000850: bd80 pop {r7, pc}
  1423. 8000852: bf00 nop
  1424. 8000854: 40010800 .word 0x40010800
  1425. 08000858 <SD_SendCmd>:
  1426. void SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc)
  1427. {
  1428. 8000858: b580 push {r7, lr}
  1429. 800085a: b086 sub sp, #24
  1430. 800085c: af00 add r7, sp, #0
  1431. 800085e: 4603 mov r3, r0
  1432. 8000860: 6039 str r1, [r7, #0]
  1433. 8000862: 71fb strb r3, [r7, #7]
  1434. 8000864: 4613 mov r3, r2
  1435. 8000866: 71bb strb r3, [r7, #6]
  1436. uint32_t i = 0x00;
  1437. 8000868: 2300 movs r3, #0
  1438. 800086a: 617b str r3, [r7, #20]
  1439. uint8_t Frame[6];
  1440. Frame[0] = (Cmd | 0x40); /*!< Construct byte 1 */
  1441. 800086c: 79fb ldrb r3, [r7, #7]
  1442. 800086e: f043 0340 orr.w r3, r3, #64 ; 0x40
  1443. 8000872: b2db uxtb r3, r3
  1444. 8000874: 733b strb r3, [r7, #12]
  1445. Frame[1] = (uint8_t)(Arg >> 24); /*!< Construct byte 2 */
  1446. 8000876: 683b ldr r3, [r7, #0]
  1447. 8000878: 0e1b lsrs r3, r3, #24
  1448. 800087a: b2db uxtb r3, r3
  1449. 800087c: 737b strb r3, [r7, #13]
  1450. Frame[2] = (uint8_t)(Arg >> 16); /*!< Construct byte 3 */
  1451. 800087e: 683b ldr r3, [r7, #0]
  1452. 8000880: 0c1b lsrs r3, r3, #16
  1453. 8000882: b2db uxtb r3, r3
  1454. 8000884: 73bb strb r3, [r7, #14]
  1455. Frame[3] = (uint8_t)(Arg >> 8); /*!< Construct byte 4 */
  1456. 8000886: 683b ldr r3, [r7, #0]
  1457. 8000888: 0a1b lsrs r3, r3, #8
  1458. 800088a: b2db uxtb r3, r3
  1459. 800088c: 73fb strb r3, [r7, #15]
  1460. Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
  1461. 800088e: 683b ldr r3, [r7, #0]
  1462. 8000890: b2db uxtb r3, r3
  1463. 8000892: 743b strb r3, [r7, #16]
  1464. Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
  1465. 8000894: 79bb ldrb r3, [r7, #6]
  1466. 8000896: 747b strb r3, [r7, #17]
  1467. for (i = 0; i < 6; i++)
  1468. 8000898: 2300 movs r3, #0
  1469. 800089a: 617b str r3, [r7, #20]
  1470. 800089c: e00a b.n 80008b4 <SD_SendCmd+0x5c>
  1471. {
  1472. SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
  1473. 800089e: f107 020c add.w r2, r7, #12
  1474. 80008a2: 697b ldr r3, [r7, #20]
  1475. 80008a4: 4413 add r3, r2
  1476. 80008a6: 781b ldrb r3, [r3, #0]
  1477. 80008a8: 4618 mov r0, r3
  1478. 80008aa: f7ff fdd7 bl 800045c <SD_WriteByte>
  1479. Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
  1480. Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
  1481. for (i = 0; i < 6; i++)
  1482. 80008ae: 697b ldr r3, [r7, #20]
  1483. 80008b0: 3301 adds r3, #1
  1484. 80008b2: 617b str r3, [r7, #20]
  1485. 80008b4: 697b ldr r3, [r7, #20]
  1486. 80008b6: 2b05 cmp r3, #5
  1487. 80008b8: d9f1 bls.n 800089e <SD_SendCmd+0x46>
  1488. {
  1489. SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
  1490. }
  1491. }
  1492. 80008ba: bf00 nop
  1493. 80008bc: 3718 adds r7, #24
  1494. 80008be: 46bd mov sp, r7
  1495. 80008c0: bd80 pop {r7, pc}
  1496. 80008c2: bf00 nop
  1497. 080008c4 <SD_GetResponse>:
  1498. SD_Error SD_GetResponse(uint8_t Response)
  1499. {
  1500. 80008c4: b580 push {r7, lr}
  1501. 80008c6: b084 sub sp, #16
  1502. 80008c8: af00 add r7, sp, #0
  1503. 80008ca: 4603 mov r3, r0
  1504. 80008cc: 71fb strb r3, [r7, #7]
  1505. uint32_t Count = 0xFFF;
  1506. 80008ce: f640 73ff movw r3, #4095 ; 0xfff
  1507. 80008d2: 60fb str r3, [r7, #12]
  1508. /*!< Check if response is got or a timeout is happen */
  1509. while ((SD_ReadByte() != Response) && Count)
  1510. 80008d4: e002 b.n 80008dc <SD_GetResponse+0x18>
  1511. {
  1512. Count--;
  1513. 80008d6: 68fb ldr r3, [r7, #12]
  1514. 80008d8: 3b01 subs r3, #1
  1515. 80008da: 60fb str r3, [r7, #12]
  1516. SD_Error SD_GetResponse(uint8_t Response)
  1517. {
  1518. uint32_t Count = 0xFFF;
  1519. /*!< Check if response is got or a timeout is happen */
  1520. while ((SD_ReadByte() != Response) && Count)
  1521. 80008dc: f000 f812 bl 8000904 <SD_ReadByte>
  1522. 80008e0: 4603 mov r3, r0
  1523. 80008e2: 461a mov r2, r3
  1524. 80008e4: 79fb ldrb r3, [r7, #7]
  1525. 80008e6: 4293 cmp r3, r2
  1526. 80008e8: d002 beq.n 80008f0 <SD_GetResponse+0x2c>
  1527. 80008ea: 68fb ldr r3, [r7, #12]
  1528. 80008ec: 2b00 cmp r3, #0
  1529. 80008ee: d1f2 bne.n 80008d6 <SD_GetResponse+0x12>
  1530. {
  1531. Count--;
  1532. }
  1533. if (Count == 0)
  1534. 80008f0: 68fb ldr r3, [r7, #12]
  1535. 80008f2: 2b00 cmp r3, #0
  1536. 80008f4: d101 bne.n 80008fa <SD_GetResponse+0x36>
  1537. {
  1538. /*!< After time out */
  1539. return SD_RESPONSE_FAILURE;
  1540. 80008f6: 23ff movs r3, #255 ; 0xff
  1541. 80008f8: e000 b.n 80008fc <SD_GetResponse+0x38>
  1542. }
  1543. else
  1544. {
  1545. /*!< Right response got */
  1546. return SD_RESPONSE_NO_ERROR;
  1547. 80008fa: 2300 movs r3, #0
  1548. }
  1549. }
  1550. 80008fc: 4618 mov r0, r3
  1551. 80008fe: 3710 adds r7, #16
  1552. 8000900: 46bd mov sp, r7
  1553. 8000902: bd80 pop {r7, pc}
  1554. 08000904 <SD_ReadByte>:
  1555. uint8_t SD_ReadByte(void)
  1556. {
  1557. 8000904: b580 push {r7, lr}
  1558. 8000906: b082 sub sp, #8
  1559. 8000908: af00 add r7, sp, #0
  1560. uint8_t Data = 0;
  1561. 800090a: 2300 movs r3, #0
  1562. 800090c: 71fb strb r3, [r7, #7]
  1563. /*!< Wait until the transmit buffer is empty */
  1564. while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
  1565. 800090e: bf00 nop
  1566. 8000910: 2102 movs r1, #2
  1567. 8000912: 480e ldr r0, [pc, #56] ; (800094c <SD_ReadByte+0x48>)
  1568. 8000914: f7ff fd6c bl 80003f0 <SPI_I2S_GetFlagStatus>
  1569. 8000918: 4603 mov r3, r0
  1570. 800091a: 2b00 cmp r3, #0
  1571. 800091c: d0f8 beq.n 8000910 <SD_ReadByte+0xc>
  1572. {
  1573. }
  1574. /*!< Send the byte */
  1575. SPI_I2S_SendData(SD_SPI, SD_DUMMY_BYTE);
  1576. 800091e: 21ff movs r1, #255 ; 0xff
  1577. 8000920: 480a ldr r0, [pc, #40] ; (800094c <SD_ReadByte+0x48>)
  1578. 8000922: f7ff fd81 bl 8000428 <SPI_I2S_SendData>
  1579. /*!< Wait until a data is received */
  1580. while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
  1581. 8000926: bf00 nop
  1582. 8000928: 2101 movs r1, #1
  1583. 800092a: 4808 ldr r0, [pc, #32] ; (800094c <SD_ReadByte+0x48>)
  1584. 800092c: f7ff fd60 bl 80003f0 <SPI_I2S_GetFlagStatus>
  1585. 8000930: 4603 mov r3, r0
  1586. 8000932: 2b00 cmp r3, #0
  1587. 8000934: d0f8 beq.n 8000928 <SD_ReadByte+0x24>
  1588. {
  1589. }
  1590. /*!< Get the received data */
  1591. Data = SPI_I2S_ReceiveData(SD_SPI);
  1592. 8000936: 4805 ldr r0, [pc, #20] ; (800094c <SD_ReadByte+0x48>)
  1593. 8000938: f7ff fd84 bl 8000444 <SPI_I2S_ReceiveData>
  1594. 800093c: 4603 mov r3, r0
  1595. 800093e: 71fb strb r3, [r7, #7]
  1596. /*!< Return the shifted data */
  1597. return Data;
  1598. 8000940: 79fb ldrb r3, [r7, #7]
  1599. }
  1600. 8000942: 4618 mov r0, r3
  1601. 8000944: 3708 adds r7, #8
  1602. 8000946: 46bd mov sp, r7
  1603. 8000948: bd80 pop {r7, pc}
  1604. 800094a: bf00 nop
  1605. 800094c: 40013000 .word 0x40013000
  1606. 08000950 <SD_GetDataResponse>:
  1607. uint8_t SD_GetDataResponse(void)
  1608. {
  1609. 8000950: b580 push {r7, lr}
  1610. 8000952: b082 sub sp, #8
  1611. 8000954: af00 add r7, sp, #0
  1612. uint32_t i = 0;
  1613. 8000956: 2300 movs r3, #0
  1614. 8000958: 607b str r3, [r7, #4]
  1615. uint8_t response, rvalue;
  1616. while (i <= 64)
  1617. 800095a: e01e b.n 800099a <SD_GetDataResponse+0x4a>
  1618. {
  1619. /*!< Read resonse */
  1620. response = SD_ReadByte();
  1621. 800095c: f7ff ffd2 bl 8000904 <SD_ReadByte>
  1622. 8000960: 4603 mov r3, r0
  1623. 8000962: 70fb strb r3, [r7, #3]
  1624. /*!< Mask unused bits */
  1625. response &= 0x1F;
  1626. 8000964: 78fb ldrb r3, [r7, #3]
  1627. 8000966: f003 031f and.w r3, r3, #31
  1628. 800096a: 70fb strb r3, [r7, #3]
  1629. switch (response)
  1630. 800096c: 78fb ldrb r3, [r7, #3]
  1631. 800096e: 2b0b cmp r3, #11
  1632. 8000970: d006 beq.n 8000980 <SD_GetDataResponse+0x30>
  1633. 8000972: 2b0d cmp r3, #13
  1634. 8000974: d006 beq.n 8000984 <SD_GetDataResponse+0x34>
  1635. 8000976: 2b05 cmp r3, #5
  1636. 8000978: d106 bne.n 8000988 <SD_GetDataResponse+0x38>
  1637. {
  1638. case SD_DATA_OK:
  1639. {
  1640. rvalue = SD_DATA_OK;
  1641. 800097a: 2305 movs r3, #5
  1642. 800097c: 70bb strb r3, [r7, #2]
  1643. break;
  1644. 800097e: e006 b.n 800098e <SD_GetDataResponse+0x3e>
  1645. }
  1646. case SD_DATA_CRC_ERROR:
  1647. return SD_DATA_CRC_ERROR;
  1648. 8000980: 230b movs r3, #11
  1649. 8000982: e016 b.n 80009b2 <SD_GetDataResponse+0x62>
  1650. case SD_DATA_WRITE_ERROR:
  1651. return SD_DATA_WRITE_ERROR;
  1652. 8000984: 230d movs r3, #13
  1653. 8000986: e014 b.n 80009b2 <SD_GetDataResponse+0x62>
  1654. default:
  1655. {
  1656. rvalue = SD_DATA_OTHER_ERROR;
  1657. 8000988: 23ff movs r3, #255 ; 0xff
  1658. 800098a: 70bb strb r3, [r7, #2]
  1659. break;
  1660. 800098c: bf00 nop
  1661. }
  1662. }
  1663. /*!< Exit loop in case of data ok */
  1664. if (rvalue == SD_DATA_OK)
  1665. 800098e: 78bb ldrb r3, [r7, #2]
  1666. 8000990: 2b05 cmp r3, #5
  1667. 8000992: d006 beq.n 80009a2 <SD_GetDataResponse+0x52>
  1668. break;
  1669. /*!< Increment loop counter */
  1670. i++;
  1671. 8000994: 687b ldr r3, [r7, #4]
  1672. 8000996: 3301 adds r3, #1
  1673. 8000998: 607b str r3, [r7, #4]
  1674. uint8_t SD_GetDataResponse(void)
  1675. {
  1676. uint32_t i = 0;
  1677. uint8_t response, rvalue;
  1678. while (i <= 64)
  1679. 800099a: 687b ldr r3, [r7, #4]
  1680. 800099c: 2b40 cmp r3, #64 ; 0x40
  1681. 800099e: d9dd bls.n 800095c <SD_GetDataResponse+0xc>
  1682. 80009a0: e000 b.n 80009a4 <SD_GetDataResponse+0x54>
  1683. break;
  1684. }
  1685. }
  1686. /*!< Exit loop in case of data ok */
  1687. if (rvalue == SD_DATA_OK)
  1688. break;
  1689. 80009a2: bf00 nop
  1690. /*!< Increment loop counter */
  1691. i++;
  1692. }
  1693. /*!< Wait null data */
  1694. while (SD_ReadByte() == 0);
  1695. 80009a4: bf00 nop
  1696. 80009a6: f7ff ffad bl 8000904 <SD_ReadByte>
  1697. 80009aa: 4603 mov r3, r0
  1698. 80009ac: 2b00 cmp r3, #0
  1699. 80009ae: d0fa beq.n 80009a6 <SD_GetDataResponse+0x56>
  1700. /*!< Return response */
  1701. return response;
  1702. 80009b0: 78fb ldrb r3, [r7, #3]
  1703. }
  1704. 80009b2: 4618 mov r0, r3
  1705. 80009b4: 3708 adds r7, #8
  1706. 80009b6: 46bd mov sp, r7
  1707. 80009b8: bd80 pop {r7, pc}
  1708. 80009ba: bf00 nop
  1709. 080009bc <SD_Init>:
  1710. SD_Error SD_Init(void)
  1711. {
  1712. 80009bc: b580 push {r7, lr}
  1713. 80009be: b082 sub sp, #8
  1714. 80009c0: af00 add r7, sp, #0
  1715. uint32_t i = 0;
  1716. 80009c2: 2300 movs r3, #0
  1717. 80009c4: 607b str r3, [r7, #4]
  1718. /*!< Initialize SD_SPI */
  1719. SD_LowLevel_Init();
  1720. 80009c6: f7ff fec9 bl 800075c <SD_LowLevel_Init>
  1721. /*!< SD chip select high */
  1722. SD_CS_HIGH();
  1723. 80009ca: 2110 movs r1, #16
  1724. 80009cc: 480a ldr r0, [pc, #40] ; (80009f8 <SD_Init+0x3c>)
  1725. 80009ce: f7ff fe8b bl 80006e8 <GPIO_SetBits>
  1726. /*!< Send dummy byte 0xFF, 10 times with CS high */
  1727. /*!< Rise CS and MOSI for 80 clocks cycles */
  1728. for (i = 0; i <= 9; i++)
  1729. 80009d2: 2300 movs r3, #0
  1730. 80009d4: 607b str r3, [r7, #4]
  1731. 80009d6: e005 b.n 80009e4 <SD_Init+0x28>
  1732. {
  1733. /*!< Send dummy byte 0xFF */
  1734. SD_WriteByte(SD_DUMMY_BYTE);
  1735. 80009d8: 20ff movs r0, #255 ; 0xff
  1736. 80009da: f7ff fd3f bl 800045c <SD_WriteByte>
  1737. /*!< SD chip select high */
  1738. SD_CS_HIGH();
  1739. /*!< Send dummy byte 0xFF, 10 times with CS high */
  1740. /*!< Rise CS and MOSI for 80 clocks cycles */
  1741. for (i = 0; i <= 9; i++)
  1742. 80009de: 687b ldr r3, [r7, #4]
  1743. 80009e0: 3301 adds r3, #1
  1744. 80009e2: 607b str r3, [r7, #4]
  1745. 80009e4: 687b ldr r3, [r7, #4]
  1746. 80009e6: 2b09 cmp r3, #9
  1747. 80009e8: d9f6 bls.n 80009d8 <SD_Init+0x1c>
  1748. /*!< Send dummy byte 0xFF */
  1749. SD_WriteByte(SD_DUMMY_BYTE);
  1750. }
  1751. /*------------Put SD in SPI mode--------------*/
  1752. /*!< SD initialized and set to SPI mode properly */
  1753. return (SD_GoIdleState());
  1754. 80009ea: f7ff feff bl 80007ec <SD_GoIdleState>
  1755. 80009ee: 4603 mov r3, r0
  1756. }
  1757. 80009f0: 4618 mov r0, r3
  1758. 80009f2: 3708 adds r7, #8
  1759. 80009f4: 46bd mov sp, r7
  1760. 80009f6: bd80 pop {r7, pc}
  1761. 80009f8: 40010800 .word 0x40010800
  1762. 080009fc <_checkSDStatus>:
  1763. uint8_t _checkSDStatus() {
  1764. 80009fc: b580 push {r7, lr}
  1765. 80009fe: af00 add r7, sp, #0
  1766. if (SD_Status == SD_RESPONSE_NO_ERROR)
  1767. 8000a00: 4b09 ldr r3, [pc, #36] ; (8000a28 <_checkSDStatus+0x2c>)
  1768. 8000a02: 881b ldrh r3, [r3, #0]
  1769. 8000a04: 2b00 cmp r3, #0
  1770. 8000a06: d101 bne.n 8000a0c <_checkSDStatus+0x10>
  1771. return 0;
  1772. 8000a08: 2300 movs r3, #0
  1773. 8000a0a: e00a b.n 8000a22 <_checkSDStatus+0x26>
  1774. do
  1775. SD_Status = SD_Init();
  1776. 8000a0c: f7ff ffd6 bl 80009bc <SD_Init>
  1777. 8000a10: 4603 mov r3, r0
  1778. 8000a12: b29a uxth r2, r3
  1779. 8000a14: 4b04 ldr r3, [pc, #16] ; (8000a28 <_checkSDStatus+0x2c>)
  1780. 8000a16: 801a strh r2, [r3, #0]
  1781. while (SD_Status != SD_RESPONSE_NO_ERROR);
  1782. 8000a18: 4b03 ldr r3, [pc, #12] ; (8000a28 <_checkSDStatus+0x2c>)
  1783. 8000a1a: 881b ldrh r3, [r3, #0]
  1784. 8000a1c: 2b00 cmp r3, #0
  1785. 8000a1e: d1f5 bne.n 8000a0c <_checkSDStatus+0x10>
  1786. return 1;
  1787. 8000a20: 2301 movs r3, #1
  1788. }
  1789. 8000a22: 4618 mov r0, r3
  1790. 8000a24: bd80 pop {r7, pc}
  1791. 8000a26: bf00 nop
  1792. 8000a28: 20000018 .word 0x20000018
  1793. 08000a2c <checkSDStatus>:
  1794. void checkSDStatus() {
  1795. 8000a2c: b580 push {r7, lr}
  1796. 8000a2e: af00 add r7, sp, #0
  1797. while (_checkSDStatus()) {
  1798. 8000a30: bf00 nop
  1799. 8000a32: f7ff ffe3 bl 80009fc <_checkSDStatus>
  1800. 8000a36: 4603 mov r3, r0
  1801. 8000a38: 2b00 cmp r3, #0
  1802. 8000a3a: d1fa bne.n 8000a32 <checkSDStatus+0x6>
  1803. //<----><------>writeBufFilled = 0;
  1804. //<----><------>SDWriteOffset = SD_WriteHeaders();
  1805. }
  1806. }
  1807. 8000a3c: bf00 nop
  1808. 8000a3e: bd80 pop {r7, pc}
  1809. 08000a40 <SD_WriteBlock_1>:
  1810. SD_Error SD_WriteBlock_1(uint32_t WriteAddr)
  1811. {
  1812. 8000a40: b580 push {r7, lr}
  1813. 8000a42: b084 sub sp, #16
  1814. 8000a44: af00 add r7, sp, #0
  1815. 8000a46: 6078 str r0, [r7, #4]
  1816. Wstatus = BuffReady;
  1817. 8000a48: 4b3b ldr r3, [pc, #236] ; (8000b38 <SD_WriteBlock_1+0xf8>)
  1818. 8000a4a: 781a ldrb r2, [r3, #0]
  1819. 8000a4c: 4b3b ldr r3, [pc, #236] ; (8000b3c <SD_WriteBlock_1+0xfc>)
  1820. 8000a4e: 701a strb r2, [r3, #0]
  1821. BuffReady = 0;
  1822. 8000a50: 4b39 ldr r3, [pc, #228] ; (8000b38 <SD_WriteBlock_1+0xf8>)
  1823. 8000a52: 2200 movs r2, #0
  1824. 8000a54: 701a strb r2, [r3, #0]
  1825. uint32_t i = 0;
  1826. 8000a56: 2300 movs r3, #0
  1827. 8000a58: 60fb str r3, [r7, #12]
  1828. SD_Error rvalue = SD_RESPONSE_FAILURE;
  1829. 8000a5a: 23ff movs r3, #255 ; 0xff
  1830. 8000a5c: 72fb strb r3, [r7, #11]
  1831. SD_CS_LOW();
  1832. 8000a5e: 2110 movs r1, #16
  1833. 8000a60: 4837 ldr r0, [pc, #220] ; (8000b40 <SD_WriteBlock_1+0x100>)
  1834. 8000a62: f7ff fe6d bl 8000740 <GPIO_ResetBits>
  1835. SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, WriteAddr, 0xFF);
  1836. 8000a66: 22ff movs r2, #255 ; 0xff
  1837. 8000a68: 6879 ldr r1, [r7, #4]
  1838. 8000a6a: 2018 movs r0, #24
  1839. 8000a6c: f7ff fef4 bl 8000858 <SD_SendCmd>
  1840. if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
  1841. 8000a70: 2000 movs r0, #0
  1842. 8000a72: f7ff ff27 bl 80008c4 <SD_GetResponse>
  1843. 8000a76: 4603 mov r3, r0
  1844. 8000a78: 2b00 cmp r3, #0
  1845. 8000a7a: d14e bne.n 8000b1a <SD_WriteBlock_1+0xda>
  1846. {
  1847. SD_WriteByte(SD_DUMMY_BYTE);
  1848. 8000a7c: 20ff movs r0, #255 ; 0xff
  1849. 8000a7e: f7ff fced bl 800045c <SD_WriteByte>
  1850. SD_WriteByte(0xFE);
  1851. 8000a82: 20fe movs r0, #254 ; 0xfe
  1852. 8000a84: f7ff fcea bl 800045c <SD_WriteByte>
  1853. if (Wstatus == 1){
  1854. 8000a88: 4b2c ldr r3, [pc, #176] ; (8000b3c <SD_WriteBlock_1+0xfc>)
  1855. 8000a8a: 781b ldrb r3, [r3, #0]
  1856. 8000a8c: 2b01 cmp r3, #1
  1857. 8000a8e: d11a bne.n 8000ac6 <SD_WriteBlock_1+0x86>
  1858. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  1859. 8000a90: 2300 movs r3, #0
  1860. 8000a92: 60fb str r3, [r7, #12]
  1861. 8000a94: e014 b.n 8000ac0 <SD_WriteBlock_1+0x80>
  1862. {
  1863. SD_WriteByte(Buffer1[i]);
  1864. 8000a96: 4a2b ldr r2, [pc, #172] ; (8000b44 <SD_WriteBlock_1+0x104>)
  1865. 8000a98: 68fb ldr r3, [r7, #12]
  1866. 8000a9a: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  1867. 8000a9e: b2db uxtb r3, r3
  1868. 8000aa0: 4618 mov r0, r3
  1869. 8000aa2: f7ff fcdb bl 800045c <SD_WriteByte>
  1870. SD_WriteByte(Buffer1[i] >> 8);
  1871. 8000aa6: 4a27 ldr r2, [pc, #156] ; (8000b44 <SD_WriteBlock_1+0x104>)
  1872. 8000aa8: 68fb ldr r3, [r7, #12]
  1873. 8000aaa: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  1874. 8000aae: 0a1b lsrs r3, r3, #8
  1875. 8000ab0: b29b uxth r3, r3
  1876. 8000ab2: b2db uxtb r3, r3
  1877. 8000ab4: 4618 mov r0, r3
  1878. 8000ab6: f7ff fcd1 bl 800045c <SD_WriteByte>
  1879. if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
  1880. {
  1881. SD_WriteByte(SD_DUMMY_BYTE);
  1882. SD_WriteByte(0xFE);
  1883. if (Wstatus == 1){
  1884. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  1885. 8000aba: 68fb ldr r3, [r7, #12]
  1886. 8000abc: 3301 adds r3, #1
  1887. 8000abe: 60fb str r3, [r7, #12]
  1888. 8000ac0: 68fb ldr r3, [r7, #12]
  1889. 8000ac2: 2bff cmp r3, #255 ; 0xff
  1890. 8000ac4: d9e7 bls.n 8000a96 <SD_WriteBlock_1+0x56>
  1891. SD_WriteByte(Buffer1[i]);
  1892. SD_WriteByte(Buffer1[i] >> 8);
  1893. }
  1894. }
  1895. if (Wstatus == 2){
  1896. 8000ac6: 4b1d ldr r3, [pc, #116] ; (8000b3c <SD_WriteBlock_1+0xfc>)
  1897. 8000ac8: 781b ldrb r3, [r3, #0]
  1898. 8000aca: 2b02 cmp r3, #2
  1899. 8000acc: d11a bne.n 8000b04 <SD_WriteBlock_1+0xc4>
  1900. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  1901. 8000ace: 2300 movs r3, #0
  1902. 8000ad0: 60fb str r3, [r7, #12]
  1903. 8000ad2: e014 b.n 8000afe <SD_WriteBlock_1+0xbe>
  1904. {
  1905. SD_WriteByte(Buffer2[i]);
  1906. 8000ad4: 4a1c ldr r2, [pc, #112] ; (8000b48 <SD_WriteBlock_1+0x108>)
  1907. 8000ad6: 68fb ldr r3, [r7, #12]
  1908. 8000ad8: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  1909. 8000adc: b2db uxtb r3, r3
  1910. 8000ade: 4618 mov r0, r3
  1911. 8000ae0: f7ff fcbc bl 800045c <SD_WriteByte>
  1912. SD_WriteByte(Buffer2[i] >> 8);
  1913. 8000ae4: 4a18 ldr r2, [pc, #96] ; (8000b48 <SD_WriteBlock_1+0x108>)
  1914. 8000ae6: 68fb ldr r3, [r7, #12]
  1915. 8000ae8: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  1916. 8000aec: 0a1b lsrs r3, r3, #8
  1917. 8000aee: b29b uxth r3, r3
  1918. 8000af0: b2db uxtb r3, r3
  1919. 8000af2: 4618 mov r0, r3
  1920. 8000af4: f7ff fcb2 bl 800045c <SD_WriteByte>
  1921. SD_WriteByte(Buffer1[i] >> 8);
  1922. }
  1923. }
  1924. if (Wstatus == 2){
  1925. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  1926. 8000af8: 68fb ldr r3, [r7, #12]
  1927. 8000afa: 3301 adds r3, #1
  1928. 8000afc: 60fb str r3, [r7, #12]
  1929. 8000afe: 68fb ldr r3, [r7, #12]
  1930. 8000b00: 2bff cmp r3, #255 ; 0xff
  1931. 8000b02: d9e7 bls.n 8000ad4 <SD_WriteBlock_1+0x94>
  1932. SD_WriteByte(Buffer2[i]);
  1933. SD_WriteByte(Buffer2[i] >> 8);
  1934. }
  1935. }
  1936. SD_ReadByte();
  1937. 8000b04: f7ff fefe bl 8000904 <SD_ReadByte>
  1938. SD_ReadByte();
  1939. 8000b08: f7ff fefc bl 8000904 <SD_ReadByte>
  1940. if (SD_GetDataResponse() == SD_DATA_OK)
  1941. 8000b0c: f7ff ff20 bl 8000950 <SD_GetDataResponse>
  1942. 8000b10: 4603 mov r3, r0
  1943. 8000b12: 2b05 cmp r3, #5
  1944. 8000b14: d101 bne.n 8000b1a <SD_WriteBlock_1+0xda>
  1945. {
  1946. rvalue = SD_RESPONSE_NO_ERROR;
  1947. 8000b16: 2300 movs r3, #0
  1948. 8000b18: 72fb strb r3, [r7, #11]
  1949. }
  1950. }
  1951. SD_CS_HIGH();
  1952. 8000b1a: 2110 movs r1, #16
  1953. 8000b1c: 4808 ldr r0, [pc, #32] ; (8000b40 <SD_WriteBlock_1+0x100>)
  1954. 8000b1e: f7ff fde3 bl 80006e8 <GPIO_SetBits>
  1955. SD_WriteByte(SD_DUMMY_BYTE);
  1956. 8000b22: 20ff movs r0, #255 ; 0xff
  1957. 8000b24: f7ff fc9a bl 800045c <SD_WriteByte>
  1958. Wstatus = 0;
  1959. 8000b28: 4b04 ldr r3, [pc, #16] ; (8000b3c <SD_WriteBlock_1+0xfc>)
  1960. 8000b2a: 2200 movs r2, #0
  1961. 8000b2c: 701a strb r2, [r3, #0]
  1962. return rvalue;
  1963. 8000b2e: 7afb ldrb r3, [r7, #11]
  1964. }
  1965. 8000b30: 4618 mov r0, r3
  1966. 8000b32: 3710 adds r7, #16
  1967. 8000b34: 46bd mov sp, r7
  1968. 8000b36: bd80 pop {r7, pc}
  1969. 8000b38: 20000630 .word 0x20000630
  1970. 8000b3c: 2000001b .word 0x2000001b
  1971. 8000b40: 40010800 .word 0x40010800
  1972. 8000b44: 20000230 .word 0x20000230
  1973. 8000b48: 20000430 .word 0x20000430
  1974. 08000b4c <main>:
  1975. int main(void) {
  1976. 8000b4c: b580 push {r7, lr}
  1977. 8000b4e: af00 add r7, sp, #0
  1978. status = SD_Init();
  1979. 8000b50: f7ff ff34 bl 80009bc <SD_Init>
  1980. 8000b54: 4603 mov r3, r0
  1981. 8000b56: 461a mov r2, r3
  1982. 8000b58: 4b14 ldr r3, [pc, #80] ; (8000bac <main+0x60>)
  1983. 8000b5a: 601a str r2, [r3, #0]
  1984. checkSDStatus();
  1985. 8000b5c: f7ff ff66 bl 8000a2c <checkSDStatus>
  1986. writeBufFilled = 0;
  1987. 8000b60: 4b13 ldr r3, [pc, #76] ; (8000bb0 <main+0x64>)
  1988. 8000b62: 2200 movs r2, #0
  1989. 8000b64: 801a strh r2, [r3, #0]
  1990. // SD_WriteHeaders();
  1991. SDWriteOffset = SD_BUFSIZE;
  1992. 8000b66: 4b13 ldr r3, [pc, #76] ; (8000bb4 <main+0x68>)
  1993. 8000b68: f44f 7200 mov.w r2, #512 ; 0x200
  1994. 8000b6c: 601a str r2, [r3, #0]
  1995. SystemCoreClockUpdate();
  1996. 8000b6e: f7ff fb4d bl 800020c <SystemCoreClockUpdate>
  1997. SysTick_Config(SystemCoreClock/10000);
  1998. 8000b72: 4b11 ldr r3, [pc, #68] ; (8000bb8 <main+0x6c>)
  1999. 8000b74: 681b ldr r3, [r3, #0]
  2000. 8000b76: 4a11 ldr r2, [pc, #68] ; (8000bbc <main+0x70>)
  2001. 8000b78: fba2 2303 umull r2, r3, r2, r3
  2002. 8000b7c: 0b5b lsrs r3, r3, #13
  2003. 8000b7e: 4618 mov r0, r3
  2004. 8000b80: f7ff faee bl 8000160 <SysTick_Config>
  2005. while (1)
  2006. {
  2007. if (BuffReady != 0){
  2008. 8000b84: 4b0e ldr r3, [pc, #56] ; (8000bc0 <main+0x74>)
  2009. 8000b86: 781b ldrb r3, [r3, #0]
  2010. 8000b88: 2b00 cmp r3, #0
  2011. 8000b8a: d0fb beq.n 8000b84 <main+0x38>
  2012. check=1;
  2013. 8000b8c: 4b0d ldr r3, [pc, #52] ; (8000bc4 <main+0x78>)
  2014. 8000b8e: 2201 movs r2, #1
  2015. 8000b90: 701a strb r2, [r3, #0]
  2016. SD_WriteBlock_1(SDWriteOffset);
  2017. 8000b92: 4b08 ldr r3, [pc, #32] ; (8000bb4 <main+0x68>)
  2018. 8000b94: 681b ldr r3, [r3, #0]
  2019. 8000b96: 4618 mov r0, r3
  2020. 8000b98: f7ff ff52 bl 8000a40 <SD_WriteBlock_1>
  2021. SDWriteOffset = SDWriteOffset + SD_BUFSIZE;
  2022. 8000b9c: 4b05 ldr r3, [pc, #20] ; (8000bb4 <main+0x68>)
  2023. 8000b9e: 681b ldr r3, [r3, #0]
  2024. 8000ba0: f503 7300 add.w r3, r3, #512 ; 0x200
  2025. 8000ba4: 4a03 ldr r2, [pc, #12] ; (8000bb4 <main+0x68>)
  2026. 8000ba6: 6013 str r3, [r2, #0]
  2027. }
  2028. }
  2029. 8000ba8: e7ec b.n 8000b84 <main+0x38>
  2030. 8000baa: bf00 nop
  2031. 8000bac: 20000014 .word 0x20000014
  2032. 8000bb0: 20000226 .word 0x20000226
  2033. 8000bb4: 20000228 .word 0x20000228
  2034. 8000bb8: 20000000 .word 0x20000000
  2035. 8000bbc: d1b71759 .word 0xd1b71759
  2036. 8000bc0: 20000630 .word 0x20000630
  2037. 8000bc4: 20000632 .word 0x20000632
  2038. 08000bc8 <SysTick_Handler>:
  2039. }
  2040. void SysTick_Handler(void) {
  2041. 8000bc8: b480 push {r7}
  2042. 8000bca: af00 add r7, sp, #0
  2043. if (Rstatus == 1 && Wstatus != 1){
  2044. 8000bcc: 4b40 ldr r3, [pc, #256] ; (8000cd0 <SysTick_Handler+0x108>)
  2045. 8000bce: 781b ldrb r3, [r3, #0]
  2046. 8000bd0: 2b01 cmp r3, #1
  2047. 8000bd2: d129 bne.n 8000c28 <SysTick_Handler+0x60>
  2048. 8000bd4: 4b3f ldr r3, [pc, #252] ; (8000cd4 <SysTick_Handler+0x10c>)
  2049. 8000bd6: 781b ldrb r3, [r3, #0]
  2050. 8000bd8: 2b01 cmp r3, #1
  2051. 8000bda: d025 beq.n 8000c28 <SysTick_Handler+0x60>
  2052. ADC1ConvertedValue = 0xB1;
  2053. 8000bdc: 4b3e ldr r3, [pc, #248] ; (8000cd8 <SysTick_Handler+0x110>)
  2054. 8000bde: 22b1 movs r2, #177 ; 0xb1
  2055. 8000be0: 801a strh r2, [r3, #0]
  2056. Buffer1[BuffCount] = TMSTP;
  2057. 8000be2: 4b3e ldr r3, [pc, #248] ; (8000cdc <SysTick_Handler+0x114>)
  2058. 8000be4: 781b ldrb r3, [r3, #0]
  2059. 8000be6: 461a mov r2, r3
  2060. 8000be8: 4b3d ldr r3, [pc, #244] ; (8000ce0 <SysTick_Handler+0x118>)
  2061. 8000bea: 8819 ldrh r1, [r3, #0]
  2062. 8000bec: 4b3d ldr r3, [pc, #244] ; (8000ce4 <SysTick_Handler+0x11c>)
  2063. 8000bee: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2064. BuffCount++;
  2065. 8000bf2: 4b3a ldr r3, [pc, #232] ; (8000cdc <SysTick_Handler+0x114>)
  2066. 8000bf4: 781b ldrb r3, [r3, #0]
  2067. 8000bf6: 3301 adds r3, #1
  2068. 8000bf8: b2da uxtb r2, r3
  2069. 8000bfa: 4b38 ldr r3, [pc, #224] ; (8000cdc <SysTick_Handler+0x114>)
  2070. 8000bfc: 701a strb r2, [r3, #0]
  2071. Buffer1[BuffCount] = ADC1ConvertedValue;
  2072. 8000bfe: 4b37 ldr r3, [pc, #220] ; (8000cdc <SysTick_Handler+0x114>)
  2073. 8000c00: 781b ldrb r3, [r3, #0]
  2074. 8000c02: 461a mov r2, r3
  2075. 8000c04: 4b34 ldr r3, [pc, #208] ; (8000cd8 <SysTick_Handler+0x110>)
  2076. 8000c06: 881b ldrh r3, [r3, #0]
  2077. 8000c08: b299 uxth r1, r3
  2078. 8000c0a: 4b36 ldr r3, [pc, #216] ; (8000ce4 <SysTick_Handler+0x11c>)
  2079. 8000c0c: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2080. BuffCount++;
  2081. 8000c10: 4b32 ldr r3, [pc, #200] ; (8000cdc <SysTick_Handler+0x114>)
  2082. 8000c12: 781b ldrb r3, [r3, #0]
  2083. 8000c14: 3301 adds r3, #1
  2084. 8000c16: b2da uxtb r2, r3
  2085. 8000c18: 4b30 ldr r3, [pc, #192] ; (8000cdc <SysTick_Handler+0x114>)
  2086. 8000c1a: 701a strb r2, [r3, #0]
  2087. TMSTP++;
  2088. 8000c1c: 4b30 ldr r3, [pc, #192] ; (8000ce0 <SysTick_Handler+0x118>)
  2089. 8000c1e: 881b ldrh r3, [r3, #0]
  2090. 8000c20: 3301 adds r3, #1
  2091. 8000c22: b29a uxth r2, r3
  2092. 8000c24: 4b2e ldr r3, [pc, #184] ; (8000ce0 <SysTick_Handler+0x118>)
  2093. 8000c26: 801a strh r2, [r3, #0]
  2094. }
  2095. if (Rstatus == 2 && Wstatus != 2){
  2096. 8000c28: 4b29 ldr r3, [pc, #164] ; (8000cd0 <SysTick_Handler+0x108>)
  2097. 8000c2a: 781b ldrb r3, [r3, #0]
  2098. 8000c2c: 2b02 cmp r3, #2
  2099. 8000c2e: d129 bne.n 8000c84 <SysTick_Handler+0xbc>
  2100. 8000c30: 4b28 ldr r3, [pc, #160] ; (8000cd4 <SysTick_Handler+0x10c>)
  2101. 8000c32: 781b ldrb r3, [r3, #0]
  2102. 8000c34: 2b02 cmp r3, #2
  2103. 8000c36: d025 beq.n 8000c84 <SysTick_Handler+0xbc>
  2104. ADC1ConvertedValue = 0xB2;
  2105. 8000c38: 4b27 ldr r3, [pc, #156] ; (8000cd8 <SysTick_Handler+0x110>)
  2106. 8000c3a: 22b2 movs r2, #178 ; 0xb2
  2107. 8000c3c: 801a strh r2, [r3, #0]
  2108. Buffer2[BuffCount] = TMSTP;
  2109. 8000c3e: 4b27 ldr r3, [pc, #156] ; (8000cdc <SysTick_Handler+0x114>)
  2110. 8000c40: 781b ldrb r3, [r3, #0]
  2111. 8000c42: 461a mov r2, r3
  2112. 8000c44: 4b26 ldr r3, [pc, #152] ; (8000ce0 <SysTick_Handler+0x118>)
  2113. 8000c46: 8819 ldrh r1, [r3, #0]
  2114. 8000c48: 4b27 ldr r3, [pc, #156] ; (8000ce8 <SysTick_Handler+0x120>)
  2115. 8000c4a: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2116. BuffCount++;
  2117. 8000c4e: 4b23 ldr r3, [pc, #140] ; (8000cdc <SysTick_Handler+0x114>)
  2118. 8000c50: 781b ldrb r3, [r3, #0]
  2119. 8000c52: 3301 adds r3, #1
  2120. 8000c54: b2da uxtb r2, r3
  2121. 8000c56: 4b21 ldr r3, [pc, #132] ; (8000cdc <SysTick_Handler+0x114>)
  2122. 8000c58: 701a strb r2, [r3, #0]
  2123. Buffer2[BuffCount] = ADC1ConvertedValue;
  2124. 8000c5a: 4b20 ldr r3, [pc, #128] ; (8000cdc <SysTick_Handler+0x114>)
  2125. 8000c5c: 781b ldrb r3, [r3, #0]
  2126. 8000c5e: 461a mov r2, r3
  2127. 8000c60: 4b1d ldr r3, [pc, #116] ; (8000cd8 <SysTick_Handler+0x110>)
  2128. 8000c62: 881b ldrh r3, [r3, #0]
  2129. 8000c64: b299 uxth r1, r3
  2130. 8000c66: 4b20 ldr r3, [pc, #128] ; (8000ce8 <SysTick_Handler+0x120>)
  2131. 8000c68: f823 1012 strh.w r1, [r3, r2, lsl #1]
  2132. BuffCount++;
  2133. 8000c6c: 4b1b ldr r3, [pc, #108] ; (8000cdc <SysTick_Handler+0x114>)
  2134. 8000c6e: 781b ldrb r3, [r3, #0]
  2135. 8000c70: 3301 adds r3, #1
  2136. 8000c72: b2da uxtb r2, r3
  2137. 8000c74: 4b19 ldr r3, [pc, #100] ; (8000cdc <SysTick_Handler+0x114>)
  2138. 8000c76: 701a strb r2, [r3, #0]
  2139. TMSTP++;
  2140. 8000c78: 4b19 ldr r3, [pc, #100] ; (8000ce0 <SysTick_Handler+0x118>)
  2141. 8000c7a: 881b ldrh r3, [r3, #0]
  2142. 8000c7c: 3301 adds r3, #1
  2143. 8000c7e: b29a uxth r2, r3
  2144. 8000c80: 4b17 ldr r3, [pc, #92] ; (8000ce0 <SysTick_Handler+0x118>)
  2145. 8000c82: 801a strh r2, [r3, #0]
  2146. }
  2147. if ( BuffCount == 254 && Rstatus == 1 ){
  2148. 8000c84: 4b15 ldr r3, [pc, #84] ; (8000cdc <SysTick_Handler+0x114>)
  2149. 8000c86: 781b ldrb r3, [r3, #0]
  2150. 8000c88: 2bfe cmp r3, #254 ; 0xfe
  2151. 8000c8a: d10c bne.n 8000ca6 <SysTick_Handler+0xde>
  2152. 8000c8c: 4b10 ldr r3, [pc, #64] ; (8000cd0 <SysTick_Handler+0x108>)
  2153. 8000c8e: 781b ldrb r3, [r3, #0]
  2154. 8000c90: 2b01 cmp r3, #1
  2155. 8000c92: d108 bne.n 8000ca6 <SysTick_Handler+0xde>
  2156. Rstatus = 2;
  2157. 8000c94: 4b0e ldr r3, [pc, #56] ; (8000cd0 <SysTick_Handler+0x108>)
  2158. 8000c96: 2202 movs r2, #2
  2159. 8000c98: 701a strb r2, [r3, #0]
  2160. BuffReady = 1;
  2161. 8000c9a: 4b14 ldr r3, [pc, #80] ; (8000cec <SysTick_Handler+0x124>)
  2162. 8000c9c: 2201 movs r2, #1
  2163. 8000c9e: 701a strb r2, [r3, #0]
  2164. BuffCount = 0;
  2165. 8000ca0: 4b0e ldr r3, [pc, #56] ; (8000cdc <SysTick_Handler+0x114>)
  2166. 8000ca2: 2200 movs r2, #0
  2167. 8000ca4: 701a strb r2, [r3, #0]
  2168. }
  2169. if (BuffCount == 254 && Rstatus == 2){
  2170. 8000ca6: 4b0d ldr r3, [pc, #52] ; (8000cdc <SysTick_Handler+0x114>)
  2171. 8000ca8: 781b ldrb r3, [r3, #0]
  2172. 8000caa: 2bfe cmp r3, #254 ; 0xfe
  2173. 8000cac: d10c bne.n 8000cc8 <SysTick_Handler+0x100>
  2174. 8000cae: 4b08 ldr r3, [pc, #32] ; (8000cd0 <SysTick_Handler+0x108>)
  2175. 8000cb0: 781b ldrb r3, [r3, #0]
  2176. 8000cb2: 2b02 cmp r3, #2
  2177. 8000cb4: d108 bne.n 8000cc8 <SysTick_Handler+0x100>
  2178. Rstatus = 1;
  2179. 8000cb6: 4b06 ldr r3, [pc, #24] ; (8000cd0 <SysTick_Handler+0x108>)
  2180. 8000cb8: 2201 movs r2, #1
  2181. 8000cba: 701a strb r2, [r3, #0]
  2182. BuffReady = 2;
  2183. 8000cbc: 4b0b ldr r3, [pc, #44] ; (8000cec <SysTick_Handler+0x124>)
  2184. 8000cbe: 2202 movs r2, #2
  2185. 8000cc0: 701a strb r2, [r3, #0]
  2186. BuffCount = 0;
  2187. 8000cc2: 4b06 ldr r3, [pc, #24] ; (8000cdc <SysTick_Handler+0x114>)
  2188. 8000cc4: 2200 movs r2, #0
  2189. 8000cc6: 701a strb r2, [r3, #0]
  2190. }
  2191. }
  2192. 8000cc8: bf00 nop
  2193. 8000cca: 46bd mov sp, r7
  2194. 8000ccc: bc80 pop {r7}
  2195. 8000cce: 4770 bx lr
  2196. 8000cd0: 2000001a .word 0x2000001a
  2197. 8000cd4: 2000001b .word 0x2000001b
  2198. 8000cd8: 2000022c .word 0x2000022c
  2199. 8000cdc: 20000631 .word 0x20000631
  2200. 8000ce0: 20000634 .word 0x20000634
  2201. 8000ce4: 20000230 .word 0x20000230
  2202. 8000ce8: 20000430 .word 0x20000430
  2203. 8000cec: 20000630 .word 0x20000630
  2204. 8000cf0: 08000d4c .word 0x08000d4c
  2205. 8000cf4: 20000000 .word 0x20000000
  2206. 8000cf8: 2000001c .word 0x2000001c
  2207. 8000cfc: 2000001c .word 0x2000001c
  2208. 8000d00: 20000638 .word 0x20000638
  2209. 08000d04 <Reset_Handler>:
  2210. .weak Reset_Handler
  2211. .type Reset_Handler, %function
  2212. Reset_Handler:
  2213. /* Copy the data segment initializers from flash to SRAM */
  2214. movs r1, #0
  2215. 8000d04: 2100 movs r1, #0
  2216. b LoopCopyDataInit
  2217. 8000d06: e003 b.n 8000d10 <LoopCopyDataInit>
  2218. 08000d08 <CopyDataInit>:
  2219. CopyDataInit:
  2220. ldr r3, =_sidata
  2221. 8000d08: 4b0a ldr r3, [pc, #40] ; (8000d34 <LoopFillZerobss+0x10>)
  2222. ldr r3, [r3, r1]
  2223. 8000d0a: 585b ldr r3, [r3, r1]
  2224. str r3, [r0, r1]
  2225. 8000d0c: 5043 str r3, [r0, r1]
  2226. adds r1, r1, #4
  2227. 8000d0e: 3104 adds r1, #4
  2228. 08000d10 <LoopCopyDataInit>:
  2229. LoopCopyDataInit:
  2230. ldr r0, =_sdata
  2231. 8000d10: 4809 ldr r0, [pc, #36] ; (8000d38 <LoopFillZerobss+0x14>)
  2232. ldr r3, =_edata
  2233. 8000d12: 4b0a ldr r3, [pc, #40] ; (8000d3c <LoopFillZerobss+0x18>)
  2234. adds r2, r0, r1
  2235. 8000d14: 1842 adds r2, r0, r1
  2236. cmp r2, r3
  2237. 8000d16: 429a cmp r2, r3
  2238. bcc CopyDataInit
  2239. 8000d18: d3f6 bcc.n 8000d08 <CopyDataInit>
  2240. ldr r2, =_sbss
  2241. 8000d1a: 4a09 ldr r2, [pc, #36] ; (8000d40 <LoopFillZerobss+0x1c>)
  2242. b LoopFillZerobss
  2243. 8000d1c: e002 b.n 8000d24 <LoopFillZerobss>
  2244. 08000d1e <FillZerobss>:
  2245. /* Zero fill the bss segment. */
  2246. FillZerobss:
  2247. movs r3, #0
  2248. 8000d1e: 2300 movs r3, #0
  2249. str r3, [r2], #4
  2250. 8000d20: f842 3b04 str.w r3, [r2], #4
  2251. 08000d24 <LoopFillZerobss>:
  2252. LoopFillZerobss:
  2253. ldr r3, = _ebss
  2254. 8000d24: 4b07 ldr r3, [pc, #28] ; (8000d44 <LoopFillZerobss+0x20>)
  2255. cmp r2, r3
  2256. 8000d26: 429a cmp r2, r3
  2257. bcc FillZerobss
  2258. 8000d28: d3f9 bcc.n 8000d1e <FillZerobss>
  2259. /* Call the clock system intitialization function.*/
  2260. bl SystemInit
  2261. 8000d2a: f7ff fa3b bl 80001a4 <SystemInit>
  2262. /* Call the application's entry point.*/
  2263. bl main
  2264. 8000d2e: f7ff ff0d bl 8000b4c <main>
  2265. bx lr
  2266. 8000d32: 4770 bx lr
  2267. /* Copy the data segment initializers from flash to SRAM */
  2268. movs r1, #0
  2269. b LoopCopyDataInit
  2270. CopyDataInit:
  2271. ldr r3, =_sidata
  2272. 8000d34: 08000d4c .word 0x08000d4c
  2273. ldr r3, [r3, r1]
  2274. str r3, [r0, r1]
  2275. adds r1, r1, #4
  2276. LoopCopyDataInit:
  2277. ldr r0, =_sdata
  2278. 8000d38: 20000000 .word 0x20000000
  2279. ldr r3, =_edata
  2280. 8000d3c: 2000001c .word 0x2000001c
  2281. adds r2, r0, r1
  2282. cmp r2, r3
  2283. bcc CopyDataInit
  2284. ldr r2, =_sbss
  2285. 8000d40: 2000001c .word 0x2000001c
  2286. FillZerobss:
  2287. movs r3, #0
  2288. str r3, [r2], #4
  2289. LoopFillZerobss:
  2290. ldr r3, = _ebss
  2291. 8000d44: 20000638 .word 0x20000638
  2292. 08000d48 <ADC1_2_IRQHandler>:
  2293. * @retval None
  2294. */
  2295. .section .text.Default_Handler,"ax",%progbits
  2296. Default_Handler:
  2297. Infinite_Loop:
  2298. b Infinite_Loop
  2299. 8000d48: e7fe b.n 8000d48 <ADC1_2_IRQHandler>
  2300. ...