system_stm32f1xx.lst 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. ARM GAS /tmp/ccji4ked.s page 1
  2. 1 .cpu cortex-m3
  3. 2 .arch armv7-m
  4. 3 .fpu softvfp
  5. 4 .eabi_attribute 20, 1
  6. 5 .eabi_attribute 21, 1
  7. 6 .eabi_attribute 23, 3
  8. 7 .eabi_attribute 24, 1
  9. 8 .eabi_attribute 25, 1
  10. 9 .eabi_attribute 26, 1
  11. 10 .eabi_attribute 30, 1
  12. 11 .eabi_attribute 34, 1
  13. 12 .eabi_attribute 18, 4
  14. 13 .file "system_stm32f1xx.c"
  15. 14 .text
  16. 15 .Ltext0:
  17. 16 .cfi_sections .debug_frame
  18. 17 .section .text.SystemInit,"ax",%progbits
  19. 18 .align 1
  20. 19 .global SystemInit
  21. 20 .syntax unified
  22. 21 .thumb
  23. 22 .thumb_func
  24. 24 SystemInit:
  25. 25 .LFB65:
  26. 26 .file 1 "Core/Src/system_stm32f1xx.c"
  27. 1:Core/Src/system_stm32f1xx.c **** /**
  28. 2:Core/Src/system_stm32f1xx.c **** ******************************************************************************
  29. 3:Core/Src/system_stm32f1xx.c **** * @file system_stm32f1xx.c
  30. 4:Core/Src/system_stm32f1xx.c **** * @author MCD Application Team
  31. 5:Core/Src/system_stm32f1xx.c **** * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File.
  32. 6:Core/Src/system_stm32f1xx.c **** *
  33. 7:Core/Src/system_stm32f1xx.c **** * 1. This file provides two functions and one global variable to be called from
  34. 8:Core/Src/system_stm32f1xx.c **** * user application:
  35. 9:Core/Src/system_stm32f1xx.c **** * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier
  36. 10:Core/Src/system_stm32f1xx.c **** * factors, AHB/APBx prescalers and Flash settings).
  37. 11:Core/Src/system_stm32f1xx.c **** * This function is called at startup just after reset and
  38. 12:Core/Src/system_stm32f1xx.c **** * before branch to main program. This call is made inside
  39. 13:Core/Src/system_stm32f1xx.c **** * the "startup_stm32f1xx_xx.s" file.
  40. 14:Core/Src/system_stm32f1xx.c **** *
  41. 15:Core/Src/system_stm32f1xx.c **** * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
  42. 16:Core/Src/system_stm32f1xx.c **** * by the user application to setup the SysTick
  43. 17:Core/Src/system_stm32f1xx.c **** * timer or configure other parameters.
  44. 18:Core/Src/system_stm32f1xx.c **** *
  45. 19:Core/Src/system_stm32f1xx.c **** * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
  46. 20:Core/Src/system_stm32f1xx.c **** * be called whenever the core clock is changed
  47. 21:Core/Src/system_stm32f1xx.c **** * during program execution.
  48. 22:Core/Src/system_stm32f1xx.c **** *
  49. 23:Core/Src/system_stm32f1xx.c **** * 2. After each device reset the HSI (8 MHz) is used as system clock source.
  50. 24:Core/Src/system_stm32f1xx.c **** * Then SystemInit() function is called, in "startup_stm32f1xx_xx.s" file, to
  51. 25:Core/Src/system_stm32f1xx.c **** * configure the system clock before to branch to main program.
  52. 26:Core/Src/system_stm32f1xx.c **** *
  53. 27:Core/Src/system_stm32f1xx.c **** * 4. The default value of HSE crystal is set to 8 MHz (or 25 MHz, depending on
  54. 28:Core/Src/system_stm32f1xx.c **** * the product used), refer to "HSE_VALUE".
  55. 29:Core/Src/system_stm32f1xx.c **** * When HSE is used as system clock source, directly or through PLL, and you
  56. 30:Core/Src/system_stm32f1xx.c **** * are using different crystal you have to adapt the HSE value to your own
  57. 31:Core/Src/system_stm32f1xx.c **** * configuration.
  58. 32:Core/Src/system_stm32f1xx.c **** *
  59. ARM GAS /tmp/ccji4ked.s page 2
  60. 33:Core/Src/system_stm32f1xx.c **** ******************************************************************************
  61. 34:Core/Src/system_stm32f1xx.c **** * @attention
  62. 35:Core/Src/system_stm32f1xx.c **** *
  63. 36:Core/Src/system_stm32f1xx.c **** * Copyright (c) 2017-2021 STMicroelectronics.
  64. 37:Core/Src/system_stm32f1xx.c **** * All rights reserved.
  65. 38:Core/Src/system_stm32f1xx.c **** *
  66. 39:Core/Src/system_stm32f1xx.c **** * This software is licensed under terms that can be found in the LICENSE file
  67. 40:Core/Src/system_stm32f1xx.c **** * in the root directory of this software component.
  68. 41:Core/Src/system_stm32f1xx.c **** * If no LICENSE file comes with this software, it is provided AS-IS.
  69. 42:Core/Src/system_stm32f1xx.c **** *
  70. 43:Core/Src/system_stm32f1xx.c **** ******************************************************************************
  71. 44:Core/Src/system_stm32f1xx.c **** */
  72. 45:Core/Src/system_stm32f1xx.c ****
  73. 46:Core/Src/system_stm32f1xx.c **** /** @addtogroup CMSIS
  74. 47:Core/Src/system_stm32f1xx.c **** * @{
  75. 48:Core/Src/system_stm32f1xx.c **** */
  76. 49:Core/Src/system_stm32f1xx.c ****
  77. 50:Core/Src/system_stm32f1xx.c **** /** @addtogroup stm32f1xx_system
  78. 51:Core/Src/system_stm32f1xx.c **** * @{
  79. 52:Core/Src/system_stm32f1xx.c **** */
  80. 53:Core/Src/system_stm32f1xx.c ****
  81. 54:Core/Src/system_stm32f1xx.c **** /** @addtogroup STM32F1xx_System_Private_Includes
  82. 55:Core/Src/system_stm32f1xx.c **** * @{
  83. 56:Core/Src/system_stm32f1xx.c **** */
  84. 57:Core/Src/system_stm32f1xx.c ****
  85. 58:Core/Src/system_stm32f1xx.c **** #include "stm32f1xx.h"
  86. 59:Core/Src/system_stm32f1xx.c ****
  87. 60:Core/Src/system_stm32f1xx.c **** /**
  88. 61:Core/Src/system_stm32f1xx.c **** * @}
  89. 62:Core/Src/system_stm32f1xx.c **** */
  90. 63:Core/Src/system_stm32f1xx.c ****
  91. 64:Core/Src/system_stm32f1xx.c **** /** @addtogroup STM32F1xx_System_Private_TypesDefinitions
  92. 65:Core/Src/system_stm32f1xx.c **** * @{
  93. 66:Core/Src/system_stm32f1xx.c **** */
  94. 67:Core/Src/system_stm32f1xx.c ****
  95. 68:Core/Src/system_stm32f1xx.c **** /**
  96. 69:Core/Src/system_stm32f1xx.c **** * @}
  97. 70:Core/Src/system_stm32f1xx.c **** */
  98. 71:Core/Src/system_stm32f1xx.c ****
  99. 72:Core/Src/system_stm32f1xx.c **** /** @addtogroup STM32F1xx_System_Private_Defines
  100. 73:Core/Src/system_stm32f1xx.c **** * @{
  101. 74:Core/Src/system_stm32f1xx.c **** */
  102. 75:Core/Src/system_stm32f1xx.c ****
  103. 76:Core/Src/system_stm32f1xx.c **** #if !defined (HSE_VALUE)
  104. 77:Core/Src/system_stm32f1xx.c **** #define HSE_VALUE 8000000U /*!< Default value of the External oscillator in Hz.
  105. 78:Core/Src/system_stm32f1xx.c **** This value can be provided and adapted by the user
  106. 79:Core/Src/system_stm32f1xx.c **** #endif /* HSE_VALUE */
  107. 80:Core/Src/system_stm32f1xx.c ****
  108. 81:Core/Src/system_stm32f1xx.c **** #if !defined (HSI_VALUE)
  109. 82:Core/Src/system_stm32f1xx.c **** #define HSI_VALUE 8000000U /*!< Default value of the Internal oscillator in Hz.
  110. 83:Core/Src/system_stm32f1xx.c **** This value can be provided and adapted by the user
  111. 84:Core/Src/system_stm32f1xx.c **** #endif /* HSI_VALUE */
  112. 85:Core/Src/system_stm32f1xx.c ****
  113. 86:Core/Src/system_stm32f1xx.c **** /*!< Uncomment the following line if you need to use external SRAM */
  114. 87:Core/Src/system_stm32f1xx.c **** #if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) ||
  115. 88:Core/Src/system_stm32f1xx.c **** /* #define DATA_IN_ExtSRAM */
  116. 89:Core/Src/system_stm32f1xx.c **** #endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
  117. ARM GAS /tmp/ccji4ked.s page 3
  118. 90:Core/Src/system_stm32f1xx.c ****
  119. 91:Core/Src/system_stm32f1xx.c **** /* Note: Following vector table addresses must be defined in line with linker
  120. 92:Core/Src/system_stm32f1xx.c **** configuration. */
  121. 93:Core/Src/system_stm32f1xx.c **** /*!< Uncomment the following line if you need to relocate the vector table
  122. 94:Core/Src/system_stm32f1xx.c **** anywhere in Flash or Sram, else the vector table is kept at the automatic
  123. 95:Core/Src/system_stm32f1xx.c **** remap of boot address selected */
  124. 96:Core/Src/system_stm32f1xx.c **** /* #define USER_VECT_TAB_ADDRESS */
  125. 97:Core/Src/system_stm32f1xx.c ****
  126. 98:Core/Src/system_stm32f1xx.c **** #if defined(USER_VECT_TAB_ADDRESS)
  127. 99:Core/Src/system_stm32f1xx.c **** /*!< Uncomment the following line if you need to relocate your vector Table
  128. 100:Core/Src/system_stm32f1xx.c **** in Sram else user remap will be done in Flash. */
  129. 101:Core/Src/system_stm32f1xx.c **** /* #define VECT_TAB_SRAM */
  130. 102:Core/Src/system_stm32f1xx.c **** #if defined(VECT_TAB_SRAM)
  131. 103:Core/Src/system_stm32f1xx.c **** #define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
  132. 104:Core/Src/system_stm32f1xx.c **** This value must be a multiple of 0x200. */
  133. 105:Core/Src/system_stm32f1xx.c **** #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
  134. 106:Core/Src/system_stm32f1xx.c **** This value must be a multiple of 0x200. */
  135. 107:Core/Src/system_stm32f1xx.c **** #else
  136. 108:Core/Src/system_stm32f1xx.c **** #define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
  137. 109:Core/Src/system_stm32f1xx.c **** This value must be a multiple of 0x200. */
  138. 110:Core/Src/system_stm32f1xx.c **** #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
  139. 111:Core/Src/system_stm32f1xx.c **** This value must be a multiple of 0x200. */
  140. 112:Core/Src/system_stm32f1xx.c **** #endif /* VECT_TAB_SRAM */
  141. 113:Core/Src/system_stm32f1xx.c **** #endif /* USER_VECT_TAB_ADDRESS */
  142. 114:Core/Src/system_stm32f1xx.c ****
  143. 115:Core/Src/system_stm32f1xx.c **** /******************************************************************************/
  144. 116:Core/Src/system_stm32f1xx.c ****
  145. 117:Core/Src/system_stm32f1xx.c **** /**
  146. 118:Core/Src/system_stm32f1xx.c **** * @}
  147. 119:Core/Src/system_stm32f1xx.c **** */
  148. 120:Core/Src/system_stm32f1xx.c ****
  149. 121:Core/Src/system_stm32f1xx.c **** /** @addtogroup STM32F1xx_System_Private_Macros
  150. 122:Core/Src/system_stm32f1xx.c **** * @{
  151. 123:Core/Src/system_stm32f1xx.c **** */
  152. 124:Core/Src/system_stm32f1xx.c ****
  153. 125:Core/Src/system_stm32f1xx.c **** /**
  154. 126:Core/Src/system_stm32f1xx.c **** * @}
  155. 127:Core/Src/system_stm32f1xx.c **** */
  156. 128:Core/Src/system_stm32f1xx.c ****
  157. 129:Core/Src/system_stm32f1xx.c **** /** @addtogroup STM32F1xx_System_Private_Variables
  158. 130:Core/Src/system_stm32f1xx.c **** * @{
  159. 131:Core/Src/system_stm32f1xx.c **** */
  160. 132:Core/Src/system_stm32f1xx.c ****
  161. 133:Core/Src/system_stm32f1xx.c **** /* This variable is updated in three ways:
  162. 134:Core/Src/system_stm32f1xx.c **** 1) by calling CMSIS function SystemCoreClockUpdate()
  163. 135:Core/Src/system_stm32f1xx.c **** 2) by calling HAL API function HAL_RCC_GetHCLKFreq()
  164. 136:Core/Src/system_stm32f1xx.c **** 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
  165. 137:Core/Src/system_stm32f1xx.c **** Note: If you use this function to configure the system clock; then there
  166. 138:Core/Src/system_stm32f1xx.c **** is no need to call the 2 first functions listed above, since SystemCoreClock
  167. 139:Core/Src/system_stm32f1xx.c **** variable is updated automatically.
  168. 140:Core/Src/system_stm32f1xx.c **** */
  169. 141:Core/Src/system_stm32f1xx.c **** uint32_t SystemCoreClock = 16000000;
  170. 142:Core/Src/system_stm32f1xx.c **** const uint8_t AHBPrescTable[16U] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
  171. 143:Core/Src/system_stm32f1xx.c **** const uint8_t APBPrescTable[8U] = {0, 0, 0, 0, 1, 2, 3, 4};
  172. 144:Core/Src/system_stm32f1xx.c ****
  173. 145:Core/Src/system_stm32f1xx.c **** /**
  174. 146:Core/Src/system_stm32f1xx.c **** * @}
  175. ARM GAS /tmp/ccji4ked.s page 4
  176. 147:Core/Src/system_stm32f1xx.c **** */
  177. 148:Core/Src/system_stm32f1xx.c ****
  178. 149:Core/Src/system_stm32f1xx.c **** /** @addtogroup STM32F1xx_System_Private_FunctionPrototypes
  179. 150:Core/Src/system_stm32f1xx.c **** * @{
  180. 151:Core/Src/system_stm32f1xx.c **** */
  181. 152:Core/Src/system_stm32f1xx.c ****
  182. 153:Core/Src/system_stm32f1xx.c **** #if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) ||
  183. 154:Core/Src/system_stm32f1xx.c **** #ifdef DATA_IN_ExtSRAM
  184. 155:Core/Src/system_stm32f1xx.c **** static void SystemInit_ExtMemCtl(void);
  185. 156:Core/Src/system_stm32f1xx.c **** #endif /* DATA_IN_ExtSRAM */
  186. 157:Core/Src/system_stm32f1xx.c **** #endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
  187. 158:Core/Src/system_stm32f1xx.c ****
  188. 159:Core/Src/system_stm32f1xx.c **** /**
  189. 160:Core/Src/system_stm32f1xx.c **** * @}
  190. 161:Core/Src/system_stm32f1xx.c **** */
  191. 162:Core/Src/system_stm32f1xx.c ****
  192. 163:Core/Src/system_stm32f1xx.c **** /** @addtogroup STM32F1xx_System_Private_Functions
  193. 164:Core/Src/system_stm32f1xx.c **** * @{
  194. 165:Core/Src/system_stm32f1xx.c **** */
  195. 166:Core/Src/system_stm32f1xx.c ****
  196. 167:Core/Src/system_stm32f1xx.c **** /**
  197. 168:Core/Src/system_stm32f1xx.c **** * @brief Setup the microcontroller system
  198. 169:Core/Src/system_stm32f1xx.c **** * Initialize the Embedded Flash Interface, the PLL and update the
  199. 170:Core/Src/system_stm32f1xx.c **** * SystemCoreClock variable.
  200. 171:Core/Src/system_stm32f1xx.c **** * @note This function should be used only after reset.
  201. 172:Core/Src/system_stm32f1xx.c **** * @param None
  202. 173:Core/Src/system_stm32f1xx.c **** * @retval None
  203. 174:Core/Src/system_stm32f1xx.c **** */
  204. 175:Core/Src/system_stm32f1xx.c **** void SystemInit (void)
  205. 176:Core/Src/system_stm32f1xx.c **** {
  206. 27 .loc 1 176 1 view -0
  207. 28 .cfi_startproc
  208. 29 @ args = 0, pretend = 0, frame = 0
  209. 30 @ frame_needed = 0, uses_anonymous_args = 0
  210. 31 @ link register save eliminated.
  211. 177:Core/Src/system_stm32f1xx.c **** #if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) ||
  212. 178:Core/Src/system_stm32f1xx.c **** #ifdef DATA_IN_ExtSRAM
  213. 179:Core/Src/system_stm32f1xx.c **** SystemInit_ExtMemCtl();
  214. 180:Core/Src/system_stm32f1xx.c **** #endif /* DATA_IN_ExtSRAM */
  215. 181:Core/Src/system_stm32f1xx.c **** #endif
  216. 182:Core/Src/system_stm32f1xx.c ****
  217. 183:Core/Src/system_stm32f1xx.c **** /* Configure the Vector Table location -------------------------------------*/
  218. 184:Core/Src/system_stm32f1xx.c **** #if defined(USER_VECT_TAB_ADDRESS)
  219. 185:Core/Src/system_stm32f1xx.c **** SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM.
  220. 186:Core/Src/system_stm32f1xx.c **** #endif /* USER_VECT_TAB_ADDRESS */
  221. 187:Core/Src/system_stm32f1xx.c **** }
  222. 32 .loc 1 187 1 view .LVU1
  223. 33 0000 7047 bx lr
  224. 34 .cfi_endproc
  225. 35 .LFE65:
  226. 37 .section .text.SystemCoreClockUpdate,"ax",%progbits
  227. 38 .align 1
  228. 39 .global SystemCoreClockUpdate
  229. 40 .syntax unified
  230. 41 .thumb
  231. 42 .thumb_func
  232. 44 SystemCoreClockUpdate:
  233. ARM GAS /tmp/ccji4ked.s page 5
  234. 45 .LFB66:
  235. 188:Core/Src/system_stm32f1xx.c ****
  236. 189:Core/Src/system_stm32f1xx.c **** /**
  237. 190:Core/Src/system_stm32f1xx.c **** * @brief Update SystemCoreClock variable according to Clock Register Values.
  238. 191:Core/Src/system_stm32f1xx.c **** * The SystemCoreClock variable contains the core clock (HCLK), it can
  239. 192:Core/Src/system_stm32f1xx.c **** * be used by the user application to setup the SysTick timer or configure
  240. 193:Core/Src/system_stm32f1xx.c **** * other parameters.
  241. 194:Core/Src/system_stm32f1xx.c **** *
  242. 195:Core/Src/system_stm32f1xx.c **** * @note Each time the core clock (HCLK) changes, this function must be called
  243. 196:Core/Src/system_stm32f1xx.c **** * to update SystemCoreClock variable value. Otherwise, any configuration
  244. 197:Core/Src/system_stm32f1xx.c **** * based on this variable will be incorrect.
  245. 198:Core/Src/system_stm32f1xx.c **** *
  246. 199:Core/Src/system_stm32f1xx.c **** * @note - The system frequency computed by this function is not the real
  247. 200:Core/Src/system_stm32f1xx.c **** * frequency in the chip. It is calculated based on the predefined
  248. 201:Core/Src/system_stm32f1xx.c **** * constant and the selected clock source:
  249. 202:Core/Src/system_stm32f1xx.c **** *
  250. 203:Core/Src/system_stm32f1xx.c **** * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
  251. 204:Core/Src/system_stm32f1xx.c **** *
  252. 205:Core/Src/system_stm32f1xx.c **** * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
  253. 206:Core/Src/system_stm32f1xx.c **** *
  254. 207:Core/Src/system_stm32f1xx.c **** * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
  255. 208:Core/Src/system_stm32f1xx.c **** * or HSI_VALUE(*) multiplied by the PLL factors.
  256. 209:Core/Src/system_stm32f1xx.c **** *
  257. 210:Core/Src/system_stm32f1xx.c **** * (*) HSI_VALUE is a constant defined in stm32f1xx.h file (default value
  258. 211:Core/Src/system_stm32f1xx.c **** * 8 MHz) but the real value may vary depending on the variations
  259. 212:Core/Src/system_stm32f1xx.c **** * in voltage and temperature.
  260. 213:Core/Src/system_stm32f1xx.c **** *
  261. 214:Core/Src/system_stm32f1xx.c **** * (**) HSE_VALUE is a constant defined in stm32f1xx.h file (default value
  262. 215:Core/Src/system_stm32f1xx.c **** * 8 MHz or 25 MHz, depending on the product used), user has to ensure
  263. 216:Core/Src/system_stm32f1xx.c **** * that HSE_VALUE is same as the real frequency of the crystal used.
  264. 217:Core/Src/system_stm32f1xx.c **** * Otherwise, this function may have wrong result.
  265. 218:Core/Src/system_stm32f1xx.c **** *
  266. 219:Core/Src/system_stm32f1xx.c **** * - The result of this function could be not correct when using fractional
  267. 220:Core/Src/system_stm32f1xx.c **** * value for HSE crystal.
  268. 221:Core/Src/system_stm32f1xx.c **** * @param None
  269. 222:Core/Src/system_stm32f1xx.c **** * @retval None
  270. 223:Core/Src/system_stm32f1xx.c **** */
  271. 224:Core/Src/system_stm32f1xx.c **** void SystemCoreClockUpdate (void)
  272. 225:Core/Src/system_stm32f1xx.c **** {
  273. 46 .loc 1 225 1 view -0
  274. 47 .cfi_startproc
  275. 48 @ args = 0, pretend = 0, frame = 0
  276. 49 @ frame_needed = 0, uses_anonymous_args = 0
  277. 50 @ link register save eliminated.
  278. 226:Core/Src/system_stm32f1xx.c **** uint32_t tmp = 0U, pllmull = 0U, pllsource = 0U;
  279. 51 .loc 1 226 3 view .LVU3
  280. 52 .LVL0:
  281. 227:Core/Src/system_stm32f1xx.c ****
  282. 228:Core/Src/system_stm32f1xx.c **** #if defined(STM32F105xC) || defined(STM32F107xC)
  283. 229:Core/Src/system_stm32f1xx.c **** uint32_t prediv1source = 0U, prediv1factor = 0U, prediv2factor = 0U, pll2mull = 0U;
  284. 230:Core/Src/system_stm32f1xx.c **** #endif /* STM32F105xC */
  285. 231:Core/Src/system_stm32f1xx.c ****
  286. 232:Core/Src/system_stm32f1xx.c **** #if defined(STM32F100xB) || defined(STM32F100xE)
  287. 233:Core/Src/system_stm32f1xx.c **** uint32_t prediv1factor = 0U;
  288. 234:Core/Src/system_stm32f1xx.c **** #endif /* STM32F100xB or STM32F100xE */
  289. 235:Core/Src/system_stm32f1xx.c ****
  290. 236:Core/Src/system_stm32f1xx.c **** /* Get SYSCLK source -------------------------------------------------------*/
  291. ARM GAS /tmp/ccji4ked.s page 6
  292. 237:Core/Src/system_stm32f1xx.c **** tmp = RCC->CFGR & RCC_CFGR_SWS;
  293. 53 .loc 1 237 3 view .LVU4
  294. 54 .loc 1 237 12 is_stmt 0 view .LVU5
  295. 55 0000 1F4B ldr r3, .L10
  296. 56 0002 5B68 ldr r3, [r3, #4]
  297. 57 .loc 1 237 7 view .LVU6
  298. 58 0004 03F00C03 and r3, r3, #12
  299. 59 .LVL1:
  300. 238:Core/Src/system_stm32f1xx.c ****
  301. 239:Core/Src/system_stm32f1xx.c **** switch (tmp)
  302. 60 .loc 1 239 3 is_stmt 1 view .LVU7
  303. 61 0008 042B cmp r3, #4
  304. 62 000a 14D0 beq .L3
  305. 63 000c 082B cmp r3, #8
  306. 64 000e 16D0 beq .L4
  307. 65 0010 1BB1 cbz r3, .L9
  308. 240:Core/Src/system_stm32f1xx.c **** {
  309. 241:Core/Src/system_stm32f1xx.c **** case 0x00U: /* HSI used as system clock */
  310. 242:Core/Src/system_stm32f1xx.c **** SystemCoreClock = HSI_VALUE;
  311. 243:Core/Src/system_stm32f1xx.c **** break;
  312. 244:Core/Src/system_stm32f1xx.c **** case 0x04U: /* HSE used as system clock */
  313. 245:Core/Src/system_stm32f1xx.c **** SystemCoreClock = HSE_VALUE;
  314. 246:Core/Src/system_stm32f1xx.c **** break;
  315. 247:Core/Src/system_stm32f1xx.c **** case 0x08U: /* PLL used as system clock */
  316. 248:Core/Src/system_stm32f1xx.c ****
  317. 249:Core/Src/system_stm32f1xx.c **** /* Get PLL clock source and multiplication factor ----------------------*/
  318. 250:Core/Src/system_stm32f1xx.c **** pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
  319. 251:Core/Src/system_stm32f1xx.c **** pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  320. 252:Core/Src/system_stm32f1xx.c ****
  321. 253:Core/Src/system_stm32f1xx.c **** #if !defined(STM32F105xC) && !defined(STM32F107xC)
  322. 254:Core/Src/system_stm32f1xx.c **** pllmull = ( pllmull >> 18U) + 2U;
  323. 255:Core/Src/system_stm32f1xx.c ****
  324. 256:Core/Src/system_stm32f1xx.c **** if (pllsource == 0x00U)
  325. 257:Core/Src/system_stm32f1xx.c **** {
  326. 258:Core/Src/system_stm32f1xx.c **** /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  327. 259:Core/Src/system_stm32f1xx.c **** SystemCoreClock = (HSI_VALUE >> 1U) * pllmull;
  328. 260:Core/Src/system_stm32f1xx.c **** }
  329. 261:Core/Src/system_stm32f1xx.c **** else
  330. 262:Core/Src/system_stm32f1xx.c **** {
  331. 263:Core/Src/system_stm32f1xx.c **** #if defined(STM32F100xB) || defined(STM32F100xE)
  332. 264:Core/Src/system_stm32f1xx.c **** prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1U;
  333. 265:Core/Src/system_stm32f1xx.c **** /* HSE oscillator clock selected as PREDIV1 clock entry */
  334. 266:Core/Src/system_stm32f1xx.c **** SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  335. 267:Core/Src/system_stm32f1xx.c **** #else
  336. 268:Core/Src/system_stm32f1xx.c **** /* HSE selected as PLL clock entry */
  337. 269:Core/Src/system_stm32f1xx.c **** if ((RCC->CFGR & RCC_CFGR_PLLXTPRE) != (uint32_t)RESET)
  338. 270:Core/Src/system_stm32f1xx.c **** {/* HSE oscillator clock divided by 2 */
  339. 271:Core/Src/system_stm32f1xx.c **** SystemCoreClock = (HSE_VALUE >> 1U) * pllmull;
  340. 272:Core/Src/system_stm32f1xx.c **** }
  341. 273:Core/Src/system_stm32f1xx.c **** else
  342. 274:Core/Src/system_stm32f1xx.c **** {
  343. 275:Core/Src/system_stm32f1xx.c **** SystemCoreClock = HSE_VALUE * pllmull;
  344. 276:Core/Src/system_stm32f1xx.c **** }
  345. 277:Core/Src/system_stm32f1xx.c **** #endif
  346. 278:Core/Src/system_stm32f1xx.c **** }
  347. 279:Core/Src/system_stm32f1xx.c **** #else
  348. 280:Core/Src/system_stm32f1xx.c **** pllmull = pllmull >> 18U;
  349. ARM GAS /tmp/ccji4ked.s page 7
  350. 281:Core/Src/system_stm32f1xx.c ****
  351. 282:Core/Src/system_stm32f1xx.c **** if (pllmull != 0x0DU)
  352. 283:Core/Src/system_stm32f1xx.c **** {
  353. 284:Core/Src/system_stm32f1xx.c **** pllmull += 2U;
  354. 285:Core/Src/system_stm32f1xx.c **** }
  355. 286:Core/Src/system_stm32f1xx.c **** else
  356. 287:Core/Src/system_stm32f1xx.c **** { /* PLL multiplication factor = PLL input clock * 6.5 */
  357. 288:Core/Src/system_stm32f1xx.c **** pllmull = 13U / 2U;
  358. 289:Core/Src/system_stm32f1xx.c **** }
  359. 290:Core/Src/system_stm32f1xx.c ****
  360. 291:Core/Src/system_stm32f1xx.c **** if (pllsource == 0x00U)
  361. 292:Core/Src/system_stm32f1xx.c **** {
  362. 293:Core/Src/system_stm32f1xx.c **** /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  363. 294:Core/Src/system_stm32f1xx.c **** SystemCoreClock = (HSI_VALUE >> 1U) * pllmull;
  364. 295:Core/Src/system_stm32f1xx.c **** }
  365. 296:Core/Src/system_stm32f1xx.c **** else
  366. 297:Core/Src/system_stm32f1xx.c **** {/* PREDIV1 selected as PLL clock entry */
  367. 298:Core/Src/system_stm32f1xx.c ****
  368. 299:Core/Src/system_stm32f1xx.c **** /* Get PREDIV1 clock source and division factor */
  369. 300:Core/Src/system_stm32f1xx.c **** prediv1source = RCC->CFGR2 & RCC_CFGR2_PREDIV1SRC;
  370. 301:Core/Src/system_stm32f1xx.c **** prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1U;
  371. 302:Core/Src/system_stm32f1xx.c ****
  372. 303:Core/Src/system_stm32f1xx.c **** if (prediv1source == 0U)
  373. 304:Core/Src/system_stm32f1xx.c **** {
  374. 305:Core/Src/system_stm32f1xx.c **** /* HSE oscillator clock selected as PREDIV1 clock entry */
  375. 306:Core/Src/system_stm32f1xx.c **** SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  376. 307:Core/Src/system_stm32f1xx.c **** }
  377. 308:Core/Src/system_stm32f1xx.c **** else
  378. 309:Core/Src/system_stm32f1xx.c **** {/* PLL2 clock selected as PREDIV1 clock entry */
  379. 310:Core/Src/system_stm32f1xx.c ****
  380. 311:Core/Src/system_stm32f1xx.c **** /* Get PREDIV2 division factor and PLL2 multiplication factor */
  381. 312:Core/Src/system_stm32f1xx.c **** prediv2factor = ((RCC->CFGR2 & RCC_CFGR2_PREDIV2) >> 4U) + 1U;
  382. 313:Core/Src/system_stm32f1xx.c **** pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8U) + 2U;
  383. 314:Core/Src/system_stm32f1xx.c **** SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull;
  384. 315:Core/Src/system_stm32f1xx.c **** }
  385. 316:Core/Src/system_stm32f1xx.c **** }
  386. 317:Core/Src/system_stm32f1xx.c **** #endif /* STM32F105xC */
  387. 318:Core/Src/system_stm32f1xx.c **** break;
  388. 319:Core/Src/system_stm32f1xx.c ****
  389. 320:Core/Src/system_stm32f1xx.c **** default:
  390. 321:Core/Src/system_stm32f1xx.c **** SystemCoreClock = HSI_VALUE;
  391. 66 .loc 1 321 7 view .LVU8
  392. 67 .loc 1 321 23 is_stmt 0 view .LVU9
  393. 68 0012 1C4B ldr r3, .L10+4
  394. 69 .LVL2:
  395. 70 .loc 1 321 23 view .LVU10
  396. 71 0014 1C4A ldr r2, .L10+8
  397. 72 0016 1A60 str r2, [r3]
  398. 322:Core/Src/system_stm32f1xx.c **** break;
  399. 73 .loc 1 322 7 is_stmt 1 view .LVU11
  400. 74 0018 02E0 b .L6
  401. 75 .LVL3:
  402. 76 .L9:
  403. 242:Core/Src/system_stm32f1xx.c **** break;
  404. 77 .loc 1 242 7 view .LVU12
  405. 242:Core/Src/system_stm32f1xx.c **** break;
  406. 78 .loc 1 242 23 is_stmt 0 view .LVU13
  407. ARM GAS /tmp/ccji4ked.s page 8
  408. 79 001a 1A4B ldr r3, .L10+4
  409. 80 .LVL4:
  410. 242:Core/Src/system_stm32f1xx.c **** break;
  411. 81 .loc 1 242 23 view .LVU14
  412. 82 001c 1A4A ldr r2, .L10+8
  413. 83 001e 1A60 str r2, [r3]
  414. 243:Core/Src/system_stm32f1xx.c **** case 0x04U: /* HSE used as system clock */
  415. 84 .loc 1 243 7 is_stmt 1 view .LVU15
  416. 85 .LVL5:
  417. 86 .L6:
  418. 323:Core/Src/system_stm32f1xx.c **** }
  419. 324:Core/Src/system_stm32f1xx.c ****
  420. 325:Core/Src/system_stm32f1xx.c **** /* Compute HCLK clock frequency ----------------*/
  421. 326:Core/Src/system_stm32f1xx.c **** /* Get HCLK prescaler */
  422. 327:Core/Src/system_stm32f1xx.c **** tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U)];
  423. 87 .loc 1 327 3 view .LVU16
  424. 88 .loc 1 327 28 is_stmt 0 view .LVU17
  425. 89 0020 174B ldr r3, .L10
  426. 90 0022 5B68 ldr r3, [r3, #4]
  427. 91 .loc 1 327 52 view .LVU18
  428. 92 0024 C3F30313 ubfx r3, r3, #4, #4
  429. 93 .loc 1 327 22 view .LVU19
  430. 94 0028 184A ldr r2, .L10+12
  431. 95 002a D15C ldrb r1, [r2, r3] @ zero_extendqisi2
  432. 96 .LVL6:
  433. 328:Core/Src/system_stm32f1xx.c **** /* HCLK clock frequency */
  434. 329:Core/Src/system_stm32f1xx.c **** SystemCoreClock >>= tmp;
  435. 97 .loc 1 329 3 is_stmt 1 view .LVU20
  436. 98 .loc 1 329 19 is_stmt 0 view .LVU21
  437. 99 002c 154A ldr r2, .L10+4
  438. 100 002e 1368 ldr r3, [r2]
  439. 101 0030 CB40 lsrs r3, r3, r1
  440. 102 0032 1360 str r3, [r2]
  441. 330:Core/Src/system_stm32f1xx.c **** }
  442. 103 .loc 1 330 1 view .LVU22
  443. 104 0034 7047 bx lr
  444. 105 .LVL7:
  445. 106 .L3:
  446. 245:Core/Src/system_stm32f1xx.c **** break;
  447. 107 .loc 1 245 7 is_stmt 1 view .LVU23
  448. 245:Core/Src/system_stm32f1xx.c **** break;
  449. 108 .loc 1 245 23 is_stmt 0 view .LVU24
  450. 109 0036 134B ldr r3, .L10+4
  451. 110 .LVL8:
  452. 245:Core/Src/system_stm32f1xx.c **** break;
  453. 111 .loc 1 245 23 view .LVU25
  454. 112 0038 134A ldr r2, .L10+8
  455. 113 003a 1A60 str r2, [r3]
  456. 246:Core/Src/system_stm32f1xx.c **** case 0x08U: /* PLL used as system clock */
  457. 114 .loc 1 246 7 is_stmt 1 view .LVU26
  458. 115 003c F0E7 b .L6
  459. 116 .LVL9:
  460. 117 .L4:
  461. 250:Core/Src/system_stm32f1xx.c **** pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  462. 118 .loc 1 250 7 view .LVU27
  463. 250:Core/Src/system_stm32f1xx.c **** pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  464. 119 .loc 1 250 20 is_stmt 0 view .LVU28
  465. ARM GAS /tmp/ccji4ked.s page 9
  466. 120 003e 104A ldr r2, .L10
  467. 121 0040 5368 ldr r3, [r2, #4]
  468. 122 .LVL10:
  469. 251:Core/Src/system_stm32f1xx.c ****
  470. 123 .loc 1 251 7 is_stmt 1 view .LVU29
  471. 251:Core/Src/system_stm32f1xx.c ****
  472. 124 .loc 1 251 22 is_stmt 0 view .LVU30
  473. 125 0042 5268 ldr r2, [r2, #4]
  474. 126 .LVL11:
  475. 254:Core/Src/system_stm32f1xx.c ****
  476. 127 .loc 1 254 7 is_stmt 1 view .LVU31
  477. 254:Core/Src/system_stm32f1xx.c ****
  478. 128 .loc 1 254 27 is_stmt 0 view .LVU32
  479. 129 0044 C3F38343 ubfx r3, r3, #18, #4
  480. 130 .LVL12:
  481. 254:Core/Src/system_stm32f1xx.c ****
  482. 131 .loc 1 254 15 view .LVU33
  483. 132 0048 0233 adds r3, r3, #2
  484. 133 .LVL13:
  485. 256:Core/Src/system_stm32f1xx.c **** {
  486. 134 .loc 1 256 7 is_stmt 1 view .LVU34
  487. 256:Core/Src/system_stm32f1xx.c **** {
  488. 135 .loc 1 256 10 is_stmt 0 view .LVU35
  489. 136 004a 12F4803F tst r2, #65536
  490. 137 004e 05D1 bne .L7
  491. 259:Core/Src/system_stm32f1xx.c **** }
  492. 138 .loc 1 259 9 is_stmt 1 view .LVU36
  493. 259:Core/Src/system_stm32f1xx.c **** }
  494. 139 .loc 1 259 45 is_stmt 0 view .LVU37
  495. 140 0050 0F4A ldr r2, .L10+16
  496. 141 .LVL14:
  497. 259:Core/Src/system_stm32f1xx.c **** }
  498. 142 .loc 1 259 45 view .LVU38
  499. 143 0052 02FB03F3 mul r3, r2, r3
  500. 144 .LVL15:
  501. 259:Core/Src/system_stm32f1xx.c **** }
  502. 145 .loc 1 259 25 view .LVU39
  503. 146 0056 0B4A ldr r2, .L10+4
  504. 147 0058 1360 str r3, [r2]
  505. 148 005a E1E7 b .L6
  506. 149 .LVL16:
  507. 150 .L7:
  508. 269:Core/Src/system_stm32f1xx.c **** {/* HSE oscillator clock divided by 2 */
  509. 151 .loc 1 269 9 is_stmt 1 view .LVU40
  510. 269:Core/Src/system_stm32f1xx.c **** {/* HSE oscillator clock divided by 2 */
  511. 152 .loc 1 269 17 is_stmt 0 view .LVU41
  512. 153 005c 084A ldr r2, .L10
  513. 154 .LVL17:
  514. 269:Core/Src/system_stm32f1xx.c **** {/* HSE oscillator clock divided by 2 */
  515. 155 .loc 1 269 17 view .LVU42
  516. 156 005e 5268 ldr r2, [r2, #4]
  517. 269:Core/Src/system_stm32f1xx.c **** {/* HSE oscillator clock divided by 2 */
  518. 157 .loc 1 269 12 view .LVU43
  519. 158 0060 12F4003F tst r2, #131072
  520. 159 0064 05D0 beq .L8
  521. 271:Core/Src/system_stm32f1xx.c **** }
  522. 160 .loc 1 271 11 is_stmt 1 view .LVU44
  523. ARM GAS /tmp/ccji4ked.s page 10
  524. 271:Core/Src/system_stm32f1xx.c **** }
  525. 161 .loc 1 271 47 is_stmt 0 view .LVU45
  526. 162 0066 0A4A ldr r2, .L10+16
  527. 163 0068 02FB03F3 mul r3, r2, r3
  528. 164 .LVL18:
  529. 271:Core/Src/system_stm32f1xx.c **** }
  530. 165 .loc 1 271 27 view .LVU46
  531. 166 006c 054A ldr r2, .L10+4
  532. 167 006e 1360 str r3, [r2]
  533. 168 0070 D6E7 b .L6
  534. 169 .LVL19:
  535. 170 .L8:
  536. 275:Core/Src/system_stm32f1xx.c **** }
  537. 171 .loc 1 275 11 is_stmt 1 view .LVU47
  538. 275:Core/Src/system_stm32f1xx.c **** }
  539. 172 .loc 1 275 39 is_stmt 0 view .LVU48
  540. 173 0072 054A ldr r2, .L10+8
  541. 174 0074 02FB03F3 mul r3, r2, r3
  542. 175 .LVL20:
  543. 275:Core/Src/system_stm32f1xx.c **** }
  544. 176 .loc 1 275 27 view .LVU49
  545. 177 0078 024A ldr r2, .L10+4
  546. 178 007a 1360 str r3, [r2]
  547. 179 007c D0E7 b .L6
  548. 180 .L11:
  549. 181 007e 00BF .align 2
  550. 182 .L10:
  551. 183 0080 00100240 .word 1073876992
  552. 184 0084 00000000 .word .LANCHOR0
  553. 185 0088 00127A00 .word 8000000
  554. 186 008c 00000000 .word .LANCHOR1
  555. 187 0090 00093D00 .word 4000000
  556. 188 .cfi_endproc
  557. 189 .LFE66:
  558. 191 .global APBPrescTable
  559. 192 .global AHBPrescTable
  560. 193 .global SystemCoreClock
  561. 194 .section .data.SystemCoreClock,"aw"
  562. 195 .align 2
  563. 196 .set .LANCHOR0,. + 0
  564. 199 SystemCoreClock:
  565. 200 0000 0024F400 .word 16000000
  566. 201 .section .rodata.AHBPrescTable,"a"
  567. 202 .align 2
  568. 203 .set .LANCHOR1,. + 0
  569. 206 AHBPrescTable:
  570. 207 0000 00000000 .ascii "\000\000\000\000\000\000\000\000\001\002\003\004\006"
  571. 207 00000000
  572. 207 01020304
  573. 207 06
  574. 208 000d 070809 .ascii "\007\010\011"
  575. 209 .section .rodata.APBPrescTable,"a"
  576. 210 .align 2
  577. 213 APBPrescTable:
  578. 214 0000 00000000 .ascii "\000\000\000\000\001\002\003\004"
  579. 214 01020304
  580. 215 .text
  581. ARM GAS /tmp/ccji4ked.s page 11
  582. 216 .Letext0:
  583. 217 .file 2 "/opt/gcc-arm/arm-none-eabi/include/machine/_default_types.h"
  584. 218 .file 3 "/opt/gcc-arm/arm-none-eabi/include/sys/_stdint.h"
  585. 219 .file 4 "Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h"
  586. 220 .file 5 "Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h"
  587. 221 .file 6 "Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h"
  588. ARM GAS /tmp/ccji4ked.s page 12
  589. DEFINED SYMBOLS
  590. *ABS*:0000000000000000 system_stm32f1xx.c
  591. /tmp/ccji4ked.s:18 .text.SystemInit:0000000000000000 $t
  592. /tmp/ccji4ked.s:24 .text.SystemInit:0000000000000000 SystemInit
  593. /tmp/ccji4ked.s:38 .text.SystemCoreClockUpdate:0000000000000000 $t
  594. /tmp/ccji4ked.s:44 .text.SystemCoreClockUpdate:0000000000000000 SystemCoreClockUpdate
  595. /tmp/ccji4ked.s:183 .text.SystemCoreClockUpdate:0000000000000080 $d
  596. /tmp/ccji4ked.s:213 .rodata.APBPrescTable:0000000000000000 APBPrescTable
  597. /tmp/ccji4ked.s:206 .rodata.AHBPrescTable:0000000000000000 AHBPrescTable
  598. /tmp/ccji4ked.s:199 .data.SystemCoreClock:0000000000000000 SystemCoreClock
  599. /tmp/ccji4ked.s:195 .data.SystemCoreClock:0000000000000000 $d
  600. /tmp/ccji4ked.s:202 .rodata.AHBPrescTable:0000000000000000 $d
  601. /tmp/ccji4ked.s:210 .rodata.APBPrescTable:0000000000000000 $d
  602. NO UNDEFINED SYMBOLS