123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493 |
- build/main.elf: file format elf32-littlearm
- Disassembly of section .text:
- 0800010c <NVIC_SetPriority>:
- * interrupt, or negative to specify an internal (core) interrupt.
- *
- * Note: The priority cannot be set for every core interrupt.
- */
- static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
- {
- 800010c: b480 push {r7}
- 800010e: b083 sub sp, #12
- 8000110: af00 add r7, sp, #0
- 8000112: 4603 mov r3, r0
- 8000114: 6039 str r1, [r7, #0]
- 8000116: 71fb strb r3, [r7, #7]
- if(IRQn < 0) {
- 8000118: f997 3007 ldrsb.w r3, [r7, #7]
- 800011c: 2b00 cmp r3, #0
- 800011e: da0b bge.n 8000138 <NVIC_SetPriority+0x2c>
- SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
- 8000120: 490d ldr r1, [pc, #52] ; (8000158 <NVIC_SetPriority+0x4c>)
- 8000122: 79fb ldrb r3, [r7, #7]
- 8000124: f003 030f and.w r3, r3, #15
- 8000128: 3b04 subs r3, #4
- 800012a: 683a ldr r2, [r7, #0]
- 800012c: b2d2 uxtb r2, r2
- 800012e: 0112 lsls r2, r2, #4
- 8000130: b2d2 uxtb r2, r2
- 8000132: 440b add r3, r1
- 8000134: 761a strb r2, [r3, #24]
- else {
- NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
- }
- 8000136: e009 b.n 800014c <NVIC_SetPriority+0x40>
- static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
- {
- if(IRQn < 0) {
- SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
- else {
- NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
- 8000138: 4908 ldr r1, [pc, #32] ; (800015c <NVIC_SetPriority+0x50>)
- 800013a: f997 3007 ldrsb.w r3, [r7, #7]
- 800013e: 683a ldr r2, [r7, #0]
- 8000140: b2d2 uxtb r2, r2
- 8000142: 0112 lsls r2, r2, #4
- 8000144: b2d2 uxtb r2, r2
- 8000146: 440b add r3, r1
- 8000148: f883 2300 strb.w r2, [r3, #768] ; 0x300
- }
- 800014c: bf00 nop
- 800014e: 370c adds r7, #12
- 8000150: 46bd mov sp, r7
- 8000152: bc80 pop {r7}
- 8000154: 4770 bx lr
- 8000156: bf00 nop
- 8000158: e000ed00 .word 0xe000ed00
- 800015c: e000e100 .word 0xe000e100
- 08000160 <SysTick_Config>:
- * Initialise the system tick timer and its interrupt and start the
- * system tick timer / counter in free running mode to generate
- * periodical interrupts.
- */
- static __INLINE uint32_t SysTick_Config(uint32_t ticks)
- {
- 8000160: b580 push {r7, lr}
- 8000162: b082 sub sp, #8
- 8000164: af00 add r7, sp, #0
- 8000166: 6078 str r0, [r7, #4]
- if (ticks > SysTick_LOAD_RELOAD_Msk) return (1); /* Reload value impossible */
- 8000168: 687b ldr r3, [r7, #4]
- 800016a: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
- 800016e: d301 bcc.n 8000174 <SysTick_Config+0x14>
- 8000170: 2301 movs r3, #1
- 8000172: e011 b.n 8000198 <SysTick_Config+0x38>
-
- SysTick->LOAD = (ticks & SysTick_LOAD_RELOAD_Msk) - 1; /* set reload register */
- 8000174: 4a0a ldr r2, [pc, #40] ; (80001a0 <SysTick_Config+0x40>)
- 8000176: 687b ldr r3, [r7, #4]
- 8000178: f023 437f bic.w r3, r3, #4278190080 ; 0xff000000
- 800017c: 3b01 subs r3, #1
- 800017e: 6053 str r3, [r2, #4]
- NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1); /* set Priority for Cortex-M0 System Interrupts */
- 8000180: 210f movs r1, #15
- 8000182: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
- 8000186: f7ff ffc1 bl 800010c <NVIC_SetPriority>
- SysTick->VAL = 0; /* Load the SysTick Counter Value */
- 800018a: 4b05 ldr r3, [pc, #20] ; (80001a0 <SysTick_Config+0x40>)
- 800018c: 2200 movs r2, #0
- 800018e: 609a str r2, [r3, #8]
- SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
- 8000190: 4b03 ldr r3, [pc, #12] ; (80001a0 <SysTick_Config+0x40>)
- 8000192: 2207 movs r2, #7
- 8000194: 601a str r2, [r3, #0]
- SysTick_CTRL_TICKINT_Msk |
- SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
- return (0); /* Function successful */
- 8000196: 2300 movs r3, #0
- }
- 8000198: 4618 mov r0, r3
- 800019a: 3708 adds r7, #8
- 800019c: 46bd mov sp, r7
- 800019e: bd80 pop {r7, pc}
- 80001a0: e000e010 .word 0xe000e010
- 080001a4 <SystemInit>:
- * @note This function should be used only after reset.
- * @param None
- * @retval None
- */
- void SystemInit (void)
- {
- 80001a4: b580 push {r7, lr}
- 80001a6: af00 add r7, sp, #0
- /* Reset the RCC clock configuration to the default reset state(for debug purpose) */
- /* Set HSION bit */
- RCC->CR |= (uint32_t)0x00000001;
- 80001a8: 4a15 ldr r2, [pc, #84] ; (8000200 <SystemInit+0x5c>)
- 80001aa: 4b15 ldr r3, [pc, #84] ; (8000200 <SystemInit+0x5c>)
- 80001ac: 681b ldr r3, [r3, #0]
- 80001ae: f043 0301 orr.w r3, r3, #1
- 80001b2: 6013 str r3, [r2, #0]
- /* Reset SW, HPRE, PPRE1, PPRE2, ADCPRE and MCO bits */
- #ifndef STM32F10X_CL
- RCC->CFGR &= (uint32_t)0xF8FF0000;
- 80001b4: 4912 ldr r1, [pc, #72] ; (8000200 <SystemInit+0x5c>)
- 80001b6: 4b12 ldr r3, [pc, #72] ; (8000200 <SystemInit+0x5c>)
- 80001b8: 685a ldr r2, [r3, #4]
- 80001ba: 4b12 ldr r3, [pc, #72] ; (8000204 <SystemInit+0x60>)
- 80001bc: 4013 ands r3, r2
- 80001be: 604b str r3, [r1, #4]
- #else
- RCC->CFGR &= (uint32_t)0xF0FF0000;
- #endif /* STM32F10X_CL */
-
- /* Reset HSEON, CSSON and PLLON bits */
- RCC->CR &= (uint32_t)0xFEF6FFFF;
- 80001c0: 4a0f ldr r2, [pc, #60] ; (8000200 <SystemInit+0x5c>)
- 80001c2: 4b0f ldr r3, [pc, #60] ; (8000200 <SystemInit+0x5c>)
- 80001c4: 681b ldr r3, [r3, #0]
- 80001c6: f023 7384 bic.w r3, r3, #17301504 ; 0x1080000
- 80001ca: f423 3380 bic.w r3, r3, #65536 ; 0x10000
- 80001ce: 6013 str r3, [r2, #0]
- /* Reset HSEBYP bit */
- RCC->CR &= (uint32_t)0xFFFBFFFF;
- 80001d0: 4a0b ldr r2, [pc, #44] ; (8000200 <SystemInit+0x5c>)
- 80001d2: 4b0b ldr r3, [pc, #44] ; (8000200 <SystemInit+0x5c>)
- 80001d4: 681b ldr r3, [r3, #0]
- 80001d6: f423 2380 bic.w r3, r3, #262144 ; 0x40000
- 80001da: 6013 str r3, [r2, #0]
- /* Reset PLLSRC, PLLXTPRE, PLLMUL and USBPRE/OTGFSPRE bits */
- RCC->CFGR &= (uint32_t)0xFF80FFFF;
- 80001dc: 4a08 ldr r2, [pc, #32] ; (8000200 <SystemInit+0x5c>)
- 80001de: 4b08 ldr r3, [pc, #32] ; (8000200 <SystemInit+0x5c>)
- 80001e0: 685b ldr r3, [r3, #4]
- 80001e2: f423 03fe bic.w r3, r3, #8323072 ; 0x7f0000
- 80001e6: 6053 str r3, [r2, #4]
- /* Reset CFGR2 register */
- RCC->CFGR2 = 0x00000000;
- #else
- /* Disable all interrupts and clear pending bits */
- RCC->CIR = 0x009F0000;
- 80001e8: 4b05 ldr r3, [pc, #20] ; (8000200 <SystemInit+0x5c>)
- 80001ea: f44f 021f mov.w r2, #10420224 ; 0x9f0000
- 80001ee: 609a str r2, [r3, #8]
- #endif /* DATA_IN_ExtSRAM */
- #endif
- /* Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers */
- /* Configure the Flash Latency cycles and enable prefetch buffer */
- SetSysClock();
- 80001f0: f000 f878 bl 80002e4 <SetSysClock>
- #ifdef VECT_TAB_SRAM
- SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
- #else
- SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
- 80001f4: 4b04 ldr r3, [pc, #16] ; (8000208 <SystemInit+0x64>)
- 80001f6: f04f 6200 mov.w r2, #134217728 ; 0x8000000
- 80001fa: 609a str r2, [r3, #8]
- #endif
- }
- 80001fc: bf00 nop
- 80001fe: bd80 pop {r7, pc}
- 8000200: 40021000 .word 0x40021000
- 8000204: f8ff0000 .word 0xf8ff0000
- 8000208: e000ed00 .word 0xe000ed00
- 0800020c <SystemCoreClockUpdate>:
- * value for HSE crystal.
- * @param None
- * @retval None
- */
- void SystemCoreClockUpdate (void)
- {
- 800020c: b480 push {r7}
- 800020e: b085 sub sp, #20
- 8000210: af00 add r7, sp, #0
- uint32_t tmp = 0, pllmull = 0, pllsource = 0;
- 8000212: 2300 movs r3, #0
- 8000214: 60fb str r3, [r7, #12]
- 8000216: 2300 movs r3, #0
- 8000218: 60bb str r3, [r7, #8]
- 800021a: 2300 movs r3, #0
- 800021c: 607b str r3, [r7, #4]
- #if defined (STM32F10X_LD_VL) || defined (STM32F10X_MD_VL) || (defined STM32F10X_HD_VL)
- uint32_t prediv1factor = 0;
- #endif /* STM32F10X_LD_VL or STM32F10X_MD_VL or STM32F10X_HD_VL */
-
- /* Get SYSCLK source -------------------------------------------------------*/
- tmp = RCC->CFGR & RCC_CFGR_SWS;
- 800021e: 4b2c ldr r3, [pc, #176] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
- 8000220: 685b ldr r3, [r3, #4]
- 8000222: f003 030c and.w r3, r3, #12
- 8000226: 60fb str r3, [r7, #12]
-
- switch (tmp)
- 8000228: 68fb ldr r3, [r7, #12]
- 800022a: 2b04 cmp r3, #4
- 800022c: d007 beq.n 800023e <SystemCoreClockUpdate+0x32>
- 800022e: 2b08 cmp r3, #8
- 8000230: d009 beq.n 8000246 <SystemCoreClockUpdate+0x3a>
- 8000232: 2b00 cmp r3, #0
- 8000234: d133 bne.n 800029e <SystemCoreClockUpdate+0x92>
- {
- case 0x00: /* HSI used as system clock */
- SystemCoreClock = HSI_VALUE;
- 8000236: 4b27 ldr r3, [pc, #156] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 8000238: 4a27 ldr r2, [pc, #156] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
- 800023a: 601a str r2, [r3, #0]
- break;
- 800023c: e033 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
- case 0x04: /* HSE used as system clock */
- SystemCoreClock = HSE_VALUE;
- 800023e: 4b25 ldr r3, [pc, #148] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 8000240: 4a25 ldr r2, [pc, #148] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
- 8000242: 601a str r2, [r3, #0]
- break;
- 8000244: e02f b.n 80002a6 <SystemCoreClockUpdate+0x9a>
- case 0x08: /* PLL used as system clock */
- /* Get PLL clock source and multiplication factor ----------------------*/
- pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
- 8000246: 4b22 ldr r3, [pc, #136] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
- 8000248: 685b ldr r3, [r3, #4]
- 800024a: f403 1370 and.w r3, r3, #3932160 ; 0x3c0000
- 800024e: 60bb str r3, [r7, #8]
- pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
- 8000250: 4b1f ldr r3, [pc, #124] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
- 8000252: 685b ldr r3, [r3, #4]
- 8000254: f403 3380 and.w r3, r3, #65536 ; 0x10000
- 8000258: 607b str r3, [r7, #4]
-
- #ifndef STM32F10X_CL
- pllmull = ( pllmull >> 18) + 2;
- 800025a: 68bb ldr r3, [r7, #8]
- 800025c: 0c9b lsrs r3, r3, #18
- 800025e: 3302 adds r3, #2
- 8000260: 60bb str r3, [r7, #8]
-
- if (pllsource == 0x00)
- 8000262: 687b ldr r3, [r7, #4]
- 8000264: 2b00 cmp r3, #0
- 8000266: d106 bne.n 8000276 <SystemCoreClockUpdate+0x6a>
- {
- /* HSI oscillator clock divided by 2 selected as PLL clock entry */
- SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
- 8000268: 68bb ldr r3, [r7, #8]
- 800026a: 4a1c ldr r2, [pc, #112] ; (80002dc <SystemCoreClockUpdate+0xd0>)
- 800026c: fb02 f303 mul.w r3, r2, r3
- 8000270: 4a18 ldr r2, [pc, #96] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 8000272: 6013 str r3, [r2, #0]
- pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
- SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
- }
- }
- #endif /* STM32F10X_CL */
- break;
- 8000274: e017 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
- prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
- /* HSE oscillator clock selected as PREDIV1 clock entry */
- SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
- #else
- /* HSE selected as PLL clock entry */
- if ((RCC->CFGR & RCC_CFGR_PLLXTPRE) != (uint32_t)RESET)
- 8000276: 4b16 ldr r3, [pc, #88] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
- 8000278: 685b ldr r3, [r3, #4]
- 800027a: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 800027e: 2b00 cmp r3, #0
- 8000280: d006 beq.n 8000290 <SystemCoreClockUpdate+0x84>
- {/* HSE oscillator clock divided by 2 */
- SystemCoreClock = (HSE_VALUE >> 1) * pllmull;
- 8000282: 68bb ldr r3, [r7, #8]
- 8000284: 4a15 ldr r2, [pc, #84] ; (80002dc <SystemCoreClockUpdate+0xd0>)
- 8000286: fb02 f303 mul.w r3, r2, r3
- 800028a: 4a12 ldr r2, [pc, #72] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 800028c: 6013 str r3, [r2, #0]
- pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
- SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
- }
- }
- #endif /* STM32F10X_CL */
- break;
- 800028e: e00a b.n 80002a6 <SystemCoreClockUpdate+0x9a>
- {/* HSE oscillator clock divided by 2 */
- SystemCoreClock = (HSE_VALUE >> 1) * pllmull;
- }
- else
- {
- SystemCoreClock = HSE_VALUE * pllmull;
- 8000290: 68bb ldr r3, [r7, #8]
- 8000292: 4a11 ldr r2, [pc, #68] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
- 8000294: fb02 f303 mul.w r3, r2, r3
- 8000298: 4a0e ldr r2, [pc, #56] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 800029a: 6013 str r3, [r2, #0]
- pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
- SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
- }
- }
- #endif /* STM32F10X_CL */
- break;
- 800029c: e003 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
- default:
- SystemCoreClock = HSI_VALUE;
- 800029e: 4b0d ldr r3, [pc, #52] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 80002a0: 4a0d ldr r2, [pc, #52] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
- 80002a2: 601a str r2, [r3, #0]
- break;
- 80002a4: bf00 nop
- }
-
- /* Compute HCLK clock frequency ----------------*/
- /* Get HCLK prescaler */
- tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
- 80002a6: 4b0a ldr r3, [pc, #40] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
- 80002a8: 685b ldr r3, [r3, #4]
- 80002aa: f003 03f0 and.w r3, r3, #240 ; 0xf0
- 80002ae: 091b lsrs r3, r3, #4
- 80002b0: 4a0b ldr r2, [pc, #44] ; (80002e0 <SystemCoreClockUpdate+0xd4>)
- 80002b2: 5cd3 ldrb r3, [r2, r3]
- 80002b4: b2db uxtb r3, r3
- 80002b6: 60fb str r3, [r7, #12]
- /* HCLK clock frequency */
- SystemCoreClock >>= tmp;
- 80002b8: 4b06 ldr r3, [pc, #24] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 80002ba: 681a ldr r2, [r3, #0]
- 80002bc: 68fb ldr r3, [r7, #12]
- 80002be: fa22 f303 lsr.w r3, r2, r3
- 80002c2: 4a04 ldr r2, [pc, #16] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
- 80002c4: 6013 str r3, [r2, #0]
- }
- 80002c6: bf00 nop
- 80002c8: 3714 adds r7, #20
- 80002ca: 46bd mov sp, r7
- 80002cc: bc80 pop {r7}
- 80002ce: 4770 bx lr
- 80002d0: 40021000 .word 0x40021000
- 80002d4: 20000000 .word 0x20000000
- 80002d8: 007a1200 .word 0x007a1200
- 80002dc: 003d0900 .word 0x003d0900
- 80002e0: 20000004 .word 0x20000004
- 080002e4 <SetSysClock>:
- * @brief Configures the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers.
- * @param None
- * @retval None
- */
- static void SetSysClock(void)
- {
- 80002e4: b580 push {r7, lr}
- 80002e6: af00 add r7, sp, #0
- #elif defined SYSCLK_FREQ_48MHz
- SetSysClockTo48();
- #elif defined SYSCLK_FREQ_56MHz
- SetSysClockTo56();
- #elif defined SYSCLK_FREQ_72MHz
- SetSysClockTo72();
- 80002e8: f000 f802 bl 80002f0 <SetSysClockTo72>
- #endif
-
- /* If none of the define above is enabled, the HSI is used as System clock
- source (default after reset) */
- }
- 80002ec: bf00 nop
- 80002ee: bd80 pop {r7, pc}
- 080002f0 <SetSysClockTo72>:
- * @note This function should be used only after reset.
- * @param None
- * @retval None
- */
- static void SetSysClockTo72(void)
- {
- 80002f0: b480 push {r7}
- 80002f2: b083 sub sp, #12
- 80002f4: af00 add r7, sp, #0
- __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
- 80002f6: 2300 movs r3, #0
- 80002f8: 607b str r3, [r7, #4]
- 80002fa: 2300 movs r3, #0
- 80002fc: 603b str r3, [r7, #0]
-
- /* SYSCLK, HCLK, PCLK2 and PCLK1 configuration ---------------------------*/
- /* Enable HSE */
- RCC->CR |= ((uint32_t)RCC_CR_HSEON);
- 80002fe: 4a3a ldr r2, [pc, #232] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000300: 4b39 ldr r3, [pc, #228] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000302: 681b ldr r3, [r3, #0]
- 8000304: f443 3380 orr.w r3, r3, #65536 ; 0x10000
- 8000308: 6013 str r3, [r2, #0]
-
- /* Wait till HSE is ready and if Time out is reached exit */
- do
- {
- HSEStatus = RCC->CR & RCC_CR_HSERDY;
- 800030a: 4b37 ldr r3, [pc, #220] ; (80003e8 <SetSysClockTo72+0xf8>)
- 800030c: 681b ldr r3, [r3, #0]
- 800030e: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 8000312: 603b str r3, [r7, #0]
- StartUpCounter++;
- 8000314: 687b ldr r3, [r7, #4]
- 8000316: 3301 adds r3, #1
- 8000318: 607b str r3, [r7, #4]
- } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
- 800031a: 683b ldr r3, [r7, #0]
- 800031c: 2b00 cmp r3, #0
- 800031e: d103 bne.n 8000328 <SetSysClockTo72+0x38>
- 8000320: 687b ldr r3, [r7, #4]
- 8000322: f5b3 6fa0 cmp.w r3, #1280 ; 0x500
- 8000326: d1f0 bne.n 800030a <SetSysClockTo72+0x1a>
- if ((RCC->CR & RCC_CR_HSERDY) != RESET)
- 8000328: 4b2f ldr r3, [pc, #188] ; (80003e8 <SetSysClockTo72+0xf8>)
- 800032a: 681b ldr r3, [r3, #0]
- 800032c: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 8000330: 2b00 cmp r3, #0
- 8000332: d002 beq.n 800033a <SetSysClockTo72+0x4a>
- {
- HSEStatus = (uint32_t)0x01;
- 8000334: 2301 movs r3, #1
- 8000336: 603b str r3, [r7, #0]
- 8000338: e001 b.n 800033e <SetSysClockTo72+0x4e>
- }
- else
- {
- HSEStatus = (uint32_t)0x00;
- 800033a: 2300 movs r3, #0
- 800033c: 603b str r3, [r7, #0]
- }
- if (HSEStatus == (uint32_t)0x01)
- 800033e: 683b ldr r3, [r7, #0]
- 8000340: 2b01 cmp r3, #1
- 8000342: d14b bne.n 80003dc <SetSysClockTo72+0xec>
- {
- /* Enable Prefetch Buffer */
- FLASH->ACR |= FLASH_ACR_PRFTBE;
- 8000344: 4a29 ldr r2, [pc, #164] ; (80003ec <SetSysClockTo72+0xfc>)
- 8000346: 4b29 ldr r3, [pc, #164] ; (80003ec <SetSysClockTo72+0xfc>)
- 8000348: 681b ldr r3, [r3, #0]
- 800034a: f043 0310 orr.w r3, r3, #16
- 800034e: 6013 str r3, [r2, #0]
- /* Flash 2 wait state */
- FLASH->ACR &= (uint32_t)((uint32_t)~FLASH_ACR_LATENCY);
- 8000350: 4a26 ldr r2, [pc, #152] ; (80003ec <SetSysClockTo72+0xfc>)
- 8000352: 4b26 ldr r3, [pc, #152] ; (80003ec <SetSysClockTo72+0xfc>)
- 8000354: 681b ldr r3, [r3, #0]
- 8000356: f023 0303 bic.w r3, r3, #3
- 800035a: 6013 str r3, [r2, #0]
- FLASH->ACR |= (uint32_t)FLASH_ACR_LATENCY_2;
- 800035c: 4a23 ldr r2, [pc, #140] ; (80003ec <SetSysClockTo72+0xfc>)
- 800035e: 4b23 ldr r3, [pc, #140] ; (80003ec <SetSysClockTo72+0xfc>)
- 8000360: 681b ldr r3, [r3, #0]
- 8000362: f043 0302 orr.w r3, r3, #2
- 8000366: 6013 str r3, [r2, #0]
-
- /* HCLK = SYSCLK */
- RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
- 8000368: 4a1f ldr r2, [pc, #124] ; (80003e8 <SetSysClockTo72+0xf8>)
- 800036a: 4b1f ldr r3, [pc, #124] ; (80003e8 <SetSysClockTo72+0xf8>)
- 800036c: 685b ldr r3, [r3, #4]
- 800036e: 6053 str r3, [r2, #4]
-
- /* PCLK2 = HCLK */
- RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
- 8000370: 4a1d ldr r2, [pc, #116] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000372: 4b1d ldr r3, [pc, #116] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000374: 685b ldr r3, [r3, #4]
- 8000376: 6053 str r3, [r2, #4]
-
- /* PCLK1 = HCLK */
- RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV2;
- 8000378: 4a1b ldr r2, [pc, #108] ; (80003e8 <SetSysClockTo72+0xf8>)
- 800037a: 4b1b ldr r3, [pc, #108] ; (80003e8 <SetSysClockTo72+0xf8>)
- 800037c: 685b ldr r3, [r3, #4]
- 800037e: f443 6380 orr.w r3, r3, #1024 ; 0x400
- 8000382: 6053 str r3, [r2, #4]
- RCC->CFGR &= (uint32_t)~(RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLSRC | RCC_CFGR_PLLMULL);
- RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLSRC_PREDIV1 |
- RCC_CFGR_PLLMULL9);
- #else
- /* PLL configuration: PLLCLK = HSE * 9 = 72 MHz */
- RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE |
- 8000384: 4a18 ldr r2, [pc, #96] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000386: 4b18 ldr r3, [pc, #96] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000388: 685b ldr r3, [r3, #4]
- 800038a: f423 137c bic.w r3, r3, #4128768 ; 0x3f0000
- 800038e: 6053 str r3, [r2, #4]
- RCC_CFGR_PLLMULL));
- RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE | RCC_CFGR_PLLMULL9);
- 8000390: 4a15 ldr r2, [pc, #84] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000392: 4b15 ldr r3, [pc, #84] ; (80003e8 <SetSysClockTo72+0xf8>)
- 8000394: 685b ldr r3, [r3, #4]
- 8000396: f443 13e8 orr.w r3, r3, #1900544 ; 0x1d0000
- 800039a: 6053 str r3, [r2, #4]
- #endif /* STM32F10X_CL */
- /* Enable PLL */
- RCC->CR |= RCC_CR_PLLON;
- 800039c: 4a12 ldr r2, [pc, #72] ; (80003e8 <SetSysClockTo72+0xf8>)
- 800039e: 4b12 ldr r3, [pc, #72] ; (80003e8 <SetSysClockTo72+0xf8>)
- 80003a0: 681b ldr r3, [r3, #0]
- 80003a2: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
- 80003a6: 6013 str r3, [r2, #0]
- /* Wait till PLL is ready */
- while((RCC->CR & RCC_CR_PLLRDY) == 0)
- 80003a8: bf00 nop
- 80003aa: 4b0f ldr r3, [pc, #60] ; (80003e8 <SetSysClockTo72+0xf8>)
- 80003ac: 681b ldr r3, [r3, #0]
- 80003ae: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
- 80003b2: 2b00 cmp r3, #0
- 80003b4: d0f9 beq.n 80003aa <SetSysClockTo72+0xba>
- {
- }
-
- /* Select PLL as system clock source */
- RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
- 80003b6: 4a0c ldr r2, [pc, #48] ; (80003e8 <SetSysClockTo72+0xf8>)
- 80003b8: 4b0b ldr r3, [pc, #44] ; (80003e8 <SetSysClockTo72+0xf8>)
- 80003ba: 685b ldr r3, [r3, #4]
- 80003bc: f023 0303 bic.w r3, r3, #3
- 80003c0: 6053 str r3, [r2, #4]
- RCC->CFGR |= (uint32_t)RCC_CFGR_SW_PLL;
- 80003c2: 4a09 ldr r2, [pc, #36] ; (80003e8 <SetSysClockTo72+0xf8>)
- 80003c4: 4b08 ldr r3, [pc, #32] ; (80003e8 <SetSysClockTo72+0xf8>)
- 80003c6: 685b ldr r3, [r3, #4]
- 80003c8: f043 0302 orr.w r3, r3, #2
- 80003cc: 6053 str r3, [r2, #4]
- /* Wait till PLL is used as system clock source */
- while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)0x08)
- 80003ce: bf00 nop
- 80003d0: 4b05 ldr r3, [pc, #20] ; (80003e8 <SetSysClockTo72+0xf8>)
- 80003d2: 685b ldr r3, [r3, #4]
- 80003d4: f003 030c and.w r3, r3, #12
- 80003d8: 2b08 cmp r3, #8
- 80003da: d1f9 bne.n 80003d0 <SetSysClockTo72+0xe0>
- }
- else
- { /* If HSE fails to start-up, the application will have wrong clock
- configuration. User can add here some code to deal with this error */
- }
- }
- 80003dc: bf00 nop
- 80003de: 370c adds r7, #12
- 80003e0: 46bd mov sp, r7
- 80003e2: bc80 pop {r7}
- 80003e4: 4770 bx lr
- 80003e6: bf00 nop
- 80003e8: 40021000 .word 0x40021000
- 80003ec: 40022000 .word 0x40022000
- 080003f0 <SPI_I2S_GetFlagStatus>:
- FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
- {
- 80003f0: b480 push {r7}
- 80003f2: b085 sub sp, #20
- 80003f4: af00 add r7, sp, #0
- 80003f6: 6078 str r0, [r7, #4]
- 80003f8: 460b mov r3, r1
- 80003fa: 807b strh r3, [r7, #2]
- FlagStatus bitstatus = RESET;
- 80003fc: 2300 movs r3, #0
- 80003fe: 73fb strb r3, [r7, #15]
- /* Check the parameters */
- assert_param(IS_SPI_ALL_PERIPH(SPIx));
- assert_param(IS_SPI_I2S_GET_FLAG(SPI_I2S_FLAG));
- /* Check the status of the specified SPI/I2S flag */
- if ((SPIx->SR & SPI_I2S_FLAG) != (uint16_t)RESET)
- 8000400: 687b ldr r3, [r7, #4]
- 8000402: 891b ldrh r3, [r3, #8]
- 8000404: b29a uxth r2, r3
- 8000406: 887b ldrh r3, [r7, #2]
- 8000408: 4013 ands r3, r2
- 800040a: b29b uxth r3, r3
- 800040c: 2b00 cmp r3, #0
- 800040e: d002 beq.n 8000416 <SPI_I2S_GetFlagStatus+0x26>
- {
- /* SPI_I2S_FLAG is set */
- bitstatus = SET;
- 8000410: 2301 movs r3, #1
- 8000412: 73fb strb r3, [r7, #15]
- 8000414: e001 b.n 800041a <SPI_I2S_GetFlagStatus+0x2a>
- }
- else
- {
- /* SPI_I2S_FLAG is reset */
- bitstatus = RESET;
- 8000416: 2300 movs r3, #0
- 8000418: 73fb strb r3, [r7, #15]
- }
- /* Return the SPI_I2S_FLAG status */
- return bitstatus;
- 800041a: 7bfb ldrb r3, [r7, #15]
- }
- 800041c: 4618 mov r0, r3
- 800041e: 3714 adds r7, #20
- 8000420: 46bd mov sp, r7
- 8000422: bc80 pop {r7}
- 8000424: 4770 bx lr
- 8000426: bf00 nop
- 08000428 <SPI_I2S_SendData>:
- void SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data)
- {
- 8000428: b480 push {r7}
- 800042a: b083 sub sp, #12
- 800042c: af00 add r7, sp, #0
- 800042e: 6078 str r0, [r7, #4]
- 8000430: 460b mov r3, r1
- 8000432: 807b strh r3, [r7, #2]
- /* Check the parameters */
- assert_param(IS_SPI_ALL_PERIPH(SPIx));
-
- /* Write in the DR register the data to be sent */
- SPIx->DR = Data;
- 8000434: 687b ldr r3, [r7, #4]
- 8000436: 887a ldrh r2, [r7, #2]
- 8000438: 819a strh r2, [r3, #12]
- }
- 800043a: bf00 nop
- 800043c: 370c adds r7, #12
- 800043e: 46bd mov sp, r7
- 8000440: bc80 pop {r7}
- 8000442: 4770 bx lr
- 08000444 <SPI_I2S_ReceiveData>:
- uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx)
- {
- 8000444: b480 push {r7}
- 8000446: b083 sub sp, #12
- 8000448: af00 add r7, sp, #0
- 800044a: 6078 str r0, [r7, #4]
- /* Check the parameters */
- assert_param(IS_SPI_ALL_PERIPH(SPIx));
-
- /* Return the data in the DR register */
- return SPIx->DR;
- 800044c: 687b ldr r3, [r7, #4]
- 800044e: 899b ldrh r3, [r3, #12]
- 8000450: b29b uxth r3, r3
- }
- 8000452: 4618 mov r0, r3
- 8000454: 370c adds r7, #12
- 8000456: 46bd mov sp, r7
- 8000458: bc80 pop {r7}
- 800045a: 4770 bx lr
- 0800045c <SD_WriteByte>:
- uint8_t SD_WriteByte(uint8_t Data)
- {
- 800045c: b580 push {r7, lr}
- 800045e: b082 sub sp, #8
- 8000460: af00 add r7, sp, #0
- 8000462: 4603 mov r3, r0
- 8000464: 71fb strb r3, [r7, #7]
- /*!< Wait until the transmit buffer is empty */
- while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
- 8000466: bf00 nop
- 8000468: 2102 movs r1, #2
- 800046a: 480e ldr r0, [pc, #56] ; (80004a4 <SD_WriteByte+0x48>)
- 800046c: f7ff ffc0 bl 80003f0 <SPI_I2S_GetFlagStatus>
- 8000470: 4603 mov r3, r0
- 8000472: 2b00 cmp r3, #0
- 8000474: d0f8 beq.n 8000468 <SD_WriteByte+0xc>
- {
- }
-
- /*!< Send the byte */
- SPI_I2S_SendData(SD_SPI, Data);
- 8000476: 79fb ldrb r3, [r7, #7]
- 8000478: b29b uxth r3, r3
- 800047a: 4619 mov r1, r3
- 800047c: 4809 ldr r0, [pc, #36] ; (80004a4 <SD_WriteByte+0x48>)
- 800047e: f7ff ffd3 bl 8000428 <SPI_I2S_SendData>
-
- /*!< Wait to receive a byte*/
- while(SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
- 8000482: bf00 nop
- 8000484: 2101 movs r1, #1
- 8000486: 4807 ldr r0, [pc, #28] ; (80004a4 <SD_WriteByte+0x48>)
- 8000488: f7ff ffb2 bl 80003f0 <SPI_I2S_GetFlagStatus>
- 800048c: 4603 mov r3, r0
- 800048e: 2b00 cmp r3, #0
- 8000490: d0f8 beq.n 8000484 <SD_WriteByte+0x28>
- {
- }
-
- /*!< Return the byte read from the SPI bus */
- return SPI_I2S_ReceiveData(SD_SPI);
- 8000492: 4804 ldr r0, [pc, #16] ; (80004a4 <SD_WriteByte+0x48>)
- 8000494: f7ff ffd6 bl 8000444 <SPI_I2S_ReceiveData>
- 8000498: 4603 mov r3, r0
- 800049a: b2db uxtb r3, r3
- }
- 800049c: 4618 mov r0, r3
- 800049e: 3708 adds r7, #8
- 80004a0: 46bd mov sp, r7
- 80004a2: bd80 pop {r7, pc}
- 80004a4: 40013000 .word 0x40013000
- 080004a8 <GPIO_Init>:
- void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
- {
- 80004a8: b480 push {r7}
- 80004aa: b089 sub sp, #36 ; 0x24
- 80004ac: af00 add r7, sp, #0
- 80004ae: 6078 str r0, [r7, #4]
- 80004b0: 6039 str r1, [r7, #0]
- uint32_t currentmode = 0x00, currentpin = 0x00, pinpos = 0x00, pos = 0x00;
- 80004b2: 2300 movs r3, #0
- 80004b4: 61fb str r3, [r7, #28]
- 80004b6: 2300 movs r3, #0
- 80004b8: 613b str r3, [r7, #16]
- 80004ba: 2300 movs r3, #0
- 80004bc: 61bb str r3, [r7, #24]
- 80004be: 2300 movs r3, #0
- 80004c0: 60fb str r3, [r7, #12]
- uint32_t tmpreg = 0x00, pinmask = 0x00;
- 80004c2: 2300 movs r3, #0
- 80004c4: 617b str r3, [r7, #20]
- 80004c6: 2300 movs r3, #0
- 80004c8: 60bb str r3, [r7, #8]
- assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
- assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
- assert_param(IS_GPIO_PIN(GPIO_InitStruct->GPIO_Pin));
-
- /*---------------------------- GPIO Mode Configuration -----------------------*/
- currentmode = ((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x0F);
- 80004ca: 683b ldr r3, [r7, #0]
- 80004cc: 78db ldrb r3, [r3, #3]
- 80004ce: f003 030f and.w r3, r3, #15
- 80004d2: 61fb str r3, [r7, #28]
- if ((((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x10)) != 0x00)
- 80004d4: 683b ldr r3, [r7, #0]
- 80004d6: 78db ldrb r3, [r3, #3]
- 80004d8: f003 0310 and.w r3, r3, #16
- 80004dc: 2b00 cmp r3, #0
- 80004de: d005 beq.n 80004ec <GPIO_Init+0x44>
- {
- /* Check the parameters */
- assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
- /* Output mode */
- currentmode |= (uint32_t)GPIO_InitStruct->GPIO_Speed;
- 80004e0: 683b ldr r3, [r7, #0]
- 80004e2: 789b ldrb r3, [r3, #2]
- 80004e4: 461a mov r2, r3
- 80004e6: 69fb ldr r3, [r7, #28]
- 80004e8: 4313 orrs r3, r2
- 80004ea: 61fb str r3, [r7, #28]
- }
- /*---------------------------- GPIO CRL Configuration ------------------------*/
- /* Configure the eight low port pins */
- if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
- 80004ec: 683b ldr r3, [r7, #0]
- 80004ee: 881b ldrh r3, [r3, #0]
- 80004f0: b2db uxtb r3, r3
- 80004f2: 2b00 cmp r3, #0
- 80004f4: d044 beq.n 8000580 <GPIO_Init+0xd8>
- {
- tmpreg = GPIOx->CRL;
- 80004f6: 687b ldr r3, [r7, #4]
- 80004f8: 681b ldr r3, [r3, #0]
- 80004fa: 617b str r3, [r7, #20]
- for (pinpos = 0x00; pinpos < 0x08; pinpos++)
- 80004fc: 2300 movs r3, #0
- 80004fe: 61bb str r3, [r7, #24]
- 8000500: e038 b.n 8000574 <GPIO_Init+0xcc>
- {
- pos = ((uint32_t)0x01) << pinpos;
- 8000502: 2201 movs r2, #1
- 8000504: 69bb ldr r3, [r7, #24]
- 8000506: fa02 f303 lsl.w r3, r2, r3
- 800050a: 60fb str r3, [r7, #12]
- /* Get the port pins position */
- currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
- 800050c: 683b ldr r3, [r7, #0]
- 800050e: 881b ldrh r3, [r3, #0]
- 8000510: 461a mov r2, r3
- 8000512: 68fb ldr r3, [r7, #12]
- 8000514: 4013 ands r3, r2
- 8000516: 613b str r3, [r7, #16]
- if (currentpin == pos)
- 8000518: 693a ldr r2, [r7, #16]
- 800051a: 68fb ldr r3, [r7, #12]
- 800051c: 429a cmp r2, r3
- 800051e: d126 bne.n 800056e <GPIO_Init+0xc6>
- {
- pos = pinpos << 2;
- 8000520: 69bb ldr r3, [r7, #24]
- 8000522: 009b lsls r3, r3, #2
- 8000524: 60fb str r3, [r7, #12]
- /* Clear the corresponding low control register bits */
- pinmask = ((uint32_t)0x0F) << pos;
- 8000526: 220f movs r2, #15
- 8000528: 68fb ldr r3, [r7, #12]
- 800052a: fa02 f303 lsl.w r3, r2, r3
- 800052e: 60bb str r3, [r7, #8]
- tmpreg &= ~pinmask;
- 8000530: 68bb ldr r3, [r7, #8]
- 8000532: 43db mvns r3, r3
- 8000534: 697a ldr r2, [r7, #20]
- 8000536: 4013 ands r3, r2
- 8000538: 617b str r3, [r7, #20]
- /* Write the mode configuration in the corresponding bits */
- tmpreg |= (currentmode << pos);
- 800053a: 69fa ldr r2, [r7, #28]
- 800053c: 68fb ldr r3, [r7, #12]
- 800053e: fa02 f303 lsl.w r3, r2, r3
- 8000542: 697a ldr r2, [r7, #20]
- 8000544: 4313 orrs r3, r2
- 8000546: 617b str r3, [r7, #20]
- /* Reset the corresponding ODR bit */
- if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
- 8000548: 683b ldr r3, [r7, #0]
- 800054a: 78db ldrb r3, [r3, #3]
- 800054c: 2b28 cmp r3, #40 ; 0x28
- 800054e: d105 bne.n 800055c <GPIO_Init+0xb4>
- {
- GPIOx->BRR = (((uint32_t)0x01) << pinpos);
- 8000550: 2201 movs r2, #1
- 8000552: 69bb ldr r3, [r7, #24]
- 8000554: 409a lsls r2, r3
- 8000556: 687b ldr r3, [r7, #4]
- 8000558: 615a str r2, [r3, #20]
- 800055a: e008 b.n 800056e <GPIO_Init+0xc6>
- }
- else
- {
- /* Set the corresponding ODR bit */
- if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
- 800055c: 683b ldr r3, [r7, #0]
- 800055e: 78db ldrb r3, [r3, #3]
- 8000560: 2b48 cmp r3, #72 ; 0x48
- 8000562: d104 bne.n 800056e <GPIO_Init+0xc6>
- {
- GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
- 8000564: 2201 movs r2, #1
- 8000566: 69bb ldr r3, [r7, #24]
- 8000568: 409a lsls r2, r3
- 800056a: 687b ldr r3, [r7, #4]
- 800056c: 611a str r2, [r3, #16]
- /*---------------------------- GPIO CRL Configuration ------------------------*/
- /* Configure the eight low port pins */
- if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
- {
- tmpreg = GPIOx->CRL;
- for (pinpos = 0x00; pinpos < 0x08; pinpos++)
- 800056e: 69bb ldr r3, [r7, #24]
- 8000570: 3301 adds r3, #1
- 8000572: 61bb str r3, [r7, #24]
- 8000574: 69bb ldr r3, [r7, #24]
- 8000576: 2b07 cmp r3, #7
- 8000578: d9c3 bls.n 8000502 <GPIO_Init+0x5a>
- GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
- }
- }
- }
- }
- GPIOx->CRL = tmpreg;
- 800057a: 687b ldr r3, [r7, #4]
- 800057c: 697a ldr r2, [r7, #20]
- 800057e: 601a str r2, [r3, #0]
- }
- /*---------------------------- GPIO CRH Configuration ------------------------*/
- /* Configure the eight high port pins */
- if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
- 8000580: 683b ldr r3, [r7, #0]
- 8000582: 881b ldrh r3, [r3, #0]
- 8000584: 2bff cmp r3, #255 ; 0xff
- 8000586: d946 bls.n 8000616 <GPIO_Init+0x16e>
- {
- tmpreg = GPIOx->CRH;
- 8000588: 687b ldr r3, [r7, #4]
- 800058a: 685b ldr r3, [r3, #4]
- 800058c: 617b str r3, [r7, #20]
- for (pinpos = 0x00; pinpos < 0x08; pinpos++)
- 800058e: 2300 movs r3, #0
- 8000590: 61bb str r3, [r7, #24]
- 8000592: e03a b.n 800060a <GPIO_Init+0x162>
- {
- pos = (((uint32_t)0x01) << (pinpos + 0x08));
- 8000594: 69bb ldr r3, [r7, #24]
- 8000596: 3308 adds r3, #8
- 8000598: 2201 movs r2, #1
- 800059a: fa02 f303 lsl.w r3, r2, r3
- 800059e: 60fb str r3, [r7, #12]
- /* Get the port pins position */
- currentpin = ((GPIO_InitStruct->GPIO_Pin) & pos);
- 80005a0: 683b ldr r3, [r7, #0]
- 80005a2: 881b ldrh r3, [r3, #0]
- 80005a4: 461a mov r2, r3
- 80005a6: 68fb ldr r3, [r7, #12]
- 80005a8: 4013 ands r3, r2
- 80005aa: 613b str r3, [r7, #16]
- if (currentpin == pos)
- 80005ac: 693a ldr r2, [r7, #16]
- 80005ae: 68fb ldr r3, [r7, #12]
- 80005b0: 429a cmp r2, r3
- 80005b2: d127 bne.n 8000604 <GPIO_Init+0x15c>
- {
- pos = pinpos << 2;
- 80005b4: 69bb ldr r3, [r7, #24]
- 80005b6: 009b lsls r3, r3, #2
- 80005b8: 60fb str r3, [r7, #12]
- /* Clear the corresponding high control register bits */
- pinmask = ((uint32_t)0x0F) << pos;
- 80005ba: 220f movs r2, #15
- 80005bc: 68fb ldr r3, [r7, #12]
- 80005be: fa02 f303 lsl.w r3, r2, r3
- 80005c2: 60bb str r3, [r7, #8]
- tmpreg &= ~pinmask;
- 80005c4: 68bb ldr r3, [r7, #8]
- 80005c6: 43db mvns r3, r3
- 80005c8: 697a ldr r2, [r7, #20]
- 80005ca: 4013 ands r3, r2
- 80005cc: 617b str r3, [r7, #20]
- /* Write the mode configuration in the corresponding bits */
- tmpreg |= (currentmode << pos);
- 80005ce: 69fa ldr r2, [r7, #28]
- 80005d0: 68fb ldr r3, [r7, #12]
- 80005d2: fa02 f303 lsl.w r3, r2, r3
- 80005d6: 697a ldr r2, [r7, #20]
- 80005d8: 4313 orrs r3, r2
- 80005da: 617b str r3, [r7, #20]
- /* Reset the corresponding ODR bit */
- if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
- 80005dc: 683b ldr r3, [r7, #0]
- 80005de: 78db ldrb r3, [r3, #3]
- 80005e0: 2b28 cmp r3, #40 ; 0x28
- 80005e2: d105 bne.n 80005f0 <GPIO_Init+0x148>
- {
- GPIOx->BRR = (((uint32_t)0x01) << (pinpos + 0x08));
- 80005e4: 69bb ldr r3, [r7, #24]
- 80005e6: 3308 adds r3, #8
- 80005e8: 2201 movs r2, #1
- 80005ea: 409a lsls r2, r3
- 80005ec: 687b ldr r3, [r7, #4]
- 80005ee: 615a str r2, [r3, #20]
- }
- /* Set the corresponding ODR bit */
- if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
- 80005f0: 683b ldr r3, [r7, #0]
- 80005f2: 78db ldrb r3, [r3, #3]
- 80005f4: 2b48 cmp r3, #72 ; 0x48
- 80005f6: d105 bne.n 8000604 <GPIO_Init+0x15c>
- {
- GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
- 80005f8: 69bb ldr r3, [r7, #24]
- 80005fa: 3308 adds r3, #8
- 80005fc: 2201 movs r2, #1
- 80005fe: 409a lsls r2, r3
- 8000600: 687b ldr r3, [r7, #4]
- 8000602: 611a str r2, [r3, #16]
- /*---------------------------- GPIO CRH Configuration ------------------------*/
- /* Configure the eight high port pins */
- if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
- {
- tmpreg = GPIOx->CRH;
- for (pinpos = 0x00; pinpos < 0x08; pinpos++)
- 8000604: 69bb ldr r3, [r7, #24]
- 8000606: 3301 adds r3, #1
- 8000608: 61bb str r3, [r7, #24]
- 800060a: 69bb ldr r3, [r7, #24]
- 800060c: 2b07 cmp r3, #7
- 800060e: d9c1 bls.n 8000594 <GPIO_Init+0xec>
- {
- GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
- }
- }
- }
- GPIOx->CRH = tmpreg;
- 8000610: 687b ldr r3, [r7, #4]
- 8000612: 697a ldr r2, [r7, #20]
- 8000614: 605a str r2, [r3, #4]
- }
- }
- 8000616: bf00 nop
- 8000618: 3724 adds r7, #36 ; 0x24
- 800061a: 46bd mov sp, r7
- 800061c: bc80 pop {r7}
- 800061e: 4770 bx lr
- 08000620 <SPI_Init>:
- void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct)
- {
- 8000620: b480 push {r7}
- 8000622: b085 sub sp, #20
- 8000624: af00 add r7, sp, #0
- 8000626: 6078 str r0, [r7, #4]
- 8000628: 6039 str r1, [r7, #0]
- uint16_t tmpreg = 0;
- 800062a: 2300 movs r3, #0
- 800062c: 81fb strh r3, [r7, #14]
- assert_param(IS_SPI_FIRST_BIT(SPI_InitStruct->SPI_FirstBit));
- assert_param(IS_SPI_CRC_POLYNOMIAL(SPI_InitStruct->SPI_CRCPolynomial));
- /*---------------------------- SPIx CR1 Configuration ------------------------*/
- /* Get the SPIx CR1 value */
- tmpreg = SPIx->CR1;
- 800062e: 687b ldr r3, [r7, #4]
- 8000630: 881b ldrh r3, [r3, #0]
- 8000632: 81fb strh r3, [r7, #14]
- /* Clear BIDIMode, BIDIOE, RxONLY, SSM, SSI, LSBFirst, BR, MSTR, CPOL and CPHA bits */
- tmpreg &= CR1_CLEAR_Mask;
- 8000634: 89fb ldrh r3, [r7, #14]
- 8000636: f403 5341 and.w r3, r3, #12352 ; 0x3040
- 800063a: 81fb strh r3, [r7, #14]
- /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
- /* Set LSBFirst bit according to SPI_FirstBit value */
- /* Set BR bits according to SPI_BaudRatePrescaler value */
- /* Set CPOL bit according to SPI_CPOL value */
- /* Set CPHA bit according to SPI_CPHA value */
- tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
- 800063c: 683b ldr r3, [r7, #0]
- 800063e: 881a ldrh r2, [r3, #0]
- 8000640: 683b ldr r3, [r7, #0]
- 8000642: 885b ldrh r3, [r3, #2]
- 8000644: 4313 orrs r3, r2
- 8000646: b29a uxth r2, r3
- SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
- 8000648: 683b ldr r3, [r7, #0]
- 800064a: 889b ldrh r3, [r3, #4]
- /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
- /* Set LSBFirst bit according to SPI_FirstBit value */
- /* Set BR bits according to SPI_BaudRatePrescaler value */
- /* Set CPOL bit according to SPI_CPOL value */
- /* Set CPHA bit according to SPI_CPHA value */
- tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
- 800064c: 4313 orrs r3, r2
- 800064e: b29a uxth r2, r3
- SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
- 8000650: 683b ldr r3, [r7, #0]
- 8000652: 88db ldrh r3, [r3, #6]
- /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
- /* Set LSBFirst bit according to SPI_FirstBit value */
- /* Set BR bits according to SPI_BaudRatePrescaler value */
- /* Set CPOL bit according to SPI_CPOL value */
- /* Set CPHA bit according to SPI_CPHA value */
- tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
- 8000654: 4313 orrs r3, r2
- 8000656: b29a uxth r2, r3
- SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
- SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
- 8000658: 683b ldr r3, [r7, #0]
- 800065a: 891b ldrh r3, [r3, #8]
- /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
- /* Set LSBFirst bit according to SPI_FirstBit value */
- /* Set BR bits according to SPI_BaudRatePrescaler value */
- /* Set CPOL bit according to SPI_CPOL value */
- /* Set CPHA bit according to SPI_CPHA value */
- tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
- 800065c: 4313 orrs r3, r2
- 800065e: b29a uxth r2, r3
- SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
- SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
- 8000660: 683b ldr r3, [r7, #0]
- 8000662: 895b ldrh r3, [r3, #10]
- /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
- /* Set LSBFirst bit according to SPI_FirstBit value */
- /* Set BR bits according to SPI_BaudRatePrescaler value */
- /* Set CPOL bit according to SPI_CPOL value */
- /* Set CPHA bit according to SPI_CPHA value */
- tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
- 8000664: 4313 orrs r3, r2
- 8000666: b29a uxth r2, r3
- SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
- SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
- SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
- 8000668: 683b ldr r3, [r7, #0]
- 800066a: 899b ldrh r3, [r3, #12]
- /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
- /* Set LSBFirst bit according to SPI_FirstBit value */
- /* Set BR bits according to SPI_BaudRatePrescaler value */
- /* Set CPOL bit according to SPI_CPOL value */
- /* Set CPHA bit according to SPI_CPHA value */
- tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
- 800066c: 4313 orrs r3, r2
- 800066e: b29a uxth r2, r3
- SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
- SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
- SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
- 8000670: 683b ldr r3, [r7, #0]
- 8000672: 89db ldrh r3, [r3, #14]
- /* Set SSM, SSI and MSTR bits according to SPI_Mode and SPI_NSS values */
- /* Set LSBFirst bit according to SPI_FirstBit value */
- /* Set BR bits according to SPI_BaudRatePrescaler value */
- /* Set CPOL bit according to SPI_CPOL value */
- /* Set CPHA bit according to SPI_CPHA value */
- tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_Mode |
- 8000674: 4313 orrs r3, r2
- 8000676: b29a uxth r2, r3
- 8000678: 89fb ldrh r3, [r7, #14]
- 800067a: 4313 orrs r3, r2
- 800067c: 81fb strh r3, [r7, #14]
- SPI_InitStruct->SPI_DataSize | SPI_InitStruct->SPI_CPOL |
- SPI_InitStruct->SPI_CPHA | SPI_InitStruct->SPI_NSS |
- SPI_InitStruct->SPI_BaudRatePrescaler | SPI_InitStruct->SPI_FirstBit);
- /* Write to SPIx CR1 */
- SPIx->CR1 = tmpreg;
- 800067e: 687b ldr r3, [r7, #4]
- 8000680: 89fa ldrh r2, [r7, #14]
- 8000682: 801a strh r2, [r3, #0]
-
- /* Activate the SPI mode (Reset I2SMOD bit in I2SCFGR register) */
- SPIx->I2SCFGR &= SPI_Mode_Select;
- 8000684: 687b ldr r3, [r7, #4]
- 8000686: 8b9b ldrh r3, [r3, #28]
- 8000688: b29b uxth r3, r3
- 800068a: f423 6300 bic.w r3, r3, #2048 ; 0x800
- 800068e: b29a uxth r2, r3
- 8000690: 687b ldr r3, [r7, #4]
- 8000692: 839a strh r2, [r3, #28]
- /*---------------------------- SPIx CRCPOLY Configuration --------------------*/
- /* Write to SPIx CRCPOLY */
- SPIx->CRCPR = SPI_InitStruct->SPI_CRCPolynomial;
- 8000694: 683b ldr r3, [r7, #0]
- 8000696: 8a1a ldrh r2, [r3, #16]
- 8000698: 687b ldr r3, [r7, #4]
- 800069a: 821a strh r2, [r3, #16]
- }
- 800069c: bf00 nop
- 800069e: 3714 adds r7, #20
- 80006a0: 46bd mov sp, r7
- 80006a2: bc80 pop {r7}
- 80006a4: 4770 bx lr
- 80006a6: bf00 nop
- 080006a8 <SPI_Cmd>:
- void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
- {
- 80006a8: b480 push {r7}
- 80006aa: b083 sub sp, #12
- 80006ac: af00 add r7, sp, #0
- 80006ae: 6078 str r0, [r7, #4]
- 80006b0: 460b mov r3, r1
- 80006b2: 70fb strb r3, [r7, #3]
- /* Check the parameters */
- assert_param(IS_SPI_ALL_PERIPH(SPIx));
- assert_param(IS_FUNCTIONAL_STATE(NewState));
- if (NewState != DISABLE)
- 80006b4: 78fb ldrb r3, [r7, #3]
- 80006b6: 2b00 cmp r3, #0
- 80006b8: d008 beq.n 80006cc <SPI_Cmd+0x24>
- {
- /* Enable the selected SPI peripheral */
- SPIx->CR1 |= CR1_SPE_Set;
- 80006ba: 687b ldr r3, [r7, #4]
- 80006bc: 881b ldrh r3, [r3, #0]
- 80006be: b29b uxth r3, r3
- 80006c0: f043 0340 orr.w r3, r3, #64 ; 0x40
- 80006c4: b29a uxth r2, r3
- 80006c6: 687b ldr r3, [r7, #4]
- 80006c8: 801a strh r2, [r3, #0]
- else
- {
- /* Disable the selected SPI peripheral */
- SPIx->CR1 &= CR1_SPE_Reset;
- }
- }
- 80006ca: e007 b.n 80006dc <SPI_Cmd+0x34>
- SPIx->CR1 |= CR1_SPE_Set;
- }
- else
- {
- /* Disable the selected SPI peripheral */
- SPIx->CR1 &= CR1_SPE_Reset;
- 80006cc: 687b ldr r3, [r7, #4]
- 80006ce: 881b ldrh r3, [r3, #0]
- 80006d0: b29b uxth r3, r3
- 80006d2: f023 0340 bic.w r3, r3, #64 ; 0x40
- 80006d6: b29a uxth r2, r3
- 80006d8: 687b ldr r3, [r7, #4]
- 80006da: 801a strh r2, [r3, #0]
- }
- }
- 80006dc: bf00 nop
- 80006de: 370c adds r7, #12
- 80006e0: 46bd mov sp, r7
- 80006e2: bc80 pop {r7}
- 80006e4: 4770 bx lr
- 80006e6: bf00 nop
- 080006e8 <GPIO_SetBits>:
- void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
- {
- 80006e8: b480 push {r7}
- 80006ea: b083 sub sp, #12
- 80006ec: af00 add r7, sp, #0
- 80006ee: 6078 str r0, [r7, #4]
- 80006f0: 460b mov r3, r1
- 80006f2: 807b strh r3, [r7, #2]
- /* Check the parameters */
- assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
- assert_param(IS_GPIO_PIN(GPIO_Pin));
-
- GPIOx->BSRR = GPIO_Pin;
- 80006f4: 887a ldrh r2, [r7, #2]
- 80006f6: 687b ldr r3, [r7, #4]
- 80006f8: 611a str r2, [r3, #16]
- }
- 80006fa: bf00 nop
- 80006fc: 370c adds r7, #12
- 80006fe: 46bd mov sp, r7
- 8000700: bc80 pop {r7}
- 8000702: 4770 bx lr
- 08000704 <RCC_APB2PeriphClockCmd>:
- void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
- {
- 8000704: b480 push {r7}
- 8000706: b083 sub sp, #12
- 8000708: af00 add r7, sp, #0
- 800070a: 6078 str r0, [r7, #4]
- 800070c: 460b mov r3, r1
- 800070e: 70fb strb r3, [r7, #3]
- /* Check the parameters */
- assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
- assert_param(IS_FUNCTIONAL_STATE(NewState));
- if (NewState != DISABLE)
- 8000710: 78fb ldrb r3, [r7, #3]
- 8000712: 2b00 cmp r3, #0
- 8000714: d006 beq.n 8000724 <RCC_APB2PeriphClockCmd+0x20>
- {
- RCC->APB2ENR |= RCC_APB2Periph;
- 8000716: 4909 ldr r1, [pc, #36] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
- 8000718: 4b08 ldr r3, [pc, #32] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
- 800071a: 699a ldr r2, [r3, #24]
- 800071c: 687b ldr r3, [r7, #4]
- 800071e: 4313 orrs r3, r2
- 8000720: 618b str r3, [r1, #24]
- }
- else
- {
- RCC->APB2ENR &= ~RCC_APB2Periph;
- }
- }
- 8000722: e006 b.n 8000732 <RCC_APB2PeriphClockCmd+0x2e>
- {
- RCC->APB2ENR |= RCC_APB2Periph;
- }
- else
- {
- RCC->APB2ENR &= ~RCC_APB2Periph;
- 8000724: 4905 ldr r1, [pc, #20] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
- 8000726: 4b05 ldr r3, [pc, #20] ; (800073c <RCC_APB2PeriphClockCmd+0x38>)
- 8000728: 699a ldr r2, [r3, #24]
- 800072a: 687b ldr r3, [r7, #4]
- 800072c: 43db mvns r3, r3
- 800072e: 4013 ands r3, r2
- 8000730: 618b str r3, [r1, #24]
- }
- }
- 8000732: bf00 nop
- 8000734: 370c adds r7, #12
- 8000736: 46bd mov sp, r7
- 8000738: bc80 pop {r7}
- 800073a: 4770 bx lr
- 800073c: 40021000 .word 0x40021000
- 08000740 <GPIO_ResetBits>:
- void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
- {
- 8000740: b480 push {r7}
- 8000742: b083 sub sp, #12
- 8000744: af00 add r7, sp, #0
- 8000746: 6078 str r0, [r7, #4]
- 8000748: 460b mov r3, r1
- 800074a: 807b strh r3, [r7, #2]
- /* Check the parameters */
- assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
- assert_param(IS_GPIO_PIN(GPIO_Pin));
-
- GPIOx->BRR = GPIO_Pin;
- 800074c: 887a ldrh r2, [r7, #2]
- 800074e: 687b ldr r3, [r7, #4]
- 8000750: 615a str r2, [r3, #20]
- }
- 8000752: bf00 nop
- 8000754: 370c adds r7, #12
- 8000756: 46bd mov sp, r7
- 8000758: bc80 pop {r7}
- 800075a: 4770 bx lr
- 0800075c <SD_LowLevel_Init>:
- void SD_LowLevel_Init(void)
- {
- 800075c: b580 push {r7, lr}
- 800075e: b086 sub sp, #24
- 8000760: af00 add r7, sp, #0
- GPIO_InitTypeDef GPIO_InitStructure;
- SPI_InitTypeDef SPI_InitStructure;
- /*!< SD_SPI_CS_GPIO, SD_SPI_MOSI_GPIO, SD_SPI_MISO_GPIO, SD_SPI_DETECT_GPIO
- and SD_SPI_SCK_GPIO Periph clock enable */
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
- 8000762: 2101 movs r1, #1
- 8000764: 2004 movs r0, #4
- 8000766: f7ff ffcd bl 8000704 <RCC_APB2PeriphClockCmd>
- /*!< SD_SPI Periph clock enable */
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE);
- 800076a: 2101 movs r1, #1
- 800076c: f44f 5080 mov.w r0, #4096 ; 0x1000
- 8000770: f7ff ffc8 bl 8000704 <RCC_APB2PeriphClockCmd>
-
- /*!< Configure SD_SPI pins: SCK */
- GPIO_InitStructure.GPIO_Pin = SD_SPI_SCK_PIN | SD_SPI_MOSI_PIN | SD_SPI_MISO_PIN;
- 8000774: 23e0 movs r3, #224 ; 0xe0
- 8000776: 82bb strh r3, [r7, #20]
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- 8000778: 2303 movs r3, #3
- 800077a: 75bb strb r3, [r7, #22]
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
- 800077c: 2318 movs r3, #24
- 800077e: 75fb strb r3, [r7, #23]
- GPIO_Init(SD_SPI_SCK_GPIO_PORT, &GPIO_InitStructure);
- 8000780: f107 0314 add.w r3, r7, #20
- 8000784: 4619 mov r1, r3
- 8000786: 4817 ldr r0, [pc, #92] ; (80007e4 <SD_LowLevel_Init+0x88>)
- 8000788: f7ff fe8e bl 80004a8 <GPIO_Init>
- /*!< Configure SD_SPI_CS_PIN pin: SD Card CS pin */
- GPIO_InitStructure.GPIO_Pin = SD_CS_PIN;
- 800078c: 2310 movs r3, #16
- 800078e: 82bb strh r3, [r7, #20]
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
- 8000790: 2310 movs r3, #16
- 8000792: 75fb strb r3, [r7, #23]
- GPIO_Init(SD_CS_GPIO_PORT, &GPIO_InitStructure);
- 8000794: f107 0314 add.w r3, r7, #20
- 8000798: 4619 mov r1, r3
- 800079a: 4812 ldr r0, [pc, #72] ; (80007e4 <SD_LowLevel_Init+0x88>)
- 800079c: f7ff fe84 bl 80004a8 <GPIO_Init>
- /*!< SD_SPI Config */
- SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
- 80007a0: 2300 movs r3, #0
- 80007a2: 803b strh r3, [r7, #0]
- SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
- 80007a4: f44f 7382 mov.w r3, #260 ; 0x104
- 80007a8: 807b strh r3, [r7, #2]
- SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
- 80007aa: 2300 movs r3, #0
- 80007ac: 80bb strh r3, [r7, #4]
- SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
- 80007ae: 2302 movs r3, #2
- 80007b0: 80fb strh r3, [r7, #6]
- SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge;
- 80007b2: 2301 movs r3, #1
- 80007b4: 813b strh r3, [r7, #8]
- SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
- 80007b6: f44f 7300 mov.w r3, #512 ; 0x200
- 80007ba: 817b strh r3, [r7, #10]
- SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
- 80007bc: 2308 movs r3, #8
- 80007be: 81bb strh r3, [r7, #12]
- SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
- 80007c0: 2300 movs r3, #0
- 80007c2: 81fb strh r3, [r7, #14]
- SPI_InitStructure.SPI_CRCPolynomial = 7;
- 80007c4: 2307 movs r3, #7
- 80007c6: 823b strh r3, [r7, #16]
- SPI_Init(SD_SPI, &SPI_InitStructure);
- 80007c8: 463b mov r3, r7
- 80007ca: 4619 mov r1, r3
- 80007cc: 4806 ldr r0, [pc, #24] ; (80007e8 <SD_LowLevel_Init+0x8c>)
- 80007ce: f7ff ff27 bl 8000620 <SPI_Init>
-
- SPI_Cmd(SD_SPI, ENABLE); /*!< SD_SPI enable */
- 80007d2: 2101 movs r1, #1
- 80007d4: 4804 ldr r0, [pc, #16] ; (80007e8 <SD_LowLevel_Init+0x8c>)
- 80007d6: f7ff ff67 bl 80006a8 <SPI_Cmd>
- }
- 80007da: bf00 nop
- 80007dc: 3718 adds r7, #24
- 80007de: 46bd mov sp, r7
- 80007e0: bd80 pop {r7, pc}
- 80007e2: bf00 nop
- 80007e4: 40010800 .word 0x40010800
- 80007e8: 40013000 .word 0x40013000
- 080007ec <SD_GoIdleState>:
- SD_Error SD_GoIdleState(void)
- {
- 80007ec: b580 push {r7, lr}
- 80007ee: af00 add r7, sp, #0
- /*!< SD chip select low */
- SD_CS_LOW();
- 80007f0: 2110 movs r1, #16
- 80007f2: 4818 ldr r0, [pc, #96] ; (8000854 <SD_GoIdleState+0x68>)
- 80007f4: f7ff ffa4 bl 8000740 <GPIO_ResetBits>
-
- /*!< Send CMD0 (SD_CMD_GO_IDLE_STATE) to put SD in SPI mode */
- SD_SendCmd(SD_CMD_GO_IDLE_STATE, 0, 0x95);
- 80007f8: 2295 movs r2, #149 ; 0x95
- 80007fa: 2100 movs r1, #0
- 80007fc: 2000 movs r0, #0
- 80007fe: f000 f82b bl 8000858 <SD_SendCmd>
-
- /*!< Wait for In Idle State Response (R1 Format) equal to 0x01 */
- if (SD_GetResponse(SD_IN_IDLE_STATE))
- 8000802: 2001 movs r0, #1
- 8000804: f000 f85e bl 80008c4 <SD_GetResponse>
- 8000808: 4603 mov r3, r0
- 800080a: 2b00 cmp r3, #0
- 800080c: d001 beq.n 8000812 <SD_GoIdleState+0x26>
- {
- /*!< No Idle State Response: return response failue */
- return SD_RESPONSE_FAILURE;
- 800080e: 23ff movs r3, #255 ; 0xff
- 8000810: e01d b.n 800084e <SD_GoIdleState+0x62>
- }
- /*----------Activates the card initialization process-----------*/
- do
- {
- /*!< SD chip select high */
- SD_CS_HIGH();
- 8000812: 2110 movs r1, #16
- 8000814: 480f ldr r0, [pc, #60] ; (8000854 <SD_GoIdleState+0x68>)
- 8000816: f7ff ff67 bl 80006e8 <GPIO_SetBits>
-
- /*!< Send Dummy byte 0xFF */
- SD_WriteByte(SD_DUMMY_BYTE);
- 800081a: 20ff movs r0, #255 ; 0xff
- 800081c: f7ff fe1e bl 800045c <SD_WriteByte>
-
- /*!< SD chip select low */
- SD_CS_LOW();
- 8000820: 2110 movs r1, #16
- 8000822: 480c ldr r0, [pc, #48] ; (8000854 <SD_GoIdleState+0x68>)
- 8000824: f7ff ff8c bl 8000740 <GPIO_ResetBits>
-
- /*!< Send CMD1 (Activates the card process) until response equal to 0x0 */
- SD_SendCmd(SD_CMD_SEND_OP_COND, 0, 0xFF);
- 8000828: 22ff movs r2, #255 ; 0xff
- 800082a: 2100 movs r1, #0
- 800082c: 2001 movs r0, #1
- 800082e: f000 f813 bl 8000858 <SD_SendCmd>
- /*!< Wait for no error Response (R1 Format) equal to 0x00 */
- }
- while (SD_GetResponse(SD_RESPONSE_NO_ERROR));
- 8000832: 2000 movs r0, #0
- 8000834: f000 f846 bl 80008c4 <SD_GetResponse>
- 8000838: 4603 mov r3, r0
- 800083a: 2b00 cmp r3, #0
- 800083c: d1e9 bne.n 8000812 <SD_GoIdleState+0x26>
-
- /*!< SD chip select high */
- SD_CS_HIGH();
- 800083e: 2110 movs r1, #16
- 8000840: 4804 ldr r0, [pc, #16] ; (8000854 <SD_GoIdleState+0x68>)
- 8000842: f7ff ff51 bl 80006e8 <GPIO_SetBits>
-
- /*!< Send dummy byte 0xFF */
- SD_WriteByte(SD_DUMMY_BYTE);
- 8000846: 20ff movs r0, #255 ; 0xff
- 8000848: f7ff fe08 bl 800045c <SD_WriteByte>
-
- return SD_RESPONSE_NO_ERROR;
- 800084c: 2300 movs r3, #0
- }
- 800084e: 4618 mov r0, r3
- 8000850: bd80 pop {r7, pc}
- 8000852: bf00 nop
- 8000854: 40010800 .word 0x40010800
- 08000858 <SD_SendCmd>:
- void SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc)
- {
- 8000858: b580 push {r7, lr}
- 800085a: b086 sub sp, #24
- 800085c: af00 add r7, sp, #0
- 800085e: 4603 mov r3, r0
- 8000860: 6039 str r1, [r7, #0]
- 8000862: 71fb strb r3, [r7, #7]
- 8000864: 4613 mov r3, r2
- 8000866: 71bb strb r3, [r7, #6]
- uint32_t i = 0x00;
- 8000868: 2300 movs r3, #0
- 800086a: 617b str r3, [r7, #20]
-
- uint8_t Frame[6];
-
- Frame[0] = (Cmd | 0x40); /*!< Construct byte 1 */
- 800086c: 79fb ldrb r3, [r7, #7]
- 800086e: f043 0340 orr.w r3, r3, #64 ; 0x40
- 8000872: b2db uxtb r3, r3
- 8000874: 733b strb r3, [r7, #12]
-
- Frame[1] = (uint8_t)(Arg >> 24); /*!< Construct byte 2 */
- 8000876: 683b ldr r3, [r7, #0]
- 8000878: 0e1b lsrs r3, r3, #24
- 800087a: b2db uxtb r3, r3
- 800087c: 737b strb r3, [r7, #13]
-
- Frame[2] = (uint8_t)(Arg >> 16); /*!< Construct byte 3 */
- 800087e: 683b ldr r3, [r7, #0]
- 8000880: 0c1b lsrs r3, r3, #16
- 8000882: b2db uxtb r3, r3
- 8000884: 73bb strb r3, [r7, #14]
-
- Frame[3] = (uint8_t)(Arg >> 8); /*!< Construct byte 4 */
- 8000886: 683b ldr r3, [r7, #0]
- 8000888: 0a1b lsrs r3, r3, #8
- 800088a: b2db uxtb r3, r3
- 800088c: 73fb strb r3, [r7, #15]
-
- Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
- 800088e: 683b ldr r3, [r7, #0]
- 8000890: b2db uxtb r3, r3
- 8000892: 743b strb r3, [r7, #16]
-
- Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
- 8000894: 79bb ldrb r3, [r7, #6]
- 8000896: 747b strb r3, [r7, #17]
-
- for (i = 0; i < 6; i++)
- 8000898: 2300 movs r3, #0
- 800089a: 617b str r3, [r7, #20]
- 800089c: e00a b.n 80008b4 <SD_SendCmd+0x5c>
- {
- SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
- 800089e: f107 020c add.w r2, r7, #12
- 80008a2: 697b ldr r3, [r7, #20]
- 80008a4: 4413 add r3, r2
- 80008a6: 781b ldrb r3, [r3, #0]
- 80008a8: 4618 mov r0, r3
- 80008aa: f7ff fdd7 bl 800045c <SD_WriteByte>
-
- Frame[4] = (uint8_t)(Arg); /*!< Construct byte 5 */
-
- Frame[5] = (Crc); /*!< Construct CRC: byte 6 */
-
- for (i = 0; i < 6; i++)
- 80008ae: 697b ldr r3, [r7, #20]
- 80008b0: 3301 adds r3, #1
- 80008b2: 617b str r3, [r7, #20]
- 80008b4: 697b ldr r3, [r7, #20]
- 80008b6: 2b05 cmp r3, #5
- 80008b8: d9f1 bls.n 800089e <SD_SendCmd+0x46>
- {
- SD_WriteByte(Frame[i]); /*!< Send the Cmd bytes */
- }
- }
- 80008ba: bf00 nop
- 80008bc: 3718 adds r7, #24
- 80008be: 46bd mov sp, r7
- 80008c0: bd80 pop {r7, pc}
- 80008c2: bf00 nop
- 080008c4 <SD_GetResponse>:
- SD_Error SD_GetResponse(uint8_t Response)
- {
- 80008c4: b580 push {r7, lr}
- 80008c6: b084 sub sp, #16
- 80008c8: af00 add r7, sp, #0
- 80008ca: 4603 mov r3, r0
- 80008cc: 71fb strb r3, [r7, #7]
- uint32_t Count = 0xFFF;
- 80008ce: f640 73ff movw r3, #4095 ; 0xfff
- 80008d2: 60fb str r3, [r7, #12]
- /*!< Check if response is got or a timeout is happen */
- while ((SD_ReadByte() != Response) && Count)
- 80008d4: e002 b.n 80008dc <SD_GetResponse+0x18>
- {
- Count--;
- 80008d6: 68fb ldr r3, [r7, #12]
- 80008d8: 3b01 subs r3, #1
- 80008da: 60fb str r3, [r7, #12]
- SD_Error SD_GetResponse(uint8_t Response)
- {
- uint32_t Count = 0xFFF;
- /*!< Check if response is got or a timeout is happen */
- while ((SD_ReadByte() != Response) && Count)
- 80008dc: f000 f812 bl 8000904 <SD_ReadByte>
- 80008e0: 4603 mov r3, r0
- 80008e2: 461a mov r2, r3
- 80008e4: 79fb ldrb r3, [r7, #7]
- 80008e6: 4293 cmp r3, r2
- 80008e8: d002 beq.n 80008f0 <SD_GetResponse+0x2c>
- 80008ea: 68fb ldr r3, [r7, #12]
- 80008ec: 2b00 cmp r3, #0
- 80008ee: d1f2 bne.n 80008d6 <SD_GetResponse+0x12>
- {
- Count--;
- }
- if (Count == 0)
- 80008f0: 68fb ldr r3, [r7, #12]
- 80008f2: 2b00 cmp r3, #0
- 80008f4: d101 bne.n 80008fa <SD_GetResponse+0x36>
- {
- /*!< After time out */
- return SD_RESPONSE_FAILURE;
- 80008f6: 23ff movs r3, #255 ; 0xff
- 80008f8: e000 b.n 80008fc <SD_GetResponse+0x38>
- }
- else
- {
- /*!< Right response got */
- return SD_RESPONSE_NO_ERROR;
- 80008fa: 2300 movs r3, #0
- }
- }
- 80008fc: 4618 mov r0, r3
- 80008fe: 3710 adds r7, #16
- 8000900: 46bd mov sp, r7
- 8000902: bd80 pop {r7, pc}
- 08000904 <SD_ReadByte>:
- uint8_t SD_ReadByte(void)
- {
- 8000904: b580 push {r7, lr}
- 8000906: b082 sub sp, #8
- 8000908: af00 add r7, sp, #0
- uint8_t Data = 0;
- 800090a: 2300 movs r3, #0
- 800090c: 71fb strb r3, [r7, #7]
-
- /*!< Wait until the transmit buffer is empty */
- while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_TXE) == RESET)
- 800090e: bf00 nop
- 8000910: 2102 movs r1, #2
- 8000912: 480e ldr r0, [pc, #56] ; (800094c <SD_ReadByte+0x48>)
- 8000914: f7ff fd6c bl 80003f0 <SPI_I2S_GetFlagStatus>
- 8000918: 4603 mov r3, r0
- 800091a: 2b00 cmp r3, #0
- 800091c: d0f8 beq.n 8000910 <SD_ReadByte+0xc>
- {
- }
- /*!< Send the byte */
- SPI_I2S_SendData(SD_SPI, SD_DUMMY_BYTE);
- 800091e: 21ff movs r1, #255 ; 0xff
- 8000920: 480a ldr r0, [pc, #40] ; (800094c <SD_ReadByte+0x48>)
- 8000922: f7ff fd81 bl 8000428 <SPI_I2S_SendData>
- /*!< Wait until a data is received */
- while (SPI_I2S_GetFlagStatus(SD_SPI, SPI_I2S_FLAG_RXNE) == RESET)
- 8000926: bf00 nop
- 8000928: 2101 movs r1, #1
- 800092a: 4808 ldr r0, [pc, #32] ; (800094c <SD_ReadByte+0x48>)
- 800092c: f7ff fd60 bl 80003f0 <SPI_I2S_GetFlagStatus>
- 8000930: 4603 mov r3, r0
- 8000932: 2b00 cmp r3, #0
- 8000934: d0f8 beq.n 8000928 <SD_ReadByte+0x24>
- {
- }
- /*!< Get the received data */
- Data = SPI_I2S_ReceiveData(SD_SPI);
- 8000936: 4805 ldr r0, [pc, #20] ; (800094c <SD_ReadByte+0x48>)
- 8000938: f7ff fd84 bl 8000444 <SPI_I2S_ReceiveData>
- 800093c: 4603 mov r3, r0
- 800093e: 71fb strb r3, [r7, #7]
- /*!< Return the shifted data */
- return Data;
- 8000940: 79fb ldrb r3, [r7, #7]
- }
- 8000942: 4618 mov r0, r3
- 8000944: 3708 adds r7, #8
- 8000946: 46bd mov sp, r7
- 8000948: bd80 pop {r7, pc}
- 800094a: bf00 nop
- 800094c: 40013000 .word 0x40013000
- 08000950 <SD_GetDataResponse>:
- uint8_t SD_GetDataResponse(void)
- {
- 8000950: b580 push {r7, lr}
- 8000952: b082 sub sp, #8
- 8000954: af00 add r7, sp, #0
- uint32_t i = 0;
- 8000956: 2300 movs r3, #0
- 8000958: 607b str r3, [r7, #4]
- uint8_t response, rvalue;
- while (i <= 64)
- 800095a: e01e b.n 800099a <SD_GetDataResponse+0x4a>
- {
- /*!< Read resonse */
- response = SD_ReadByte();
- 800095c: f7ff ffd2 bl 8000904 <SD_ReadByte>
- 8000960: 4603 mov r3, r0
- 8000962: 70fb strb r3, [r7, #3]
- /*!< Mask unused bits */
- response &= 0x1F;
- 8000964: 78fb ldrb r3, [r7, #3]
- 8000966: f003 031f and.w r3, r3, #31
- 800096a: 70fb strb r3, [r7, #3]
- switch (response)
- 800096c: 78fb ldrb r3, [r7, #3]
- 800096e: 2b0b cmp r3, #11
- 8000970: d006 beq.n 8000980 <SD_GetDataResponse+0x30>
- 8000972: 2b0d cmp r3, #13
- 8000974: d006 beq.n 8000984 <SD_GetDataResponse+0x34>
- 8000976: 2b05 cmp r3, #5
- 8000978: d106 bne.n 8000988 <SD_GetDataResponse+0x38>
- {
- case SD_DATA_OK:
- {
- rvalue = SD_DATA_OK;
- 800097a: 2305 movs r3, #5
- 800097c: 70bb strb r3, [r7, #2]
- break;
- 800097e: e006 b.n 800098e <SD_GetDataResponse+0x3e>
- }
- case SD_DATA_CRC_ERROR:
- return SD_DATA_CRC_ERROR;
- 8000980: 230b movs r3, #11
- 8000982: e016 b.n 80009b2 <SD_GetDataResponse+0x62>
- case SD_DATA_WRITE_ERROR:
- return SD_DATA_WRITE_ERROR;
- 8000984: 230d movs r3, #13
- 8000986: e014 b.n 80009b2 <SD_GetDataResponse+0x62>
- default:
- {
- rvalue = SD_DATA_OTHER_ERROR;
- 8000988: 23ff movs r3, #255 ; 0xff
- 800098a: 70bb strb r3, [r7, #2]
- break;
- 800098c: bf00 nop
- }
- }
- /*!< Exit loop in case of data ok */
- if (rvalue == SD_DATA_OK)
- 800098e: 78bb ldrb r3, [r7, #2]
- 8000990: 2b05 cmp r3, #5
- 8000992: d006 beq.n 80009a2 <SD_GetDataResponse+0x52>
- break;
- /*!< Increment loop counter */
- i++;
- 8000994: 687b ldr r3, [r7, #4]
- 8000996: 3301 adds r3, #1
- 8000998: 607b str r3, [r7, #4]
- uint8_t SD_GetDataResponse(void)
- {
- uint32_t i = 0;
- uint8_t response, rvalue;
- while (i <= 64)
- 800099a: 687b ldr r3, [r7, #4]
- 800099c: 2b40 cmp r3, #64 ; 0x40
- 800099e: d9dd bls.n 800095c <SD_GetDataResponse+0xc>
- 80009a0: e000 b.n 80009a4 <SD_GetDataResponse+0x54>
- break;
- }
- }
- /*!< Exit loop in case of data ok */
- if (rvalue == SD_DATA_OK)
- break;
- 80009a2: bf00 nop
- /*!< Increment loop counter */
- i++;
- }
- /*!< Wait null data */
- while (SD_ReadByte() == 0);
- 80009a4: bf00 nop
- 80009a6: f7ff ffad bl 8000904 <SD_ReadByte>
- 80009aa: 4603 mov r3, r0
- 80009ac: 2b00 cmp r3, #0
- 80009ae: d0fa beq.n 80009a6 <SD_GetDataResponse+0x56>
- /*!< Return response */
- return response;
- 80009b0: 78fb ldrb r3, [r7, #3]
- }
- 80009b2: 4618 mov r0, r3
- 80009b4: 3708 adds r7, #8
- 80009b6: 46bd mov sp, r7
- 80009b8: bd80 pop {r7, pc}
- 80009ba: bf00 nop
- 080009bc <SD_Init>:
- SD_Error SD_Init(void)
- {
- 80009bc: b580 push {r7, lr}
- 80009be: b082 sub sp, #8
- 80009c0: af00 add r7, sp, #0
- uint32_t i = 0;
- 80009c2: 2300 movs r3, #0
- 80009c4: 607b str r3, [r7, #4]
- /*!< Initialize SD_SPI */
- SD_LowLevel_Init();
- 80009c6: f7ff fec9 bl 800075c <SD_LowLevel_Init>
- /*!< SD chip select high */
- SD_CS_HIGH();
- 80009ca: 2110 movs r1, #16
- 80009cc: 480a ldr r0, [pc, #40] ; (80009f8 <SD_Init+0x3c>)
- 80009ce: f7ff fe8b bl 80006e8 <GPIO_SetBits>
- /*!< Send dummy byte 0xFF, 10 times with CS high */
- /*!< Rise CS and MOSI for 80 clocks cycles */
- for (i = 0; i <= 9; i++)
- 80009d2: 2300 movs r3, #0
- 80009d4: 607b str r3, [r7, #4]
- 80009d6: e005 b.n 80009e4 <SD_Init+0x28>
- {
- /*!< Send dummy byte 0xFF */
- SD_WriteByte(SD_DUMMY_BYTE);
- 80009d8: 20ff movs r0, #255 ; 0xff
- 80009da: f7ff fd3f bl 800045c <SD_WriteByte>
- /*!< SD chip select high */
- SD_CS_HIGH();
- /*!< Send dummy byte 0xFF, 10 times with CS high */
- /*!< Rise CS and MOSI for 80 clocks cycles */
- for (i = 0; i <= 9; i++)
- 80009de: 687b ldr r3, [r7, #4]
- 80009e0: 3301 adds r3, #1
- 80009e2: 607b str r3, [r7, #4]
- 80009e4: 687b ldr r3, [r7, #4]
- 80009e6: 2b09 cmp r3, #9
- 80009e8: d9f6 bls.n 80009d8 <SD_Init+0x1c>
- /*!< Send dummy byte 0xFF */
- SD_WriteByte(SD_DUMMY_BYTE);
- }
- /*------------Put SD in SPI mode--------------*/
- /*!< SD initialized and set to SPI mode properly */
- return (SD_GoIdleState());
- 80009ea: f7ff feff bl 80007ec <SD_GoIdleState>
- 80009ee: 4603 mov r3, r0
- }
- 80009f0: 4618 mov r0, r3
- 80009f2: 3708 adds r7, #8
- 80009f4: 46bd mov sp, r7
- 80009f6: bd80 pop {r7, pc}
- 80009f8: 40010800 .word 0x40010800
- 080009fc <_checkSDStatus>:
- uint8_t _checkSDStatus() {
- 80009fc: b580 push {r7, lr}
- 80009fe: af00 add r7, sp, #0
- if (SD_Status == SD_RESPONSE_NO_ERROR)
- 8000a00: 4b09 ldr r3, [pc, #36] ; (8000a28 <_checkSDStatus+0x2c>)
- 8000a02: 881b ldrh r3, [r3, #0]
- 8000a04: 2b00 cmp r3, #0
- 8000a06: d101 bne.n 8000a0c <_checkSDStatus+0x10>
- return 0;
- 8000a08: 2300 movs r3, #0
- 8000a0a: e00a b.n 8000a22 <_checkSDStatus+0x26>
- do
- SD_Status = SD_Init();
- 8000a0c: f7ff ffd6 bl 80009bc <SD_Init>
- 8000a10: 4603 mov r3, r0
- 8000a12: b29a uxth r2, r3
- 8000a14: 4b04 ldr r3, [pc, #16] ; (8000a28 <_checkSDStatus+0x2c>)
- 8000a16: 801a strh r2, [r3, #0]
- while (SD_Status != SD_RESPONSE_NO_ERROR);
- 8000a18: 4b03 ldr r3, [pc, #12] ; (8000a28 <_checkSDStatus+0x2c>)
- 8000a1a: 881b ldrh r3, [r3, #0]
- 8000a1c: 2b00 cmp r3, #0
- 8000a1e: d1f5 bne.n 8000a0c <_checkSDStatus+0x10>
- return 1;
- 8000a20: 2301 movs r3, #1
- }
- 8000a22: 4618 mov r0, r3
- 8000a24: bd80 pop {r7, pc}
- 8000a26: bf00 nop
- 8000a28: 20000018 .word 0x20000018
- 08000a2c <checkSDStatus>:
- void checkSDStatus() {
- 8000a2c: b580 push {r7, lr}
- 8000a2e: af00 add r7, sp, #0
- while (_checkSDStatus()) {
- 8000a30: bf00 nop
- 8000a32: f7ff ffe3 bl 80009fc <_checkSDStatus>
- 8000a36: 4603 mov r3, r0
- 8000a38: 2b00 cmp r3, #0
- 8000a3a: d1fa bne.n 8000a32 <checkSDStatus+0x6>
- //<----><------>writeBufFilled = 0;
- //<----><------>SDWriteOffset = SD_WriteHeaders();
- }
- }
- 8000a3c: bf00 nop
- 8000a3e: bd80 pop {r7, pc}
- 08000a40 <SD_WriteBlock_1>:
- SD_Error SD_WriteBlock_1(uint32_t WriteAddr)
- {
- 8000a40: b580 push {r7, lr}
- 8000a42: b084 sub sp, #16
- 8000a44: af00 add r7, sp, #0
- 8000a46: 6078 str r0, [r7, #4]
- Wstatus = BuffReady;
- 8000a48: 4b3b ldr r3, [pc, #236] ; (8000b38 <SD_WriteBlock_1+0xf8>)
- 8000a4a: 781a ldrb r2, [r3, #0]
- 8000a4c: 4b3b ldr r3, [pc, #236] ; (8000b3c <SD_WriteBlock_1+0xfc>)
- 8000a4e: 701a strb r2, [r3, #0]
- BuffReady = 0;
- 8000a50: 4b39 ldr r3, [pc, #228] ; (8000b38 <SD_WriteBlock_1+0xf8>)
- 8000a52: 2200 movs r2, #0
- 8000a54: 701a strb r2, [r3, #0]
- uint32_t i = 0;
- 8000a56: 2300 movs r3, #0
- 8000a58: 60fb str r3, [r7, #12]
- SD_Error rvalue = SD_RESPONSE_FAILURE;
- 8000a5a: 23ff movs r3, #255 ; 0xff
- 8000a5c: 72fb strb r3, [r7, #11]
- SD_CS_LOW();
- 8000a5e: 2110 movs r1, #16
- 8000a60: 4837 ldr r0, [pc, #220] ; (8000b40 <SD_WriteBlock_1+0x100>)
- 8000a62: f7ff fe6d bl 8000740 <GPIO_ResetBits>
- SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, WriteAddr, 0xFF);
- 8000a66: 22ff movs r2, #255 ; 0xff
- 8000a68: 6879 ldr r1, [r7, #4]
- 8000a6a: 2018 movs r0, #24
- 8000a6c: f7ff fef4 bl 8000858 <SD_SendCmd>
- if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
- 8000a70: 2000 movs r0, #0
- 8000a72: f7ff ff27 bl 80008c4 <SD_GetResponse>
- 8000a76: 4603 mov r3, r0
- 8000a78: 2b00 cmp r3, #0
- 8000a7a: d14e bne.n 8000b1a <SD_WriteBlock_1+0xda>
- {
- SD_WriteByte(SD_DUMMY_BYTE);
- 8000a7c: 20ff movs r0, #255 ; 0xff
- 8000a7e: f7ff fced bl 800045c <SD_WriteByte>
- SD_WriteByte(0xFE);
- 8000a82: 20fe movs r0, #254 ; 0xfe
- 8000a84: f7ff fcea bl 800045c <SD_WriteByte>
- if (Wstatus == 1){
- 8000a88: 4b2c ldr r3, [pc, #176] ; (8000b3c <SD_WriteBlock_1+0xfc>)
- 8000a8a: 781b ldrb r3, [r3, #0]
- 8000a8c: 2b01 cmp r3, #1
- 8000a8e: d11a bne.n 8000ac6 <SD_WriteBlock_1+0x86>
- for (i = 0; i < SD_BUFSIZE/2; i += 1)
- 8000a90: 2300 movs r3, #0
- 8000a92: 60fb str r3, [r7, #12]
- 8000a94: e014 b.n 8000ac0 <SD_WriteBlock_1+0x80>
- {
- SD_WriteByte(Buffer1[i]);
- 8000a96: 4a2b ldr r2, [pc, #172] ; (8000b44 <SD_WriteBlock_1+0x104>)
- 8000a98: 68fb ldr r3, [r7, #12]
- 8000a9a: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
- 8000a9e: b2db uxtb r3, r3
- 8000aa0: 4618 mov r0, r3
- 8000aa2: f7ff fcdb bl 800045c <SD_WriteByte>
- SD_WriteByte(Buffer1[i] >> 8);
- 8000aa6: 4a27 ldr r2, [pc, #156] ; (8000b44 <SD_WriteBlock_1+0x104>)
- 8000aa8: 68fb ldr r3, [r7, #12]
- 8000aaa: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
- 8000aae: 0a1b lsrs r3, r3, #8
- 8000ab0: b29b uxth r3, r3
- 8000ab2: b2db uxtb r3, r3
- 8000ab4: 4618 mov r0, r3
- 8000ab6: f7ff fcd1 bl 800045c <SD_WriteByte>
- if (!SD_GetResponse(SD_RESPONSE_NO_ERROR))
- {
- SD_WriteByte(SD_DUMMY_BYTE);
- SD_WriteByte(0xFE);
- if (Wstatus == 1){
- for (i = 0; i < SD_BUFSIZE/2; i += 1)
- 8000aba: 68fb ldr r3, [r7, #12]
- 8000abc: 3301 adds r3, #1
- 8000abe: 60fb str r3, [r7, #12]
- 8000ac0: 68fb ldr r3, [r7, #12]
- 8000ac2: 2bff cmp r3, #255 ; 0xff
- 8000ac4: d9e7 bls.n 8000a96 <SD_WriteBlock_1+0x56>
- SD_WriteByte(Buffer1[i]);
- SD_WriteByte(Buffer1[i] >> 8);
- }
- }
-
- if (Wstatus == 2){
- 8000ac6: 4b1d ldr r3, [pc, #116] ; (8000b3c <SD_WriteBlock_1+0xfc>)
- 8000ac8: 781b ldrb r3, [r3, #0]
- 8000aca: 2b02 cmp r3, #2
- 8000acc: d11a bne.n 8000b04 <SD_WriteBlock_1+0xc4>
- for (i = 0; i < SD_BUFSIZE/2; i += 1)
- 8000ace: 2300 movs r3, #0
- 8000ad0: 60fb str r3, [r7, #12]
- 8000ad2: e014 b.n 8000afe <SD_WriteBlock_1+0xbe>
- {
- SD_WriteByte(Buffer2[i]);
- 8000ad4: 4a1c ldr r2, [pc, #112] ; (8000b48 <SD_WriteBlock_1+0x108>)
- 8000ad6: 68fb ldr r3, [r7, #12]
- 8000ad8: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
- 8000adc: b2db uxtb r3, r3
- 8000ade: 4618 mov r0, r3
- 8000ae0: f7ff fcbc bl 800045c <SD_WriteByte>
- SD_WriteByte(Buffer2[i] >> 8);
- 8000ae4: 4a18 ldr r2, [pc, #96] ; (8000b48 <SD_WriteBlock_1+0x108>)
- 8000ae6: 68fb ldr r3, [r7, #12]
- 8000ae8: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
- 8000aec: 0a1b lsrs r3, r3, #8
- 8000aee: b29b uxth r3, r3
- 8000af0: b2db uxtb r3, r3
- 8000af2: 4618 mov r0, r3
- 8000af4: f7ff fcb2 bl 800045c <SD_WriteByte>
- SD_WriteByte(Buffer1[i] >> 8);
- }
- }
-
- if (Wstatus == 2){
- for (i = 0; i < SD_BUFSIZE/2; i += 1)
- 8000af8: 68fb ldr r3, [r7, #12]
- 8000afa: 3301 adds r3, #1
- 8000afc: 60fb str r3, [r7, #12]
- 8000afe: 68fb ldr r3, [r7, #12]
- 8000b00: 2bff cmp r3, #255 ; 0xff
- 8000b02: d9e7 bls.n 8000ad4 <SD_WriteBlock_1+0x94>
- SD_WriteByte(Buffer2[i]);
- SD_WriteByte(Buffer2[i] >> 8);
- }
- }
-
- SD_ReadByte();
- 8000b04: f7ff fefe bl 8000904 <SD_ReadByte>
- SD_ReadByte();
- 8000b08: f7ff fefc bl 8000904 <SD_ReadByte>
- if (SD_GetDataResponse() == SD_DATA_OK)
- 8000b0c: f7ff ff20 bl 8000950 <SD_GetDataResponse>
- 8000b10: 4603 mov r3, r0
- 8000b12: 2b05 cmp r3, #5
- 8000b14: d101 bne.n 8000b1a <SD_WriteBlock_1+0xda>
- {
- rvalue = SD_RESPONSE_NO_ERROR;
- 8000b16: 2300 movs r3, #0
- 8000b18: 72fb strb r3, [r7, #11]
- }
- }
- SD_CS_HIGH();
- 8000b1a: 2110 movs r1, #16
- 8000b1c: 4808 ldr r0, [pc, #32] ; (8000b40 <SD_WriteBlock_1+0x100>)
- 8000b1e: f7ff fde3 bl 80006e8 <GPIO_SetBits>
- SD_WriteByte(SD_DUMMY_BYTE);
- 8000b22: 20ff movs r0, #255 ; 0xff
- 8000b24: f7ff fc9a bl 800045c <SD_WriteByte>
- Wstatus = 0;
- 8000b28: 4b04 ldr r3, [pc, #16] ; (8000b3c <SD_WriteBlock_1+0xfc>)
- 8000b2a: 2200 movs r2, #0
- 8000b2c: 701a strb r2, [r3, #0]
- return rvalue;
- 8000b2e: 7afb ldrb r3, [r7, #11]
- }
- 8000b30: 4618 mov r0, r3
- 8000b32: 3710 adds r7, #16
- 8000b34: 46bd mov sp, r7
- 8000b36: bd80 pop {r7, pc}
- 8000b38: 20000630 .word 0x20000630
- 8000b3c: 2000001b .word 0x2000001b
- 8000b40: 40010800 .word 0x40010800
- 8000b44: 20000230 .word 0x20000230
- 8000b48: 20000430 .word 0x20000430
- 08000b4c <main>:
- int main(void) {
- 8000b4c: b580 push {r7, lr}
- 8000b4e: af00 add r7, sp, #0
- status = SD_Init();
- 8000b50: f7ff ff34 bl 80009bc <SD_Init>
- 8000b54: 4603 mov r3, r0
- 8000b56: 461a mov r2, r3
- 8000b58: 4b14 ldr r3, [pc, #80] ; (8000bac <main+0x60>)
- 8000b5a: 601a str r2, [r3, #0]
- checkSDStatus();
- 8000b5c: f7ff ff66 bl 8000a2c <checkSDStatus>
- writeBufFilled = 0;
- 8000b60: 4b13 ldr r3, [pc, #76] ; (8000bb0 <main+0x64>)
- 8000b62: 2200 movs r2, #0
- 8000b64: 801a strh r2, [r3, #0]
- // SD_WriteHeaders();
- SDWriteOffset = SD_BUFSIZE;
- 8000b66: 4b13 ldr r3, [pc, #76] ; (8000bb4 <main+0x68>)
- 8000b68: f44f 7200 mov.w r2, #512 ; 0x200
- 8000b6c: 601a str r2, [r3, #0]
- SystemCoreClockUpdate();
- 8000b6e: f7ff fb4d bl 800020c <SystemCoreClockUpdate>
- SysTick_Config(SystemCoreClock/10000);
- 8000b72: 4b11 ldr r3, [pc, #68] ; (8000bb8 <main+0x6c>)
- 8000b74: 681b ldr r3, [r3, #0]
- 8000b76: 4a11 ldr r2, [pc, #68] ; (8000bbc <main+0x70>)
- 8000b78: fba2 2303 umull r2, r3, r2, r3
- 8000b7c: 0b5b lsrs r3, r3, #13
- 8000b7e: 4618 mov r0, r3
- 8000b80: f7ff faee bl 8000160 <SysTick_Config>
- while (1)
- {
- if (BuffReady != 0){
- 8000b84: 4b0e ldr r3, [pc, #56] ; (8000bc0 <main+0x74>)
- 8000b86: 781b ldrb r3, [r3, #0]
- 8000b88: 2b00 cmp r3, #0
- 8000b8a: d0fb beq.n 8000b84 <main+0x38>
- check=1;
- 8000b8c: 4b0d ldr r3, [pc, #52] ; (8000bc4 <main+0x78>)
- 8000b8e: 2201 movs r2, #1
- 8000b90: 701a strb r2, [r3, #0]
- SD_WriteBlock_1(SDWriteOffset);
- 8000b92: 4b08 ldr r3, [pc, #32] ; (8000bb4 <main+0x68>)
- 8000b94: 681b ldr r3, [r3, #0]
- 8000b96: 4618 mov r0, r3
- 8000b98: f7ff ff52 bl 8000a40 <SD_WriteBlock_1>
- SDWriteOffset = SDWriteOffset + SD_BUFSIZE;
- 8000b9c: 4b05 ldr r3, [pc, #20] ; (8000bb4 <main+0x68>)
- 8000b9e: 681b ldr r3, [r3, #0]
- 8000ba0: f503 7300 add.w r3, r3, #512 ; 0x200
- 8000ba4: 4a03 ldr r2, [pc, #12] ; (8000bb4 <main+0x68>)
- 8000ba6: 6013 str r3, [r2, #0]
- }
- }
- 8000ba8: e7ec b.n 8000b84 <main+0x38>
- 8000baa: bf00 nop
- 8000bac: 20000014 .word 0x20000014
- 8000bb0: 20000226 .word 0x20000226
- 8000bb4: 20000228 .word 0x20000228
- 8000bb8: 20000000 .word 0x20000000
- 8000bbc: d1b71759 .word 0xd1b71759
- 8000bc0: 20000630 .word 0x20000630
- 8000bc4: 20000632 .word 0x20000632
- 08000bc8 <SysTick_Handler>:
- }
- void SysTick_Handler(void) {
- 8000bc8: b480 push {r7}
- 8000bca: af00 add r7, sp, #0
- if (Rstatus == 1 && Wstatus != 1){
- 8000bcc: 4b40 ldr r3, [pc, #256] ; (8000cd0 <SysTick_Handler+0x108>)
- 8000bce: 781b ldrb r3, [r3, #0]
- 8000bd0: 2b01 cmp r3, #1
- 8000bd2: d129 bne.n 8000c28 <SysTick_Handler+0x60>
- 8000bd4: 4b3f ldr r3, [pc, #252] ; (8000cd4 <SysTick_Handler+0x10c>)
- 8000bd6: 781b ldrb r3, [r3, #0]
- 8000bd8: 2b01 cmp r3, #1
- 8000bda: d025 beq.n 8000c28 <SysTick_Handler+0x60>
- ADC1ConvertedValue = 0xB1;
- 8000bdc: 4b3e ldr r3, [pc, #248] ; (8000cd8 <SysTick_Handler+0x110>)
- 8000bde: 22b1 movs r2, #177 ; 0xb1
- 8000be0: 801a strh r2, [r3, #0]
- Buffer1[BuffCount] = TMSTP;
- 8000be2: 4b3e ldr r3, [pc, #248] ; (8000cdc <SysTick_Handler+0x114>)
- 8000be4: 781b ldrb r3, [r3, #0]
- 8000be6: 461a mov r2, r3
- 8000be8: 4b3d ldr r3, [pc, #244] ; (8000ce0 <SysTick_Handler+0x118>)
- 8000bea: 8819 ldrh r1, [r3, #0]
- 8000bec: 4b3d ldr r3, [pc, #244] ; (8000ce4 <SysTick_Handler+0x11c>)
- 8000bee: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000bf2: 4b3a ldr r3, [pc, #232] ; (8000cdc <SysTick_Handler+0x114>)
- 8000bf4: 781b ldrb r3, [r3, #0]
- 8000bf6: 3301 adds r3, #1
- 8000bf8: b2da uxtb r2, r3
- 8000bfa: 4b38 ldr r3, [pc, #224] ; (8000cdc <SysTick_Handler+0x114>)
- 8000bfc: 701a strb r2, [r3, #0]
- Buffer1[BuffCount] = ADC1ConvertedValue;
- 8000bfe: 4b37 ldr r3, [pc, #220] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c00: 781b ldrb r3, [r3, #0]
- 8000c02: 461a mov r2, r3
- 8000c04: 4b34 ldr r3, [pc, #208] ; (8000cd8 <SysTick_Handler+0x110>)
- 8000c06: 881b ldrh r3, [r3, #0]
- 8000c08: b299 uxth r1, r3
- 8000c0a: 4b36 ldr r3, [pc, #216] ; (8000ce4 <SysTick_Handler+0x11c>)
- 8000c0c: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000c10: 4b32 ldr r3, [pc, #200] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c12: 781b ldrb r3, [r3, #0]
- 8000c14: 3301 adds r3, #1
- 8000c16: b2da uxtb r2, r3
- 8000c18: 4b30 ldr r3, [pc, #192] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c1a: 701a strb r2, [r3, #0]
- TMSTP++;
- 8000c1c: 4b30 ldr r3, [pc, #192] ; (8000ce0 <SysTick_Handler+0x118>)
- 8000c1e: 881b ldrh r3, [r3, #0]
- 8000c20: 3301 adds r3, #1
- 8000c22: b29a uxth r2, r3
- 8000c24: 4b2e ldr r3, [pc, #184] ; (8000ce0 <SysTick_Handler+0x118>)
- 8000c26: 801a strh r2, [r3, #0]
- }
- if (Rstatus == 2 && Wstatus != 2){
- 8000c28: 4b29 ldr r3, [pc, #164] ; (8000cd0 <SysTick_Handler+0x108>)
- 8000c2a: 781b ldrb r3, [r3, #0]
- 8000c2c: 2b02 cmp r3, #2
- 8000c2e: d129 bne.n 8000c84 <SysTick_Handler+0xbc>
- 8000c30: 4b28 ldr r3, [pc, #160] ; (8000cd4 <SysTick_Handler+0x10c>)
- 8000c32: 781b ldrb r3, [r3, #0]
- 8000c34: 2b02 cmp r3, #2
- 8000c36: d025 beq.n 8000c84 <SysTick_Handler+0xbc>
- ADC1ConvertedValue = 0xB2;
- 8000c38: 4b27 ldr r3, [pc, #156] ; (8000cd8 <SysTick_Handler+0x110>)
- 8000c3a: 22b2 movs r2, #178 ; 0xb2
- 8000c3c: 801a strh r2, [r3, #0]
- Buffer2[BuffCount] = TMSTP;
- 8000c3e: 4b27 ldr r3, [pc, #156] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c40: 781b ldrb r3, [r3, #0]
- 8000c42: 461a mov r2, r3
- 8000c44: 4b26 ldr r3, [pc, #152] ; (8000ce0 <SysTick_Handler+0x118>)
- 8000c46: 8819 ldrh r1, [r3, #0]
- 8000c48: 4b27 ldr r3, [pc, #156] ; (8000ce8 <SysTick_Handler+0x120>)
- 8000c4a: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000c4e: 4b23 ldr r3, [pc, #140] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c50: 781b ldrb r3, [r3, #0]
- 8000c52: 3301 adds r3, #1
- 8000c54: b2da uxtb r2, r3
- 8000c56: 4b21 ldr r3, [pc, #132] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c58: 701a strb r2, [r3, #0]
- Buffer2[BuffCount] = ADC1ConvertedValue;
- 8000c5a: 4b20 ldr r3, [pc, #128] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c5c: 781b ldrb r3, [r3, #0]
- 8000c5e: 461a mov r2, r3
- 8000c60: 4b1d ldr r3, [pc, #116] ; (8000cd8 <SysTick_Handler+0x110>)
- 8000c62: 881b ldrh r3, [r3, #0]
- 8000c64: b299 uxth r1, r3
- 8000c66: 4b20 ldr r3, [pc, #128] ; (8000ce8 <SysTick_Handler+0x120>)
- 8000c68: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000c6c: 4b1b ldr r3, [pc, #108] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c6e: 781b ldrb r3, [r3, #0]
- 8000c70: 3301 adds r3, #1
- 8000c72: b2da uxtb r2, r3
- 8000c74: 4b19 ldr r3, [pc, #100] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c76: 701a strb r2, [r3, #0]
- TMSTP++;
- 8000c78: 4b19 ldr r3, [pc, #100] ; (8000ce0 <SysTick_Handler+0x118>)
- 8000c7a: 881b ldrh r3, [r3, #0]
- 8000c7c: 3301 adds r3, #1
- 8000c7e: b29a uxth r2, r3
- 8000c80: 4b17 ldr r3, [pc, #92] ; (8000ce0 <SysTick_Handler+0x118>)
- 8000c82: 801a strh r2, [r3, #0]
- }
- if ( BuffCount == 254 && Rstatus == 1 ){
- 8000c84: 4b15 ldr r3, [pc, #84] ; (8000cdc <SysTick_Handler+0x114>)
- 8000c86: 781b ldrb r3, [r3, #0]
- 8000c88: 2bfe cmp r3, #254 ; 0xfe
- 8000c8a: d10c bne.n 8000ca6 <SysTick_Handler+0xde>
- 8000c8c: 4b10 ldr r3, [pc, #64] ; (8000cd0 <SysTick_Handler+0x108>)
- 8000c8e: 781b ldrb r3, [r3, #0]
- 8000c90: 2b01 cmp r3, #1
- 8000c92: d108 bne.n 8000ca6 <SysTick_Handler+0xde>
- Rstatus = 2;
- 8000c94: 4b0e ldr r3, [pc, #56] ; (8000cd0 <SysTick_Handler+0x108>)
- 8000c96: 2202 movs r2, #2
- 8000c98: 701a strb r2, [r3, #0]
- BuffReady = 1;
- 8000c9a: 4b14 ldr r3, [pc, #80] ; (8000cec <SysTick_Handler+0x124>)
- 8000c9c: 2201 movs r2, #1
- 8000c9e: 701a strb r2, [r3, #0]
- BuffCount = 0;
- 8000ca0: 4b0e ldr r3, [pc, #56] ; (8000cdc <SysTick_Handler+0x114>)
- 8000ca2: 2200 movs r2, #0
- 8000ca4: 701a strb r2, [r3, #0]
- }
- if (BuffCount == 254 && Rstatus == 2){
- 8000ca6: 4b0d ldr r3, [pc, #52] ; (8000cdc <SysTick_Handler+0x114>)
- 8000ca8: 781b ldrb r3, [r3, #0]
- 8000caa: 2bfe cmp r3, #254 ; 0xfe
- 8000cac: d10c bne.n 8000cc8 <SysTick_Handler+0x100>
- 8000cae: 4b08 ldr r3, [pc, #32] ; (8000cd0 <SysTick_Handler+0x108>)
- 8000cb0: 781b ldrb r3, [r3, #0]
- 8000cb2: 2b02 cmp r3, #2
- 8000cb4: d108 bne.n 8000cc8 <SysTick_Handler+0x100>
- Rstatus = 1;
- 8000cb6: 4b06 ldr r3, [pc, #24] ; (8000cd0 <SysTick_Handler+0x108>)
- 8000cb8: 2201 movs r2, #1
- 8000cba: 701a strb r2, [r3, #0]
- BuffReady = 2;
- 8000cbc: 4b0b ldr r3, [pc, #44] ; (8000cec <SysTick_Handler+0x124>)
- 8000cbe: 2202 movs r2, #2
- 8000cc0: 701a strb r2, [r3, #0]
- BuffCount = 0;
- 8000cc2: 4b06 ldr r3, [pc, #24] ; (8000cdc <SysTick_Handler+0x114>)
- 8000cc4: 2200 movs r2, #0
- 8000cc6: 701a strb r2, [r3, #0]
- }
- }
- 8000cc8: bf00 nop
- 8000cca: 46bd mov sp, r7
- 8000ccc: bc80 pop {r7}
- 8000cce: 4770 bx lr
- 8000cd0: 2000001a .word 0x2000001a
- 8000cd4: 2000001b .word 0x2000001b
- 8000cd8: 2000022c .word 0x2000022c
- 8000cdc: 20000631 .word 0x20000631
- 8000ce0: 20000634 .word 0x20000634
- 8000ce4: 20000230 .word 0x20000230
- 8000ce8: 20000430 .word 0x20000430
- 8000cec: 20000630 .word 0x20000630
- 8000cf0: 08000d4c .word 0x08000d4c
- 8000cf4: 20000000 .word 0x20000000
- 8000cf8: 2000001c .word 0x2000001c
- 8000cfc: 2000001c .word 0x2000001c
- 8000d00: 20000638 .word 0x20000638
- 08000d04 <Reset_Handler>:
- .weak Reset_Handler
- .type Reset_Handler, %function
- Reset_Handler:
- /* Copy the data segment initializers from flash to SRAM */
- movs r1, #0
- 8000d04: 2100 movs r1, #0
- b LoopCopyDataInit
- 8000d06: e003 b.n 8000d10 <LoopCopyDataInit>
- 08000d08 <CopyDataInit>:
- CopyDataInit:
- ldr r3, =_sidata
- 8000d08: 4b0a ldr r3, [pc, #40] ; (8000d34 <LoopFillZerobss+0x10>)
- ldr r3, [r3, r1]
- 8000d0a: 585b ldr r3, [r3, r1]
- str r3, [r0, r1]
- 8000d0c: 5043 str r3, [r0, r1]
- adds r1, r1, #4
- 8000d0e: 3104 adds r1, #4
- 08000d10 <LoopCopyDataInit>:
-
- LoopCopyDataInit:
- ldr r0, =_sdata
- 8000d10: 4809 ldr r0, [pc, #36] ; (8000d38 <LoopFillZerobss+0x14>)
- ldr r3, =_edata
- 8000d12: 4b0a ldr r3, [pc, #40] ; (8000d3c <LoopFillZerobss+0x18>)
- adds r2, r0, r1
- 8000d14: 1842 adds r2, r0, r1
- cmp r2, r3
- 8000d16: 429a cmp r2, r3
- bcc CopyDataInit
- 8000d18: d3f6 bcc.n 8000d08 <CopyDataInit>
- ldr r2, =_sbss
- 8000d1a: 4a09 ldr r2, [pc, #36] ; (8000d40 <LoopFillZerobss+0x1c>)
- b LoopFillZerobss
- 8000d1c: e002 b.n 8000d24 <LoopFillZerobss>
- 08000d1e <FillZerobss>:
- /* Zero fill the bss segment. */
- FillZerobss:
- movs r3, #0
- 8000d1e: 2300 movs r3, #0
- str r3, [r2], #4
- 8000d20: f842 3b04 str.w r3, [r2], #4
- 08000d24 <LoopFillZerobss>:
-
- LoopFillZerobss:
- ldr r3, = _ebss
- 8000d24: 4b07 ldr r3, [pc, #28] ; (8000d44 <LoopFillZerobss+0x20>)
- cmp r2, r3
- 8000d26: 429a cmp r2, r3
- bcc FillZerobss
- 8000d28: d3f9 bcc.n 8000d1e <FillZerobss>
- /* Call the clock system intitialization function.*/
- bl SystemInit
- 8000d2a: f7ff fa3b bl 80001a4 <SystemInit>
- /* Call the application's entry point.*/
- bl main
- 8000d2e: f7ff ff0d bl 8000b4c <main>
- bx lr
- 8000d32: 4770 bx lr
- /* Copy the data segment initializers from flash to SRAM */
- movs r1, #0
- b LoopCopyDataInit
- CopyDataInit:
- ldr r3, =_sidata
- 8000d34: 08000d4c .word 0x08000d4c
- ldr r3, [r3, r1]
- str r3, [r0, r1]
- adds r1, r1, #4
-
- LoopCopyDataInit:
- ldr r0, =_sdata
- 8000d38: 20000000 .word 0x20000000
- ldr r3, =_edata
- 8000d3c: 2000001c .word 0x2000001c
- adds r2, r0, r1
- cmp r2, r3
- bcc CopyDataInit
- ldr r2, =_sbss
- 8000d40: 2000001c .word 0x2000001c
- FillZerobss:
- movs r3, #0
- str r3, [r2], #4
-
- LoopFillZerobss:
- ldr r3, = _ebss
- 8000d44: 20000638 .word 0x20000638
- 08000d48 <ADC1_2_IRQHandler>:
- * @retval None
- */
- .section .text.Default_Handler,"ax",%progbits
- Default_Handler:
- Infinite_Loop:
- b Infinite_Loop
- 8000d48: e7fe b.n 8000d48 <ADC1_2_IRQHandler>
- ...
|