main.lst 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. build/main.elf: file format elf32-littlearm
  2. Disassembly of section .text:
  3. 0800010c <SystemInit>:
  4. * SystemCoreClock variable.
  5. * @param None
  6. * @retval None
  7. */
  8. void SystemInit (void)
  9. {
  10. 800010c: b580 push {r7, lr}
  11. 800010e: af00 add r7, sp, #0
  12. /* Set HSION bit */
  13. RCC->CR |= (uint32_t)0x00000001;
  14. 8000110: 4b1b ldr r3, [pc, #108] ; (8000180 <SystemInit+0x74>)
  15. 8000112: 4a1b ldr r2, [pc, #108] ; (8000180 <SystemInit+0x74>)
  16. 8000114: 6812 ldr r2, [r2, #0]
  17. 8000116: 2101 movs r1, #1
  18. 8000118: 430a orrs r2, r1
  19. 800011a: 601a str r2, [r3, #0]
  20. #if defined(STM32F051)
  21. /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE and MCOSEL[2:0] bits */
  22. RCC->CFGR &= (uint32_t)0xF8FFB80C;
  23. #else
  24. /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE, MCOSEL[2:0], MCOPRE[2:0] and PLLNODIV bits */
  25. RCC->CFGR &= (uint32_t)0x08FFB80C;
  26. 800011c: 4b18 ldr r3, [pc, #96] ; (8000180 <SystemInit+0x74>)
  27. 800011e: 4a18 ldr r2, [pc, #96] ; (8000180 <SystemInit+0x74>)
  28. 8000120: 6852 ldr r2, [r2, #4]
  29. 8000122: 4918 ldr r1, [pc, #96] ; (8000184 <SystemInit+0x78>)
  30. 8000124: 400a ands r2, r1
  31. 8000126: 605a str r2, [r3, #4]
  32. #endif /* STM32F051 */
  33. /* Reset HSEON, CSSON and PLLON bits */
  34. RCC->CR &= (uint32_t)0xFEF6FFFF;
  35. 8000128: 4b15 ldr r3, [pc, #84] ; (8000180 <SystemInit+0x74>)
  36. 800012a: 4a15 ldr r2, [pc, #84] ; (8000180 <SystemInit+0x74>)
  37. 800012c: 6812 ldr r2, [r2, #0]
  38. 800012e: 4916 ldr r1, [pc, #88] ; (8000188 <SystemInit+0x7c>)
  39. 8000130: 400a ands r2, r1
  40. 8000132: 601a str r2, [r3, #0]
  41. /* Reset HSEBYP bit */
  42. RCC->CR &= (uint32_t)0xFFFBFFFF;
  43. 8000134: 4b12 ldr r3, [pc, #72] ; (8000180 <SystemInit+0x74>)
  44. 8000136: 4a12 ldr r2, [pc, #72] ; (8000180 <SystemInit+0x74>)
  45. 8000138: 6812 ldr r2, [r2, #0]
  46. 800013a: 4914 ldr r1, [pc, #80] ; (800018c <SystemInit+0x80>)
  47. 800013c: 400a ands r2, r1
  48. 800013e: 601a str r2, [r3, #0]
  49. /* Reset PLLSRC, PLLXTPRE and PLLMUL[3:0] bits */
  50. RCC->CFGR &= (uint32_t)0xFFC0FFFF;
  51. 8000140: 4b0f ldr r3, [pc, #60] ; (8000180 <SystemInit+0x74>)
  52. 8000142: 4a0f ldr r2, [pc, #60] ; (8000180 <SystemInit+0x74>)
  53. 8000144: 6852 ldr r2, [r2, #4]
  54. 8000146: 4912 ldr r1, [pc, #72] ; (8000190 <SystemInit+0x84>)
  55. 8000148: 400a ands r2, r1
  56. 800014a: 605a str r2, [r3, #4]
  57. /* Reset PREDIV1[3:0] bits */
  58. RCC->CFGR2 &= (uint32_t)0xFFFFFFF0;
  59. 800014c: 4b0c ldr r3, [pc, #48] ; (8000180 <SystemInit+0x74>)
  60. 800014e: 4a0c ldr r2, [pc, #48] ; (8000180 <SystemInit+0x74>)
  61. 8000150: 6ad2 ldr r2, [r2, #44] ; 0x2c
  62. 8000152: 210f movs r1, #15
  63. 8000154: 438a bics r2, r1
  64. 8000156: 62da str r2, [r3, #44] ; 0x2c
  65. /* Reset USARTSW[1:0], I2CSW, CECSW and ADCSW bits */
  66. RCC->CFGR3 &= (uint32_t)0xFFFFFEAC;
  67. 8000158: 4b09 ldr r3, [pc, #36] ; (8000180 <SystemInit+0x74>)
  68. 800015a: 4a09 ldr r2, [pc, #36] ; (8000180 <SystemInit+0x74>)
  69. 800015c: 6b12 ldr r2, [r2, #48] ; 0x30
  70. 800015e: 490d ldr r1, [pc, #52] ; (8000194 <SystemInit+0x88>)
  71. 8000160: 400a ands r2, r1
  72. 8000162: 631a str r2, [r3, #48] ; 0x30
  73. /* Reset HSI14 bit */
  74. RCC->CR2 &= (uint32_t)0xFFFFFFFE;
  75. 8000164: 4b06 ldr r3, [pc, #24] ; (8000180 <SystemInit+0x74>)
  76. 8000166: 4a06 ldr r2, [pc, #24] ; (8000180 <SystemInit+0x74>)
  77. 8000168: 6b52 ldr r2, [r2, #52] ; 0x34
  78. 800016a: 2101 movs r1, #1
  79. 800016c: 438a bics r2, r1
  80. 800016e: 635a str r2, [r3, #52] ; 0x34
  81. /* Disable all interrupts */
  82. RCC->CIR = 0x00000000;
  83. 8000170: 4b03 ldr r3, [pc, #12] ; (8000180 <SystemInit+0x74>)
  84. 8000172: 2200 movs r2, #0
  85. 8000174: 609a str r2, [r3, #8]
  86. /* Configure the System clock frequency, AHB/APBx prescalers and Flash settings */
  87. SetSysClock();
  88. 8000176: f000 f879 bl 800026c <SetSysClock>
  89. }
  90. 800017a: 46c0 nop ; (mov r8, r8)
  91. 800017c: 46bd mov sp, r7
  92. 800017e: bd80 pop {r7, pc}
  93. 8000180: 40021000 .word 0x40021000
  94. 8000184: 08ffb80c .word 0x08ffb80c
  95. 8000188: fef6ffff .word 0xfef6ffff
  96. 800018c: fffbffff .word 0xfffbffff
  97. 8000190: ffc0ffff .word 0xffc0ffff
  98. 8000194: fffffeac .word 0xfffffeac
  99. 08000198 <SystemCoreClockUpdate>:
  100. * value for HSE crystal.
  101. * @param None
  102. * @retval None
  103. */
  104. void SystemCoreClockUpdate (void)
  105. {
  106. 8000198: b580 push {r7, lr}
  107. 800019a: b084 sub sp, #16
  108. 800019c: af00 add r7, sp, #0
  109. uint32_t tmp = 0, pllmull = 0, pllsource = 0, prediv1factor = 0;
  110. 800019e: 2300 movs r3, #0
  111. 80001a0: 60fb str r3, [r7, #12]
  112. 80001a2: 2300 movs r3, #0
  113. 80001a4: 60bb str r3, [r7, #8]
  114. 80001a6: 2300 movs r3, #0
  115. 80001a8: 607b str r3, [r7, #4]
  116. 80001aa: 2300 movs r3, #0
  117. 80001ac: 603b str r3, [r7, #0]
  118. /* Get SYSCLK source -------------------------------------------------------*/
  119. tmp = RCC->CFGR & RCC_CFGR_SWS;
  120. 80001ae: 4b2a ldr r3, [pc, #168] ; (8000258 <SystemCoreClockUpdate+0xc0>)
  121. 80001b0: 685b ldr r3, [r3, #4]
  122. 80001b2: 220c movs r2, #12
  123. 80001b4: 4013 ands r3, r2
  124. 80001b6: 60fb str r3, [r7, #12]
  125. switch (tmp)
  126. 80001b8: 68fb ldr r3, [r7, #12]
  127. 80001ba: 2b04 cmp r3, #4
  128. 80001bc: d007 beq.n 80001ce <SystemCoreClockUpdate+0x36>
  129. 80001be: 2b08 cmp r3, #8
  130. 80001c0: d009 beq.n 80001d6 <SystemCoreClockUpdate+0x3e>
  131. 80001c2: 2b00 cmp r3, #0
  132. 80001c4: d131 bne.n 800022a <SystemCoreClockUpdate+0x92>
  133. {
  134. case 0x00: /* HSI used as system clock */
  135. SystemCoreClock = HSI_VALUE;
  136. 80001c6: 4b25 ldr r3, [pc, #148] ; (800025c <SystemCoreClockUpdate+0xc4>)
  137. 80001c8: 4a25 ldr r2, [pc, #148] ; (8000260 <SystemCoreClockUpdate+0xc8>)
  138. 80001ca: 601a str r2, [r3, #0]
  139. break;
  140. 80001cc: e031 b.n 8000232 <SystemCoreClockUpdate+0x9a>
  141. case 0x04: /* HSE used as system clock */
  142. SystemCoreClock = HSE_VALUE;
  143. 80001ce: 4b23 ldr r3, [pc, #140] ; (800025c <SystemCoreClockUpdate+0xc4>)
  144. 80001d0: 4a23 ldr r2, [pc, #140] ; (8000260 <SystemCoreClockUpdate+0xc8>)
  145. 80001d2: 601a str r2, [r3, #0]
  146. break;
  147. 80001d4: e02d b.n 8000232 <SystemCoreClockUpdate+0x9a>
  148. case 0x08: /* PLL used as system clock */
  149. /* Get PLL clock source and multiplication factor ----------------------*/
  150. pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
  151. 80001d6: 4b20 ldr r3, [pc, #128] ; (8000258 <SystemCoreClockUpdate+0xc0>)
  152. 80001d8: 685a ldr r2, [r3, #4]
  153. 80001da: 23f0 movs r3, #240 ; 0xf0
  154. 80001dc: 039b lsls r3, r3, #14
  155. 80001de: 4013 ands r3, r2
  156. 80001e0: 60bb str r3, [r7, #8]
  157. pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  158. 80001e2: 4b1d ldr r3, [pc, #116] ; (8000258 <SystemCoreClockUpdate+0xc0>)
  159. 80001e4: 685a ldr r2, [r3, #4]
  160. 80001e6: 23c0 movs r3, #192 ; 0xc0
  161. 80001e8: 025b lsls r3, r3, #9
  162. 80001ea: 4013 ands r3, r2
  163. 80001ec: 607b str r3, [r7, #4]
  164. pllmull = ( pllmull >> 18) + 2;
  165. 80001ee: 68bb ldr r3, [r7, #8]
  166. 80001f0: 0c9b lsrs r3, r3, #18
  167. 80001f2: 3302 adds r3, #2
  168. 80001f4: 60bb str r3, [r7, #8]
  169. if (pllsource == 0x00)
  170. 80001f6: 687b ldr r3, [r7, #4]
  171. 80001f8: 2b00 cmp r3, #0
  172. 80001fa: d105 bne.n 8000208 <SystemCoreClockUpdate+0x70>
  173. {
  174. /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  175. SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
  176. 80001fc: 68bb ldr r3, [r7, #8]
  177. 80001fe: 4a19 ldr r2, [pc, #100] ; (8000264 <SystemCoreClockUpdate+0xcc>)
  178. 8000200: 435a muls r2, r3
  179. 8000202: 4b16 ldr r3, [pc, #88] ; (800025c <SystemCoreClockUpdate+0xc4>)
  180. 8000204: 601a str r2, [r3, #0]
  181. {
  182. prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
  183. /* HSE oscillator clock selected as PREDIV1 clock entry */
  184. SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  185. }
  186. break;
  187. 8000206: e014 b.n 8000232 <SystemCoreClockUpdate+0x9a>
  188. /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  189. SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
  190. }
  191. else
  192. {
  193. prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
  194. 8000208: 4b13 ldr r3, [pc, #76] ; (8000258 <SystemCoreClockUpdate+0xc0>)
  195. 800020a: 6adb ldr r3, [r3, #44] ; 0x2c
  196. 800020c: 220f movs r2, #15
  197. 800020e: 4013 ands r3, r2
  198. 8000210: 3301 adds r3, #1
  199. 8000212: 603b str r3, [r7, #0]
  200. /* HSE oscillator clock selected as PREDIV1 clock entry */
  201. SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  202. 8000214: 6839 ldr r1, [r7, #0]
  203. 8000216: 4812 ldr r0, [pc, #72] ; (8000260 <SystemCoreClockUpdate+0xc8>)
  204. 8000218: f000 f8ba bl 8000390 <__aeabi_uidiv>
  205. 800021c: 0003 movs r3, r0
  206. 800021e: 001a movs r2, r3
  207. 8000220: 68bb ldr r3, [r7, #8]
  208. 8000222: 435a muls r2, r3
  209. 8000224: 4b0d ldr r3, [pc, #52] ; (800025c <SystemCoreClockUpdate+0xc4>)
  210. 8000226: 601a str r2, [r3, #0]
  211. }
  212. break;
  213. 8000228: e003 b.n 8000232 <SystemCoreClockUpdate+0x9a>
  214. default: /* HSI used as system clock */
  215. SystemCoreClock = HSI_VALUE;
  216. 800022a: 4b0c ldr r3, [pc, #48] ; (800025c <SystemCoreClockUpdate+0xc4>)
  217. 800022c: 4a0c ldr r2, [pc, #48] ; (8000260 <SystemCoreClockUpdate+0xc8>)
  218. 800022e: 601a str r2, [r3, #0]
  219. break;
  220. 8000230: 46c0 nop ; (mov r8, r8)
  221. }
  222. /* Compute HCLK clock frequency ----------------*/
  223. /* Get HCLK prescaler */
  224. tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
  225. 8000232: 4b09 ldr r3, [pc, #36] ; (8000258 <SystemCoreClockUpdate+0xc0>)
  226. 8000234: 685b ldr r3, [r3, #4]
  227. 8000236: 22f0 movs r2, #240 ; 0xf0
  228. 8000238: 4013 ands r3, r2
  229. 800023a: 091b lsrs r3, r3, #4
  230. 800023c: 4a0a ldr r2, [pc, #40] ; (8000268 <SystemCoreClockUpdate+0xd0>)
  231. 800023e: 5cd3 ldrb r3, [r2, r3]
  232. 8000240: b2db uxtb r3, r3
  233. 8000242: 60fb str r3, [r7, #12]
  234. /* HCLK clock frequency */
  235. SystemCoreClock >>= tmp;
  236. 8000244: 4b05 ldr r3, [pc, #20] ; (800025c <SystemCoreClockUpdate+0xc4>)
  237. 8000246: 681a ldr r2, [r3, #0]
  238. 8000248: 68fb ldr r3, [r7, #12]
  239. 800024a: 40da lsrs r2, r3
  240. 800024c: 4b03 ldr r3, [pc, #12] ; (800025c <SystemCoreClockUpdate+0xc4>)
  241. 800024e: 601a str r2, [r3, #0]
  242. }
  243. 8000250: 46c0 nop ; (mov r8, r8)
  244. 8000252: 46bd mov sp, r7
  245. 8000254: b004 add sp, #16
  246. 8000256: bd80 pop {r7, pc}
  247. 8000258: 40021000 .word 0x40021000
  248. 800025c: 20000000 .word 0x20000000
  249. 8000260: 007a1200 .word 0x007a1200
  250. 8000264: 003d0900 .word 0x003d0900
  251. 8000268: 20000004 .word 0x20000004
  252. 0800026c <SetSysClock>:
  253. * is reset to the default reset state (done in SystemInit() function).
  254. * @param None
  255. * @retval None
  256. */
  257. static void SetSysClock(void)
  258. {
  259. 800026c: b580 push {r7, lr}
  260. 800026e: b082 sub sp, #8
  261. 8000270: af00 add r7, sp, #0
  262. __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
  263. 8000272: 2300 movs r3, #0
  264. 8000274: 607b str r3, [r7, #4]
  265. 8000276: 2300 movs r3, #0
  266. 8000278: 603b str r3, [r7, #0]
  267. /* PLL (clocked by HSE) used as System clock source */
  268. /******************************************************************************/
  269. /* SYSCLK, HCLK, PCLK configuration ----------------------------------------*/
  270. /* Enable HSE */
  271. RCC->CR |= ((uint32_t)RCC_CR_HSEON);
  272. 800027a: 4b31 ldr r3, [pc, #196] ; (8000340 <SetSysClock+0xd4>)
  273. 800027c: 4a30 ldr r2, [pc, #192] ; (8000340 <SetSysClock+0xd4>)
  274. 800027e: 6812 ldr r2, [r2, #0]
  275. 8000280: 2180 movs r1, #128 ; 0x80
  276. 8000282: 0249 lsls r1, r1, #9
  277. 8000284: 430a orrs r2, r1
  278. 8000286: 601a str r2, [r3, #0]
  279. /* Wait till HSE is ready and if Time out is reached exit */
  280. do
  281. {
  282. HSEStatus = RCC->CR & RCC_CR_HSERDY;
  283. 8000288: 4b2d ldr r3, [pc, #180] ; (8000340 <SetSysClock+0xd4>)
  284. 800028a: 681a ldr r2, [r3, #0]
  285. 800028c: 2380 movs r3, #128 ; 0x80
  286. 800028e: 029b lsls r3, r3, #10
  287. 8000290: 4013 ands r3, r2
  288. 8000292: 603b str r3, [r7, #0]
  289. StartUpCounter++;
  290. 8000294: 687b ldr r3, [r7, #4]
  291. 8000296: 3301 adds r3, #1
  292. 8000298: 607b str r3, [r7, #4]
  293. } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
  294. 800029a: 683b ldr r3, [r7, #0]
  295. 800029c: 2b00 cmp r3, #0
  296. 800029e: d104 bne.n 80002aa <SetSysClock+0x3e>
  297. 80002a0: 687a ldr r2, [r7, #4]
  298. 80002a2: 23a0 movs r3, #160 ; 0xa0
  299. 80002a4: 01db lsls r3, r3, #7
  300. 80002a6: 429a cmp r2, r3
  301. 80002a8: d1ee bne.n 8000288 <SetSysClock+0x1c>
  302. if ((RCC->CR & RCC_CR_HSERDY) != RESET)
  303. 80002aa: 4b25 ldr r3, [pc, #148] ; (8000340 <SetSysClock+0xd4>)
  304. 80002ac: 681a ldr r2, [r3, #0]
  305. 80002ae: 2380 movs r3, #128 ; 0x80
  306. 80002b0: 029b lsls r3, r3, #10
  307. 80002b2: 4013 ands r3, r2
  308. 80002b4: d002 beq.n 80002bc <SetSysClock+0x50>
  309. {
  310. HSEStatus = (uint32_t)0x01;
  311. 80002b6: 2301 movs r3, #1
  312. 80002b8: 603b str r3, [r7, #0]
  313. 80002ba: e001 b.n 80002c0 <SetSysClock+0x54>
  314. }
  315. else
  316. {
  317. HSEStatus = (uint32_t)0x00;
  318. 80002bc: 2300 movs r3, #0
  319. 80002be: 603b str r3, [r7, #0]
  320. }
  321. if (HSEStatus == (uint32_t)0x01)
  322. 80002c0: 683b ldr r3, [r7, #0]
  323. 80002c2: 2b01 cmp r3, #1
  324. 80002c4: d138 bne.n 8000338 <SetSysClock+0xcc>
  325. {
  326. /* Enable Prefetch Buffer and set Flash Latency */
  327. FLASH->ACR = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY;
  328. 80002c6: 4b1f ldr r3, [pc, #124] ; (8000344 <SetSysClock+0xd8>)
  329. 80002c8: 2211 movs r2, #17
  330. 80002ca: 601a str r2, [r3, #0]
  331. /* HCLK = SYSCLK */
  332. RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
  333. 80002cc: 4b1c ldr r3, [pc, #112] ; (8000340 <SetSysClock+0xd4>)
  334. 80002ce: 4a1c ldr r2, [pc, #112] ; (8000340 <SetSysClock+0xd4>)
  335. 80002d0: 6852 ldr r2, [r2, #4]
  336. 80002d2: 605a str r2, [r3, #4]
  337. /* PCLK = HCLK */
  338. RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE_DIV1;
  339. 80002d4: 4b1a ldr r3, [pc, #104] ; (8000340 <SetSysClock+0xd4>)
  340. 80002d6: 4a1a ldr r2, [pc, #104] ; (8000340 <SetSysClock+0xd4>)
  341. 80002d8: 6852 ldr r2, [r2, #4]
  342. 80002da: 605a str r2, [r3, #4]
  343. /* PLL configuration */
  344. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL));
  345. 80002dc: 4b18 ldr r3, [pc, #96] ; (8000340 <SetSysClock+0xd4>)
  346. 80002de: 4a18 ldr r2, [pc, #96] ; (8000340 <SetSysClock+0xd4>)
  347. 80002e0: 6852 ldr r2, [r2, #4]
  348. 80002e2: 4919 ldr r1, [pc, #100] ; (8000348 <SetSysClock+0xdc>)
  349. 80002e4: 400a ands r2, r1
  350. 80002e6: 605a str r2, [r3, #4]
  351. RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_PREDIV1 | RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLMULL6);
  352. 80002e8: 4b15 ldr r3, [pc, #84] ; (8000340 <SetSysClock+0xd4>)
  353. 80002ea: 4a15 ldr r2, [pc, #84] ; (8000340 <SetSysClock+0xd4>)
  354. 80002ec: 6852 ldr r2, [r2, #4]
  355. 80002ee: 2188 movs r1, #136 ; 0x88
  356. 80002f0: 0349 lsls r1, r1, #13
  357. 80002f2: 430a orrs r2, r1
  358. 80002f4: 605a str r2, [r3, #4]
  359. /* Enable PLL */
  360. RCC->CR |= RCC_CR_PLLON;
  361. 80002f6: 4b12 ldr r3, [pc, #72] ; (8000340 <SetSysClock+0xd4>)
  362. 80002f8: 4a11 ldr r2, [pc, #68] ; (8000340 <SetSysClock+0xd4>)
  363. 80002fa: 6812 ldr r2, [r2, #0]
  364. 80002fc: 2180 movs r1, #128 ; 0x80
  365. 80002fe: 0449 lsls r1, r1, #17
  366. 8000300: 430a orrs r2, r1
  367. 8000302: 601a str r2, [r3, #0]
  368. /* Wait till PLL is ready */
  369. while((RCC->CR & RCC_CR_PLLRDY) == 0)
  370. 8000304: 46c0 nop ; (mov r8, r8)
  371. 8000306: 4b0e ldr r3, [pc, #56] ; (8000340 <SetSysClock+0xd4>)
  372. 8000308: 681a ldr r2, [r3, #0]
  373. 800030a: 2380 movs r3, #128 ; 0x80
  374. 800030c: 049b lsls r3, r3, #18
  375. 800030e: 4013 ands r3, r2
  376. 8000310: d0f9 beq.n 8000306 <SetSysClock+0x9a>
  377. {
  378. }
  379. /* Select PLL as system clock source */
  380. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
  381. 8000312: 4b0b ldr r3, [pc, #44] ; (8000340 <SetSysClock+0xd4>)
  382. 8000314: 4a0a ldr r2, [pc, #40] ; (8000340 <SetSysClock+0xd4>)
  383. 8000316: 6852 ldr r2, [r2, #4]
  384. 8000318: 2103 movs r1, #3
  385. 800031a: 438a bics r2, r1
  386. 800031c: 605a str r2, [r3, #4]
  387. RCC->CFGR |= (uint32_t)RCC_CFGR_SW_PLL;
  388. 800031e: 4b08 ldr r3, [pc, #32] ; (8000340 <SetSysClock+0xd4>)
  389. 8000320: 4a07 ldr r2, [pc, #28] ; (8000340 <SetSysClock+0xd4>)
  390. 8000322: 6852 ldr r2, [r2, #4]
  391. 8000324: 2102 movs r1, #2
  392. 8000326: 430a orrs r2, r1
  393. 8000328: 605a str r2, [r3, #4]
  394. /* Wait till PLL is used as system clock source */
  395. while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)RCC_CFGR_SWS_PLL)
  396. 800032a: 46c0 nop ; (mov r8, r8)
  397. 800032c: 4b04 ldr r3, [pc, #16] ; (8000340 <SetSysClock+0xd4>)
  398. 800032e: 685b ldr r3, [r3, #4]
  399. 8000330: 220c movs r2, #12
  400. 8000332: 4013 ands r3, r2
  401. 8000334: 2b08 cmp r3, #8
  402. 8000336: d1f9 bne.n 800032c <SetSysClock+0xc0>
  403. }
  404. else
  405. { /* If HSE fails to start-up, the application will have wrong clock
  406. configuration. User can add here some code to deal with this error */
  407. }
  408. }
  409. 8000338: 46c0 nop ; (mov r8, r8)
  410. 800033a: 46bd mov sp, r7
  411. 800033c: b002 add sp, #8
  412. 800033e: bd80 pop {r7, pc}
  413. 8000340: 40021000 .word 0x40021000
  414. 8000344: 40022000 .word 0x40022000
  415. 8000348: ffc07fff .word 0xffc07fff
  416. 0800034c <main>:
  417. */
  418. volatile int iee=0;
  419. int main()
  420. {
  421. 800034c: b580 push {r7, lr}
  422. 800034e: b082 sub sp, #8
  423. 8000350: af00 add r7, sp, #0
  424. while(1)
  425. {
  426. // GPIOA -> BSRR = GPIO_Pin_1;
  427. // for (int i=0; i<100000 ; i++);
  428. // GPIOA -> BSRR = GPIO_Pin_1;
  429. for (int i=0; i<10000000 ; i++);
  430. 8000352: 2300 movs r3, #0
  431. 8000354: 607b str r3, [r7, #4]
  432. 8000356: e002 b.n 800035e <main+0x12>
  433. 8000358: 687b ldr r3, [r7, #4]
  434. 800035a: 3301 adds r3, #1
  435. 800035c: 607b str r3, [r7, #4]
  436. 800035e: 687b ldr r3, [r7, #4]
  437. 8000360: 4a04 ldr r2, [pc, #16] ; (8000374 <main+0x28>)
  438. 8000362: 4293 cmp r3, r2
  439. 8000364: ddf8 ble.n 8000358 <main+0xc>
  440. iee++;
  441. 8000366: 4b04 ldr r3, [pc, #16] ; (8000378 <main+0x2c>)
  442. 8000368: 681b ldr r3, [r3, #0]
  443. 800036a: 1c5a adds r2, r3, #1
  444. 800036c: 4b02 ldr r3, [pc, #8] ; (8000378 <main+0x2c>)
  445. 800036e: 601a str r2, [r3, #0]
  446. }
  447. 8000370: e7ef b.n 8000352 <main+0x6>
  448. 8000372: 46c0 nop ; (mov r8, r8)
  449. 8000374: 0098967f .word 0x0098967f
  450. 8000378: 20000014 .word 0x20000014
  451. 800037c: 080004f0 .word 0x080004f0
  452. 8000380: 20000000 .word 0x20000000
  453. 8000384: 20000014 .word 0x20000014
  454. 8000388: 20000014 .word 0x20000014
  455. 800038c: 20000018 .word 0x20000018
  456. 08000390 <__aeabi_uidiv>:
  457. 8000390: e2512001 subs r2, r1, #1
  458. 8000394: 012fff1e bxeq lr
  459. 8000398: 3a000036 bcc 8000478 <__aeabi_uidiv+0xe8>
  460. 800039c: e1500001 cmp r0, r1
  461. 80003a0: 9a000022 bls 8000430 <__aeabi_uidiv+0xa0>
  462. 80003a4: e1110002 tst r1, r2
  463. 80003a8: 0a000023 beq 800043c <__aeabi_uidiv+0xac>
  464. 80003ac: e311020e tst r1, #-536870912 ; 0xe0000000
  465. 80003b0: 01a01181 lsleq r1, r1, #3
  466. 80003b4: 03a03008 moveq r3, #8
  467. 80003b8: 13a03001 movne r3, #1
  468. 80003bc: e3510201 cmp r1, #268435456 ; 0x10000000
  469. 80003c0: 31510000 cmpcc r1, r0
  470. 80003c4: 31a01201 lslcc r1, r1, #4
  471. 80003c8: 31a03203 lslcc r3, r3, #4
  472. 80003cc: 3afffffa bcc 80003bc <__aeabi_uidiv+0x2c>
  473. 80003d0: e3510102 cmp r1, #-2147483648 ; 0x80000000
  474. 80003d4: 31510000 cmpcc r1, r0
  475. 80003d8: 31a01081 lslcc r1, r1, #1
  476. 80003dc: 31a03083 lslcc r3, r3, #1
  477. 80003e0: 3afffffa bcc 80003d0 <__aeabi_uidiv+0x40>
  478. 80003e4: e3a02000 mov r2, #0
  479. 80003e8: e1500001 cmp r0, r1
  480. 80003ec: 20400001 subcs r0, r0, r1
  481. 80003f0: 21822003 orrcs r2, r2, r3
  482. 80003f4: e15000a1 cmp r0, r1, lsr #1
  483. 80003f8: 204000a1 subcs r0, r0, r1, lsr #1
  484. 80003fc: 218220a3 orrcs r2, r2, r3, lsr #1
  485. 8000400: e1500121 cmp r0, r1, lsr #2
  486. 8000404: 20400121 subcs r0, r0, r1, lsr #2
  487. 8000408: 21822123 orrcs r2, r2, r3, lsr #2
  488. 800040c: e15001a1 cmp r0, r1, lsr #3
  489. 8000410: 204001a1 subcs r0, r0, r1, lsr #3
  490. 8000414: 218221a3 orrcs r2, r2, r3, lsr #3
  491. 8000418: e3500000 cmp r0, #0
  492. 800041c: 11b03223 lsrsne r3, r3, #4
  493. 8000420: 11a01221 lsrne r1, r1, #4
  494. 8000424: 1affffef bne 80003e8 <__aeabi_uidiv+0x58>
  495. 8000428: e1a00002 mov r0, r2
  496. 800042c: e12fff1e bx lr
  497. 8000430: 03a00001 moveq r0, #1
  498. 8000434: 13a00000 movne r0, #0
  499. 8000438: e12fff1e bx lr
  500. 800043c: e3510801 cmp r1, #65536 ; 0x10000
  501. 8000440: 21a01821 lsrcs r1, r1, #16
  502. 8000444: 23a02010 movcs r2, #16
  503. 8000448: 33a02000 movcc r2, #0
  504. 800044c: e3510c01 cmp r1, #256 ; 0x100
  505. 8000450: 21a01421 lsrcs r1, r1, #8
  506. 8000454: 22822008 addcs r2, r2, #8
  507. 8000458: e3510010 cmp r1, #16
  508. 800045c: 21a01221 lsrcs r1, r1, #4
  509. 8000460: 22822004 addcs r2, r2, #4
  510. 8000464: e3510004 cmp r1, #4
  511. 8000468: 82822003 addhi r2, r2, #3
  512. 800046c: 908220a1 addls r2, r2, r1, lsr #1
  513. 8000470: e1a00230 lsr r0, r0, r2
  514. 8000474: e12fff1e bx lr
  515. 8000478: e3500000 cmp r0, #0
  516. 800047c: 13e00000 mvnne r0, #0
  517. 8000480: ea000007 b 80004a4 <__aeabi_idiv0>
  518. 08000484 <__aeabi_uidivmod>:
  519. 8000484: e3510000 cmp r1, #0
  520. 8000488: 0afffffa beq 8000478 <__aeabi_uidiv+0xe8>
  521. 800048c: e92d4003 push {r0, r1, lr}
  522. 8000490: ebffffbe bl 8000390 <__aeabi_uidiv>
  523. 8000494: e8bd4006 pop {r1, r2, lr}
  524. 8000498: e0030092 mul r3, r2, r0
  525. 800049c: e0411003 sub r1, r1, r3
  526. 80004a0: e12fff1e bx lr
  527. 080004a4 <__aeabi_idiv0>:
  528. 80004a4: e12fff1e bx lr
  529. 080004a8 <Reset_Handler>:
  530. .weak Reset_Handler
  531. .type Reset_Handler, %function
  532. Reset_Handler:
  533. /* Copy the data segment initializers from flash to SRAM */
  534. movs r1, #0
  535. 80004a8: 2100 movs r1, #0
  536. b LoopCopyDataInit
  537. 80004aa: e003 b.n 80004b4 <LoopCopyDataInit>
  538. 080004ac <CopyDataInit>:
  539. CopyDataInit:
  540. ldr r3, =_sidata
  541. 80004ac: 4b0a ldr r3, [pc, #40] ; (80004d8 <LoopFillZerobss+0x10>)
  542. ldr r3, [r3, r1]
  543. 80004ae: 585b ldr r3, [r3, r1]
  544. str r3, [r0, r1]
  545. 80004b0: 5043 str r3, [r0, r1]
  546. adds r1, r1, #4
  547. 80004b2: 3104 adds r1, #4
  548. 080004b4 <LoopCopyDataInit>:
  549. LoopCopyDataInit:
  550. ldr r0, =_sdata
  551. 80004b4: 4809 ldr r0, [pc, #36] ; (80004dc <LoopFillZerobss+0x14>)
  552. ldr r3, =_edata
  553. 80004b6: 4b0a ldr r3, [pc, #40] ; (80004e0 <LoopFillZerobss+0x18>)
  554. adds r2, r0, r1
  555. 80004b8: 1842 adds r2, r0, r1
  556. cmp r2, r3
  557. 80004ba: 429a cmp r2, r3
  558. bcc CopyDataInit
  559. 80004bc: d3f6 bcc.n 80004ac <CopyDataInit>
  560. ldr r2, =_sbss
  561. 80004be: 4a09 ldr r2, [pc, #36] ; (80004e4 <LoopFillZerobss+0x1c>)
  562. b LoopFillZerobss
  563. 80004c0: e002 b.n 80004c8 <LoopFillZerobss>
  564. 080004c2 <FillZerobss>:
  565. /* Zero fill the bss segment. */
  566. FillZerobss:
  567. movs r3, #0
  568. 80004c2: 2300 movs r3, #0
  569. str r3, [r2], #4
  570. 80004c4: f842 3b04 str.w r3, [r2], #4
  571. 080004c8 <LoopFillZerobss>:
  572. LoopFillZerobss:
  573. ldr r3, = _ebss
  574. 80004c8: 4b07 ldr r3, [pc, #28] ; (80004e8 <LoopFillZerobss+0x20>)
  575. cmp r2, r3
  576. 80004ca: 429a cmp r2, r3
  577. bcc FillZerobss
  578. 80004cc: d3f9 bcc.n 80004c2 <FillZerobss>
  579. /* Call the clock system intitialization function.*/
  580. bl SystemInit
  581. 80004ce: f7ff fe1d bl 800010c <SystemInit>
  582. /* Call the application's entry point.*/
  583. bl main
  584. 80004d2: f7ff ff3b bl 800034c <main>
  585. bx lr
  586. 80004d6: 4770 bx lr
  587. /* Copy the data segment initializers from flash to SRAM */
  588. movs r1, #0
  589. b LoopCopyDataInit
  590. CopyDataInit:
  591. ldr r3, =_sidata
  592. 80004d8: 080004f0 .word 0x080004f0
  593. ldr r3, [r3, r1]
  594. str r3, [r0, r1]
  595. adds r1, r1, #4
  596. LoopCopyDataInit:
  597. ldr r0, =_sdata
  598. 80004dc: 20000000 .word 0x20000000
  599. ldr r3, =_edata
  600. 80004e0: 20000014 .word 0x20000014
  601. adds r2, r0, r1
  602. cmp r2, r3
  603. bcc CopyDataInit
  604. ldr r2, =_sbss
  605. 80004e4: 20000014 .word 0x20000014
  606. FillZerobss:
  607. movs r3, #0
  608. str r3, [r2], #4
  609. LoopFillZerobss:
  610. ldr r3, = _ebss
  611. 80004e8: 20000018 .word 0x20000018
  612. 080004ec <ADC1_2_IRQHandler>:
  613. * @retval None
  614. */
  615. .section .text.Default_Handler,"ax",%progbits
  616. Default_Handler:
  617. Infinite_Loop:
  618. b Infinite_Loop
  619. 80004ec: e7fe b.n 80004ec <ADC1_2_IRQHandler>
  620. ...