main.lst 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. build/main.elf: file format elf32-littlearm
  2. Disassembly of section .text:
  3. 0800010c <NVIC_SetPriority>:
  4. * interrupt, or negative to specify an internal (core) interrupt.
  5. *
  6. * Note: The priority cannot be set for every core interrupt.
  7. */
  8. static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
  9. {
  10. 800010c: b480 push {r7}
  11. 800010e: b083 sub sp, #12
  12. 8000110: af00 add r7, sp, #0
  13. 8000112: 4603 mov r3, r0
  14. 8000114: 6039 str r1, [r7, #0]
  15. 8000116: 71fb strb r3, [r7, #7]
  16. if(IRQn < 0) {
  17. 8000118: f997 3007 ldrsb.w r3, [r7, #7]
  18. 800011c: 2b00 cmp r3, #0
  19. 800011e: da0b bge.n 8000138 <NVIC_SetPriority+0x2c>
  20. SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
  21. 8000120: 490d ldr r1, [pc, #52] ; (8000158 <NVIC_SetPriority+0x4c>)
  22. 8000122: 79fb ldrb r3, [r7, #7]
  23. 8000124: f003 030f and.w r3, r3, #15
  24. 8000128: 3b04 subs r3, #4
  25. 800012a: 683a ldr r2, [r7, #0]
  26. 800012c: b2d2 uxtb r2, r2
  27. 800012e: 0112 lsls r2, r2, #4
  28. 8000130: b2d2 uxtb r2, r2
  29. 8000132: 440b add r3, r1
  30. 8000134: 761a strb r2, [r3, #24]
  31. else {
  32. NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
  33. }
  34. 8000136: e009 b.n 800014c <NVIC_SetPriority+0x40>
  35. static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
  36. {
  37. if(IRQn < 0) {
  38. SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
  39. else {
  40. NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
  41. 8000138: 4908 ldr r1, [pc, #32] ; (800015c <NVIC_SetPriority+0x50>)
  42. 800013a: f997 3007 ldrsb.w r3, [r7, #7]
  43. 800013e: 683a ldr r2, [r7, #0]
  44. 8000140: b2d2 uxtb r2, r2
  45. 8000142: 0112 lsls r2, r2, #4
  46. 8000144: b2d2 uxtb r2, r2
  47. 8000146: 440b add r3, r1
  48. 8000148: f883 2300 strb.w r2, [r3, #768] ; 0x300
  49. }
  50. 800014c: bf00 nop
  51. 800014e: 370c adds r7, #12
  52. 8000150: 46bd mov sp, r7
  53. 8000152: bc80 pop {r7}
  54. 8000154: 4770 bx lr
  55. 8000156: bf00 nop
  56. 8000158: e000ed00 .word 0xe000ed00
  57. 800015c: e000e100 .word 0xe000e100
  58. 08000160 <SysTick_Config>:
  59. * Initialise the system tick timer and its interrupt and start the
  60. * system tick timer / counter in free running mode to generate
  61. * periodical interrupts.
  62. */
  63. static __INLINE uint32_t SysTick_Config(uint32_t ticks)
  64. {
  65. 8000160: b580 push {r7, lr}
  66. 8000162: b082 sub sp, #8
  67. 8000164: af00 add r7, sp, #0
  68. 8000166: 6078 str r0, [r7, #4]
  69. if (ticks > SysTick_LOAD_RELOAD_Msk) return (1); /* Reload value impossible */
  70. 8000168: 687b ldr r3, [r7, #4]
  71. 800016a: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
  72. 800016e: d301 bcc.n 8000174 <SysTick_Config+0x14>
  73. 8000170: 2301 movs r3, #1
  74. 8000172: e011 b.n 8000198 <SysTick_Config+0x38>
  75. SysTick->LOAD = (ticks & SysTick_LOAD_RELOAD_Msk) - 1; /* set reload register */
  76. 8000174: 4a0a ldr r2, [pc, #40] ; (80001a0 <SysTick_Config+0x40>)
  77. 8000176: 687b ldr r3, [r7, #4]
  78. 8000178: f023 437f bic.w r3, r3, #4278190080 ; 0xff000000
  79. 800017c: 3b01 subs r3, #1
  80. 800017e: 6053 str r3, [r2, #4]
  81. NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1); /* set Priority for Cortex-M0 System Interrupts */
  82. 8000180: 210f movs r1, #15
  83. 8000182: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff
  84. 8000186: f7ff ffc1 bl 800010c <NVIC_SetPriority>
  85. SysTick->VAL = 0; /* Load the SysTick Counter Value */
  86. 800018a: 4b05 ldr r3, [pc, #20] ; (80001a0 <SysTick_Config+0x40>)
  87. 800018c: 2200 movs r2, #0
  88. 800018e: 609a str r2, [r3, #8]
  89. SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
  90. 8000190: 4b03 ldr r3, [pc, #12] ; (80001a0 <SysTick_Config+0x40>)
  91. 8000192: 2207 movs r2, #7
  92. 8000194: 601a str r2, [r3, #0]
  93. SysTick_CTRL_TICKINT_Msk |
  94. SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
  95. return (0); /* Function successful */
  96. 8000196: 2300 movs r3, #0
  97. }
  98. 8000198: 4618 mov r0, r3
  99. 800019a: 3708 adds r7, #8
  100. 800019c: 46bd mov sp, r7
  101. 800019e: bd80 pop {r7, pc}
  102. 80001a0: e000e010 .word 0xe000e010
  103. 080001a4 <SystemInit>:
  104. * @note This function should be used only after reset.
  105. * @param None
  106. * @retval None
  107. */
  108. void SystemInit (void)
  109. {
  110. 80001a4: b580 push {r7, lr}
  111. 80001a6: af00 add r7, sp, #0
  112. /* Reset the RCC clock configuration to the default reset state(for debug purpose) */
  113. /* Set HSION bit */
  114. RCC->CR |= (uint32_t)0x00000001;
  115. 80001a8: 4a15 ldr r2, [pc, #84] ; (8000200 <SystemInit+0x5c>)
  116. 80001aa: 4b15 ldr r3, [pc, #84] ; (8000200 <SystemInit+0x5c>)
  117. 80001ac: 681b ldr r3, [r3, #0]
  118. 80001ae: f043 0301 orr.w r3, r3, #1
  119. 80001b2: 6013 str r3, [r2, #0]
  120. /* Reset SW, HPRE, PPRE1, PPRE2, ADCPRE and MCO bits */
  121. #ifndef STM32F10X_CL
  122. RCC->CFGR &= (uint32_t)0xF8FF0000;
  123. 80001b4: 4912 ldr r1, [pc, #72] ; (8000200 <SystemInit+0x5c>)
  124. 80001b6: 4b12 ldr r3, [pc, #72] ; (8000200 <SystemInit+0x5c>)
  125. 80001b8: 685a ldr r2, [r3, #4]
  126. 80001ba: 4b12 ldr r3, [pc, #72] ; (8000204 <SystemInit+0x60>)
  127. 80001bc: 4013 ands r3, r2
  128. 80001be: 604b str r3, [r1, #4]
  129. #else
  130. RCC->CFGR &= (uint32_t)0xF0FF0000;
  131. #endif /* STM32F10X_CL */
  132. /* Reset HSEON, CSSON and PLLON bits */
  133. RCC->CR &= (uint32_t)0xFEF6FFFF;
  134. 80001c0: 4a0f ldr r2, [pc, #60] ; (8000200 <SystemInit+0x5c>)
  135. 80001c2: 4b0f ldr r3, [pc, #60] ; (8000200 <SystemInit+0x5c>)
  136. 80001c4: 681b ldr r3, [r3, #0]
  137. 80001c6: f023 7384 bic.w r3, r3, #17301504 ; 0x1080000
  138. 80001ca: f423 3380 bic.w r3, r3, #65536 ; 0x10000
  139. 80001ce: 6013 str r3, [r2, #0]
  140. /* Reset HSEBYP bit */
  141. RCC->CR &= (uint32_t)0xFFFBFFFF;
  142. 80001d0: 4a0b ldr r2, [pc, #44] ; (8000200 <SystemInit+0x5c>)
  143. 80001d2: 4b0b ldr r3, [pc, #44] ; (8000200 <SystemInit+0x5c>)
  144. 80001d4: 681b ldr r3, [r3, #0]
  145. 80001d6: f423 2380 bic.w r3, r3, #262144 ; 0x40000
  146. 80001da: 6013 str r3, [r2, #0]
  147. /* Reset PLLSRC, PLLXTPRE, PLLMUL and USBPRE/OTGFSPRE bits */
  148. RCC->CFGR &= (uint32_t)0xFF80FFFF;
  149. 80001dc: 4a08 ldr r2, [pc, #32] ; (8000200 <SystemInit+0x5c>)
  150. 80001de: 4b08 ldr r3, [pc, #32] ; (8000200 <SystemInit+0x5c>)
  151. 80001e0: 685b ldr r3, [r3, #4]
  152. 80001e2: f423 03fe bic.w r3, r3, #8323072 ; 0x7f0000
  153. 80001e6: 6053 str r3, [r2, #4]
  154. /* Reset CFGR2 register */
  155. RCC->CFGR2 = 0x00000000;
  156. #else
  157. /* Disable all interrupts and clear pending bits */
  158. RCC->CIR = 0x009F0000;
  159. 80001e8: 4b05 ldr r3, [pc, #20] ; (8000200 <SystemInit+0x5c>)
  160. 80001ea: f44f 021f mov.w r2, #10420224 ; 0x9f0000
  161. 80001ee: 609a str r2, [r3, #8]
  162. #endif /* DATA_IN_ExtSRAM */
  163. #endif
  164. /* Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers */
  165. /* Configure the Flash Latency cycles and enable prefetch buffer */
  166. SetSysClock();
  167. 80001f0: f000 f878 bl 80002e4 <SetSysClock>
  168. #ifdef VECT_TAB_SRAM
  169. SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
  170. #else
  171. SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
  172. 80001f4: 4b04 ldr r3, [pc, #16] ; (8000208 <SystemInit+0x64>)
  173. 80001f6: f04f 6200 mov.w r2, #134217728 ; 0x8000000
  174. 80001fa: 609a str r2, [r3, #8]
  175. #endif
  176. }
  177. 80001fc: bf00 nop
  178. 80001fe: bd80 pop {r7, pc}
  179. 8000200: 40021000 .word 0x40021000
  180. 8000204: f8ff0000 .word 0xf8ff0000
  181. 8000208: e000ed00 .word 0xe000ed00
  182. 0800020c <SystemCoreClockUpdate>:
  183. * value for HSE crystal.
  184. * @param None
  185. * @retval None
  186. */
  187. void SystemCoreClockUpdate (void)
  188. {
  189. 800020c: b480 push {r7}
  190. 800020e: b085 sub sp, #20
  191. 8000210: af00 add r7, sp, #0
  192. uint32_t tmp = 0, pllmull = 0, pllsource = 0;
  193. 8000212: 2300 movs r3, #0
  194. 8000214: 60fb str r3, [r7, #12]
  195. 8000216: 2300 movs r3, #0
  196. 8000218: 60bb str r3, [r7, #8]
  197. 800021a: 2300 movs r3, #0
  198. 800021c: 607b str r3, [r7, #4]
  199. #if defined (STM32F10X_LD_VL) || defined (STM32F10X_MD_VL) || (defined STM32F10X_HD_VL)
  200. uint32_t prediv1factor = 0;
  201. #endif /* STM32F10X_LD_VL or STM32F10X_MD_VL or STM32F10X_HD_VL */
  202. /* Get SYSCLK source -------------------------------------------------------*/
  203. tmp = RCC->CFGR & RCC_CFGR_SWS;
  204. 800021e: 4b2c ldr r3, [pc, #176] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  205. 8000220: 685b ldr r3, [r3, #4]
  206. 8000222: f003 030c and.w r3, r3, #12
  207. 8000226: 60fb str r3, [r7, #12]
  208. switch (tmp)
  209. 8000228: 68fb ldr r3, [r7, #12]
  210. 800022a: 2b04 cmp r3, #4
  211. 800022c: d007 beq.n 800023e <SystemCoreClockUpdate+0x32>
  212. 800022e: 2b08 cmp r3, #8
  213. 8000230: d009 beq.n 8000246 <SystemCoreClockUpdate+0x3a>
  214. 8000232: 2b00 cmp r3, #0
  215. 8000234: d133 bne.n 800029e <SystemCoreClockUpdate+0x92>
  216. {
  217. case 0x00: /* HSI used as system clock */
  218. SystemCoreClock = HSI_VALUE;
  219. 8000236: 4b27 ldr r3, [pc, #156] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  220. 8000238: 4a27 ldr r2, [pc, #156] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  221. 800023a: 601a str r2, [r3, #0]
  222. break;
  223. 800023c: e033 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  224. case 0x04: /* HSE used as system clock */
  225. SystemCoreClock = HSE_VALUE;
  226. 800023e: 4b25 ldr r3, [pc, #148] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  227. 8000240: 4a25 ldr r2, [pc, #148] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  228. 8000242: 601a str r2, [r3, #0]
  229. break;
  230. 8000244: e02f b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  231. case 0x08: /* PLL used as system clock */
  232. /* Get PLL clock source and multiplication factor ----------------------*/
  233. pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
  234. 8000246: 4b22 ldr r3, [pc, #136] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  235. 8000248: 685b ldr r3, [r3, #4]
  236. 800024a: f403 1370 and.w r3, r3, #3932160 ; 0x3c0000
  237. 800024e: 60bb str r3, [r7, #8]
  238. pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  239. 8000250: 4b1f ldr r3, [pc, #124] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  240. 8000252: 685b ldr r3, [r3, #4]
  241. 8000254: f403 3380 and.w r3, r3, #65536 ; 0x10000
  242. 8000258: 607b str r3, [r7, #4]
  243. #ifndef STM32F10X_CL
  244. pllmull = ( pllmull >> 18) + 2;
  245. 800025a: 68bb ldr r3, [r7, #8]
  246. 800025c: 0c9b lsrs r3, r3, #18
  247. 800025e: 3302 adds r3, #2
  248. 8000260: 60bb str r3, [r7, #8]
  249. if (pllsource == 0x00)
  250. 8000262: 687b ldr r3, [r7, #4]
  251. 8000264: 2b00 cmp r3, #0
  252. 8000266: d106 bne.n 8000276 <SystemCoreClockUpdate+0x6a>
  253. {
  254. /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  255. SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
  256. 8000268: 68bb ldr r3, [r7, #8]
  257. 800026a: 4a1c ldr r2, [pc, #112] ; (80002dc <SystemCoreClockUpdate+0xd0>)
  258. 800026c: fb02 f303 mul.w r3, r2, r3
  259. 8000270: 4a18 ldr r2, [pc, #96] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  260. 8000272: 6013 str r3, [r2, #0]
  261. pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
  262. SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
  263. }
  264. }
  265. #endif /* STM32F10X_CL */
  266. break;
  267. 8000274: e017 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  268. prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
  269. /* HSE oscillator clock selected as PREDIV1 clock entry */
  270. SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  271. #else
  272. /* HSE selected as PLL clock entry */
  273. if ((RCC->CFGR & RCC_CFGR_PLLXTPRE) != (uint32_t)RESET)
  274. 8000276: 4b16 ldr r3, [pc, #88] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  275. 8000278: 685b ldr r3, [r3, #4]
  276. 800027a: f403 3300 and.w r3, r3, #131072 ; 0x20000
  277. 800027e: 2b00 cmp r3, #0
  278. 8000280: d006 beq.n 8000290 <SystemCoreClockUpdate+0x84>
  279. {/* HSE oscillator clock divided by 2 */
  280. SystemCoreClock = (HSE_VALUE >> 1) * pllmull;
  281. 8000282: 68bb ldr r3, [r7, #8]
  282. 8000284: 4a15 ldr r2, [pc, #84] ; (80002dc <SystemCoreClockUpdate+0xd0>)
  283. 8000286: fb02 f303 mul.w r3, r2, r3
  284. 800028a: 4a12 ldr r2, [pc, #72] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  285. 800028c: 6013 str r3, [r2, #0]
  286. pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
  287. SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
  288. }
  289. }
  290. #endif /* STM32F10X_CL */
  291. break;
  292. 800028e: e00a b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  293. {/* HSE oscillator clock divided by 2 */
  294. SystemCoreClock = (HSE_VALUE >> 1) * pllmull;
  295. }
  296. else
  297. {
  298. SystemCoreClock = HSE_VALUE * pllmull;
  299. 8000290: 68bb ldr r3, [r7, #8]
  300. 8000292: 4a11 ldr r2, [pc, #68] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  301. 8000294: fb02 f303 mul.w r3, r2, r3
  302. 8000298: 4a0e ldr r2, [pc, #56] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  303. 800029a: 6013 str r3, [r2, #0]
  304. pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8 ) + 2;
  305. SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
  306. }
  307. }
  308. #endif /* STM32F10X_CL */
  309. break;
  310. 800029c: e003 b.n 80002a6 <SystemCoreClockUpdate+0x9a>
  311. default:
  312. SystemCoreClock = HSI_VALUE;
  313. 800029e: 4b0d ldr r3, [pc, #52] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  314. 80002a0: 4a0d ldr r2, [pc, #52] ; (80002d8 <SystemCoreClockUpdate+0xcc>)
  315. 80002a2: 601a str r2, [r3, #0]
  316. break;
  317. 80002a4: bf00 nop
  318. }
  319. /* Compute HCLK clock frequency ----------------*/
  320. /* Get HCLK prescaler */
  321. tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
  322. 80002a6: 4b0a ldr r3, [pc, #40] ; (80002d0 <SystemCoreClockUpdate+0xc4>)
  323. 80002a8: 685b ldr r3, [r3, #4]
  324. 80002aa: f003 03f0 and.w r3, r3, #240 ; 0xf0
  325. 80002ae: 091b lsrs r3, r3, #4
  326. 80002b0: 4a0b ldr r2, [pc, #44] ; (80002e0 <SystemCoreClockUpdate+0xd4>)
  327. 80002b2: 5cd3 ldrb r3, [r2, r3]
  328. 80002b4: b2db uxtb r3, r3
  329. 80002b6: 60fb str r3, [r7, #12]
  330. /* HCLK clock frequency */
  331. SystemCoreClock >>= tmp;
  332. 80002b8: 4b06 ldr r3, [pc, #24] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  333. 80002ba: 681a ldr r2, [r3, #0]
  334. 80002bc: 68fb ldr r3, [r7, #12]
  335. 80002be: fa22 f303 lsr.w r3, r2, r3
  336. 80002c2: 4a04 ldr r2, [pc, #16] ; (80002d4 <SystemCoreClockUpdate+0xc8>)
  337. 80002c4: 6013 str r3, [r2, #0]
  338. }
  339. 80002c6: bf00 nop
  340. 80002c8: 3714 adds r7, #20
  341. 80002ca: 46bd mov sp, r7
  342. 80002cc: bc80 pop {r7}
  343. 80002ce: 4770 bx lr
  344. 80002d0: 40021000 .word 0x40021000
  345. 80002d4: 20000000 .word 0x20000000
  346. 80002d8: 007a1200 .word 0x007a1200
  347. 80002dc: 003d0900 .word 0x003d0900
  348. 80002e0: 20000004 .word 0x20000004
  349. 080002e4 <SetSysClock>:
  350. * @brief Configures the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers.
  351. * @param None
  352. * @retval None
  353. */
  354. static void SetSysClock(void)
  355. {
  356. 80002e4: b580 push {r7, lr}
  357. 80002e6: af00 add r7, sp, #0
  358. #elif defined SYSCLK_FREQ_48MHz
  359. SetSysClockTo48();
  360. #elif defined SYSCLK_FREQ_56MHz
  361. SetSysClockTo56();
  362. #elif defined SYSCLK_FREQ_72MHz
  363. SetSysClockTo72();
  364. 80002e8: f000 f802 bl 80002f0 <SetSysClockTo72>
  365. #endif
  366. /* If none of the define above is enabled, the HSI is used as System clock
  367. source (default after reset) */
  368. }
  369. 80002ec: bf00 nop
  370. 80002ee: bd80 pop {r7, pc}
  371. 080002f0 <SetSysClockTo72>:
  372. * @note This function should be used only after reset.
  373. * @param None
  374. * @retval None
  375. */
  376. static void SetSysClockTo72(void)
  377. {
  378. 80002f0: b480 push {r7}
  379. 80002f2: b083 sub sp, #12
  380. 80002f4: af00 add r7, sp, #0
  381. __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
  382. 80002f6: 2300 movs r3, #0
  383. 80002f8: 607b str r3, [r7, #4]
  384. 80002fa: 2300 movs r3, #0
  385. 80002fc: 603b str r3, [r7, #0]
  386. /* SYSCLK, HCLK, PCLK2 and PCLK1 configuration ---------------------------*/
  387. /* Enable HSE */
  388. RCC->CR |= ((uint32_t)RCC_CR_HSEON);
  389. 80002fe: 4a3a ldr r2, [pc, #232] ; (80003e8 <SetSysClockTo72+0xf8>)
  390. 8000300: 4b39 ldr r3, [pc, #228] ; (80003e8 <SetSysClockTo72+0xf8>)
  391. 8000302: 681b ldr r3, [r3, #0]
  392. 8000304: f443 3380 orr.w r3, r3, #65536 ; 0x10000
  393. 8000308: 6013 str r3, [r2, #0]
  394. /* Wait till HSE is ready and if Time out is reached exit */
  395. do
  396. {
  397. HSEStatus = RCC->CR & RCC_CR_HSERDY;
  398. 800030a: 4b37 ldr r3, [pc, #220] ; (80003e8 <SetSysClockTo72+0xf8>)
  399. 800030c: 681b ldr r3, [r3, #0]
  400. 800030e: f403 3300 and.w r3, r3, #131072 ; 0x20000
  401. 8000312: 603b str r3, [r7, #0]
  402. StartUpCounter++;
  403. 8000314: 687b ldr r3, [r7, #4]
  404. 8000316: 3301 adds r3, #1
  405. 8000318: 607b str r3, [r7, #4]
  406. } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
  407. 800031a: 683b ldr r3, [r7, #0]
  408. 800031c: 2b00 cmp r3, #0
  409. 800031e: d103 bne.n 8000328 <SetSysClockTo72+0x38>
  410. 8000320: 687b ldr r3, [r7, #4]
  411. 8000322: f5b3 6fa0 cmp.w r3, #1280 ; 0x500
  412. 8000326: d1f0 bne.n 800030a <SetSysClockTo72+0x1a>
  413. if ((RCC->CR & RCC_CR_HSERDY) != RESET)
  414. 8000328: 4b2f ldr r3, [pc, #188] ; (80003e8 <SetSysClockTo72+0xf8>)
  415. 800032a: 681b ldr r3, [r3, #0]
  416. 800032c: f403 3300 and.w r3, r3, #131072 ; 0x20000
  417. 8000330: 2b00 cmp r3, #0
  418. 8000332: d002 beq.n 800033a <SetSysClockTo72+0x4a>
  419. {
  420. HSEStatus = (uint32_t)0x01;
  421. 8000334: 2301 movs r3, #1
  422. 8000336: 603b str r3, [r7, #0]
  423. 8000338: e001 b.n 800033e <SetSysClockTo72+0x4e>
  424. }
  425. else
  426. {
  427. HSEStatus = (uint32_t)0x00;
  428. 800033a: 2300 movs r3, #0
  429. 800033c: 603b str r3, [r7, #0]
  430. }
  431. if (HSEStatus == (uint32_t)0x01)
  432. 800033e: 683b ldr r3, [r7, #0]
  433. 8000340: 2b01 cmp r3, #1
  434. 8000342: d14b bne.n 80003dc <SetSysClockTo72+0xec>
  435. {
  436. /* Enable Prefetch Buffer */
  437. FLASH->ACR |= FLASH_ACR_PRFTBE;
  438. 8000344: 4a29 ldr r2, [pc, #164] ; (80003ec <SetSysClockTo72+0xfc>)
  439. 8000346: 4b29 ldr r3, [pc, #164] ; (80003ec <SetSysClockTo72+0xfc>)
  440. 8000348: 681b ldr r3, [r3, #0]
  441. 800034a: f043 0310 orr.w r3, r3, #16
  442. 800034e: 6013 str r3, [r2, #0]
  443. /* Flash 2 wait state */
  444. FLASH->ACR &= (uint32_t)((uint32_t)~FLASH_ACR_LATENCY);
  445. 8000350: 4a26 ldr r2, [pc, #152] ; (80003ec <SetSysClockTo72+0xfc>)
  446. 8000352: 4b26 ldr r3, [pc, #152] ; (80003ec <SetSysClockTo72+0xfc>)
  447. 8000354: 681b ldr r3, [r3, #0]
  448. 8000356: f023 0303 bic.w r3, r3, #3
  449. 800035a: 6013 str r3, [r2, #0]
  450. FLASH->ACR |= (uint32_t)FLASH_ACR_LATENCY_2;
  451. 800035c: 4a23 ldr r2, [pc, #140] ; (80003ec <SetSysClockTo72+0xfc>)
  452. 800035e: 4b23 ldr r3, [pc, #140] ; (80003ec <SetSysClockTo72+0xfc>)
  453. 8000360: 681b ldr r3, [r3, #0]
  454. 8000362: f043 0302 orr.w r3, r3, #2
  455. 8000366: 6013 str r3, [r2, #0]
  456. /* HCLK = SYSCLK */
  457. RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
  458. 8000368: 4a1f ldr r2, [pc, #124] ; (80003e8 <SetSysClockTo72+0xf8>)
  459. 800036a: 4b1f ldr r3, [pc, #124] ; (80003e8 <SetSysClockTo72+0xf8>)
  460. 800036c: 685b ldr r3, [r3, #4]
  461. 800036e: 6053 str r3, [r2, #4]
  462. /* PCLK2 = HCLK */
  463. RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
  464. 8000370: 4a1d ldr r2, [pc, #116] ; (80003e8 <SetSysClockTo72+0xf8>)
  465. 8000372: 4b1d ldr r3, [pc, #116] ; (80003e8 <SetSysClockTo72+0xf8>)
  466. 8000374: 685b ldr r3, [r3, #4]
  467. 8000376: 6053 str r3, [r2, #4]
  468. /* PCLK1 = HCLK */
  469. RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV2;
  470. 8000378: 4a1b ldr r2, [pc, #108] ; (80003e8 <SetSysClockTo72+0xf8>)
  471. 800037a: 4b1b ldr r3, [pc, #108] ; (80003e8 <SetSysClockTo72+0xf8>)
  472. 800037c: 685b ldr r3, [r3, #4]
  473. 800037e: f443 6380 orr.w r3, r3, #1024 ; 0x400
  474. 8000382: 6053 str r3, [r2, #4]
  475. RCC->CFGR &= (uint32_t)~(RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLSRC | RCC_CFGR_PLLMULL);
  476. RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLSRC_PREDIV1 |
  477. RCC_CFGR_PLLMULL9);
  478. #else
  479. /* PLL configuration: PLLCLK = HSE * 9 = 72 MHz */
  480. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE |
  481. 8000384: 4a18 ldr r2, [pc, #96] ; (80003e8 <SetSysClockTo72+0xf8>)
  482. 8000386: 4b18 ldr r3, [pc, #96] ; (80003e8 <SetSysClockTo72+0xf8>)
  483. 8000388: 685b ldr r3, [r3, #4]
  484. 800038a: f423 137c bic.w r3, r3, #4128768 ; 0x3f0000
  485. 800038e: 6053 str r3, [r2, #4]
  486. RCC_CFGR_PLLMULL));
  487. RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE | RCC_CFGR_PLLMULL9);
  488. 8000390: 4a15 ldr r2, [pc, #84] ; (80003e8 <SetSysClockTo72+0xf8>)
  489. 8000392: 4b15 ldr r3, [pc, #84] ; (80003e8 <SetSysClockTo72+0xf8>)
  490. 8000394: 685b ldr r3, [r3, #4]
  491. 8000396: f443 13e8 orr.w r3, r3, #1900544 ; 0x1d0000
  492. 800039a: 6053 str r3, [r2, #4]
  493. #endif /* STM32F10X_CL */
  494. /* Enable PLL */
  495. RCC->CR |= RCC_CR_PLLON;
  496. 800039c: 4a12 ldr r2, [pc, #72] ; (80003e8 <SetSysClockTo72+0xf8>)
  497. 800039e: 4b12 ldr r3, [pc, #72] ; (80003e8 <SetSysClockTo72+0xf8>)
  498. 80003a0: 681b ldr r3, [r3, #0]
  499. 80003a2: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000
  500. 80003a6: 6013 str r3, [r2, #0]
  501. /* Wait till PLL is ready */
  502. while((RCC->CR & RCC_CR_PLLRDY) == 0)
  503. 80003a8: bf00 nop
  504. 80003aa: 4b0f ldr r3, [pc, #60] ; (80003e8 <SetSysClockTo72+0xf8>)
  505. 80003ac: 681b ldr r3, [r3, #0]
  506. 80003ae: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
  507. 80003b2: 2b00 cmp r3, #0
  508. 80003b4: d0f9 beq.n 80003aa <SetSysClockTo72+0xba>
  509. {
  510. }
  511. /* Select PLL as system clock source */
  512. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
  513. 80003b6: 4a0c ldr r2, [pc, #48] ; (80003e8 <SetSysClockTo72+0xf8>)
  514. 80003b8: 4b0b ldr r3, [pc, #44] ; (80003e8 <SetSysClockTo72+0xf8>)
  515. 80003ba: 685b ldr r3, [r3, #4]
  516. 80003bc: f023 0303 bic.w r3, r3, #3
  517. 80003c0: 6053 str r3, [r2, #4]
  518. RCC->CFGR |= (uint32_t)RCC_CFGR_SW_PLL;
  519. 80003c2: 4a09 ldr r2, [pc, #36] ; (80003e8 <SetSysClockTo72+0xf8>)
  520. 80003c4: 4b08 ldr r3, [pc, #32] ; (80003e8 <SetSysClockTo72+0xf8>)
  521. 80003c6: 685b ldr r3, [r3, #4]
  522. 80003c8: f043 0302 orr.w r3, r3, #2
  523. 80003cc: 6053 str r3, [r2, #4]
  524. /* Wait till PLL is used as system clock source */
  525. while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)0x08)
  526. 80003ce: bf00 nop
  527. 80003d0: 4b05 ldr r3, [pc, #20] ; (80003e8 <SetSysClockTo72+0xf8>)
  528. 80003d2: 685b ldr r3, [r3, #4]
  529. 80003d4: f003 030c and.w r3, r3, #12
  530. 80003d8: 2b08 cmp r3, #8
  531. 80003da: d1f9 bne.n 80003d0 <SetSysClockTo72+0xe0>
  532. }
  533. else
  534. { /* If HSE fails to start-up, the application will have wrong clock
  535. configuration. User can add here some code to deal with this error */
  536. }
  537. }
  538. 80003dc: bf00 nop
  539. 80003de: 370c adds r7, #12
  540. 80003e0: 46bd mov sp, r7
  541. 80003e2: bc80 pop {r7}
  542. 80003e4: 4770 bx lr
  543. 80003e6: bf00 nop
  544. 80003e8: 40021000 .word 0x40021000
  545. 80003ec: 40022000 .word 0x40022000
  546. 080003f0 <SysTick_Handler>:
  547. volatile long int aa=0,bb=0;
  548. void SysTick_Handler(void) {
  549. 80003f0: b480 push {r7}
  550. 80003f2: af00 add r7, sp, #0
  551. aa++;
  552. 80003f4: 4b04 ldr r3, [pc, #16] ; (8000408 <SysTick_Handler+0x18>)
  553. 80003f6: 681b ldr r3, [r3, #0]
  554. 80003f8: 3301 adds r3, #1
  555. 80003fa: 4a03 ldr r2, [pc, #12] ; (8000408 <SysTick_Handler+0x18>)
  556. 80003fc: 6013 str r3, [r2, #0]
  557. }
  558. 80003fe: bf00 nop
  559. 8000400: 46bd mov sp, r7
  560. 8000402: bc80 pop {r7}
  561. 8000404: 4770 bx lr
  562. 8000406: bf00 nop
  563. 8000408: 20000014 .word 0x20000014
  564. 0800040c <main>:
  565. int main(void) {
  566. 800040c: b580 push {r7, lr}
  567. 800040e: af00 add r7, sp, #0
  568. SystemCoreClockUpdate();
  569. 8000410: f7ff fefc bl 800020c <SystemCoreClockUpdate>
  570. SysTick_Config(SystemCoreClock/10000);
  571. 8000414: 4b07 ldr r3, [pc, #28] ; (8000434 <main+0x28>)
  572. 8000416: 681b ldr r3, [r3, #0]
  573. 8000418: 4a07 ldr r2, [pc, #28] ; (8000438 <main+0x2c>)
  574. 800041a: fba2 2303 umull r2, r3, r2, r3
  575. 800041e: 0b5b lsrs r3, r3, #13
  576. 8000420: 4618 mov r0, r3
  577. 8000422: f7ff fe9d bl 8000160 <SysTick_Config>
  578. while (1) {
  579. bb=SystemCoreClock;
  580. 8000426: 4b03 ldr r3, [pc, #12] ; (8000434 <main+0x28>)
  581. 8000428: 681b ldr r3, [r3, #0]
  582. 800042a: 461a mov r2, r3
  583. 800042c: 4b03 ldr r3, [pc, #12] ; (800043c <main+0x30>)
  584. 800042e: 601a str r2, [r3, #0]
  585. }
  586. 8000430: e7f9 b.n 8000426 <main+0x1a>
  587. 8000432: bf00 nop
  588. 8000434: 20000000 .word 0x20000000
  589. 8000438: d1b71759 .word 0xd1b71759
  590. 800043c: 20000018 .word 0x20000018
  591. 8000440: 0800049c .word 0x0800049c
  592. 8000444: 20000000 .word 0x20000000
  593. 8000448: 20000014 .word 0x20000014
  594. 800044c: 20000014 .word 0x20000014
  595. 8000450: 2000001c .word 0x2000001c
  596. 08000454 <Reset_Handler>:
  597. .weak Reset_Handler
  598. .type Reset_Handler, %function
  599. Reset_Handler:
  600. /* Copy the data segment initializers from flash to SRAM */
  601. movs r1, #0
  602. 8000454: 2100 movs r1, #0
  603. b LoopCopyDataInit
  604. 8000456: e003 b.n 8000460 <LoopCopyDataInit>
  605. 08000458 <CopyDataInit>:
  606. CopyDataInit:
  607. ldr r3, =_sidata
  608. 8000458: 4b0a ldr r3, [pc, #40] ; (8000484 <LoopFillZerobss+0x10>)
  609. ldr r3, [r3, r1]
  610. 800045a: 585b ldr r3, [r3, r1]
  611. str r3, [r0, r1]
  612. 800045c: 5043 str r3, [r0, r1]
  613. adds r1, r1, #4
  614. 800045e: 3104 adds r1, #4
  615. 08000460 <LoopCopyDataInit>:
  616. LoopCopyDataInit:
  617. ldr r0, =_sdata
  618. 8000460: 4809 ldr r0, [pc, #36] ; (8000488 <LoopFillZerobss+0x14>)
  619. ldr r3, =_edata
  620. 8000462: 4b0a ldr r3, [pc, #40] ; (800048c <LoopFillZerobss+0x18>)
  621. adds r2, r0, r1
  622. 8000464: 1842 adds r2, r0, r1
  623. cmp r2, r3
  624. 8000466: 429a cmp r2, r3
  625. bcc CopyDataInit
  626. 8000468: d3f6 bcc.n 8000458 <CopyDataInit>
  627. ldr r2, =_sbss
  628. 800046a: 4a09 ldr r2, [pc, #36] ; (8000490 <LoopFillZerobss+0x1c>)
  629. b LoopFillZerobss
  630. 800046c: e002 b.n 8000474 <LoopFillZerobss>
  631. 0800046e <FillZerobss>:
  632. /* Zero fill the bss segment. */
  633. FillZerobss:
  634. movs r3, #0
  635. 800046e: 2300 movs r3, #0
  636. str r3, [r2], #4
  637. 8000470: f842 3b04 str.w r3, [r2], #4
  638. 08000474 <LoopFillZerobss>:
  639. LoopFillZerobss:
  640. ldr r3, = _ebss
  641. 8000474: 4b07 ldr r3, [pc, #28] ; (8000494 <LoopFillZerobss+0x20>)
  642. cmp r2, r3
  643. 8000476: 429a cmp r2, r3
  644. bcc FillZerobss
  645. 8000478: d3f9 bcc.n 800046e <FillZerobss>
  646. /* Call the clock system intitialization function.*/
  647. bl SystemInit
  648. 800047a: f7ff fe93 bl 80001a4 <SystemInit>
  649. /* Call the application's entry point.*/
  650. bl main
  651. 800047e: f7ff ffc5 bl 800040c <main>
  652. bx lr
  653. 8000482: 4770 bx lr
  654. /* Copy the data segment initializers from flash to SRAM */
  655. movs r1, #0
  656. b LoopCopyDataInit
  657. CopyDataInit:
  658. ldr r3, =_sidata
  659. 8000484: 0800049c .word 0x0800049c
  660. ldr r3, [r3, r1]
  661. str r3, [r0, r1]
  662. adds r1, r1, #4
  663. LoopCopyDataInit:
  664. ldr r0, =_sdata
  665. 8000488: 20000000 .word 0x20000000
  666. ldr r3, =_edata
  667. 800048c: 20000014 .word 0x20000014
  668. adds r2, r0, r1
  669. cmp r2, r3
  670. bcc CopyDataInit
  671. ldr r2, =_sbss
  672. 8000490: 20000014 .word 0x20000014
  673. FillZerobss:
  674. movs r3, #0
  675. str r3, [r2], #4
  676. LoopFillZerobss:
  677. ldr r3, = _ebss
  678. 8000494: 2000001c .word 0x2000001c
  679. 08000498 <ADC1_2_IRQHandler>:
  680. * @retval None
  681. */
  682. .section .text.Default_Handler,"ax",%progbits
  683. Default_Handler:
  684. Infinite_Loop:
  685. b Infinite_Loop
  686. 8000498: e7fe b.n 8000498 <ADC1_2_IRQHandler>
  687. ...