main.lst 98 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794
  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 <ADC_Cmd>:
  547. FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx);
  548. void ADC_SoftwareStartConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  549. void ADC_Cmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  550. {
  551. 80003f0: b480 push {r7}
  552. 80003f2: b083 sub sp, #12
  553. 80003f4: af00 add r7, sp, #0
  554. 80003f6: 6078 str r0, [r7, #4]
  555. 80003f8: 460b mov r3, r1
  556. 80003fa: 70fb strb r3, [r7, #3]
  557. /* Check the parameters */
  558. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  559. assert_param(IS_FUNCTIONAL_STATE(NewState));
  560. if (NewState != DISABLE)
  561. 80003fc: 78fb ldrb r3, [r7, #3]
  562. 80003fe: 2b00 cmp r3, #0
  563. 8000400: d006 beq.n 8000410 <ADC_Cmd+0x20>
  564. {
  565. /* Set the ADON bit to wake up the ADC from power down mode */
  566. ADCx->CR2 |= CR2_ADON_Set;
  567. 8000402: 687b ldr r3, [r7, #4]
  568. 8000404: 689b ldr r3, [r3, #8]
  569. 8000406: f043 0201 orr.w r2, r3, #1
  570. 800040a: 687b ldr r3, [r7, #4]
  571. 800040c: 609a str r2, [r3, #8]
  572. else
  573. {
  574. /* Disable the selected ADC peripheral */
  575. ADCx->CR2 &= CR2_ADON_Reset;
  576. }
  577. }
  578. 800040e: e005 b.n 800041c <ADC_Cmd+0x2c>
  579. ADCx->CR2 |= CR2_ADON_Set;
  580. }
  581. else
  582. {
  583. /* Disable the selected ADC peripheral */
  584. ADCx->CR2 &= CR2_ADON_Reset;
  585. 8000410: 687b ldr r3, [r7, #4]
  586. 8000412: 689b ldr r3, [r3, #8]
  587. 8000414: f023 0201 bic.w r2, r3, #1
  588. 8000418: 687b ldr r3, [r7, #4]
  589. 800041a: 609a str r2, [r3, #8]
  590. }
  591. }
  592. 800041c: bf00 nop
  593. 800041e: 370c adds r7, #12
  594. 8000420: 46bd mov sp, r7
  595. 8000422: bc80 pop {r7}
  596. 8000424: 4770 bx lr
  597. 8000426: bf00 nop
  598. 08000428 <SPI_I2S_GetFlagStatus>:
  599. FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
  600. {
  601. 8000428: b480 push {r7}
  602. 800042a: b085 sub sp, #20
  603. 800042c: af00 add r7, sp, #0
  604. 800042e: 6078 str r0, [r7, #4]
  605. 8000430: 460b mov r3, r1
  606. 8000432: 807b strh r3, [r7, #2]
  607. FlagStatus bitstatus = RESET;
  608. 8000434: 2300 movs r3, #0
  609. 8000436: 73fb strb r3, [r7, #15]
  610. /* Check the parameters */
  611. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  612. assert_param(IS_SPI_I2S_GET_FLAG(SPI_I2S_FLAG));
  613. /* Check the status of the specified SPI/I2S flag */
  614. if ((SPIx->SR & SPI_I2S_FLAG) != (uint16_t)RESET)
  615. 8000438: 687b ldr r3, [r7, #4]
  616. 800043a: 891b ldrh r3, [r3, #8]
  617. 800043c: b29a uxth r2, r3
  618. 800043e: 887b ldrh r3, [r7, #2]
  619. 8000440: 4013 ands r3, r2
  620. 8000442: b29b uxth r3, r3
  621. 8000444: 2b00 cmp r3, #0
  622. 8000446: d002 beq.n 800044e <SPI_I2S_GetFlagStatus+0x26>
  623. {
  624. /* SPI_I2S_FLAG is set */
  625. bitstatus = SET;
  626. 8000448: 2301 movs r3, #1
  627. 800044a: 73fb strb r3, [r7, #15]
  628. 800044c: e001 b.n 8000452 <SPI_I2S_GetFlagStatus+0x2a>
  629. }
  630. else
  631. {
  632. /* SPI_I2S_FLAG is reset */
  633. bitstatus = RESET;
  634. 800044e: 2300 movs r3, #0
  635. 8000450: 73fb strb r3, [r7, #15]
  636. }
  637. /* Return the SPI_I2S_FLAG status */
  638. return bitstatus;
  639. 8000452: 7bfb ldrb r3, [r7, #15]
  640. }
  641. 8000454: 4618 mov r0, r3
  642. 8000456: 3714 adds r7, #20
  643. 8000458: 46bd mov sp, r7
  644. 800045a: bc80 pop {r7}
  645. 800045c: 4770 bx lr
  646. 800045e: bf00 nop
  647. 08000460 <SPI_I2S_SendData>:
  648. void SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data)
  649. {
  650. 8000460: b480 push {r7}
  651. 8000462: b083 sub sp, #12
  652. 8000464: af00 add r7, sp, #0
  653. 8000466: 6078 str r0, [r7, #4]
  654. 8000468: 460b mov r3, r1
  655. 800046a: 807b strh r3, [r7, #2]
  656. /* Check the parameters */
  657. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  658. /* Write in the DR register the data to be sent */
  659. SPIx->DR = Data;
  660. 800046c: 687b ldr r3, [r7, #4]
  661. 800046e: 887a ldrh r2, [r7, #2]
  662. 8000470: 819a strh r2, [r3, #12]
  663. }
  664. 8000472: bf00 nop
  665. 8000474: 370c adds r7, #12
  666. 8000476: 46bd mov sp, r7
  667. 8000478: bc80 pop {r7}
  668. 800047a: 4770 bx lr
  669. 0800047c <ADC_ResetCalibration>:
  670. void ADC_ResetCalibration(ADC_TypeDef* ADCx)
  671. {
  672. 800047c: b480 push {r7}
  673. 800047e: b083 sub sp, #12
  674. 8000480: af00 add r7, sp, #0
  675. 8000482: 6078 str r0, [r7, #4]
  676. /* Check the parameters */
  677. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  678. /* Resets the selected ADC calibration registers */
  679. ADCx->CR2 |= CR2_RSTCAL_Set;
  680. 8000484: 687b ldr r3, [r7, #4]
  681. 8000486: 689b ldr r3, [r3, #8]
  682. 8000488: f043 0208 orr.w r2, r3, #8
  683. 800048c: 687b ldr r3, [r7, #4]
  684. 800048e: 609a str r2, [r3, #8]
  685. }
  686. 8000490: bf00 nop
  687. 8000492: 370c adds r7, #12
  688. 8000494: 46bd mov sp, r7
  689. 8000496: bc80 pop {r7}
  690. 8000498: 4770 bx lr
  691. 800049a: bf00 nop
  692. 0800049c <ADC_GetResetCalibrationStatus>:
  693. FlagStatus ADC_GetResetCalibrationStatus(ADC_TypeDef* ADCx)
  694. {
  695. 800049c: b480 push {r7}
  696. 800049e: b085 sub sp, #20
  697. 80004a0: af00 add r7, sp, #0
  698. 80004a2: 6078 str r0, [r7, #4]
  699. FlagStatus bitstatus = RESET;
  700. 80004a4: 2300 movs r3, #0
  701. 80004a6: 73fb strb r3, [r7, #15]
  702. /* Check the parameters */
  703. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  704. /* Check the status of RSTCAL bit */
  705. if ((ADCx->CR2 & CR2_RSTCAL_Set) != (uint32_t)RESET)
  706. 80004a8: 687b ldr r3, [r7, #4]
  707. 80004aa: 689b ldr r3, [r3, #8]
  708. 80004ac: f003 0308 and.w r3, r3, #8
  709. 80004b0: 2b00 cmp r3, #0
  710. 80004b2: d002 beq.n 80004ba <ADC_GetResetCalibrationStatus+0x1e>
  711. {
  712. /* RSTCAL bit is set */
  713. bitstatus = SET;
  714. 80004b4: 2301 movs r3, #1
  715. 80004b6: 73fb strb r3, [r7, #15]
  716. 80004b8: e001 b.n 80004be <ADC_GetResetCalibrationStatus+0x22>
  717. }
  718. else
  719. {
  720. /* RSTCAL bit is reset */
  721. bitstatus = RESET;
  722. 80004ba: 2300 movs r3, #0
  723. 80004bc: 73fb strb r3, [r7, #15]
  724. }
  725. /* Return the RSTCAL bit status */
  726. return bitstatus;
  727. 80004be: 7bfb ldrb r3, [r7, #15]
  728. }
  729. 80004c0: 4618 mov r0, r3
  730. 80004c2: 3714 adds r7, #20
  731. 80004c4: 46bd mov sp, r7
  732. 80004c6: bc80 pop {r7}
  733. 80004c8: 4770 bx lr
  734. 80004ca: bf00 nop
  735. 080004cc <ADC_StartCalibration>:
  736. void ADC_StartCalibration(ADC_TypeDef* ADCx)
  737. {
  738. 80004cc: b480 push {r7}
  739. 80004ce: b083 sub sp, #12
  740. 80004d0: af00 add r7, sp, #0
  741. 80004d2: 6078 str r0, [r7, #4]
  742. /* Check the parameters */
  743. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  744. /* Enable the selected ADC calibration process */
  745. ADCx->CR2 |= CR2_CAL_Set;
  746. 80004d4: 687b ldr r3, [r7, #4]
  747. 80004d6: 689b ldr r3, [r3, #8]
  748. 80004d8: f043 0204 orr.w r2, r3, #4
  749. 80004dc: 687b ldr r3, [r7, #4]
  750. 80004de: 609a str r2, [r3, #8]
  751. }
  752. 80004e0: bf00 nop
  753. 80004e2: 370c adds r7, #12
  754. 80004e4: 46bd mov sp, r7
  755. 80004e6: bc80 pop {r7}
  756. 80004e8: 4770 bx lr
  757. 80004ea: bf00 nop
  758. 080004ec <ADC_GetCalibrationStatus>:
  759. FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx)
  760. {
  761. 80004ec: b480 push {r7}
  762. 80004ee: b085 sub sp, #20
  763. 80004f0: af00 add r7, sp, #0
  764. 80004f2: 6078 str r0, [r7, #4]
  765. FlagStatus bitstatus = RESET;
  766. 80004f4: 2300 movs r3, #0
  767. 80004f6: 73fb strb r3, [r7, #15]
  768. /* Check the parameters */
  769. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  770. /* Check the status of CAL bit */
  771. if ((ADCx->CR2 & CR2_CAL_Set) != (uint32_t)RESET)
  772. 80004f8: 687b ldr r3, [r7, #4]
  773. 80004fa: 689b ldr r3, [r3, #8]
  774. 80004fc: f003 0304 and.w r3, r3, #4
  775. 8000500: 2b00 cmp r3, #0
  776. 8000502: d002 beq.n 800050a <ADC_GetCalibrationStatus+0x1e>
  777. {
  778. /* CAL bit is set: calibration on going */
  779. bitstatus = SET;
  780. 8000504: 2301 movs r3, #1
  781. 8000506: 73fb strb r3, [r7, #15]
  782. 8000508: e001 b.n 800050e <ADC_GetCalibrationStatus+0x22>
  783. }
  784. else
  785. {
  786. /* CAL bit is reset: end of calibration */
  787. bitstatus = RESET;
  788. 800050a: 2300 movs r3, #0
  789. 800050c: 73fb strb r3, [r7, #15]
  790. }
  791. /* Return the CAL bit status */
  792. return bitstatus;
  793. 800050e: 7bfb ldrb r3, [r7, #15]
  794. }
  795. 8000510: 4618 mov r0, r3
  796. 8000512: 3714 adds r7, #20
  797. 8000514: 46bd mov sp, r7
  798. 8000516: bc80 pop {r7}
  799. 8000518: 4770 bx lr
  800. 800051a: bf00 nop
  801. 0800051c <ADC_SoftwareStartConvCmd>:
  802. void ADC_SoftwareStartConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  803. {
  804. 800051c: b480 push {r7}
  805. 800051e: b083 sub sp, #12
  806. 8000520: af00 add r7, sp, #0
  807. 8000522: 6078 str r0, [r7, #4]
  808. 8000524: 460b mov r3, r1
  809. 8000526: 70fb strb r3, [r7, #3]
  810. /* Check the parameters */
  811. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  812. assert_param(IS_FUNCTIONAL_STATE(NewState));
  813. if (NewState != DISABLE)
  814. 8000528: 78fb ldrb r3, [r7, #3]
  815. 800052a: 2b00 cmp r3, #0
  816. 800052c: d006 beq.n 800053c <ADC_SoftwareStartConvCmd+0x20>
  817. {
  818. /* Enable the selected ADC conversion on external event and start the selected
  819. ADC conversion */
  820. ADCx->CR2 |= CR2_EXTTRIG_SWSTART_Set;
  821. 800052e: 687b ldr r3, [r7, #4]
  822. 8000530: 689b ldr r3, [r3, #8]
  823. 8000532: f443 02a0 orr.w r2, r3, #5242880 ; 0x500000
  824. 8000536: 687b ldr r3, [r7, #4]
  825. 8000538: 609a str r2, [r3, #8]
  826. {
  827. /* Disable the selected ADC conversion on external event and stop the selected
  828. ADC conversion */
  829. ADCx->CR2 &= CR2_EXTTRIG_SWSTART_Reset;
  830. }
  831. }
  832. 800053a: e005 b.n 8000548 <ADC_SoftwareStartConvCmd+0x2c>
  833. }
  834. else
  835. {
  836. /* Disable the selected ADC conversion on external event and stop the selected
  837. ADC conversion */
  838. ADCx->CR2 &= CR2_EXTTRIG_SWSTART_Reset;
  839. 800053c: 687b ldr r3, [r7, #4]
  840. 800053e: 689b ldr r3, [r3, #8]
  841. 8000540: f423 02a0 bic.w r2, r3, #5242880 ; 0x500000
  842. 8000544: 687b ldr r3, [r7, #4]
  843. 8000546: 609a str r2, [r3, #8]
  844. }
  845. }
  846. 8000548: bf00 nop
  847. 800054a: 370c adds r7, #12
  848. 800054c: 46bd mov sp, r7
  849. 800054e: bc80 pop {r7}
  850. 8000550: 4770 bx lr
  851. 8000552: bf00 nop
  852. 08000554 <SPI_I2S_ReceiveData>:
  853. uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx)
  854. {
  855. 8000554: b480 push {r7}
  856. 8000556: b083 sub sp, #12
  857. 8000558: af00 add r7, sp, #0
  858. 800055a: 6078 str r0, [r7, #4]
  859. /* Check the parameters */
  860. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  861. /* Return the data in the DR register */
  862. return SPIx->DR;
  863. 800055c: 687b ldr r3, [r7, #4]
  864. 800055e: 899b ldrh r3, [r3, #12]
  865. 8000560: b29b uxth r3, r3
  866. }
  867. 8000562: 4618 mov r0, r3
  868. 8000564: 370c adds r7, #12
  869. 8000566: 46bd mov sp, r7
  870. 8000568: bc80 pop {r7}
  871. 800056a: 4770 bx lr
  872. 0800056c <SD_WriteByte>:
  873. uint8_t SD_WriteByte(uint8_t Data)
  874. {
  875. 800056c: b580 push {r7, lr}
  876. 800056e: b082 sub sp, #8
  877. 8000570: af00 add r7, sp, #0
  878. 8000572: 4603 mov r3, r0
  879. 8000574: 71fb strb r3, [r7, #7]
  880. /*!< Wait until the transmit buffer is empty */
  881. while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
  882. 8000576: bf00 nop
  883. 8000578: 2102 movs r1, #2
  884. 800057a: 480e ldr r0, [pc, #56] ; (80005b4 <SD_WriteByte+0x48>)
  885. 800057c: f7ff ff54 bl 8000428 <SPI_I2S_GetFlagStatus>
  886. 8000580: 4603 mov r3, r0
  887. 8000582: 2b00 cmp r3, #0
  888. 8000584: d0f8 beq.n 8000578 <SD_WriteByte+0xc>
  889. {
  890. }
  891. /*!< Send the byte */
  892. SPI_I2S_SendData(SD_SPI, Data);
  893. 8000586: 79fb ldrb r3, [r7, #7]
  894. 8000588: b29b uxth r3, r3
  895. 800058a: 4619 mov r1, r3
  896. 800058c: 4809 ldr r0, [pc, #36] ; (80005b4 <SD_WriteByte+0x48>)
  897. 800058e: f7ff ff67 bl 8000460 <SPI_I2S_SendData>
  898. /*!< Wait to receive a byte*/
  899. while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
  900. 8000592: bf00 nop
  901. 8000594: 2101 movs r1, #1
  902. 8000596: 4807 ldr r0, [pc, #28] ; (80005b4 <SD_WriteByte+0x48>)
  903. 8000598: f7ff ff46 bl 8000428 <SPI_I2S_GetFlagStatus>
  904. 800059c: 4603 mov r3, r0
  905. 800059e: 2b00 cmp r3, #0
  906. 80005a0: d0f8 beq.n 8000594 <SD_WriteByte+0x28>
  907. {
  908. }
  909. /*!< Return the byte read from the SPI bus */
  910. return SPI_I2S_ReceiveData(SD_SPI);
  911. 80005a2: 4804 ldr r0, [pc, #16] ; (80005b4 <SD_WriteByte+0x48>)
  912. 80005a4: f7ff ffd6 bl 8000554 <SPI_I2S_ReceiveData>
  913. 80005a8: 4603 mov r3, r0
  914. 80005aa: b2db uxtb r3, r3
  915. }
  916. 80005ac: 4618 mov r0, r3
  917. 80005ae: 3708 adds r7, #8
  918. 80005b0: 46bd mov sp, r7
  919. 80005b2: bd80 pop {r7, pc}
  920. 80005b4: 40013000 .word 0x40013000
  921. 080005b8 <GPIO_Init>:
  922. void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
  923. {
  924. 80005b8: b480 push {r7}
  925. 80005ba: b089 sub sp, #36 ; 0x24
  926. 80005bc: af00 add r7, sp, #0
  927. 80005be: 6078 str r0, [r7, #4]
  928. 80005c0: 6039 str r1, [r7, #0]
  929. uint32_t currentmode = 0x00, currentpin = 0x00, pinpos = 0x00, pos = 0x00;
  930. 80005c2: 2300 movs r3, #0
  931. 80005c4: 61fb str r3, [r7, #28]
  932. 80005c6: 2300 movs r3, #0
  933. 80005c8: 613b str r3, [r7, #16]
  934. 80005ca: 2300 movs r3, #0
  935. 80005cc: 61bb str r3, [r7, #24]
  936. 80005ce: 2300 movs r3, #0
  937. 80005d0: 60fb str r3, [r7, #12]
  938. uint32_t tmpreg = 0x00, pinmask = 0x00;
  939. 80005d2: 2300 movs r3, #0
  940. 80005d4: 617b str r3, [r7, #20]
  941. 80005d6: 2300 movs r3, #0
  942. 80005d8: 60bb str r3, [r7, #8]
  943. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  944. assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
  945. assert_param(IS_GPIO_PIN(GPIO_InitStruct->GPIO_Pin));
  946. /*---------------------------- GPIO Mode Configuration -----------------------*/
  947. currentmode = ((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x0F);
  948. 80005da: 683b ldr r3, [r7, #0]
  949. 80005dc: 78db ldrb r3, [r3, #3]
  950. 80005de: f003 030f and.w r3, r3, #15
  951. 80005e2: 61fb str r3, [r7, #28]
  952. if ((((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x10)) != 0x00)
  953. 80005e4: 683b ldr r3, [r7, #0]
  954. 80005e6: 78db ldrb r3, [r3, #3]
  955. 80005e8: f003 0310 and.w r3, r3, #16
  956. 80005ec: 2b00 cmp r3, #0
  957. 80005ee: d005 beq.n 80005fc <GPIO_Init+0x44>
  958. {
  959. /* Check the parameters */
  960. assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
  961. /* Output mode */
  962. currentmode |= (uint32_t)GPIO_InitStruct->GPIO_Speed;
  963. 80005f0: 683b ldr r3, [r7, #0]
  964. 80005f2: 789b ldrb r3, [r3, #2]
  965. 80005f4: 461a mov r2, r3
  966. 80005f6: 69fb ldr r3, [r7, #28]
  967. 80005f8: 4313 orrs r3, r2
  968. 80005fa: 61fb str r3, [r7, #28]
  969. }
  970. /*---------------------------- GPIO CRL Configuration ------------------------*/
  971. /* Configure the eight low port pins */
  972. if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
  973. 80005fc: 683b ldr r3, [r7, #0]
  974. 80005fe: 881b ldrh r3, [r3, #0]
  975. 8000600: b2db uxtb r3, r3
  976. 8000602: 2b00 cmp r3, #0
  977. 8000604: d044 beq.n 8000690 <GPIO_Init+0xd8>
  978. {
  979. tmpreg = GPIOx->CRL;
  980. 8000606: 687b ldr r3, [r7, #4]
  981. 8000608: 681b ldr r3, [r3, #0]
  982. 800060a: 617b str r3, [r7, #20]
  983. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  984. 800060c: 2300 movs r3, #0
  985. 800060e: 61bb str r3, [r7, #24]
  986. 8000610: e038 b.n 8000684 <GPIO_Init+0xcc>
  987. {
  988. pos = ((uint32_t)0x01) << pinpos;
  989. 8000612: 2201 movs r2, #1
  990. 8000614: 69bb ldr r3, [r7, #24]
  991. 8000616: fa02 f303 lsl.w r3, r2, r3
  992. 800061a: 60fb str r3, [r7, #12]
  993. /* Get the port pins position */
  994. currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
  995. 800061c: 683b ldr r3, [r7, #0]
  996. 800061e: 881b ldrh r3, [r3, #0]
  997. 8000620: 461a mov r2, r3
  998. 8000622: 68fb ldr r3, [r7, #12]
  999. 8000624: 4013 ands r3, r2
  1000. 8000626: 613b str r3, [r7, #16]
  1001. if (currentpin == pos)
  1002. 8000628: 693a ldr r2, [r7, #16]
  1003. 800062a: 68fb ldr r3, [r7, #12]
  1004. 800062c: 429a cmp r2, r3
  1005. 800062e: d126 bne.n 800067e <GPIO_Init+0xc6>
  1006. {
  1007. pos = pinpos << 2;
  1008. 8000630: 69bb ldr r3, [r7, #24]
  1009. 8000632: 009b lsls r3, r3, #2
  1010. 8000634: 60fb str r3, [r7, #12]
  1011. /* Clear the corresponding low control register bits */
  1012. pinmask = ((uint32_t)0x0F) << pos;
  1013. 8000636: 220f movs r2, #15
  1014. 8000638: 68fb ldr r3, [r7, #12]
  1015. 800063a: fa02 f303 lsl.w r3, r2, r3
  1016. 800063e: 60bb str r3, [r7, #8]
  1017. tmpreg &= ~pinmask;
  1018. 8000640: 68bb ldr r3, [r7, #8]
  1019. 8000642: 43db mvns r3, r3
  1020. 8000644: 697a ldr r2, [r7, #20]
  1021. 8000646: 4013 ands r3, r2
  1022. 8000648: 617b str r3, [r7, #20]
  1023. /* Write the mode configuration in the corresponding bits */
  1024. tmpreg |= (currentmode << pos);
  1025. 800064a: 69fa ldr r2, [r7, #28]
  1026. 800064c: 68fb ldr r3, [r7, #12]
  1027. 800064e: fa02 f303 lsl.w r3, r2, r3
  1028. 8000652: 697a ldr r2, [r7, #20]
  1029. 8000654: 4313 orrs r3, r2
  1030. 8000656: 617b str r3, [r7, #20]
  1031. /* Reset the corresponding ODR bit */
  1032. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
  1033. 8000658: 683b ldr r3, [r7, #0]
  1034. 800065a: 78db ldrb r3, [r3, #3]
  1035. 800065c: 2b28 cmp r3, #40 ; 0x28
  1036. 800065e: d105 bne.n 800066c <GPIO_Init+0xb4>
  1037. {
  1038. GPIOx->BRR = (((uint32_t)0x01) << pinpos);
  1039. 8000660: 2201 movs r2, #1
  1040. 8000662: 69bb ldr r3, [r7, #24]
  1041. 8000664: 409a lsls r2, r3
  1042. 8000666: 687b ldr r3, [r7, #4]
  1043. 8000668: 615a str r2, [r3, #20]
  1044. 800066a: e008 b.n 800067e <GPIO_Init+0xc6>
  1045. }
  1046. else
  1047. {
  1048. /* Set the corresponding ODR bit */
  1049. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
  1050. 800066c: 683b ldr r3, [r7, #0]
  1051. 800066e: 78db ldrb r3, [r3, #3]
  1052. 8000670: 2b48 cmp r3, #72 ; 0x48
  1053. 8000672: d104 bne.n 800067e <GPIO_Init+0xc6>
  1054. {
  1055. GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
  1056. 8000674: 2201 movs r2, #1
  1057. 8000676: 69bb ldr r3, [r7, #24]
  1058. 8000678: 409a lsls r2, r3
  1059. 800067a: 687b ldr r3, [r7, #4]
  1060. 800067c: 611a str r2, [r3, #16]
  1061. /*---------------------------- GPIO CRL Configuration ------------------------*/
  1062. /* Configure the eight low port pins */
  1063. if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
  1064. {
  1065. tmpreg = GPIOx->CRL;
  1066. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  1067. 800067e: 69bb ldr r3, [r7, #24]
  1068. 8000680: 3301 adds r3, #1
  1069. 8000682: 61bb str r3, [r7, #24]
  1070. 8000684: 69bb ldr r3, [r7, #24]
  1071. 8000686: 2b07 cmp r3, #7
  1072. 8000688: d9c3 bls.n 8000612 <GPIO_Init+0x5a>
  1073. GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
  1074. }
  1075. }
  1076. }
  1077. }
  1078. GPIOx->CRL = tmpreg;
  1079. 800068a: 687b ldr r3, [r7, #4]
  1080. 800068c: 697a ldr r2, [r7, #20]
  1081. 800068e: 601a str r2, [r3, #0]
  1082. }
  1083. /*---------------------------- GPIO CRH Configuration ------------------------*/
  1084. /* Configure the eight high port pins */
  1085. if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
  1086. 8000690: 683b ldr r3, [r7, #0]
  1087. 8000692: 881b ldrh r3, [r3, #0]
  1088. 8000694: 2bff cmp r3, #255 ; 0xff
  1089. 8000696: d946 bls.n 8000726 <GPIO_Init+0x16e>
  1090. {
  1091. tmpreg = GPIOx->CRH;
  1092. 8000698: 687b ldr r3, [r7, #4]
  1093. 800069a: 685b ldr r3, [r3, #4]
  1094. 800069c: 617b str r3, [r7, #20]
  1095. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  1096. 800069e: 2300 movs r3, #0
  1097. 80006a0: 61bb str r3, [r7, #24]
  1098. 80006a2: e03a b.n 800071a <GPIO_Init+0x162>
  1099. {
  1100. pos = (((uint32_t)0x01) << (pinpos + 0x08));
  1101. 80006a4: 69bb ldr r3, [r7, #24]
  1102. 80006a6: 3308 adds r3, #8
  1103. 80006a8: 2201 movs r2, #1
  1104. 80006aa: fa02 f303 lsl.w r3, r2, r3
  1105. 80006ae: 60fb str r3, [r7, #12]
  1106. /* Get the port pins position */
  1107. currentpin = ((GPIO_InitStruct->GPIO_Pin) & pos);
  1108. 80006b0: 683b ldr r3, [r7, #0]
  1109. 80006b2: 881b ldrh r3, [r3, #0]
  1110. 80006b4: 461a mov r2, r3
  1111. 80006b6: 68fb ldr r3, [r7, #12]
  1112. 80006b8: 4013 ands r3, r2
  1113. 80006ba: 613b str r3, [r7, #16]
  1114. if (currentpin == pos)
  1115. 80006bc: 693a ldr r2, [r7, #16]
  1116. 80006be: 68fb ldr r3, [r7, #12]
  1117. 80006c0: 429a cmp r2, r3
  1118. 80006c2: d127 bne.n 8000714 <GPIO_Init+0x15c>
  1119. {
  1120. pos = pinpos << 2;
  1121. 80006c4: 69bb ldr r3, [r7, #24]
  1122. 80006c6: 009b lsls r3, r3, #2
  1123. 80006c8: 60fb str r3, [r7, #12]
  1124. /* Clear the corresponding high control register bits */
  1125. pinmask = ((uint32_t)0x0F) << pos;
  1126. 80006ca: 220f movs r2, #15
  1127. 80006cc: 68fb ldr r3, [r7, #12]
  1128. 80006ce: fa02 f303 lsl.w r3, r2, r3
  1129. 80006d2: 60bb str r3, [r7, #8]
  1130. tmpreg &= ~pinmask;
  1131. 80006d4: 68bb ldr r3, [r7, #8]
  1132. 80006d6: 43db mvns r3, r3
  1133. 80006d8: 697a ldr r2, [r7, #20]
  1134. 80006da: 4013 ands r3, r2
  1135. 80006dc: 617b str r3, [r7, #20]
  1136. /* Write the mode configuration in the corresponding bits */
  1137. tmpreg |= (currentmode << pos);
  1138. 80006de: 69fa ldr r2, [r7, #28]
  1139. 80006e0: 68fb ldr r3, [r7, #12]
  1140. 80006e2: fa02 f303 lsl.w r3, r2, r3
  1141. 80006e6: 697a ldr r2, [r7, #20]
  1142. 80006e8: 4313 orrs r3, r2
  1143. 80006ea: 617b str r3, [r7, #20]
  1144. /* Reset the corresponding ODR bit */
  1145. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
  1146. 80006ec: 683b ldr r3, [r7, #0]
  1147. 80006ee: 78db ldrb r3, [r3, #3]
  1148. 80006f0: 2b28 cmp r3, #40 ; 0x28
  1149. 80006f2: d105 bne.n 8000700 <GPIO_Init+0x148>
  1150. {
  1151. GPIOx->BRR = (((uint32_t)0x01) << (pinpos + 0x08));
  1152. 80006f4: 69bb ldr r3, [r7, #24]
  1153. 80006f6: 3308 adds r3, #8
  1154. 80006f8: 2201 movs r2, #1
  1155. 80006fa: 409a lsls r2, r3
  1156. 80006fc: 687b ldr r3, [r7, #4]
  1157. 80006fe: 615a str r2, [r3, #20]
  1158. }
  1159. /* Set the corresponding ODR bit */
  1160. if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
  1161. 8000700: 683b ldr r3, [r7, #0]
  1162. 8000702: 78db ldrb r3, [r3, #3]
  1163. 8000704: 2b48 cmp r3, #72 ; 0x48
  1164. 8000706: d105 bne.n 8000714 <GPIO_Init+0x15c>
  1165. {
  1166. GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
  1167. 8000708: 69bb ldr r3, [r7, #24]
  1168. 800070a: 3308 adds r3, #8
  1169. 800070c: 2201 movs r2, #1
  1170. 800070e: 409a lsls r2, r3
  1171. 8000710: 687b ldr r3, [r7, #4]
  1172. 8000712: 611a str r2, [r3, #16]
  1173. /*---------------------------- GPIO CRH Configuration ------------------------*/
  1174. /* Configure the eight high port pins */
  1175. if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
  1176. {
  1177. tmpreg = GPIOx->CRH;
  1178. for (pinpos = 0x00; pinpos < 0x08; pinpos++)
  1179. 8000714: 69bb ldr r3, [r7, #24]
  1180. 8000716: 3301 adds r3, #1
  1181. 8000718: 61bb str r3, [r7, #24]
  1182. 800071a: 69bb ldr r3, [r7, #24]
  1183. 800071c: 2b07 cmp r3, #7
  1184. 800071e: d9c1 bls.n 80006a4 <GPIO_Init+0xec>
  1185. {
  1186. GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
  1187. }
  1188. }
  1189. }
  1190. GPIOx->CRH = tmpreg;
  1191. 8000720: 687b ldr r3, [r7, #4]
  1192. 8000722: 697a ldr r2, [r7, #20]
  1193. 8000724: 605a str r2, [r3, #4]
  1194. }
  1195. }
  1196. 8000726: bf00 nop
  1197. 8000728: 3724 adds r7, #36 ; 0x24
  1198. 800072a: 46bd mov sp, r7
  1199. 800072c: bc80 pop {r7}
  1200. 800072e: 4770 bx lr
  1201. 08000730 <SPI_Init>:
  1202. void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct)
  1203. {
  1204. 8000730: b480 push {r7}
  1205. 8000732: b085 sub sp, #20
  1206. 8000734: af00 add r7, sp, #0
  1207. 8000736: 6078 str r0, [r7, #4]
  1208. 8000738: 6039 str r1, [r7, #0]
  1209. uint16_t tmpreg = 0;
  1210. 800073a: 2300 movs r3, #0
  1211. 800073c: 81fb strh r3, [r7, #14]
  1212. assert_param(IS_SPI_FIRST_BIT(SPI_InitStruct->SPI_FirstBit));
  1213. assert_param(IS_SPI_CRC_POLYNOMIAL(SPI_InitStruct->SPI_CRCPolynomial));
  1214. /*---------------------------- SPIx CR1 Configuration ------------------------*/
  1215. /* Get the SPIx CR1 value */
  1216. tmpreg = SPIx->CR1;
  1217. 800073e: 687b ldr r3, [r7, #4]
  1218. 8000740: 881b ldrh r3, [r3, #0]
  1219. 8000742: 81fb strh r3, [r7, #14]
  1220. /* Clear BIDIMode, BIDIOE, RxONLY, SSM, SSI, LSBFirst, BR, MSTR, CPOL and CPHA bits */
  1221. tmpreg &= CR1_CLEAR_Mask;
  1222. 8000744: 89fb ldrh r3, [r7, #14]
  1223. 8000746: f403 5341 and.w r3, r3, #12352 ; 0x3040
  1224. 800074a: 81fb strh r3, [r7, #14]
  1225. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1226. /* Set LSBFirst bit according to SPI_FirstBit value */
  1227. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1228. /* Set CPOL bit according to SPI_CPOL value */
  1229. /* Set CPHA bit according to SPI_CPHA value */
  1230. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1231. 800074c: 683b ldr r3, [r7, #0]
  1232. 800074e: 881a ldrh r2, [r3, #0]
  1233. 8000750: 683b ldr r3, [r7, #0]
  1234. 8000752: 885b ldrh r3, [r3, #2]
  1235. 8000754: 4313 orrs r3, r2
  1236. 8000756: b29a uxth r2, r3
  1237. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1238. 8000758: 683b ldr r3, [r7, #0]
  1239. 800075a: 889b ldrh r3, [r3, #4]
  1240. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1241. /* Set LSBFirst bit according to SPI_FirstBit value */
  1242. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1243. /* Set CPOL bit according to SPI_CPOL value */
  1244. /* Set CPHA bit according to SPI_CPHA value */
  1245. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1246. 800075c: 4313 orrs r3, r2
  1247. 800075e: b29a uxth r2, r3
  1248. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1249. 8000760: 683b ldr r3, [r7, #0]
  1250. 8000762: 88db ldrh r3, [r3, #6]
  1251. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1252. /* Set LSBFirst bit according to SPI_FirstBit value */
  1253. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1254. /* Set CPOL bit according to SPI_CPOL value */
  1255. /* Set CPHA bit according to SPI_CPHA value */
  1256. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1257. 8000764: 4313 orrs r3, r2
  1258. 8000766: b29a uxth r2, r3
  1259. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1260. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1261. 8000768: 683b ldr r3, [r7, #0]
  1262. 800076a: 891b ldrh r3, [r3, #8]
  1263. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1264. /* Set LSBFirst bit according to SPI_FirstBit value */
  1265. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1266. /* Set CPOL bit according to SPI_CPOL value */
  1267. /* Set CPHA bit according to SPI_CPHA value */
  1268. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1269. 800076c: 4313 orrs r3, r2
  1270. 800076e: b29a uxth r2, r3
  1271. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1272. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1273. 8000770: 683b ldr r3, [r7, #0]
  1274. 8000772: 895b ldrh r3, [r3, #10]
  1275. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1276. /* Set LSBFirst bit according to SPI_FirstBit value */
  1277. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1278. /* Set CPOL bit according to SPI_CPOL value */
  1279. /* Set CPHA bit according to SPI_CPHA value */
  1280. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1281. 8000774: 4313 orrs r3, r2
  1282. 8000776: b29a uxth r2, r3
  1283. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1284. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1285. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1286. 8000778: 683b ldr r3, [r7, #0]
  1287. 800077a: 899b ldrh r3, [r3, #12]
  1288. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1289. /* Set LSBFirst bit according to SPI_FirstBit value */
  1290. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1291. /* Set CPOL bit according to SPI_CPOL value */
  1292. /* Set CPHA bit according to SPI_CPHA value */
  1293. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1294. 800077c: 4313 orrs r3, r2
  1295. 800077e: b29a uxth r2, r3
  1296. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1297. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1298. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1299. 8000780: 683b ldr r3, [r7, #0]
  1300. 8000782: 89db ldrh r3, [r3, #14]
  1301. /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
  1302. /* Set LSBFirst bit according to SPI_FirstBit value */
  1303. /* Set BR bits according to SPI_BaudRatePrescaler value */
  1304. /* Set CPOL bit according to SPI_CPOL value */
  1305. /* Set CPHA bit according to SPI_CPHA value */
  1306. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
  1307. 8000784: 4313 orrs r3, r2
  1308. 8000786: b29a uxth r2, r3
  1309. 8000788: 89fb ldrh r3, [r7, #14]
  1310. 800078a: 4313 orrs r3, r2
  1311. 800078c: 81fb strh r3, [r7, #14]
  1312. SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
  1313. SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
  1314. SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
  1315. /* Write to SPIx CR1 */
  1316. SPIx->CR1 = tmpreg;
  1317. 800078e: 687b ldr r3, [r7, #4]
  1318. 8000790: 89fa ldrh r2, [r7, #14]
  1319. 8000792: 801a strh r2, [r3, #0]
  1320. /* Activate the SPI mode (Reset I2SMOD bit in I2SCFGR register) */
  1321. SPIx->I2SCFGR &= SPI_Mode_Select;
  1322. 8000794: 687b ldr r3, [r7, #4]
  1323. 8000796: 8b9b ldrh r3, [r3, #28]
  1324. 8000798: b29b uxth r3, r3
  1325. 800079a: f423 6300 bic.w r3, r3, #2048 ; 0x800
  1326. 800079e: b29a uxth r2, r3
  1327. 80007a0: 687b ldr r3, [r7, #4]
  1328. 80007a2: 839a strh r2, [r3, #28]
  1329. /*---------------------------- SPIx CRCPOLY Configuration --------------------*/
  1330. /* Write to SPIx CRCPOLY */
  1331. SPIx->CRCPR = SPI_InitStruct->SPI_CRCPolynomial;
  1332. 80007a4: 683b ldr r3, [r7, #0]
  1333. 80007a6: 8a1a ldrh r2, [r3, #16]
  1334. 80007a8: 687b ldr r3, [r7, #4]
  1335. 80007aa: 821a strh r2, [r3, #16]
  1336. }
  1337. 80007ac: bf00 nop
  1338. 80007ae: 3714 adds r7, #20
  1339. 80007b0: 46bd mov sp, r7
  1340. 80007b2: bc80 pop {r7}
  1341. 80007b4: 4770 bx lr
  1342. 80007b6: bf00 nop
  1343. 080007b8 <SPI_Cmd>:
  1344. void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  1345. {
  1346. 80007b8: b480 push {r7}
  1347. 80007ba: b083 sub sp, #12
  1348. 80007bc: af00 add r7, sp, #0
  1349. 80007be: 6078 str r0, [r7, #4]
  1350. 80007c0: 460b mov r3, r1
  1351. 80007c2: 70fb strb r3, [r7, #3]
  1352. /* Check the parameters */
  1353. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  1354. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1355. if (NewState != DISABLE)
  1356. 80007c4: 78fb ldrb r3, [r7, #3]
  1357. 80007c6: 2b00 cmp r3, #0
  1358. 80007c8: d008 beq.n 80007dc <SPI_Cmd+0x24>
  1359. {
  1360. /* Enable the selected SPI peripheral */
  1361. SPIx->CR1 |= CR1_SPE_Set;
  1362. 80007ca: 687b ldr r3, [r7, #4]
  1363. 80007cc: 881b ldrh r3, [r3, #0]
  1364. 80007ce: b29b uxth r3, r3
  1365. 80007d0: f043 0340 orr.w r3, r3, #64 ; 0x40
  1366. 80007d4: b29a uxth r2, r3
  1367. 80007d6: 687b ldr r3, [r7, #4]
  1368. 80007d8: 801a strh r2, [r3, #0]
  1369. else
  1370. {
  1371. /* Disable the selected SPI peripheral */
  1372. SPIx->CR1 &= CR1_SPE_Reset;
  1373. }
  1374. }
  1375. 80007da: e007 b.n 80007ec <SPI_Cmd+0x34>
  1376. SPIx->CR1 |= CR1_SPE_Set;
  1377. }
  1378. else
  1379. {
  1380. /* Disable the selected SPI peripheral */
  1381. SPIx->CR1 &= CR1_SPE_Reset;
  1382. 80007dc: 687b ldr r3, [r7, #4]
  1383. 80007de: 881b ldrh r3, [r3, #0]
  1384. 80007e0: b29b uxth r3, r3
  1385. 80007e2: f023 0340 bic.w r3, r3, #64 ; 0x40
  1386. 80007e6: b29a uxth r2, r3
  1387. 80007e8: 687b ldr r3, [r7, #4]
  1388. 80007ea: 801a strh r2, [r3, #0]
  1389. }
  1390. }
  1391. 80007ec: bf00 nop
  1392. 80007ee: 370c adds r7, #12
  1393. 80007f0: 46bd mov sp, r7
  1394. 80007f2: bc80 pop {r7}
  1395. 80007f4: 4770 bx lr
  1396. 80007f6: bf00 nop
  1397. 080007f8 <GPIO_SetBits>:
  1398. void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  1399. {
  1400. 80007f8: b480 push {r7}
  1401. 80007fa: b083 sub sp, #12
  1402. 80007fc: af00 add r7, sp, #0
  1403. 80007fe: 6078 str r0, [r7, #4]
  1404. 8000800: 460b mov r3, r1
  1405. 8000802: 807b strh r3, [r7, #2]
  1406. /* Check the parameters */
  1407. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  1408. assert_param(IS_GPIO_PIN(GPIO_Pin));
  1409. GPIOx->BSRR = GPIO_Pin;
  1410. 8000804: 887a ldrh r2, [r7, #2]
  1411. 8000806: 687b ldr r3, [r7, #4]
  1412. 8000808: 611a str r2, [r3, #16]
  1413. }
  1414. 800080a: bf00 nop
  1415. 800080c: 370c adds r7, #12
  1416. 800080e: 46bd mov sp, r7
  1417. 8000810: bc80 pop {r7}
  1418. 8000812: 4770 bx lr
  1419. 08000814 <RCC_APB2PeriphClockCmd>:
  1420. void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
  1421. {
  1422. 8000814: b480 push {r7}
  1423. 8000816: b083 sub sp, #12
  1424. 8000818: af00 add r7, sp, #0
  1425. 800081a: 6078 str r0, [r7, #4]
  1426. 800081c: 460b mov r3, r1
  1427. 800081e: 70fb strb r3, [r7, #3]
  1428. /* Check the parameters */
  1429. assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  1430. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1431. if (NewState != DISABLE)
  1432. 8000820: 78fb ldrb r3, [r7, #3]
  1433. 8000822: 2b00 cmp r3, #0
  1434. 8000824: d006 beq.n 8000834 <RCC_APB2PeriphClockCmd+0x20>
  1435. {
  1436. RCC->APB2ENR |= RCC_APB2Periph;
  1437. 8000826: 4909 ldr r1, [pc, #36] ; (800084c <RCC_APB2PeriphClockCmd+0x38>)
  1438. 8000828: 4b08 ldr r3, [pc, #32] ; (800084c <RCC_APB2PeriphClockCmd+0x38>)
  1439. 800082a: 699a ldr r2, [r3, #24]
  1440. 800082c: 687b ldr r3, [r7, #4]
  1441. 800082e: 4313 orrs r3, r2
  1442. 8000830: 618b str r3, [r1, #24]
  1443. }
  1444. else
  1445. {
  1446. RCC->APB2ENR &= ~RCC_APB2Periph;
  1447. }
  1448. }
  1449. 8000832: e006 b.n 8000842 <RCC_APB2PeriphClockCmd+0x2e>
  1450. {
  1451. RCC->APB2ENR |= RCC_APB2Periph;
  1452. }
  1453. else
  1454. {
  1455. RCC->APB2ENR &= ~RCC_APB2Periph;
  1456. 8000834: 4905 ldr r1, [pc, #20] ; (800084c <RCC_APB2PeriphClockCmd+0x38>)
  1457. 8000836: 4b05 ldr r3, [pc, #20] ; (800084c <RCC_APB2PeriphClockCmd+0x38>)
  1458. 8000838: 699a ldr r2, [r3, #24]
  1459. 800083a: 687b ldr r3, [r7, #4]
  1460. 800083c: 43db mvns r3, r3
  1461. 800083e: 4013 ands r3, r2
  1462. 8000840: 618b str r3, [r1, #24]
  1463. }
  1464. }
  1465. 8000842: bf00 nop
  1466. 8000844: 370c adds r7, #12
  1467. 8000846: 46bd mov sp, r7
  1468. 8000848: bc80 pop {r7}
  1469. 800084a: 4770 bx lr
  1470. 800084c: 40021000 .word 0x40021000
  1471. 08000850 <GPIO_ResetBits>:
  1472. void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  1473. {
  1474. 8000850: b480 push {r7}
  1475. 8000852: b083 sub sp, #12
  1476. 8000854: af00 add r7, sp, #0
  1477. 8000856: 6078 str r0, [r7, #4]
  1478. 8000858: 460b mov r3, r1
  1479. 800085a: 807b strh r3, [r7, #2]
  1480. /* Check the parameters */
  1481. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  1482. assert_param(IS_GPIO_PIN(GPIO_Pin));
  1483. GPIOx->BRR = GPIO_Pin;
  1484. 800085c: 887a ldrh r2, [r7, #2]
  1485. 800085e: 687b ldr r3, [r7, #4]
  1486. 8000860: 615a str r2, [r3, #20]
  1487. }
  1488. 8000862: bf00 nop
  1489. 8000864: 370c adds r7, #12
  1490. 8000866: 46bd mov sp, r7
  1491. 8000868: bc80 pop {r7}
  1492. 800086a: 4770 bx lr
  1493. 0800086c <ADC_Init>:
  1494. void ADC_Init(ADC_TypeDef* ADCx, ADC_InitTypeDef* ADC_InitStruct)
  1495. {
  1496. 800086c: b480 push {r7}
  1497. 800086e: b085 sub sp, #20
  1498. 8000870: af00 add r7, sp, #0
  1499. 8000872: 6078 str r0, [r7, #4]
  1500. 8000874: 6039 str r1, [r7, #0]
  1501. uint32_t tmpreg1 = 0;
  1502. 8000876: 2300 movs r3, #0
  1503. 8000878: 60fb str r3, [r7, #12]
  1504. uint8_t tmpreg2 = 0;
  1505. 800087a: 2300 movs r3, #0
  1506. 800087c: 72fb strb r3, [r7, #11]
  1507. assert_param(IS_ADC_DATA_ALIGN(ADC_InitStruct->ADC_DataAlign));
  1508. assert_param(IS_ADC_REGULAR_LENGTH(ADC_InitStruct->ADC_NbrOfChannel));
  1509. /*---------------------------- ADCx CR1 Configuration -----------------*/
  1510. /* Get the ADCx CR1 value */
  1511. tmpreg1 = ADCx->CR1;
  1512. 800087e: 687b ldr r3, [r7, #4]
  1513. 8000880: 685b ldr r3, [r3, #4]
  1514. 8000882: 60fb str r3, [r7, #12]
  1515. /* Clear DUALMOD and SCAN bits */
  1516. tmpreg1 &= CR1_CLEAR_Mask;
  1517. 8000884: 68fb ldr r3, [r7, #12]
  1518. 8000886: f403 5341 and.w r3, r3, #12352 ; 0x3040
  1519. 800088a: 60fb str r3, [r7, #12]
  1520. /* Configure ADCx: Dual mode and scan conversion mode */
  1521. /* Set DUALMOD bits according to ADC_Mode value */
  1522. /* Set SCAN bit according to ADC_ScanConvMode value */
  1523. tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_Mode | ((uint32_t)ADC_InitStruct->ADC_ScanConvMode << 8));
  1524. 800088c: 683b ldr r3, [r7, #0]
  1525. 800088e: 681a ldr r2, [r3, #0]
  1526. 8000890: 683b ldr r3, [r7, #0]
  1527. 8000892: 791b ldrb r3, [r3, #4]
  1528. 8000894: 021b lsls r3, r3, #8
  1529. 8000896: 4313 orrs r3, r2
  1530. 8000898: 68fa ldr r2, [r7, #12]
  1531. 800089a: 4313 orrs r3, r2
  1532. 800089c: 60fb str r3, [r7, #12]
  1533. /* Write to ADCx CR1 */
  1534. ADCx->CR1 = tmpreg1;
  1535. 800089e: 687b ldr r3, [r7, #4]
  1536. 80008a0: 68fa ldr r2, [r7, #12]
  1537. 80008a2: 605a str r2, [r3, #4]
  1538. /*---------------------------- ADCx CR2 Configuration -----------------*/
  1539. /* Get the ADCx CR2 value */
  1540. tmpreg1 = ADCx->CR2;
  1541. 80008a4: 687b ldr r3, [r7, #4]
  1542. 80008a6: 689b ldr r3, [r3, #8]
  1543. 80008a8: 60fb str r3, [r7, #12]
  1544. /* Clear CONT, ALIGN and EXTSEL bits */
  1545. tmpreg1 &= CR2_CLEAR_Mask;
  1546. 80008aa: 68fa ldr r2, [r7, #12]
  1547. 80008ac: 4b16 ldr r3, [pc, #88] ; (8000908 <ADC_Init+0x9c>)
  1548. 80008ae: 4013 ands r3, r2
  1549. 80008b0: 60fb str r3, [r7, #12]
  1550. /* Configure ADCx: external trigger event and continuous conversion mode */
  1551. /* Set ALIGN bit according to ADC_DataAlign value */
  1552. /* Set EXTSEL bits according to ADC_ExternalTrigConv value */
  1553. /* Set CONT bit according to ADC_ContinuousConvMode value */
  1554. tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ExternalTrigConv |
  1555. 80008b2: 683b ldr r3, [r7, #0]
  1556. 80008b4: 68da ldr r2, [r3, #12]
  1557. 80008b6: 683b ldr r3, [r7, #0]
  1558. 80008b8: 689b ldr r3, [r3, #8]
  1559. 80008ba: 431a orrs r2, r3
  1560. ((uint32_t)ADC_InitStruct->ADC_ContinuousConvMode << 1));
  1561. 80008bc: 683b ldr r3, [r7, #0]
  1562. 80008be: 795b ldrb r3, [r3, #5]
  1563. 80008c0: 005b lsls r3, r3, #1
  1564. tmpreg1 &= CR2_CLEAR_Mask;
  1565. /* Configure ADCx: external trigger event and continuous conversion mode */
  1566. /* Set ALIGN bit according to ADC_DataAlign value */
  1567. /* Set EXTSEL bits according to ADC_ExternalTrigConv value */
  1568. /* Set CONT bit according to ADC_ContinuousConvMode value */
  1569. tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ExternalTrigConv |
  1570. 80008c2: 4313 orrs r3, r2
  1571. 80008c4: 68fa ldr r2, [r7, #12]
  1572. 80008c6: 4313 orrs r3, r2
  1573. 80008c8: 60fb str r3, [r7, #12]
  1574. ((uint32_t)ADC_InitStruct->ADC_ContinuousConvMode << 1));
  1575. /* Write to ADCx CR2 */
  1576. ADCx->CR2 = tmpreg1;
  1577. 80008ca: 687b ldr r3, [r7, #4]
  1578. 80008cc: 68fa ldr r2, [r7, #12]
  1579. 80008ce: 609a str r2, [r3, #8]
  1580. /*---------------------------- ADCx SQR1 Configuration -----------------*/
  1581. /* Get the ADCx SQR1 value */
  1582. tmpreg1 = ADCx->SQR1;
  1583. 80008d0: 687b ldr r3, [r7, #4]
  1584. 80008d2: 6adb ldr r3, [r3, #44] ; 0x2c
  1585. 80008d4: 60fb str r3, [r7, #12]
  1586. /* Clear L bits */
  1587. tmpreg1 &= SQR1_CLEAR_Mask;
  1588. 80008d6: 68fb ldr r3, [r7, #12]
  1589. 80008d8: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000
  1590. 80008dc: 60fb str r3, [r7, #12]
  1591. /* Configure ADCx: regular channel sequence length */
  1592. /* Set L bits according to ADC_NbrOfChannel value */
  1593. tmpreg2 |= (uint8_t) (ADC_InitStruct->ADC_NbrOfChannel - (uint8_t)1);
  1594. 80008de: 683b ldr r3, [r7, #0]
  1595. 80008e0: 7c1b ldrb r3, [r3, #16]
  1596. 80008e2: 3b01 subs r3, #1
  1597. 80008e4: b2da uxtb r2, r3
  1598. 80008e6: 7afb ldrb r3, [r7, #11]
  1599. 80008e8: 4313 orrs r3, r2
  1600. 80008ea: 72fb strb r3, [r7, #11]
  1601. tmpreg1 |= (uint32_t)tmpreg2 << 20;
  1602. 80008ec: 7afb ldrb r3, [r7, #11]
  1603. 80008ee: 051b lsls r3, r3, #20
  1604. 80008f0: 68fa ldr r2, [r7, #12]
  1605. 80008f2: 4313 orrs r3, r2
  1606. 80008f4: 60fb str r3, [r7, #12]
  1607. /* Write to ADCx SQR1 */
  1608. ADCx->SQR1 = tmpreg1;
  1609. 80008f6: 687b ldr r3, [r7, #4]
  1610. 80008f8: 68fa ldr r2, [r7, #12]
  1611. 80008fa: 62da str r2, [r3, #44] ; 0x2c
  1612. }
  1613. 80008fc: bf00 nop
  1614. 80008fe: 3714 adds r7, #20
  1615. 8000900: 46bd mov sp, r7
  1616. 8000902: bc80 pop {r7}
  1617. 8000904: 4770 bx lr
  1618. 8000906: bf00 nop
  1619. 8000908: fff1f7fd .word 0xfff1f7fd
  1620. 0800090c <SD_LowLevel_Init>:
  1621. void SD_LowLevel_Init(void)
  1622. {
  1623. 800090c: b580 push {r7, lr}
  1624. 800090e: b086 sub sp, #24
  1625. 8000910: af00 add r7, sp, #0
  1626. GPIO_InitTypeDef GPIO_InitStructure;
  1627. SPI_InitTypeDef SPI_InitStructure;
  1628. /*!< SD_SPI_CS_GPIO, SD_SPI_MOSI_GPIO, SD_SPI_MISO_GPIO, SD_SPI_DETECT_GPIO
  1629. and SD_SPI_SCK_GPIO Periph clock enable */
  1630. RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
  1631. 8000912: 2101 movs r1, #1
  1632. 8000914: 2004 movs r0, #4
  1633. 8000916: f7ff ff7d bl 8000814 <RCC_APB2PeriphClockCmd>
  1634. /*!< SD_SPI Periph clock enable */
  1635. RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE);
  1636. 800091a: 2101 movs r1, #1
  1637. 800091c: f44f 5080 mov.w r0, #4096 ; 0x1000
  1638. 8000920: f7ff ff78 bl 8000814 <RCC_APB2PeriphClockCmd>
  1639. /*!< Configure SD_SPI pins: SCK */
  1640. GPIO_InitStructure.GPIO_Pin = SD_SPI_SCK_PIN | SD_SPI_MOSI_PIN | SD_SPI_MISO_PIN;
  1641. 8000924: 23e0 movs r3, #224 ; 0xe0
  1642. 8000926: 82bb strh r3, [r7, #20]
  1643. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  1644. 8000928: 2303 movs r3, #3
  1645. 800092a: 75bb strb r3, [r7, #22]
  1646. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  1647. 800092c: 2318 movs r3, #24
  1648. 800092e: 75fb strb r3, [r7, #23]
  1649. GPIO_Init(SD_SPI_SCK_GPIO_PORT, &GPIO_InitStructure);
  1650. 8000930: f107 0314 add.w r3, r7, #20
  1651. 8000934: 4619 mov r1, r3
  1652. 8000936: 4817 ldr r0, [pc, #92] ; (8000994 <SD_LowLevel_Init+0x88>)
  1653. 8000938: f7ff fe3e bl 80005b8 <GPIO_Init>
  1654. /*!< Configure SD_SPI_CS_PIN pin: SD Card CS pin */
  1655. GPIO_InitStructure.GPIO_Pin = SD_CS_PIN;
  1656. 800093c: 2310 movs r3, #16
  1657. 800093e: 82bb strh r3, [r7, #20]
  1658. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  1659. 8000940: 2310 movs r3, #16
  1660. 8000942: 75fb strb r3, [r7, #23]
  1661. GPIO_Init(SD_CS_GPIO_PORT, &GPIO_InitStructure);
  1662. 8000944: f107 0314 add.w r3, r7, #20
  1663. 8000948: 4619 mov r1, r3
  1664. 800094a: 4812 ldr r0, [pc, #72] ; (8000994 <SD_LowLevel_Init+0x88>)
  1665. 800094c: f7ff fe34 bl 80005b8 <GPIO_Init>
  1666. /*!< SD_SPI Config */
  1667. SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
  1668. 8000950: 2300 movs r3, #0
  1669. 8000952: 803b strh r3, [r7, #0]
  1670. SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
  1671. 8000954: f44f 7382 mov.w r3, #260 ; 0x104
  1672. 8000958: 807b strh r3, [r7, #2]
  1673. SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
  1674. 800095a: 2300 movs r3, #0
  1675. 800095c: 80bb strh r3, [r7, #4]
  1676. SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
  1677. 800095e: 2302 movs r3, #2
  1678. 8000960: 80fb strh r3, [r7, #6]
  1679. SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge;
  1680. 8000962: 2301 movs r3, #1
  1681. 8000964: 813b strh r3, [r7, #8]
  1682. SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
  1683. 8000966: f44f 7300 mov.w r3, #512 ; 0x200
  1684. 800096a: 817b strh r3, [r7, #10]
  1685. SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
  1686. 800096c: 2308 movs r3, #8
  1687. 800096e: 81bb strh r3, [r7, #12]
  1688. SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
  1689. 8000970: 2300 movs r3, #0
  1690. 8000972: 81fb strh r3, [r7, #14]
  1691. SPI_InitStructure.SPI_CRCPolynomial = 7;
  1692. 8000974: 2307 movs r3, #7
  1693. 8000976: 823b strh r3, [r7, #16]
  1694. SPI_Init(SD_SPI, &SPI_InitStructure);
  1695. 8000978: 463b mov r3, r7
  1696. 800097a: 4619 mov r1, r3
  1697. 800097c: 4806 ldr r0, [pc, #24] ; (8000998 <SD_LowLevel_Init+0x8c>)
  1698. 800097e: f7ff fed7 bl 8000730 <SPI_Init>
  1699. SPI_Cmd(SD_SPI, ENABLE); /*!< SD_SPI enable */
  1700. 8000982: 2101 movs r1, #1
  1701. 8000984: 4804 ldr r0, [pc, #16] ; (8000998 <SD_LowLevel_Init+0x8c>)
  1702. 8000986: f7ff ff17 bl 80007b8 <SPI_Cmd>
  1703. }
  1704. 800098a: bf00 nop
  1705. 800098c: 3718 adds r7, #24
  1706. 800098e: 46bd mov sp, r7
  1707. 8000990: bd80 pop {r7, pc}
  1708. 8000992: bf00 nop
  1709. 8000994: 40010800 .word 0x40010800
  1710. 8000998: 40013000 .word 0x40013000
  1711. 0800099c <SD_GoIdleState>:
  1712. SD_Error SD_GoIdleState(void)
  1713. {
  1714. 800099c: b580 push {r7, lr}
  1715. 800099e: af00 add r7, sp, #0
  1716. /*!< SD chip select low */
  1717. SD_CS_LOW();
  1718. 80009a0: 2110 movs r1, #16
  1719. 80009a2: 4818 ldr r0, [pc, #96] ; (8000a04 <SD_GoIdleState+0x68>)
  1720. 80009a4: f7ff ff54 bl 8000850 <GPIO_ResetBits>
  1721. /*!< Send CMD0 (SD_CMD_GO_IDLE_STATE) to put SD in SPI mode */
  1722. SD_SendCmd(SD_CMD_GO_IDLE_STATE, 0, 0x95);
  1723. 80009a8: 2295 movs r2, #149 ; 0x95
  1724. 80009aa: 2100 movs r1, #0
  1725. 80009ac: 2000 movs r0, #0
  1726. 80009ae: f000 f82b bl 8000a08 <SD_SendCmd>
  1727. /*!< Wait for In Idle State Response (R1 Format) equal to 0x01 */
  1728. if (SD_GetResponse(SD_IN_IDLE_STATE))
  1729. 80009b2: 2001 movs r0, #1
  1730. 80009b4: f000 f85e bl 8000a74 <SD_GetResponse>
  1731. 80009b8: 4603 mov r3, r0
  1732. 80009ba: 2b00 cmp r3, #0
  1733. 80009bc: d001 beq.n 80009c2 <SD_GoIdleState+0x26>
  1734. {
  1735. /*!< No Idle State Response: return response failue */
  1736. return SD_RESPONSE_FAILURE;
  1737. 80009be: 23ff movs r3, #255 ; 0xff
  1738. 80009c0: e01d b.n 80009fe <SD_GoIdleState+0x62>
  1739. }
  1740. /*----------Activates the card initialization process-----------*/
  1741. do
  1742. {
  1743. /*!< SD chip select high */
  1744. SD_CS_HIGH();
  1745. 80009c2: 2110 movs r1, #16
  1746. 80009c4: 480f ldr r0, [pc, #60] ; (8000a04 <SD_GoIdleState+0x68>)
  1747. 80009c6: f7ff ff17 bl 80007f8 <GPIO_SetBits>
  1748. /*!< Send Dummy byte 0xFF */
  1749. SD_WriteByte(SD_DUMMY_BYTE);
  1750. 80009ca: 20ff movs r0, #255 ; 0xff
  1751. 80009cc: f7ff fdce bl 800056c <SD_WriteByte>
  1752. /*!< SD chip select low */
  1753. SD_CS_LOW();
  1754. 80009d0: 2110 movs r1, #16
  1755. 80009d2: 480c ldr r0, [pc, #48] ; (8000a04 <SD_GoIdleState+0x68>)
  1756. 80009d4: f7ff ff3c bl 8000850 <GPIO_ResetBits>
  1757. /*!< Send CMD1 (Activates the card process) until response equal to 0x0 */
  1758. SD_SendCmd(SD_CMD_SEND_OP_COND, 0, 0xFF);
  1759. 80009d8: 22ff movs r2, #255 ; 0xff
  1760. 80009da: 2100 movs r1, #0
  1761. 80009dc: 2001 movs r0, #1
  1762. 80009de: f000 f813 bl 8000a08 <SD_SendCmd>
  1763. /*!< Wait for no error Response (R1 Format) equal to 0x00 */
  1764. }
  1765. while (SD_GetResponse(SD_RESPONSE_NO_ERROR));
  1766. 80009e2: 2000 movs r0, #0
  1767. 80009e4: f000 f846 bl 8000a74 <SD_GetResponse>
  1768. 80009e8: 4603 mov r3, r0
  1769. 80009ea: 2b00 cmp r3, #0
  1770. 80009ec: d1e9 bne.n 80009c2 <SD_GoIdleState+0x26>
  1771. /*!< SD chip select high */
  1772. SD_CS_HIGH();
  1773. 80009ee: 2110 movs r1, #16
  1774. 80009f0: 4804 ldr r0, [pc, #16] ; (8000a04 <SD_GoIdleState+0x68>)
  1775. 80009f2: f7ff ff01 bl 80007f8 <GPIO_SetBits>
  1776. /*!< Send dummy byte 0xFF */
  1777. SD_WriteByte(SD_DUMMY_BYTE);
  1778. 80009f6: 20ff movs r0, #255 ; 0xff
  1779. 80009f8: f7ff fdb8 bl 800056c <SD_WriteByte>
  1780. return SD_RESPONSE_NO_ERROR;
  1781. 80009fc: 2300 movs r3, #0
  1782. }
  1783. 80009fe: 4618 mov r0, r3
  1784. 8000a00: bd80 pop {r7, pc}
  1785. 8000a02: bf00 nop
  1786. 8000a04: 40010800 .word 0x40010800
  1787. 08000a08 <SD_SendCmd>:
  1788. void SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc)
  1789. {
  1790. 8000a08: b580 push {r7, lr}
  1791. 8000a0a: b086 sub sp, #24
  1792. 8000a0c: af00 add r7, sp, #0
  1793. 8000a0e: 4603 mov r3, r0
  1794. 8000a10: 6039 str r1, [r7, #0]
  1795. 8000a12: 71fb strb r3, [r7, #7]
  1796. 8000a14: 4613 mov r3, r2
  1797. 8000a16: 71bb strb r3, [r7, #6]
  1798. uint32_t i = 0x00;
  1799. 8000a18: 2300 movs r3, #0
  1800. 8000a1a: 617b str r3, [r7, #20]
  1801. uint8_t Frame[6];
  1802. Frame[0] = (Cmd | 0x40); /*!< Construct byte 1 */
  1803. 8000a1c: 79fb ldrb r3, [r7, #7]
  1804. 8000a1e: f043 0340 orr.w r3, r3, #64 ; 0x40
  1805. 8000a22: b2db uxtb r3, r3
  1806. 8000a24: 733b strb r3, [r7, #12]
  1807. Frame[1] = (uint8_t)(Arg >> 24); /*!< Construct byte 2 */
  1808. 8000a26: 683b ldr r3, [r7, #0]
  1809. 8000a28: 0e1b lsrs r3, r3, #24
  1810. 8000a2a: b2db uxtb r3, r3
  1811. 8000a2c: 737b strb r3, [r7, #13]
  1812. Frame[2] = (uint8_t)(Arg >> 16); /*!< Construct byte 3 */
  1813. 8000a2e: 683b ldr r3, [r7, #0]
  1814. 8000a30: 0c1b lsrs r3, r3, #16
  1815. 8000a32: b2db uxtb r3, r3
  1816. 8000a34: 73bb strb r3, [r7, #14]
  1817. Frame[3] = (uint8_t)(Arg >> 8); /*!< Construct byte 4 */
  1818. 8000a36: 683b ldr r3, [r7, #0]
  1819. 8000a38: 0a1b lsrs r3, r3, #8
  1820. 8000a3a: b2db uxtb r3, r3
  1821. 8000a3c: 73fb strb r3, [r7, #15]
  1822. Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
  1823. 8000a3e: 683b ldr r3, [r7, #0]
  1824. 8000a40: b2db uxtb r3, r3
  1825. 8000a42: 743b strb r3, [r7, #16]
  1826. Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
  1827. 8000a44: 79bb ldrb r3, [r7, #6]
  1828. 8000a46: 747b strb r3, [r7, #17]
  1829. for (i = 0; i < 6; i++)
  1830. 8000a48: 2300 movs r3, #0
  1831. 8000a4a: 617b str r3, [r7, #20]
  1832. 8000a4c: e00a b.n 8000a64 <SD_SendCmd+0x5c>
  1833. {
  1834. SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
  1835. 8000a4e: f107 020c add.w r2, r7, #12
  1836. 8000a52: 697b ldr r3, [r7, #20]
  1837. 8000a54: 4413 add r3, r2
  1838. 8000a56: 781b ldrb r3, [r3, #0]
  1839. 8000a58: 4618 mov r0, r3
  1840. 8000a5a: f7ff fd87 bl 800056c <SD_WriteByte>
  1841. Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
  1842. Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
  1843. for (i = 0; i < 6; i++)
  1844. 8000a5e: 697b ldr r3, [r7, #20]
  1845. 8000a60: 3301 adds r3, #1
  1846. 8000a62: 617b str r3, [r7, #20]
  1847. 8000a64: 697b ldr r3, [r7, #20]
  1848. 8000a66: 2b05 cmp r3, #5
  1849. 8000a68: d9f1 bls.n 8000a4e <SD_SendCmd+0x46>
  1850. {
  1851. SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
  1852. }
  1853. }
  1854. 8000a6a: bf00 nop
  1855. 8000a6c: 3718 adds r7, #24
  1856. 8000a6e: 46bd mov sp, r7
  1857. 8000a70: bd80 pop {r7, pc}
  1858. 8000a72: bf00 nop
  1859. 08000a74 <SD_GetResponse>:
  1860. SD_Error SD_GetResponse(uint8_t Response)
  1861. {
  1862. 8000a74: b580 push {r7, lr}
  1863. 8000a76: b084 sub sp, #16
  1864. 8000a78: af00 add r7, sp, #0
  1865. 8000a7a: 4603 mov r3, r0
  1866. 8000a7c: 71fb strb r3, [r7, #7]
  1867. uint32_t Count = 0xFFF;
  1868. 8000a7e: f640 73ff movw r3, #4095 ; 0xfff
  1869. 8000a82: 60fb str r3, [r7, #12]
  1870. /*!< Check if response is got or a timeout is happen */
  1871. while ((SD_ReadByte() != Response) && Count)
  1872. 8000a84: e002 b.n 8000a8c <SD_GetResponse+0x18>
  1873. {
  1874. Count--;
  1875. 8000a86: 68fb ldr r3, [r7, #12]
  1876. 8000a88: 3b01 subs r3, #1
  1877. 8000a8a: 60fb str r3, [r7, #12]
  1878. SD_Error SD_GetResponse(uint8_t Response)
  1879. {
  1880. uint32_t Count = 0xFFF;
  1881. /*!< Check if response is got or a timeout is happen */
  1882. while ((SD_ReadByte() != Response) && Count)
  1883. 8000a8c: f000 f812 bl 8000ab4 <SD_ReadByte>
  1884. 8000a90: 4603 mov r3, r0
  1885. 8000a92: 461a mov r2, r3
  1886. 8000a94: 79fb ldrb r3, [r7, #7]
  1887. 8000a96: 4293 cmp r3, r2
  1888. 8000a98: d002 beq.n 8000aa0 <SD_GetResponse+0x2c>
  1889. 8000a9a: 68fb ldr r3, [r7, #12]
  1890. 8000a9c: 2b00 cmp r3, #0
  1891. 8000a9e: d1f2 bne.n 8000a86 <SD_GetResponse+0x12>
  1892. {
  1893. Count--;
  1894. }
  1895. if (Count == 0)
  1896. 8000aa0: 68fb ldr r3, [r7, #12]
  1897. 8000aa2: 2b00 cmp r3, #0
  1898. 8000aa4: d101 bne.n 8000aaa <SD_GetResponse+0x36>
  1899. {
  1900. /*!< After time out */
  1901. return SD_RESPONSE_FAILURE;
  1902. 8000aa6: 23ff movs r3, #255 ; 0xff
  1903. 8000aa8: e000 b.n 8000aac <SD_GetResponse+0x38>
  1904. }
  1905. else
  1906. {
  1907. /*!< Right response got */
  1908. return SD_RESPONSE_NO_ERROR;
  1909. 8000aaa: 2300 movs r3, #0
  1910. }
  1911. }
  1912. 8000aac: 4618 mov r0, r3
  1913. 8000aae: 3710 adds r7, #16
  1914. 8000ab0: 46bd mov sp, r7
  1915. 8000ab2: bd80 pop {r7, pc}
  1916. 08000ab4 <SD_ReadByte>:
  1917. uint8_t SD_ReadByte(void)
  1918. {
  1919. 8000ab4: b580 push {r7, lr}
  1920. 8000ab6: b082 sub sp, #8
  1921. 8000ab8: af00 add r7, sp, #0
  1922. uint8_t Data = 0;
  1923. 8000aba: 2300 movs r3, #0
  1924. 8000abc: 71fb strb r3, [r7, #7]
  1925. /*!< Wait until the transmit buffer is empty */
  1926. while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
  1927. 8000abe: bf00 nop
  1928. 8000ac0: 2102 movs r1, #2
  1929. 8000ac2: 480e ldr r0, [pc, #56] ; (8000afc <SD_ReadByte+0x48>)
  1930. 8000ac4: f7ff fcb0 bl 8000428 <SPI_I2S_GetFlagStatus>
  1931. 8000ac8: 4603 mov r3, r0
  1932. 8000aca: 2b00 cmp r3, #0
  1933. 8000acc: d0f8 beq.n 8000ac0 <SD_ReadByte+0xc>
  1934. {
  1935. }
  1936. /*!< Send the byte */
  1937. SPI_I2S_SendData(SD_SPI, SD_DUMMY_BYTE);
  1938. 8000ace: 21ff movs r1, #255 ; 0xff
  1939. 8000ad0: 480a ldr r0, [pc, #40] ; (8000afc <SD_ReadByte+0x48>)
  1940. 8000ad2: f7ff fcc5 bl 8000460 <SPI_I2S_SendData>
  1941. /*!< Wait until a data is received */
  1942. while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
  1943. 8000ad6: bf00 nop
  1944. 8000ad8: 2101 movs r1, #1
  1945. 8000ada: 4808 ldr r0, [pc, #32] ; (8000afc <SD_ReadByte+0x48>)
  1946. 8000adc: f7ff fca4 bl 8000428 <SPI_I2S_GetFlagStatus>
  1947. 8000ae0: 4603 mov r3, r0
  1948. 8000ae2: 2b00 cmp r3, #0
  1949. 8000ae4: d0f8 beq.n 8000ad8 <SD_ReadByte+0x24>
  1950. {
  1951. }
  1952. /*!< Get the received data */
  1953. Data = SPI_I2S_ReceiveData(SD_SPI);
  1954. 8000ae6: 4805 ldr r0, [pc, #20] ; (8000afc <SD_ReadByte+0x48>)
  1955. 8000ae8: f7ff fd34 bl 8000554 <SPI_I2S_ReceiveData>
  1956. 8000aec: 4603 mov r3, r0
  1957. 8000aee: 71fb strb r3, [r7, #7]
  1958. /*!< Return the shifted data */
  1959. return Data;
  1960. 8000af0: 79fb ldrb r3, [r7, #7]
  1961. }
  1962. 8000af2: 4618 mov r0, r3
  1963. 8000af4: 3708 adds r7, #8
  1964. 8000af6: 46bd mov sp, r7
  1965. 8000af8: bd80 pop {r7, pc}
  1966. 8000afa: bf00 nop
  1967. 8000afc: 40013000 .word 0x40013000
  1968. 08000b00 <SD_GetDataResponse>:
  1969. uint8_t SD_GetDataResponse(void)
  1970. {
  1971. 8000b00: b580 push {r7, lr}
  1972. 8000b02: b082 sub sp, #8
  1973. 8000b04: af00 add r7, sp, #0
  1974. uint32_t i = 0;
  1975. 8000b06: 2300 movs r3, #0
  1976. 8000b08: 607b str r3, [r7, #4]
  1977. uint8_t response, rvalue;
  1978. while (i <= 64)
  1979. 8000b0a: e01e b.n 8000b4a <SD_GetDataResponse+0x4a>
  1980. {
  1981. /*!< Read resonse */
  1982. response = SD_ReadByte();
  1983. 8000b0c: f7ff ffd2 bl 8000ab4 <SD_ReadByte>
  1984. 8000b10: 4603 mov r3, r0
  1985. 8000b12: 70fb strb r3, [r7, #3]
  1986. /*!< Mask unused bits */
  1987. response &= 0x1F;
  1988. 8000b14: 78fb ldrb r3, [r7, #3]
  1989. 8000b16: f003 031f and.w r3, r3, #31
  1990. 8000b1a: 70fb strb r3, [r7, #3]
  1991. switch (response)
  1992. 8000b1c: 78fb ldrb r3, [r7, #3]
  1993. 8000b1e: 2b0b cmp r3, #11
  1994. 8000b20: d006 beq.n 8000b30 <SD_GetDataResponse+0x30>
  1995. 8000b22: 2b0d cmp r3, #13
  1996. 8000b24: d006 beq.n 8000b34 <SD_GetDataResponse+0x34>
  1997. 8000b26: 2b05 cmp r3, #5
  1998. 8000b28: d106 bne.n 8000b38 <SD_GetDataResponse+0x38>
  1999. {
  2000. case SD_DATA_OK:
  2001. {
  2002. rvalue = SD_DATA_OK;
  2003. 8000b2a: 2305 movs r3, #5
  2004. 8000b2c: 70bb strb r3, [r7, #2]
  2005. break;
  2006. 8000b2e: e006 b.n 8000b3e <SD_GetDataResponse+0x3e>
  2007. }
  2008. case SD_DATA_CRC_ERROR:
  2009. return SD_DATA_CRC_ERROR;
  2010. 8000b30: 230b movs r3, #11
  2011. 8000b32: e016 b.n 8000b62 <SD_GetDataResponse+0x62>
  2012. case SD_DATA_WRITE_ERROR:
  2013. return SD_DATA_WRITE_ERROR;
  2014. 8000b34: 230d movs r3, #13
  2015. 8000b36: e014 b.n 8000b62 <SD_GetDataResponse+0x62>
  2016. default:
  2017. {
  2018. rvalue = SD_DATA_OTHER_ERROR;
  2019. 8000b38: 23ff movs r3, #255 ; 0xff
  2020. 8000b3a: 70bb strb r3, [r7, #2]
  2021. break;
  2022. 8000b3c: bf00 nop
  2023. }
  2024. }
  2025. /*!< Exit loop in case of data ok */
  2026. if (rvalue == SD_DATA_OK)
  2027. 8000b3e: 78bb ldrb r3, [r7, #2]
  2028. 8000b40: 2b05 cmp r3, #5
  2029. 8000b42: d006 beq.n 8000b52 <SD_GetDataResponse+0x52>
  2030. break;
  2031. /*!< Increment loop counter */
  2032. i++;
  2033. 8000b44: 687b ldr r3, [r7, #4]
  2034. 8000b46: 3301 adds r3, #1
  2035. 8000b48: 607b str r3, [r7, #4]
  2036. uint8_t SD_GetDataResponse(void)
  2037. {
  2038. uint32_t i = 0;
  2039. uint8_t response, rvalue;
  2040. while (i <= 64)
  2041. 8000b4a: 687b ldr r3, [r7, #4]
  2042. 8000b4c: 2b40 cmp r3, #64 ; 0x40
  2043. 8000b4e: d9dd bls.n 8000b0c <SD_GetDataResponse+0xc>
  2044. 8000b50: e000 b.n 8000b54 <SD_GetDataResponse+0x54>
  2045. break;
  2046. }
  2047. }
  2048. /*!< Exit loop in case of data ok */
  2049. if (rvalue == SD_DATA_OK)
  2050. break;
  2051. 8000b52: bf00 nop
  2052. /*!< Increment loop counter */
  2053. i++;
  2054. }
  2055. /*!< Wait null data */
  2056. while (SD_ReadByte() == 0);
  2057. 8000b54: bf00 nop
  2058. 8000b56: f7ff ffad bl 8000ab4 <SD_ReadByte>
  2059. 8000b5a: 4603 mov r3, r0
  2060. 8000b5c: 2b00 cmp r3, #0
  2061. 8000b5e: d0fa beq.n 8000b56 <SD_GetDataResponse+0x56>
  2062. /*!< Return response */
  2063. return response;
  2064. 8000b60: 78fb ldrb r3, [r7, #3]
  2065. }
  2066. 8000b62: 4618 mov r0, r3
  2067. 8000b64: 3708 adds r7, #8
  2068. 8000b66: 46bd mov sp, r7
  2069. 8000b68: bd80 pop {r7, pc}
  2070. 8000b6a: bf00 nop
  2071. 08000b6c <SD_Init>:
  2072. SD_Error SD_Init(void)
  2073. {
  2074. 8000b6c: b580 push {r7, lr}
  2075. 8000b6e: b082 sub sp, #8
  2076. 8000b70: af00 add r7, sp, #0
  2077. uint32_t i = 0;
  2078. 8000b72: 2300 movs r3, #0
  2079. 8000b74: 607b str r3, [r7, #4]
  2080. /*!< Initialize SD_SPI */
  2081. SD_LowLevel_Init();
  2082. 8000b76: f7ff fec9 bl 800090c <SD_LowLevel_Init>
  2083. /*!< SD chip select high */
  2084. SD_CS_HIGH();
  2085. 8000b7a: 2110 movs r1, #16
  2086. 8000b7c: 480a ldr r0, [pc, #40] ; (8000ba8 <SD_Init+0x3c>)
  2087. 8000b7e: f7ff fe3b bl 80007f8 <GPIO_SetBits>
  2088. /*!< Send dummy byte 0xFF, 10 times with CS high */
  2089. /*!< Rise CS and MOSI for 80 clocks cycles */
  2090. for (i = 0; i <= 9; i++)
  2091. 8000b82: 2300 movs r3, #0
  2092. 8000b84: 607b str r3, [r7, #4]
  2093. 8000b86: e005 b.n 8000b94 <SD_Init+0x28>
  2094. {
  2095. /*!< Send dummy byte 0xFF */
  2096. SD_WriteByte(SD_DUMMY_BYTE);
  2097. 8000b88: 20ff movs r0, #255 ; 0xff
  2098. 8000b8a: f7ff fcef bl 800056c <SD_WriteByte>
  2099. /*!< SD chip select high */
  2100. SD_CS_HIGH();
  2101. /*!< Send dummy byte 0xFF, 10 times with CS high */
  2102. /*!< Rise CS and MOSI for 80 clocks cycles */
  2103. for (i = 0; i <= 9; i++)
  2104. 8000b8e: 687b ldr r3, [r7, #4]
  2105. 8000b90: 3301 adds r3, #1
  2106. 8000b92: 607b str r3, [r7, #4]
  2107. 8000b94: 687b ldr r3, [r7, #4]
  2108. 8000b96: 2b09 cmp r3, #9
  2109. 8000b98: d9f6 bls.n 8000b88 <SD_Init+0x1c>
  2110. /*!< Send dummy byte 0xFF */
  2111. SD_WriteByte(SD_DUMMY_BYTE);
  2112. }
  2113. /*------------Put SD in SPI mode--------------*/
  2114. /*!< SD initialized and set to SPI mode properly */
  2115. return (SD_GoIdleState());
  2116. 8000b9a: f7ff feff bl 800099c <SD_GoIdleState>
  2117. 8000b9e: 4603 mov r3, r0
  2118. }
  2119. 8000ba0: 4618 mov r0, r3
  2120. 8000ba2: 3708 adds r7, #8
  2121. 8000ba4: 46bd mov sp, r7
  2122. 8000ba6: bd80 pop {r7, pc}
  2123. 8000ba8: 40010800 .word 0x40010800
  2124. 08000bac <_checkSDStatus>:
  2125. uint8_t _checkSDStatus() {
  2126. 8000bac: b580 push {r7, lr}
  2127. 8000bae: af00 add r7, sp, #0
  2128. if (SD_Status == SD_RESPONSE_NO_ERROR)
  2129. 8000bb0: 4b09 ldr r3, [pc, #36] ; (8000bd8 <_checkSDStatus+0x2c>)
  2130. 8000bb2: 881b ldrh r3, [r3, #0]
  2131. 8000bb4: 2b00 cmp r3, #0
  2132. 8000bb6: d101 bne.n 8000bbc <_checkSDStatus+0x10>
  2133. return 0;
  2134. 8000bb8: 2300 movs r3, #0
  2135. 8000bba: e00a b.n 8000bd2 <_checkSDStatus+0x26>
  2136. do
  2137. SD_Status = SD_Init();
  2138. 8000bbc: f7ff ffd6 bl 8000b6c <SD_Init>
  2139. 8000bc0: 4603 mov r3, r0
  2140. 8000bc2: b29a uxth r2, r3
  2141. 8000bc4: 4b04 ldr r3, [pc, #16] ; (8000bd8 <_checkSDStatus+0x2c>)
  2142. 8000bc6: 801a strh r2, [r3, #0]
  2143. while (SD_Status != SD_RESPONSE_NO_ERROR);
  2144. 8000bc8: 4b03 ldr r3, [pc, #12] ; (8000bd8 <_checkSDStatus+0x2c>)
  2145. 8000bca: 881b ldrh r3, [r3, #0]
  2146. 8000bcc: 2b00 cmp r3, #0
  2147. 8000bce: d1f5 bne.n 8000bbc <_checkSDStatus+0x10>
  2148. return 1;
  2149. 8000bd0: 2301 movs r3, #1
  2150. }
  2151. 8000bd2: 4618 mov r0, r3
  2152. 8000bd4: bd80 pop {r7, pc}
  2153. 8000bd6: bf00 nop
  2154. 8000bd8: 20000018 .word 0x20000018
  2155. 08000bdc <checkSDStatus>:
  2156. void checkSDStatus() {
  2157. 8000bdc: b580 push {r7, lr}
  2158. 8000bde: af00 add r7, sp, #0
  2159. while (_checkSDStatus()) {
  2160. 8000be0: bf00 nop
  2161. 8000be2: f7ff ffe3 bl 8000bac <_checkSDStatus>
  2162. 8000be6: 4603 mov r3, r0
  2163. 8000be8: 2b00 cmp r3, #0
  2164. 8000bea: d1fa bne.n 8000be2 <checkSDStatus+0x6>
  2165. //<----><------>writeBufFilled = 0;
  2166. //<----><------>SDWriteOffset = SD_WriteHeaders();
  2167. }
  2168. }
  2169. 8000bec: bf00 nop
  2170. 8000bee: bd80 pop {r7, pc}
  2171. 08000bf0 <ADC_GetConversionValue>:
  2172. uint16_t ADC_GetConversionValue(ADC_TypeDef* ADCx)
  2173. {
  2174. 8000bf0: b480 push {r7}
  2175. 8000bf2: b083 sub sp, #12
  2176. 8000bf4: af00 add r7, sp, #0
  2177. 8000bf6: 6078 str r0, [r7, #4]
  2178. /* Check the parameters */
  2179. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  2180. /* Return the selected ADC conversion value */
  2181. return (uint16_t) ADCx->DR;
  2182. 8000bf8: 687b ldr r3, [r7, #4]
  2183. 8000bfa: 6cdb ldr r3, [r3, #76] ; 0x4c
  2184. 8000bfc: b29b uxth r3, r3
  2185. }
  2186. 8000bfe: 4618 mov r0, r3
  2187. 8000c00: 370c adds r7, #12
  2188. 8000c02: 46bd mov sp, r7
  2189. 8000c04: bc80 pop {r7}
  2190. 8000c06: 4770 bx lr
  2191. 08000c08 <SD_WriteBlock_1>:
  2192. SD_Error SD_WriteBlock_1(uint32_t WriteAddr)
  2193. {
  2194. 8000c08: b580 push {r7, lr}
  2195. 8000c0a: b084 sub sp, #16
  2196. 8000c0c: af00 add r7, sp, #0
  2197. 8000c0e: 6078 str r0, [r7, #4]
  2198. Wstatus = BuffReady;
  2199. 8000c10: 4b3b ldr r3, [pc, #236] ; (8000d00 <SD_WriteBlock_1+0xf8>)
  2200. 8000c12: 781a ldrb r2, [r3, #0]
  2201. 8000c14: 4b3b ldr r3, [pc, #236] ; (8000d04 <SD_WriteBlock_1+0xfc>)
  2202. 8000c16: 701a strb r2, [r3, #0]
  2203. BuffReady = 0;
  2204. 8000c18: 4b39 ldr r3, [pc, #228] ; (8000d00 <SD_WriteBlock_1+0xf8>)
  2205. 8000c1a: 2200 movs r2, #0
  2206. 8000c1c: 701a strb r2, [r3, #0]
  2207. uint32_t i = 0;
  2208. 8000c1e: 2300 movs r3, #0
  2209. 8000c20: 60fb str r3, [r7, #12]
  2210. SD_Error rvalue = SD_RESPONSE_FAILURE;
  2211. 8000c22: 23ff movs r3, #255 ; 0xff
  2212. 8000c24: 72fb strb r3, [r7, #11]
  2213. SD_CS_LOW();
  2214. 8000c26: 2110 movs r1, #16
  2215. 8000c28: 4837 ldr r0, [pc, #220] ; (8000d08 <SD_WriteBlock_1+0x100>)
  2216. 8000c2a: f7ff fe11 bl 8000850 <GPIO_ResetBits>
  2217. SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, WriteAddr, 0xFF);
  2218. 8000c2e: 22ff movs r2, #255 ; 0xff
  2219. 8000c30: 6879 ldr r1, [r7, #4]
  2220. 8000c32: 2018 movs r0, #24
  2221. 8000c34: f7ff fee8 bl 8000a08 <SD_SendCmd>
  2222. if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
  2223. 8000c38: 2000 movs r0, #0
  2224. 8000c3a: f7ff ff1b bl 8000a74 <SD_GetResponse>
  2225. 8000c3e: 4603 mov r3, r0
  2226. 8000c40: 2b00 cmp r3, #0
  2227. 8000c42: d14e bne.n 8000ce2 <SD_WriteBlock_1+0xda>
  2228. {
  2229. SD_WriteByte(SD_DUMMY_BYTE);
  2230. 8000c44: 20ff movs r0, #255 ; 0xff
  2231. 8000c46: f7ff fc91 bl 800056c <SD_WriteByte>
  2232. SD_WriteByte(0xFE);
  2233. 8000c4a: 20fe movs r0, #254 ; 0xfe
  2234. 8000c4c: f7ff fc8e bl 800056c <SD_WriteByte>
  2235. if (Wstatus == 1){
  2236. 8000c50: 4b2c ldr r3, [pc, #176] ; (8000d04 <SD_WriteBlock_1+0xfc>)
  2237. 8000c52: 781b ldrb r3, [r3, #0]
  2238. 8000c54: 2b01 cmp r3, #1
  2239. 8000c56: d11a bne.n 8000c8e <SD_WriteBlock_1+0x86>
  2240. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2241. 8000c58: 2300 movs r3, #0
  2242. 8000c5a: 60fb str r3, [r7, #12]
  2243. 8000c5c: e014 b.n 8000c88 <SD_WriteBlock_1+0x80>
  2244. {
  2245. SD_WriteByte(Buffer1[i]);
  2246. 8000c5e: 4a2b ldr r2, [pc, #172] ; (8000d0c <SD_WriteBlock_1+0x104>)
  2247. 8000c60: 68fb ldr r3, [r7, #12]
  2248. 8000c62: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2249. 8000c66: b2db uxtb r3, r3
  2250. 8000c68: 4618 mov r0, r3
  2251. 8000c6a: f7ff fc7f bl 800056c <SD_WriteByte>
  2252. SD_WriteByte(Buffer1[i] >> 8);
  2253. 8000c6e: 4a27 ldr r2, [pc, #156] ; (8000d0c <SD_WriteBlock_1+0x104>)
  2254. 8000c70: 68fb ldr r3, [r7, #12]
  2255. 8000c72: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2256. 8000c76: 0a1b lsrs r3, r3, #8
  2257. 8000c78: b29b uxth r3, r3
  2258. 8000c7a: b2db uxtb r3, r3
  2259. 8000c7c: 4618 mov r0, r3
  2260. 8000c7e: f7ff fc75 bl 800056c <SD_WriteByte>
  2261. if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
  2262. {
  2263. SD_WriteByte(SD_DUMMY_BYTE);
  2264. SD_WriteByte(0xFE);
  2265. if (Wstatus == 1){
  2266. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2267. 8000c82: 68fb ldr r3, [r7, #12]
  2268. 8000c84: 3301 adds r3, #1
  2269. 8000c86: 60fb str r3, [r7, #12]
  2270. 8000c88: 68fb ldr r3, [r7, #12]
  2271. 8000c8a: 2bff cmp r3, #255 ; 0xff
  2272. 8000c8c: d9e7 bls.n 8000c5e <SD_WriteBlock_1+0x56>
  2273. SD_WriteByte(Buffer1[i]);
  2274. SD_WriteByte(Buffer1[i] >> 8);
  2275. }
  2276. }
  2277. if (Wstatus == 2){
  2278. 8000c8e: 4b1d ldr r3, [pc, #116] ; (8000d04 <SD_WriteBlock_1+0xfc>)
  2279. 8000c90: 781b ldrb r3, [r3, #0]
  2280. 8000c92: 2b02 cmp r3, #2
  2281. 8000c94: d11a bne.n 8000ccc <SD_WriteBlock_1+0xc4>
  2282. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2283. 8000c96: 2300 movs r3, #0
  2284. 8000c98: 60fb str r3, [r7, #12]
  2285. 8000c9a: e014 b.n 8000cc6 <SD_WriteBlock_1+0xbe>
  2286. {
  2287. SD_WriteByte(Buffer2[i]);
  2288. 8000c9c: 4a1c ldr r2, [pc, #112] ; (8000d10 <SD_WriteBlock_1+0x108>)
  2289. 8000c9e: 68fb ldr r3, [r7, #12]
  2290. 8000ca0: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2291. 8000ca4: b2db uxtb r3, r3
  2292. 8000ca6: 4618 mov r0, r3
  2293. 8000ca8: f7ff fc60 bl 800056c <SD_WriteByte>
  2294. SD_WriteByte(Buffer2[i] >> 8);
  2295. 8000cac: 4a18 ldr r2, [pc, #96] ; (8000d10 <SD_WriteBlock_1+0x108>)
  2296. 8000cae: 68fb ldr r3, [r7, #12]
  2297. 8000cb0: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
  2298. 8000cb4: 0a1b lsrs r3, r3, #8
  2299. 8000cb6: b29b uxth r3, r3
  2300. 8000cb8: b2db uxtb r3, r3
  2301. 8000cba: 4618 mov r0, r3
  2302. 8000cbc: f7ff fc56 bl 800056c <SD_WriteByte>
  2303. SD_WriteByte(Buffer1[i] >> 8);
  2304. }
  2305. }
  2306. if (Wstatus == 2){
  2307. for (i = 0; i < SD_BUFSIZE/2; i += 1)
  2308. 8000cc0: 68fb ldr r3, [r7, #12]
  2309. 8000cc2: 3301 adds r3, #1
  2310. 8000cc4: 60fb str r3, [r7, #12]
  2311. 8000cc6: 68fb ldr r3, [r7, #12]
  2312. 8000cc8: 2bff cmp r3, #255 ; 0xff
  2313. 8000cca: d9e7 bls.n 8000c9c <SD_WriteBlock_1+0x94>
  2314. SD_WriteByte(Buffer2[i]);
  2315. SD_WriteByte(Buffer2[i] >> 8);
  2316. }
  2317. }
  2318. SD_ReadByte();
  2319. 8000ccc: f7ff fef2 bl 8000ab4 <SD_ReadByte>
  2320. SD_ReadByte();
  2321. 8000cd0: f7ff fef0 bl 8000ab4 <SD_ReadByte>
  2322. if (SD_GetDataResponse() == SD_DATA_OK)
  2323. 8000cd4: f7ff ff14 bl 8000b00 <SD_GetDataResponse>
  2324. 8000cd8: 4603 mov r3, r0
  2325. 8000cda: 2b05 cmp r3, #5
  2326. 8000cdc: d101 bne.n 8000ce2 <SD_WriteBlock_1+0xda>
  2327. {
  2328. rvalue = SD_RESPONSE_NO_ERROR;
  2329. 8000cde: 2300 movs r3, #0
  2330. 8000ce0: 72fb strb r3, [r7, #11]
  2331. }
  2332. }
  2333. SD_CS_HIGH();
  2334. 8000ce2: 2110 movs r1, #16
  2335. 8000ce4: 4808 ldr r0, [pc, #32] ; (8000d08 <SD_WriteBlock_1+0x100>)
  2336. 8000ce6: f7ff fd87 bl 80007f8 <GPIO_SetBits>
  2337. SD_WriteByte(SD_DUMMY_BYTE);
  2338. 8000cea: 20ff movs r0, #255 ; 0xff
  2339. 8000cec: f7ff fc3e bl 800056c <SD_WriteByte>
  2340. Wstatus = 0;
  2341. 8000cf0: 4b04 ldr r3, [pc, #16] ; (8000d04 <SD_WriteBlock_1+0xfc>)
  2342. 8000cf2: 2200 movs r2, #0
  2343. 8000cf4: 701a strb r2, [r3, #0]
  2344. return rvalue;
  2345. 8000cf6: 7afb ldrb r3, [r7, #11]
  2346. }
  2347. 8000cf8: 4618 mov r0, r3
  2348. 8000cfa: 3710 adds r7, #16
  2349. 8000cfc: 46bd mov sp, r7
  2350. 8000cfe: bd80 pop {r7, pc}
  2351. 8000d00: 20000630 .word 0x20000630
  2352. 8000d04: 2000001b .word 0x2000001b
  2353. 8000d08: 40010800 .word 0x40010800
  2354. 8000d0c: 20000230 .word 0x20000230
  2355. 8000d10: 20000430 .word 0x20000430
  2356. 08000d14 <ADC_Start>:
  2357. void ADC_Start (void){
  2358. 8000d14: b580 push {r7, lr}
  2359. 8000d16: b086 sub sp, #24
  2360. 8000d18: af00 add r7, sp, #0
  2361. ADC_InitTypeDef ADC_InitStructure;
  2362. GPIO_InitTypeDef GPIO_InitStructure;
  2363. RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
  2364. 8000d1a: 2101 movs r1, #1
  2365. 8000d1c: f44f 7000 mov.w r0, #512 ; 0x200
  2366. 8000d20: f7ff fd78 bl 8000814 <RCC_APB2PeriphClockCmd>
  2367. GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 ;
  2368. 8000d24: 2301 movs r3, #1
  2369. 8000d26: 803b strh r3, [r7, #0]
  2370. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  2371. 8000d28: 2300 movs r3, #0
  2372. 8000d2a: 70fb strb r3, [r7, #3]
  2373. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz ;
  2374. 8000d2c: 2302 movs r3, #2
  2375. 8000d2e: 70bb strb r3, [r7, #2]
  2376. GPIO_Init(GPIOA, &GPIO_InitStructure);
  2377. 8000d30: 463b mov r3, r7
  2378. 8000d32: 4619 mov r1, r3
  2379. 8000d34: 481a ldr r0, [pc, #104] ; (8000da0 <ADC_Start+0x8c>)
  2380. 8000d36: f7ff fc3f bl 80005b8 <GPIO_Init>
  2381. ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
  2382. 8000d3a: 2300 movs r3, #0
  2383. 8000d3c: 607b str r3, [r7, #4]
  2384. ADC_InitStructure.ADC_ScanConvMode = ENABLE;
  2385. 8000d3e: 2301 movs r3, #1
  2386. 8000d40: 723b strb r3, [r7, #8]
  2387. ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
  2388. 8000d42: 2301 movs r3, #1
  2389. 8000d44: 727b strb r3, [r7, #9]
  2390. ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
  2391. 8000d46: f44f 2360 mov.w r3, #917504 ; 0xe0000
  2392. 8000d4a: 60fb str r3, [r7, #12]
  2393. ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
  2394. 8000d4c: 2300 movs r3, #0
  2395. 8000d4e: 613b str r3, [r7, #16]
  2396. ADC_InitStructure.ADC_NbrOfChannel = 0;
  2397. 8000d50: 2300 movs r3, #0
  2398. 8000d52: 753b strb r3, [r7, #20]
  2399. ADC_Init(ADC1, &ADC_InitStructure);
  2400. 8000d54: 1d3b adds r3, r7, #4
  2401. 8000d56: 4619 mov r1, r3
  2402. 8000d58: 4812 ldr r0, [pc, #72] ; (8000da4 <ADC_Start+0x90>)
  2403. 8000d5a: f7ff fd87 bl 800086c <ADC_Init>
  2404. ADC_Cmd(ADC1, ENABLE);
  2405. 8000d5e: 2101 movs r1, #1
  2406. 8000d60: 4810 ldr r0, [pc, #64] ; (8000da4 <ADC_Start+0x90>)
  2407. 8000d62: f7ff fb45 bl 80003f0 <ADC_Cmd>
  2408. ADC_ResetCalibration(ADC1);
  2409. 8000d66: 480f ldr r0, [pc, #60] ; (8000da4 <ADC_Start+0x90>)
  2410. 8000d68: f7ff fb88 bl 800047c <ADC_ResetCalibration>
  2411. while(ADC_GetResetCalibrationStatus(ADC1));
  2412. 8000d6c: bf00 nop
  2413. 8000d6e: 480d ldr r0, [pc, #52] ; (8000da4 <ADC_Start+0x90>)
  2414. 8000d70: f7ff fb94 bl 800049c <ADC_GetResetCalibrationStatus>
  2415. 8000d74: 4603 mov r3, r0
  2416. 8000d76: 2b00 cmp r3, #0
  2417. 8000d78: d1f9 bne.n 8000d6e <ADC_Start+0x5a>
  2418. ADC_StartCalibration(ADC1);
  2419. 8000d7a: 480a ldr r0, [pc, #40] ; (8000da4 <ADC_Start+0x90>)
  2420. 8000d7c: f7ff fba6 bl 80004cc <ADC_StartCalibration>
  2421. while(ADC_GetCalibrationStatus(ADC1));
  2422. 8000d80: bf00 nop
  2423. 8000d82: 4808 ldr r0, [pc, #32] ; (8000da4 <ADC_Start+0x90>)
  2424. 8000d84: f7ff fbb2 bl 80004ec <ADC_GetCalibrationStatus>
  2425. 8000d88: 4603 mov r3, r0
  2426. 8000d8a: 2b00 cmp r3, #0
  2427. 8000d8c: d1f9 bne.n 8000d82 <ADC_Start+0x6e>
  2428. ADC_SoftwareStartConvCmd(ADC1, ENABLE);
  2429. 8000d8e: 2101 movs r1, #1
  2430. 8000d90: 4804 ldr r0, [pc, #16] ; (8000da4 <ADC_Start+0x90>)
  2431. 8000d92: f7ff fbc3 bl 800051c <ADC_SoftwareStartConvCmd>
  2432. }
  2433. 8000d96: bf00 nop
  2434. 8000d98: 3718 adds r7, #24
  2435. 8000d9a: 46bd mov sp, r7
  2436. 8000d9c: bd80 pop {r7, pc}
  2437. 8000d9e: bf00 nop
  2438. 8000da0: 40010800 .word 0x40010800
  2439. 8000da4: 40012400 .word 0x40012400
  2440. 08000da8 <main>:
  2441. int main(void) {
  2442. 8000da8: b580 push {r7, lr}
  2443. 8000daa: af00 add r7, sp, #0
  2444. // status = SD_Init();
  2445. // checkSDStatus();
  2446. // writeBufFilled = 0;
  2447. //// SD_WriteHeaders();
  2448. // SDWriteOffset = SD_BUFSIZE;
  2449. SystemCoreClockUpdate();
  2450. 8000dac: f7ff fa2e bl 800020c <SystemCoreClockUpdate>
  2451. SysTick_Config(SystemCoreClock/10);
  2452. 8000db0: 4b05 ldr r3, [pc, #20] ; (8000dc8 <main+0x20>)
  2453. 8000db2: 681b ldr r3, [r3, #0]
  2454. 8000db4: 4a05 ldr r2, [pc, #20] ; (8000dcc <main+0x24>)
  2455. 8000db6: fba2 2303 umull r2, r3, r2, r3
  2456. 8000dba: 08db lsrs r3, r3, #3
  2457. 8000dbc: 4618 mov r0, r3
  2458. 8000dbe: f7ff f9cf bl 8000160 <SysTick_Config>
  2459. ADC_Start();
  2460. 8000dc2: f7ff ffa7 bl 8000d14 <ADC_Start>
  2461. // SDWriteOffset = SDWriteOffset + SD_BUFSIZE;
  2462. // }
  2463. }
  2464. 8000dc6: e7fe b.n 8000dc6 <main+0x1e>
  2465. 8000dc8: 20000000 .word 0x20000000
  2466. 8000dcc: cccccccd .word 0xcccccccd
  2467. 08000dd0 <SysTick_Handler>:
  2468. }
  2469. void SysTick_Handler(void) {
  2470. 8000dd0: b580 push {r7, lr}
  2471. 8000dd2: af00 add r7, sp, #0
  2472. ADC1ConvertedValue = ADC_GetConversionValue(ADC1);
  2473. 8000dd4: 4804 ldr r0, [pc, #16] ; (8000de8 <SysTick_Handler+0x18>)
  2474. 8000dd6: f7ff ff0b bl 8000bf0 <ADC_GetConversionValue>
  2475. 8000dda: 4603 mov r3, r0
  2476. 8000ddc: 461a mov r2, r3
  2477. 8000dde: 4b03 ldr r3, [pc, #12] ; (8000dec <SysTick_Handler+0x1c>)
  2478. 8000de0: 801a strh r2, [r3, #0]
  2479. BuffReady = 2;
  2480. BuffCount = 0;
  2481. }
  2482. */
  2483. }
  2484. 8000de2: bf00 nop
  2485. 8000de4: bd80 pop {r7, pc}
  2486. 8000de6: bf00 nop
  2487. 8000de8: 40012400 .word 0x40012400
  2488. 8000dec: 2000022c .word 0x2000022c
  2489. 8000df0: 08000e4c .word 0x08000e4c
  2490. 8000df4: 20000000 .word 0x20000000
  2491. 8000df8: 2000001c .word 0x2000001c
  2492. 8000dfc: 2000001c .word 0x2000001c
  2493. 8000e00: 20000638 .word 0x20000638
  2494. 08000e04 <Reset_Handler>:
  2495. .weak Reset_Handler
  2496. .type Reset_Handler, %function
  2497. Reset_Handler:
  2498. /* Copy the data segment initializers from flash to SRAM */
  2499. movs r1, #0
  2500. 8000e04: 2100 movs r1, #0
  2501. b LoopCopyDataInit
  2502. 8000e06: e003 b.n 8000e10 <LoopCopyDataInit>
  2503. 08000e08 <CopyDataInit>:
  2504. CopyDataInit:
  2505. ldr r3, =_sidata
  2506. 8000e08: 4b0a ldr r3, [pc, #40] ; (8000e34 <LoopFillZerobss+0x10>)
  2507. ldr r3, [r3, r1]
  2508. 8000e0a: 585b ldr r3, [r3, r1]
  2509. str r3, [r0, r1]
  2510. 8000e0c: 5043 str r3, [r0, r1]
  2511. adds r1, r1, #4
  2512. 8000e0e: 3104 adds r1, #4
  2513. 08000e10 <LoopCopyDataInit>:
  2514. LoopCopyDataInit:
  2515. ldr r0, =_sdata
  2516. 8000e10: 4809 ldr r0, [pc, #36] ; (8000e38 <LoopFillZerobss+0x14>)
  2517. ldr r3, =_edata
  2518. 8000e12: 4b0a ldr r3, [pc, #40] ; (8000e3c <LoopFillZerobss+0x18>)
  2519. adds r2, r0, r1
  2520. 8000e14: 1842 adds r2, r0, r1
  2521. cmp r2, r3
  2522. 8000e16: 429a cmp r2, r3
  2523. bcc CopyDataInit
  2524. 8000e18: d3f6 bcc.n 8000e08 <CopyDataInit>
  2525. ldr r2, =_sbss
  2526. 8000e1a: 4a09 ldr r2, [pc, #36] ; (8000e40 <LoopFillZerobss+0x1c>)
  2527. b LoopFillZerobss
  2528. 8000e1c: e002 b.n 8000e24 <LoopFillZerobss>
  2529. 08000e1e <FillZerobss>:
  2530. /* Zero fill the bss segment. */
  2531. FillZerobss:
  2532. movs r3, #0
  2533. 8000e1e: 2300 movs r3, #0
  2534. str r3, [r2], #4
  2535. 8000e20: f842 3b04 str.w r3, [r2], #4
  2536. 08000e24 <LoopFillZerobss>:
  2537. LoopFillZerobss:
  2538. ldr r3, = _ebss
  2539. 8000e24: 4b07 ldr r3, [pc, #28] ; (8000e44 <LoopFillZerobss+0x20>)
  2540. cmp r2, r3
  2541. 8000e26: 429a cmp r2, r3
  2542. bcc FillZerobss
  2543. 8000e28: d3f9 bcc.n 8000e1e <FillZerobss>
  2544. /* Call the clock system intitialization function.*/
  2545. bl SystemInit
  2546. 8000e2a: f7ff f9bb bl 80001a4 <SystemInit>
  2547. /* Call the application's entry point.*/
  2548. bl main
  2549. 8000e2e: f7ff ffbb bl 8000da8 <main>
  2550. bx lr
  2551. 8000e32: 4770 bx lr
  2552. /* Copy the data segment initializers from flash to SRAM */
  2553. movs r1, #0
  2554. b LoopCopyDataInit
  2555. CopyDataInit:
  2556. ldr r3, =_sidata
  2557. 8000e34: 08000e4c .word 0x08000e4c
  2558. ldr r3, [r3, r1]
  2559. str r3, [r0, r1]
  2560. adds r1, r1, #4
  2561. LoopCopyDataInit:
  2562. ldr r0, =_sdata
  2563. 8000e38: 20000000 .word 0x20000000
  2564. ldr r3, =_edata
  2565. 8000e3c: 2000001c .word 0x2000001c
  2566. adds r2, r0, r1
  2567. cmp r2, r3
  2568. bcc CopyDataInit
  2569. ldr r2, =_sbss
  2570. 8000e40: 2000001c .word 0x2000001c
  2571. FillZerobss:
  2572. movs r3, #0
  2573. str r3, [r2], #4
  2574. LoopFillZerobss:
  2575. ldr r3, = _ebss
  2576. 8000e44: 20000638 .word 0x20000638
  2577. 08000e48 <ADC1_2_IRQHandler>:
  2578. * @retval None
  2579. */
  2580. .section .text.Default_Handler,"ax",%progbits
  2581. Default_Handler:
  2582. Infinite_Loop:
  2583. b Infinite_Loop
  2584. 8000e48: e7fe b.n 8000e48 <ADC1_2_IRQHandler>
  2585. ...