1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488 |
- 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: 4b11 ldr r3, [pc, #68] ; (8000ba0 <main+0x54>)
- 8000b5a: 601a str r2, [r3, #0]
- checkSDStatus();
- 8000b5c: f7ff ff66 bl 8000a2c <checkSDStatus>
- writeBufFilled = 0;
- 8000b60: 4b10 ldr r3, [pc, #64] ; (8000ba4 <main+0x58>)
- 8000b62: 2200 movs r2, #0
- 8000b64: 801a strh r2, [r3, #0]
- // SD_WriteHeaders();
- SDWriteOffset = SD_BUFSIZE;
- 8000b66: 4b10 ldr r3, [pc, #64] ; (8000ba8 <main+0x5c>)
- 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: 4b0e ldr r3, [pc, #56] ; (8000bac <main+0x60>)
- 8000b74: 681b ldr r3, [r3, #0]
- 8000b76: 4a0e ldr r2, [pc, #56] ; (8000bb0 <main+0x64>)
- 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: 4b0b ldr r3, [pc, #44] ; (8000bb4 <main+0x68>)
- 8000b86: 781b ldrb r3, [r3, #0]
- 8000b88: 2b00 cmp r3, #0
- 8000b8a: d0fb beq.n 8000b84 <main+0x38>
- check=1;
- 8000b8c: 4b0a ldr r3, [pc, #40] ; (8000bb8 <main+0x6c>)
- 8000b8e: 2201 movs r2, #1
- 8000b90: 701a strb r2, [r3, #0]
- // SD_WriteBlock_1(SDWriteOffset);
- SDWriteOffset = SDWriteOffset + SD_BUFSIZE;
- 8000b92: 4b05 ldr r3, [pc, #20] ; (8000ba8 <main+0x5c>)
- 8000b94: 681b ldr r3, [r3, #0]
- 8000b96: f503 7300 add.w r3, r3, #512 ; 0x200
- 8000b9a: 4a03 ldr r2, [pc, #12] ; (8000ba8 <main+0x5c>)
- 8000b9c: 6013 str r3, [r2, #0]
- }
- }
- 8000b9e: e7f1 b.n 8000b84 <main+0x38>
- 8000ba0: 20000014 .word 0x20000014
- 8000ba4: 20000226 .word 0x20000226
- 8000ba8: 20000228 .word 0x20000228
- 8000bac: 20000000 .word 0x20000000
- 8000bb0: d1b71759 .word 0xd1b71759
- 8000bb4: 20000630 .word 0x20000630
- 8000bb8: 20000632 .word 0x20000632
- 08000bbc <SysTick_Handler>:
- }
- void SysTick_Handler(void) {
- 8000bbc: b480 push {r7}
- 8000bbe: af00 add r7, sp, #0
- if (Rstatus == 1 && Wstatus != 1){
- 8000bc0: 4b40 ldr r3, [pc, #256] ; (8000cc4 <SysTick_Handler+0x108>)
- 8000bc2: 781b ldrb r3, [r3, #0]
- 8000bc4: 2b01 cmp r3, #1
- 8000bc6: d129 bne.n 8000c1c <SysTick_Handler+0x60>
- 8000bc8: 4b3f ldr r3, [pc, #252] ; (8000cc8 <SysTick_Handler+0x10c>)
- 8000bca: 781b ldrb r3, [r3, #0]
- 8000bcc: 2b01 cmp r3, #1
- 8000bce: d025 beq.n 8000c1c <SysTick_Handler+0x60>
- ADC1ConvertedValue = 0xB1;
- 8000bd0: 4b3e ldr r3, [pc, #248] ; (8000ccc <SysTick_Handler+0x110>)
- 8000bd2: 22b1 movs r2, #177 ; 0xb1
- 8000bd4: 801a strh r2, [r3, #0]
- Buffer1[BuffCount] = TMSTP;
- 8000bd6: 4b3e ldr r3, [pc, #248] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000bd8: 781b ldrb r3, [r3, #0]
- 8000bda: 461a mov r2, r3
- 8000bdc: 4b3d ldr r3, [pc, #244] ; (8000cd4 <SysTick_Handler+0x118>)
- 8000bde: 8819 ldrh r1, [r3, #0]
- 8000be0: 4b3d ldr r3, [pc, #244] ; (8000cd8 <SysTick_Handler+0x11c>)
- 8000be2: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000be6: 4b3a ldr r3, [pc, #232] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000be8: 781b ldrb r3, [r3, #0]
- 8000bea: 3301 adds r3, #1
- 8000bec: b2da uxtb r2, r3
- 8000bee: 4b38 ldr r3, [pc, #224] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000bf0: 701a strb r2, [r3, #0]
- Buffer1[BuffCount] = ADC1ConvertedValue;
- 8000bf2: 4b37 ldr r3, [pc, #220] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000bf4: 781b ldrb r3, [r3, #0]
- 8000bf6: 461a mov r2, r3
- 8000bf8: 4b34 ldr r3, [pc, #208] ; (8000ccc <SysTick_Handler+0x110>)
- 8000bfa: 881b ldrh r3, [r3, #0]
- 8000bfc: b299 uxth r1, r3
- 8000bfe: 4b36 ldr r3, [pc, #216] ; (8000cd8 <SysTick_Handler+0x11c>)
- 8000c00: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000c04: 4b32 ldr r3, [pc, #200] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c06: 781b ldrb r3, [r3, #0]
- 8000c08: 3301 adds r3, #1
- 8000c0a: b2da uxtb r2, r3
- 8000c0c: 4b30 ldr r3, [pc, #192] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c0e: 701a strb r2, [r3, #0]
- TMSTP++;
- 8000c10: 4b30 ldr r3, [pc, #192] ; (8000cd4 <SysTick_Handler+0x118>)
- 8000c12: 881b ldrh r3, [r3, #0]
- 8000c14: 3301 adds r3, #1
- 8000c16: b29a uxth r2, r3
- 8000c18: 4b2e ldr r3, [pc, #184] ; (8000cd4 <SysTick_Handler+0x118>)
- 8000c1a: 801a strh r2, [r3, #0]
- }
- if (Rstatus == 2 && Wstatus != 2){
- 8000c1c: 4b29 ldr r3, [pc, #164] ; (8000cc4 <SysTick_Handler+0x108>)
- 8000c1e: 781b ldrb r3, [r3, #0]
- 8000c20: 2b02 cmp r3, #2
- 8000c22: d129 bne.n 8000c78 <SysTick_Handler+0xbc>
- 8000c24: 4b28 ldr r3, [pc, #160] ; (8000cc8 <SysTick_Handler+0x10c>)
- 8000c26: 781b ldrb r3, [r3, #0]
- 8000c28: 2b02 cmp r3, #2
- 8000c2a: d025 beq.n 8000c78 <SysTick_Handler+0xbc>
- ADC1ConvertedValue = 0xB2;
- 8000c2c: 4b27 ldr r3, [pc, #156] ; (8000ccc <SysTick_Handler+0x110>)
- 8000c2e: 22b2 movs r2, #178 ; 0xb2
- 8000c30: 801a strh r2, [r3, #0]
- Buffer2[BuffCount] = TMSTP;
- 8000c32: 4b27 ldr r3, [pc, #156] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c34: 781b ldrb r3, [r3, #0]
- 8000c36: 461a mov r2, r3
- 8000c38: 4b26 ldr r3, [pc, #152] ; (8000cd4 <SysTick_Handler+0x118>)
- 8000c3a: 8819 ldrh r1, [r3, #0]
- 8000c3c: 4b27 ldr r3, [pc, #156] ; (8000cdc <SysTick_Handler+0x120>)
- 8000c3e: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000c42: 4b23 ldr r3, [pc, #140] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c44: 781b ldrb r3, [r3, #0]
- 8000c46: 3301 adds r3, #1
- 8000c48: b2da uxtb r2, r3
- 8000c4a: 4b21 ldr r3, [pc, #132] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c4c: 701a strb r2, [r3, #0]
- Buffer2[BuffCount] = ADC1ConvertedValue;
- 8000c4e: 4b20 ldr r3, [pc, #128] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c50: 781b ldrb r3, [r3, #0]
- 8000c52: 461a mov r2, r3
- 8000c54: 4b1d ldr r3, [pc, #116] ; (8000ccc <SysTick_Handler+0x110>)
- 8000c56: 881b ldrh r3, [r3, #0]
- 8000c58: b299 uxth r1, r3
- 8000c5a: 4b20 ldr r3, [pc, #128] ; (8000cdc <SysTick_Handler+0x120>)
- 8000c5c: f823 1012 strh.w r1, [r3, r2, lsl #1]
- BuffCount++;
- 8000c60: 4b1b ldr r3, [pc, #108] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c62: 781b ldrb r3, [r3, #0]
- 8000c64: 3301 adds r3, #1
- 8000c66: b2da uxtb r2, r3
- 8000c68: 4b19 ldr r3, [pc, #100] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c6a: 701a strb r2, [r3, #0]
- TMSTP++;
- 8000c6c: 4b19 ldr r3, [pc, #100] ; (8000cd4 <SysTick_Handler+0x118>)
- 8000c6e: 881b ldrh r3, [r3, #0]
- 8000c70: 3301 adds r3, #1
- 8000c72: b29a uxth r2, r3
- 8000c74: 4b17 ldr r3, [pc, #92] ; (8000cd4 <SysTick_Handler+0x118>)
- 8000c76: 801a strh r2, [r3, #0]
- }
- if ( BuffCount == 254 && Rstatus == 1 ){
- 8000c78: 4b15 ldr r3, [pc, #84] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c7a: 781b ldrb r3, [r3, #0]
- 8000c7c: 2bfe cmp r3, #254 ; 0xfe
- 8000c7e: d10c bne.n 8000c9a <SysTick_Handler+0xde>
- 8000c80: 4b10 ldr r3, [pc, #64] ; (8000cc4 <SysTick_Handler+0x108>)
- 8000c82: 781b ldrb r3, [r3, #0]
- 8000c84: 2b01 cmp r3, #1
- 8000c86: d108 bne.n 8000c9a <SysTick_Handler+0xde>
- Rstatus = 2;
- 8000c88: 4b0e ldr r3, [pc, #56] ; (8000cc4 <SysTick_Handler+0x108>)
- 8000c8a: 2202 movs r2, #2
- 8000c8c: 701a strb r2, [r3, #0]
- BuffReady = 1;
- 8000c8e: 4b14 ldr r3, [pc, #80] ; (8000ce0 <SysTick_Handler+0x124>)
- 8000c90: 2201 movs r2, #1
- 8000c92: 701a strb r2, [r3, #0]
- BuffCount = 0;
- 8000c94: 4b0e ldr r3, [pc, #56] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c96: 2200 movs r2, #0
- 8000c98: 701a strb r2, [r3, #0]
- }
- if (BuffCount == 254 && Rstatus == 2){
- 8000c9a: 4b0d ldr r3, [pc, #52] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000c9c: 781b ldrb r3, [r3, #0]
- 8000c9e: 2bfe cmp r3, #254 ; 0xfe
- 8000ca0: d10c bne.n 8000cbc <SysTick_Handler+0x100>
- 8000ca2: 4b08 ldr r3, [pc, #32] ; (8000cc4 <SysTick_Handler+0x108>)
- 8000ca4: 781b ldrb r3, [r3, #0]
- 8000ca6: 2b02 cmp r3, #2
- 8000ca8: d108 bne.n 8000cbc <SysTick_Handler+0x100>
- Rstatus = 1;
- 8000caa: 4b06 ldr r3, [pc, #24] ; (8000cc4 <SysTick_Handler+0x108>)
- 8000cac: 2201 movs r2, #1
- 8000cae: 701a strb r2, [r3, #0]
- BuffReady = 2;
- 8000cb0: 4b0b ldr r3, [pc, #44] ; (8000ce0 <SysTick_Handler+0x124>)
- 8000cb2: 2202 movs r2, #2
- 8000cb4: 701a strb r2, [r3, #0]
- BuffCount = 0;
- 8000cb6: 4b06 ldr r3, [pc, #24] ; (8000cd0 <SysTick_Handler+0x114>)
- 8000cb8: 2200 movs r2, #0
- 8000cba: 701a strb r2, [r3, #0]
- }
- }
- 8000cbc: bf00 nop
- 8000cbe: 46bd mov sp, r7
- 8000cc0: bc80 pop {r7}
- 8000cc2: 4770 bx lr
- 8000cc4: 2000001a .word 0x2000001a
- 8000cc8: 2000001b .word 0x2000001b
- 8000ccc: 2000022c .word 0x2000022c
- 8000cd0: 20000631 .word 0x20000631
- 8000cd4: 20000634 .word 0x20000634
- 8000cd8: 20000230 .word 0x20000230
- 8000cdc: 20000430 .word 0x20000430
- 8000ce0: 20000630 .word 0x20000630
- 8000ce4: 08000d40 .word 0x08000d40
- 8000ce8: 20000000 .word 0x20000000
- 8000cec: 2000001c .word 0x2000001c
- 8000cf0: 2000001c .word 0x2000001c
- 8000cf4: 20000638 .word 0x20000638
- 08000cf8 <Reset_Handler>:
- .weak Reset_Handler
- .type Reset_Handler, %function
- Reset_Handler:
- /* Copy the data segment initializers from flash to SRAM */
- movs r1, #0
- 8000cf8: 2100 movs r1, #0
- b LoopCopyDataInit
- 8000cfa: e003 b.n 8000d04 <LoopCopyDataInit>
- 08000cfc <CopyDataInit>:
- CopyDataInit:
- ldr r3, =_sidata
- 8000cfc: 4b0a ldr r3, [pc, #40] ; (8000d28 <LoopFillZerobss+0x10>)
- ldr r3, [r3, r1]
- 8000cfe: 585b ldr r3, [r3, r1]
- str r3, [r0, r1]
- 8000d00: 5043 str r3, [r0, r1]
- adds r1, r1, #4
- 8000d02: 3104 adds r1, #4
- 08000d04 <LoopCopyDataInit>:
-
- LoopCopyDataInit:
- ldr r0, =_sdata
- 8000d04: 4809 ldr r0, [pc, #36] ; (8000d2c <LoopFillZerobss+0x14>)
- ldr r3, =_edata
- 8000d06: 4b0a ldr r3, [pc, #40] ; (8000d30 <LoopFillZerobss+0x18>)
- adds r2, r0, r1
- 8000d08: 1842 adds r2, r0, r1
- cmp r2, r3
- 8000d0a: 429a cmp r2, r3
- bcc CopyDataInit
- 8000d0c: d3f6 bcc.n 8000cfc <CopyDataInit>
- ldr r2, =_sbss
- 8000d0e: 4a09 ldr r2, [pc, #36] ; (8000d34 <LoopFillZerobss+0x1c>)
- b LoopFillZerobss
- 8000d10: e002 b.n 8000d18 <LoopFillZerobss>
- 08000d12 <FillZerobss>:
- /* Zero fill the bss segment. */
- FillZerobss:
- movs r3, #0
- 8000d12: 2300 movs r3, #0
- str r3, [r2], #4
- 8000d14: f842 3b04 str.w r3, [r2], #4
- 08000d18 <LoopFillZerobss>:
-
- LoopFillZerobss:
- ldr r3, = _ebss
- 8000d18: 4b07 ldr r3, [pc, #28] ; (8000d38 <LoopFillZerobss+0x20>)
- cmp r2, r3
- 8000d1a: 429a cmp r2, r3
- bcc FillZerobss
- 8000d1c: d3f9 bcc.n 8000d12 <FillZerobss>
- /* Call the clock system intitialization function.*/
- bl SystemInit
- 8000d1e: f7ff fa41 bl 80001a4 <SystemInit>
- /* Call the application's entry point.*/
- bl main
- 8000d22: f7ff ff13 bl 8000b4c <main>
- bx lr
- 8000d26: 4770 bx lr
- /* Copy the data segment initializers from flash to SRAM */
- movs r1, #0
- b LoopCopyDataInit
- CopyDataInit:
- ldr r3, =_sidata
- 8000d28: 08000d40 .word 0x08000d40
- ldr r3, [r3, r1]
- str r3, [r0, r1]
- adds r1, r1, #4
-
- LoopCopyDataInit:
- ldr r0, =_sdata
- 8000d2c: 20000000 .word 0x20000000
- ldr r3, =_edata
- 8000d30: 2000001c .word 0x2000001c
- adds r2, r0, r1
- cmp r2, r3
- bcc CopyDataInit
- ldr r2, =_sbss
- 8000d34: 2000001c .word 0x2000001c
- FillZerobss:
- movs r3, #0
- str r3, [r2], #4
-
- LoopFillZerobss:
- ldr r3, = _ebss
- 8000d38: 20000638 .word 0x20000638
- 08000d3c <ADC1_2_IRQHandler>:
- * @retval None
- */
- .section .text.Default_Handler,"ax",%progbits
- Default_Handler:
- Infinite_Loop:
- b Infinite_Loop
- 8000d3c: e7fe b.n 8000d3c <ADC1_2_IRQHandler>
- ...
|