system_stm32f4xx.lst 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. ARM GAS /tmp/ccwdC0Nl.s page 1
  2. 1 .cpu cortex-m4
  3. 2 .eabi_attribute 27, 1
  4. 3 .eabi_attribute 28, 1
  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_stm32f4xx.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. 23 .fpu fpv4-sp-d16
  25. 25 SystemInit:
  26. 26 .LFB130:
  27. 27 .file 1 "Src/system_stm32f4xx.c"
  28. 1:Src/system_stm32f4xx.c **** /**
  29. 2:Src/system_stm32f4xx.c **** ******************************************************************************
  30. 3:Src/system_stm32f4xx.c **** * @file system_stm32f4xx.c
  31. 4:Src/system_stm32f4xx.c **** * @author MCD Application Team
  32. 5:Src/system_stm32f4xx.c **** * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
  33. 6:Src/system_stm32f4xx.c **** *
  34. 7:Src/system_stm32f4xx.c **** * This file provides two functions and one global variable to be called from
  35. 8:Src/system_stm32f4xx.c **** * user application:
  36. 9:Src/system_stm32f4xx.c **** * - SystemInit(): This function is called at startup just after reset and
  37. 10:Src/system_stm32f4xx.c **** * before branch to main program. This call is made inside
  38. 11:Src/system_stm32f4xx.c **** * the "startup_stm32f4xx.s" file.
  39. 12:Src/system_stm32f4xx.c **** *
  40. 13:Src/system_stm32f4xx.c **** * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
  41. 14:Src/system_stm32f4xx.c **** * by the user application to setup the SysTick
  42. 15:Src/system_stm32f4xx.c **** * timer or configure other parameters.
  43. 16:Src/system_stm32f4xx.c **** *
  44. 17:Src/system_stm32f4xx.c **** * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
  45. 18:Src/system_stm32f4xx.c **** * be called whenever the core clock is changed
  46. 19:Src/system_stm32f4xx.c **** * during program execution.
  47. 20:Src/system_stm32f4xx.c **** *
  48. 21:Src/system_stm32f4xx.c **** *
  49. 22:Src/system_stm32f4xx.c **** ******************************************************************************
  50. 23:Src/system_stm32f4xx.c **** * @attention
  51. 24:Src/system_stm32f4xx.c **** *
  52. 25:Src/system_stm32f4xx.c **** * <h2><center>&copy; COPYRIGHT 2017 STMicroelectronics</center></h2>
  53. 26:Src/system_stm32f4xx.c **** *
  54. 27:Src/system_stm32f4xx.c **** * Redistribution and use in source and binary forms, with or without modification,
  55. 28:Src/system_stm32f4xx.c **** * are permitted provided that the following conditions are met:
  56. 29:Src/system_stm32f4xx.c **** * 1. Redistributions of source code must retain the above copyright notice,
  57. 30:Src/system_stm32f4xx.c **** * this list of conditions and the following disclaimer.
  58. 31:Src/system_stm32f4xx.c **** * 2. Redistributions in binary form must reproduce the above copyright notice,
  59. ARM GAS /tmp/ccwdC0Nl.s page 2
  60. 32:Src/system_stm32f4xx.c **** * this list of conditions and the following disclaimer in the documentation
  61. 33:Src/system_stm32f4xx.c **** * and/or other materials provided with the distribution.
  62. 34:Src/system_stm32f4xx.c **** * 3. Neither the name of STMicroelectronics nor the names of its contributors
  63. 35:Src/system_stm32f4xx.c **** * may be used to endorse or promote products derived from this software
  64. 36:Src/system_stm32f4xx.c **** * without specific prior written permission.
  65. 37:Src/system_stm32f4xx.c **** *
  66. 38:Src/system_stm32f4xx.c **** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  67. 39:Src/system_stm32f4xx.c **** * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  68. 40:Src/system_stm32f4xx.c **** * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  69. 41:Src/system_stm32f4xx.c **** * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  70. 42:Src/system_stm32f4xx.c **** * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  71. 43:Src/system_stm32f4xx.c **** * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  72. 44:Src/system_stm32f4xx.c **** * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  73. 45:Src/system_stm32f4xx.c **** * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  74. 46:Src/system_stm32f4xx.c **** * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  75. 47:Src/system_stm32f4xx.c **** * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  76. 48:Src/system_stm32f4xx.c **** *
  77. 49:Src/system_stm32f4xx.c **** ******************************************************************************
  78. 50:Src/system_stm32f4xx.c **** */
  79. 51:Src/system_stm32f4xx.c ****
  80. 52:Src/system_stm32f4xx.c **** /** @addtogroup CMSIS
  81. 53:Src/system_stm32f4xx.c **** * @{
  82. 54:Src/system_stm32f4xx.c **** */
  83. 55:Src/system_stm32f4xx.c ****
  84. 56:Src/system_stm32f4xx.c **** /** @addtogroup stm32f4xx_system
  85. 57:Src/system_stm32f4xx.c **** * @{
  86. 58:Src/system_stm32f4xx.c **** */
  87. 59:Src/system_stm32f4xx.c ****
  88. 60:Src/system_stm32f4xx.c **** /** @addtogroup STM32F4xx_System_Private_Includes
  89. 61:Src/system_stm32f4xx.c **** * @{
  90. 62:Src/system_stm32f4xx.c **** */
  91. 63:Src/system_stm32f4xx.c ****
  92. 64:Src/system_stm32f4xx.c ****
  93. 65:Src/system_stm32f4xx.c **** #include "stm32f4xx.h"
  94. 66:Src/system_stm32f4xx.c ****
  95. 67:Src/system_stm32f4xx.c **** #if !defined (HSE_VALUE)
  96. 68:Src/system_stm32f4xx.c **** #define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */
  97. 69:Src/system_stm32f4xx.c **** #endif /* HSE_VALUE */
  98. 70:Src/system_stm32f4xx.c ****
  99. 71:Src/system_stm32f4xx.c **** #if !defined (HSI_VALUE)
  100. 72:Src/system_stm32f4xx.c **** #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
  101. 73:Src/system_stm32f4xx.c **** #endif /* HSI_VALUE */
  102. 74:Src/system_stm32f4xx.c ****
  103. 75:Src/system_stm32f4xx.c **** /**
  104. 76:Src/system_stm32f4xx.c **** * @}
  105. 77:Src/system_stm32f4xx.c **** */
  106. 78:Src/system_stm32f4xx.c ****
  107. 79:Src/system_stm32f4xx.c **** /** @addtogroup STM32F4xx_System_Private_TypesDefinitions
  108. 80:Src/system_stm32f4xx.c **** * @{
  109. 81:Src/system_stm32f4xx.c **** */
  110. 82:Src/system_stm32f4xx.c ****
  111. 83:Src/system_stm32f4xx.c **** /**
  112. 84:Src/system_stm32f4xx.c **** * @}
  113. 85:Src/system_stm32f4xx.c **** */
  114. 86:Src/system_stm32f4xx.c ****
  115. 87:Src/system_stm32f4xx.c **** /** @addtogroup STM32F4xx_System_Private_Defines
  116. 88:Src/system_stm32f4xx.c **** * @{
  117. ARM GAS /tmp/ccwdC0Nl.s page 3
  118. 89:Src/system_stm32f4xx.c **** */
  119. 90:Src/system_stm32f4xx.c ****
  120. 91:Src/system_stm32f4xx.c **** /************************* Miscellaneous Configuration ************************/
  121. 92:Src/system_stm32f4xx.c **** /*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
  122. 93:Src/system_stm32f4xx.c **** #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
  123. 94:Src/system_stm32f4xx.c **** || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
  124. 95:Src/system_stm32f4xx.c **** || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
  125. 96:Src/system_stm32f4xx.c **** /* #define DATA_IN_ExtSRAM */
  126. 97:Src/system_stm32f4xx.c **** #endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||
  127. 98:Src/system_stm32f4xx.c **** STM32F412Zx || STM32F412Vx */
  128. 99:Src/system_stm32f4xx.c ****
  129. 100:Src/system_stm32f4xx.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
  130. 101:Src/system_stm32f4xx.c **** || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
  131. 102:Src/system_stm32f4xx.c **** /* #define DATA_IN_ExtSDRAM */
  132. 103:Src/system_stm32f4xx.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||
  133. 104:Src/system_stm32f4xx.c **** STM32F479xx */
  134. 105:Src/system_stm32f4xx.c ****
  135. 106:Src/system_stm32f4xx.c **** /*!< Uncomment the following line if you need to relocate your vector Table in
  136. 107:Src/system_stm32f4xx.c **** Internal SRAM. */
  137. 108:Src/system_stm32f4xx.c **** /* #define VECT_TAB_SRAM */
  138. 109:Src/system_stm32f4xx.c **** #define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
  139. 110:Src/system_stm32f4xx.c **** This value must be a multiple of 0x200. */
  140. 111:Src/system_stm32f4xx.c **** /******************************************************************************/
  141. 112:Src/system_stm32f4xx.c ****
  142. 113:Src/system_stm32f4xx.c **** /**
  143. 114:Src/system_stm32f4xx.c **** * @}
  144. 115:Src/system_stm32f4xx.c **** */
  145. 116:Src/system_stm32f4xx.c ****
  146. 117:Src/system_stm32f4xx.c **** /** @addtogroup STM32F4xx_System_Private_Macros
  147. 118:Src/system_stm32f4xx.c **** * @{
  148. 119:Src/system_stm32f4xx.c **** */
  149. 120:Src/system_stm32f4xx.c ****
  150. 121:Src/system_stm32f4xx.c **** /**
  151. 122:Src/system_stm32f4xx.c **** * @}
  152. 123:Src/system_stm32f4xx.c **** */
  153. 124:Src/system_stm32f4xx.c ****
  154. 125:Src/system_stm32f4xx.c **** /** @addtogroup STM32F4xx_System_Private_Variables
  155. 126:Src/system_stm32f4xx.c **** * @{
  156. 127:Src/system_stm32f4xx.c **** */
  157. 128:Src/system_stm32f4xx.c **** /* This variable is updated in three ways:
  158. 129:Src/system_stm32f4xx.c **** 1) by calling CMSIS function SystemCoreClockUpdate()
  159. 130:Src/system_stm32f4xx.c **** 2) by calling HAL API function HAL_RCC_GetHCLKFreq()
  160. 131:Src/system_stm32f4xx.c **** 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
  161. 132:Src/system_stm32f4xx.c **** Note: If you use this function to configure the system clock; then there
  162. 133:Src/system_stm32f4xx.c **** is no need to call the 2 first functions listed above, since SystemCoreClock
  163. 134:Src/system_stm32f4xx.c **** variable is updated automatically.
  164. 135:Src/system_stm32f4xx.c **** */
  165. 136:Src/system_stm32f4xx.c **** uint32_t SystemCoreClock = 16000000;
  166. 137:Src/system_stm32f4xx.c **** const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
  167. 138:Src/system_stm32f4xx.c **** const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
  168. 139:Src/system_stm32f4xx.c **** /**
  169. 140:Src/system_stm32f4xx.c **** * @}
  170. 141:Src/system_stm32f4xx.c **** */
  171. 142:Src/system_stm32f4xx.c ****
  172. 143:Src/system_stm32f4xx.c **** /** @addtogroup STM32F4xx_System_Private_FunctionPrototypes
  173. 144:Src/system_stm32f4xx.c **** * @{
  174. 145:Src/system_stm32f4xx.c **** */
  175. ARM GAS /tmp/ccwdC0Nl.s page 4
  176. 146:Src/system_stm32f4xx.c ****
  177. 147:Src/system_stm32f4xx.c **** #if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
  178. 148:Src/system_stm32f4xx.c **** static void SystemInit_ExtMemCtl(void);
  179. 149:Src/system_stm32f4xx.c **** #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
  180. 150:Src/system_stm32f4xx.c ****
  181. 151:Src/system_stm32f4xx.c **** /**
  182. 152:Src/system_stm32f4xx.c **** * @}
  183. 153:Src/system_stm32f4xx.c **** */
  184. 154:Src/system_stm32f4xx.c ****
  185. 155:Src/system_stm32f4xx.c **** /** @addtogroup STM32F4xx_System_Private_Functions
  186. 156:Src/system_stm32f4xx.c **** * @{
  187. 157:Src/system_stm32f4xx.c **** */
  188. 158:Src/system_stm32f4xx.c ****
  189. 159:Src/system_stm32f4xx.c **** /**
  190. 160:Src/system_stm32f4xx.c **** * @brief Setup the microcontroller system
  191. 161:Src/system_stm32f4xx.c **** * Initialize the FPU setting, vector table location and External memory
  192. 162:Src/system_stm32f4xx.c **** * configuration.
  193. 163:Src/system_stm32f4xx.c **** * @param None
  194. 164:Src/system_stm32f4xx.c **** * @retval None
  195. 165:Src/system_stm32f4xx.c **** */
  196. 166:Src/system_stm32f4xx.c **** void SystemInit(void)
  197. 167:Src/system_stm32f4xx.c **** {
  198. 28 .loc 1 167 0
  199. 29 .cfi_startproc
  200. 30 @ args = 0, pretend = 0, frame = 0
  201. 31 @ frame_needed = 0, uses_anonymous_args = 0
  202. 32 @ link register save eliminated.
  203. 168:Src/system_stm32f4xx.c **** /* FPU settings ------------------------------------------------------------*/
  204. 169:Src/system_stm32f4xx.c **** #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
  205. 170:Src/system_stm32f4xx.c **** SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
  206. 33 .loc 1 170 0
  207. 34 0000 0F49 ldr r1, .L2
  208. 35 0002 D1F88830 ldr r3, [r1, #136]
  209. 36 0006 43F47003 orr r3, r3, #15728640
  210. 37 000a C1F88830 str r3, [r1, #136]
  211. 171:Src/system_stm32f4xx.c **** #endif
  212. 172:Src/system_stm32f4xx.c **** /* Reset the RCC clock configuration to the default reset state ------------*/
  213. 173:Src/system_stm32f4xx.c **** /* Set HSION bit */
  214. 174:Src/system_stm32f4xx.c **** RCC->CR |= (uint32_t)0x00000001;
  215. 38 .loc 1 174 0
  216. 39 000e 0D4B ldr r3, .L2+4
  217. 40 0010 1A68 ldr r2, [r3]
  218. 41 0012 42F00102 orr r2, r2, #1
  219. 42 0016 1A60 str r2, [r3]
  220. 175:Src/system_stm32f4xx.c ****
  221. 176:Src/system_stm32f4xx.c **** /* Reset CFGR register */
  222. 177:Src/system_stm32f4xx.c **** RCC->CFGR = 0x00000000;
  223. 43 .loc 1 177 0
  224. 44 0018 0020 movs r0, #0
  225. 45 001a 9860 str r0, [r3, #8]
  226. 178:Src/system_stm32f4xx.c ****
  227. 179:Src/system_stm32f4xx.c **** /* Reset HSEON, CSSON and PLLON bits */
  228. 180:Src/system_stm32f4xx.c **** RCC->CR &= (uint32_t)0xFEF6FFFF;
  229. 46 .loc 1 180 0
  230. 47 001c 1A68 ldr r2, [r3]
  231. 48 001e 22F08472 bic r2, r2, #17301504
  232. 49 0022 22F48032 bic r2, r2, #65536
  233. ARM GAS /tmp/ccwdC0Nl.s page 5
  234. 50 0026 1A60 str r2, [r3]
  235. 181:Src/system_stm32f4xx.c ****
  236. 182:Src/system_stm32f4xx.c **** /* Reset PLLCFGR register */
  237. 183:Src/system_stm32f4xx.c **** RCC->PLLCFGR = 0x24003010;
  238. 51 .loc 1 183 0
  239. 52 0028 074A ldr r2, .L2+8
  240. 53 002a 5A60 str r2, [r3, #4]
  241. 184:Src/system_stm32f4xx.c ****
  242. 185:Src/system_stm32f4xx.c **** /* Reset HSEBYP bit */
  243. 186:Src/system_stm32f4xx.c **** RCC->CR &= (uint32_t)0xFFFBFFFF;
  244. 54 .loc 1 186 0
  245. 55 002c 1A68 ldr r2, [r3]
  246. 56 002e 22F48022 bic r2, r2, #262144
  247. 57 0032 1A60 str r2, [r3]
  248. 187:Src/system_stm32f4xx.c ****
  249. 188:Src/system_stm32f4xx.c **** /* Disable all interrupts */
  250. 189:Src/system_stm32f4xx.c **** RCC->CIR = 0x00000000;
  251. 58 .loc 1 189 0
  252. 59 0034 D860 str r0, [r3, #12]
  253. 190:Src/system_stm32f4xx.c ****
  254. 191:Src/system_stm32f4xx.c **** #if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
  255. 192:Src/system_stm32f4xx.c **** SystemInit_ExtMemCtl();
  256. 193:Src/system_stm32f4xx.c **** #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
  257. 194:Src/system_stm32f4xx.c ****
  258. 195:Src/system_stm32f4xx.c **** /* Configure the Vector Table location add offset address ------------------*/
  259. 196:Src/system_stm32f4xx.c **** #ifdef VECT_TAB_SRAM
  260. 197:Src/system_stm32f4xx.c **** SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
  261. 198:Src/system_stm32f4xx.c **** #else
  262. 199:Src/system_stm32f4xx.c **** SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
  263. 60 .loc 1 199 0
  264. 61 0036 4FF00063 mov r3, #134217728
  265. 62 003a 8B60 str r3, [r1, #8]
  266. 63 003c 7047 bx lr
  267. 64 .L3:
  268. 65 003e 00BF .align 2
  269. 66 .L2:
  270. 67 0040 00ED00E0 .word -536810240
  271. 68 0044 00380240 .word 1073887232
  272. 69 0048 10300024 .word 603992080
  273. 70 .cfi_endproc
  274. 71 .LFE130:
  275. 73 .section .text.SystemCoreClockUpdate,"ax",%progbits
  276. 74 .align 1
  277. 75 .global SystemCoreClockUpdate
  278. 76 .syntax unified
  279. 77 .thumb
  280. 78 .thumb_func
  281. 79 .fpu fpv4-sp-d16
  282. 81 SystemCoreClockUpdate:
  283. 82 .LFB131:
  284. 200:Src/system_stm32f4xx.c **** #endif
  285. 201:Src/system_stm32f4xx.c **** }
  286. 202:Src/system_stm32f4xx.c ****
  287. 203:Src/system_stm32f4xx.c **** /**
  288. 204:Src/system_stm32f4xx.c **** * @brief Update SystemCoreClock variable according to Clock Register Values.
  289. 205:Src/system_stm32f4xx.c **** * The SystemCoreClock variable contains the core clock (HCLK), it can
  290. 206:Src/system_stm32f4xx.c **** * be used by the user application to setup the SysTick timer or configure
  291. ARM GAS /tmp/ccwdC0Nl.s page 6
  292. 207:Src/system_stm32f4xx.c **** * other parameters.
  293. 208:Src/system_stm32f4xx.c **** *
  294. 209:Src/system_stm32f4xx.c **** * @note Each time the core clock (HCLK) changes, this function must be called
  295. 210:Src/system_stm32f4xx.c **** * to update SystemCoreClock variable value. Otherwise, any configuration
  296. 211:Src/system_stm32f4xx.c **** * based on this variable will be incorrect.
  297. 212:Src/system_stm32f4xx.c **** *
  298. 213:Src/system_stm32f4xx.c **** * @note - The system frequency computed by this function is not the real
  299. 214:Src/system_stm32f4xx.c **** * frequency in the chip. It is calculated based on the predefined
  300. 215:Src/system_stm32f4xx.c **** * constant and the selected clock source:
  301. 216:Src/system_stm32f4xx.c **** *
  302. 217:Src/system_stm32f4xx.c **** * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
  303. 218:Src/system_stm32f4xx.c **** *
  304. 219:Src/system_stm32f4xx.c **** * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
  305. 220:Src/system_stm32f4xx.c **** *
  306. 221:Src/system_stm32f4xx.c **** * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
  307. 222:Src/system_stm32f4xx.c **** * or HSI_VALUE(*) multiplied/divided by the PLL factors.
  308. 223:Src/system_stm32f4xx.c **** *
  309. 224:Src/system_stm32f4xx.c **** * (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value
  310. 225:Src/system_stm32f4xx.c **** * 16 MHz) but the real value may vary depending on the variations
  311. 226:Src/system_stm32f4xx.c **** * in voltage and temperature.
  312. 227:Src/system_stm32f4xx.c **** *
  313. 228:Src/system_stm32f4xx.c **** * (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value
  314. 229:Src/system_stm32f4xx.c **** * depends on the application requirements), user has to ensure that HSE_VALUE
  315. 230:Src/system_stm32f4xx.c **** * is same as the real frequency of the crystal used. Otherwise, this function
  316. 231:Src/system_stm32f4xx.c **** * may have wrong result.
  317. 232:Src/system_stm32f4xx.c **** *
  318. 233:Src/system_stm32f4xx.c **** * - The result of this function could be not correct when using fractional
  319. 234:Src/system_stm32f4xx.c **** * value for HSE crystal.
  320. 235:Src/system_stm32f4xx.c **** *
  321. 236:Src/system_stm32f4xx.c **** * @param None
  322. 237:Src/system_stm32f4xx.c **** * @retval None
  323. 238:Src/system_stm32f4xx.c **** */
  324. 239:Src/system_stm32f4xx.c **** void SystemCoreClockUpdate(void)
  325. 240:Src/system_stm32f4xx.c **** {
  326. 83 .loc 1 240 0
  327. 84 .cfi_startproc
  328. 85 @ args = 0, pretend = 0, frame = 0
  329. 86 @ frame_needed = 0, uses_anonymous_args = 0
  330. 87 @ link register save eliminated.
  331. 88 .LVL0:
  332. 241:Src/system_stm32f4xx.c **** uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
  333. 242:Src/system_stm32f4xx.c ****
  334. 243:Src/system_stm32f4xx.c **** /* Get SYSCLK source -------------------------------------------------------*/
  335. 244:Src/system_stm32f4xx.c **** tmp = RCC->CFGR & RCC_CFGR_SWS;
  336. 89 .loc 1 244 0
  337. 90 0000 224B ldr r3, .L14
  338. 91 0002 9B68 ldr r3, [r3, #8]
  339. 92 0004 03F00C03 and r3, r3, #12
  340. 93 .LVL1:
  341. 245:Src/system_stm32f4xx.c ****
  342. 246:Src/system_stm32f4xx.c **** switch (tmp)
  343. 94 .loc 1 246 0
  344. 95 0008 042B cmp r3, #4
  345. 96 000a 14D0 beq .L6
  346. 97 000c 082B cmp r3, #8
  347. 98 000e 16D0 beq .L7
  348. 99 0010 1BB1 cbz r3, .L13
  349. ARM GAS /tmp/ccwdC0Nl.s page 7
  350. 247:Src/system_stm32f4xx.c **** {
  351. 248:Src/system_stm32f4xx.c **** case 0x00: /* HSI used as system clock source */
  352. 249:Src/system_stm32f4xx.c **** SystemCoreClock = HSI_VALUE;
  353. 250:Src/system_stm32f4xx.c **** break;
  354. 251:Src/system_stm32f4xx.c **** case 0x04: /* HSE used as system clock source */
  355. 252:Src/system_stm32f4xx.c **** SystemCoreClock = HSE_VALUE;
  356. 253:Src/system_stm32f4xx.c **** break;
  357. 254:Src/system_stm32f4xx.c **** case 0x08: /* PLL used as system clock source */
  358. 255:Src/system_stm32f4xx.c ****
  359. 256:Src/system_stm32f4xx.c **** /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N
  360. 257:Src/system_stm32f4xx.c **** SYSCLK = PLL_VCO / PLL_P
  361. 258:Src/system_stm32f4xx.c **** */
  362. 259:Src/system_stm32f4xx.c **** pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
  363. 260:Src/system_stm32f4xx.c **** pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
  364. 261:Src/system_stm32f4xx.c ****
  365. 262:Src/system_stm32f4xx.c **** if (pllsource != 0)
  366. 263:Src/system_stm32f4xx.c **** {
  367. 264:Src/system_stm32f4xx.c **** /* HSE used as PLL clock source */
  368. 265:Src/system_stm32f4xx.c **** pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
  369. 266:Src/system_stm32f4xx.c **** }
  370. 267:Src/system_stm32f4xx.c **** else
  371. 268:Src/system_stm32f4xx.c **** {
  372. 269:Src/system_stm32f4xx.c **** /* HSI used as PLL clock source */
  373. 270:Src/system_stm32f4xx.c **** pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
  374. 271:Src/system_stm32f4xx.c **** }
  375. 272:Src/system_stm32f4xx.c ****
  376. 273:Src/system_stm32f4xx.c **** pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2;
  377. 274:Src/system_stm32f4xx.c **** SystemCoreClock = pllvco/pllp;
  378. 275:Src/system_stm32f4xx.c **** break;
  379. 276:Src/system_stm32f4xx.c **** default:
  380. 277:Src/system_stm32f4xx.c **** SystemCoreClock = HSI_VALUE;
  381. 100 .loc 1 277 0
  382. 101 0012 1F4A ldr r2, .L14+4
  383. 102 0014 1F4B ldr r3, .L14+8
  384. 103 .LVL2:
  385. 104 0016 1A60 str r2, [r3]
  386. 278:Src/system_stm32f4xx.c **** break;
  387. 105 .loc 1 278 0
  388. 106 0018 02E0 b .L9
  389. 107 .LVL3:
  390. 108 .L13:
  391. 249:Src/system_stm32f4xx.c **** break;
  392. 109 .loc 1 249 0
  393. 110 001a 1D4A ldr r2, .L14+4
  394. 111 001c 1D4B ldr r3, .L14+8
  395. 112 .LVL4:
  396. 113 001e 1A60 str r2, [r3]
  397. 114 .LVL5:
  398. 115 .L9:
  399. 279:Src/system_stm32f4xx.c **** }
  400. 280:Src/system_stm32f4xx.c **** /* Compute HCLK frequency --------------------------------------------------*/
  401. 281:Src/system_stm32f4xx.c **** /* Get HCLK prescaler */
  402. 282:Src/system_stm32f4xx.c **** tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
  403. 116 .loc 1 282 0
  404. 117 0020 1A4B ldr r3, .L14
  405. 118 0022 9B68 ldr r3, [r3, #8]
  406. 119 0024 C3F30313 ubfx r3, r3, #4, #4
  407. ARM GAS /tmp/ccwdC0Nl.s page 8
  408. 120 0028 1B4A ldr r2, .L14+12
  409. 121 002a D15C ldrb r1, [r2, r3] @ zero_extendqisi2
  410. 122 .LVL6:
  411. 283:Src/system_stm32f4xx.c **** /* HCLK frequency */
  412. 284:Src/system_stm32f4xx.c **** SystemCoreClock >>= tmp;
  413. 123 .loc 1 284 0
  414. 124 002c 194A ldr r2, .L14+8
  415. 125 002e 1368 ldr r3, [r2]
  416. 126 0030 CB40 lsrs r3, r3, r1
  417. 127 0032 1360 str r3, [r2]
  418. 128 0034 7047 bx lr
  419. 129 .LVL7:
  420. 130 .L6:
  421. 252:Src/system_stm32f4xx.c **** break;
  422. 131 .loc 1 252 0
  423. 132 0036 194A ldr r2, .L14+16
  424. 133 0038 164B ldr r3, .L14+8
  425. 134 .LVL8:
  426. 135 003a 1A60 str r2, [r3]
  427. 253:Src/system_stm32f4xx.c **** case 0x08: /* PLL used as system clock source */
  428. 136 .loc 1 253 0
  429. 137 003c F0E7 b .L9
  430. 138 .LVL9:
  431. 139 .L7:
  432. 259:Src/system_stm32f4xx.c **** pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
  433. 140 .loc 1 259 0
  434. 141 003e 134B ldr r3, .L14
  435. 142 .LVL10:
  436. 143 0040 5A68 ldr r2, [r3, #4]
  437. 144 .LVL11:
  438. 260:Src/system_stm32f4xx.c ****
  439. 145 .loc 1 260 0
  440. 146 0042 5B68 ldr r3, [r3, #4]
  441. 147 0044 03F03F03 and r3, r3, #63
  442. 148 .LVL12:
  443. 262:Src/system_stm32f4xx.c **** {
  444. 149 .loc 1 262 0
  445. 150 0048 12F4800F tst r2, #4194304
  446. 151 004c 13D0 beq .L10
  447. 265:Src/system_stm32f4xx.c **** }
  448. 152 .loc 1 265 0
  449. 153 004e 134A ldr r2, .L14+16
  450. 154 .LVL13:
  451. 155 0050 B2FBF3F2 udiv r2, r2, r3
  452. 156 0054 0D4B ldr r3, .L14
  453. 157 .LVL14:
  454. 158 0056 5B68 ldr r3, [r3, #4]
  455. 159 0058 C3F38813 ubfx r3, r3, #6, #9
  456. 160 005c 03FB02F3 mul r3, r3, r2
  457. 161 .LVL15:
  458. 162 .L11:
  459. 273:Src/system_stm32f4xx.c **** SystemCoreClock = pllvco/pllp;
  460. 163 .loc 1 273 0
  461. 164 0060 0A4A ldr r2, .L14
  462. 165 0062 5268 ldr r2, [r2, #4]
  463. 166 0064 C2F30142 ubfx r2, r2, #16, #2
  464. 167 0068 0132 adds r2, r2, #1
  465. ARM GAS /tmp/ccwdC0Nl.s page 9
  466. 168 006a 5200 lsls r2, r2, #1
  467. 169 .LVL16:
  468. 274:Src/system_stm32f4xx.c **** break;
  469. 170 .loc 1 274 0
  470. 171 006c B3FBF2F3 udiv r3, r3, r2
  471. 172 .LVL17:
  472. 173 0070 084A ldr r2, .L14+8
  473. 174 .LVL18:
  474. 175 0072 1360 str r3, [r2]
  475. 275:Src/system_stm32f4xx.c **** default:
  476. 176 .loc 1 275 0
  477. 177 0074 D4E7 b .L9
  478. 178 .LVL19:
  479. 179 .L10:
  480. 270:Src/system_stm32f4xx.c **** }
  481. 180 .loc 1 270 0
  482. 181 0076 064A ldr r2, .L14+4
  483. 182 .LVL20:
  484. 183 0078 B2FBF3F2 udiv r2, r2, r3
  485. 184 007c 034B ldr r3, .L14
  486. 185 .LVL21:
  487. 186 007e 5B68 ldr r3, [r3, #4]
  488. 187 0080 C3F38813 ubfx r3, r3, #6, #9
  489. 188 0084 03FB02F3 mul r3, r3, r2
  490. 189 .LVL22:
  491. 190 0088 EAE7 b .L11
  492. 191 .L15:
  493. 192 008a 00BF .align 2
  494. 193 .L14:
  495. 194 008c 00380240 .word 1073887232
  496. 195 0090 0024F400 .word 16000000
  497. 196 0094 00000000 .word .LANCHOR0
  498. 197 0098 00000000 .word .LANCHOR1
  499. 198 009c 40787D01 .word 25000000
  500. 199 .cfi_endproc
  501. 200 .LFE131:
  502. 202 .global APBPrescTable
  503. 203 .global AHBPrescTable
  504. 204 .global SystemCoreClock
  505. 205 .section .data.SystemCoreClock,"aw",%progbits
  506. 206 .align 2
  507. 207 .set .LANCHOR0,. + 0
  508. 210 SystemCoreClock:
  509. 211 0000 0024F400 .word 16000000
  510. 212 .section .rodata.AHBPrescTable,"a",%progbits
  511. 213 .align 2
  512. 214 .set .LANCHOR1,. + 0
  513. 217 AHBPrescTable:
  514. 218 0000 00 .byte 0
  515. 219 0001 00 .byte 0
  516. 220 0002 00 .byte 0
  517. 221 0003 00 .byte 0
  518. 222 0004 00 .byte 0
  519. 223 0005 00 .byte 0
  520. 224 0006 00 .byte 0
  521. 225 0007 00 .byte 0
  522. 226 0008 01 .byte 1
  523. ARM GAS /tmp/ccwdC0Nl.s page 10
  524. 227 0009 02 .byte 2
  525. 228 000a 03 .byte 3
  526. 229 000b 04 .byte 4
  527. 230 000c 06 .byte 6
  528. 231 000d 07 .byte 7
  529. 232 000e 08 .byte 8
  530. 233 000f 09 .byte 9
  531. 234 .section .rodata.APBPrescTable,"a",%progbits
  532. 235 .align 2
  533. 238 APBPrescTable:
  534. 239 0000 00 .byte 0
  535. 240 0001 00 .byte 0
  536. 241 0002 00 .byte 0
  537. 242 0003 00 .byte 0
  538. 243 0004 01 .byte 1
  539. 244 0005 02 .byte 2
  540. 245 0006 03 .byte 3
  541. 246 0007 04 .byte 4
  542. 247 .text
  543. 248 .Letext0:
  544. 249 .file 2 "/usr/include/newlib/machine/_default_types.h"
  545. 250 .file 3 "/usr/include/newlib/sys/_stdint.h"
  546. 251 .file 4 "Drivers/CMSIS/Include/core_cm4.h"
  547. 252 .file 5 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h"
  548. 253 .file 6 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h"
  549. ARM GAS /tmp/ccwdC0Nl.s page 11
  550. DEFINED SYMBOLS
  551. *ABS*:0000000000000000 system_stm32f4xx.c
  552. /tmp/ccwdC0Nl.s:18 .text.SystemInit:0000000000000000 $t
  553. /tmp/ccwdC0Nl.s:25 .text.SystemInit:0000000000000000 SystemInit
  554. /tmp/ccwdC0Nl.s:67 .text.SystemInit:0000000000000040 $d
  555. /tmp/ccwdC0Nl.s:74 .text.SystemCoreClockUpdate:0000000000000000 $t
  556. /tmp/ccwdC0Nl.s:81 .text.SystemCoreClockUpdate:0000000000000000 SystemCoreClockUpdate
  557. /tmp/ccwdC0Nl.s:194 .text.SystemCoreClockUpdate:000000000000008c $d
  558. /tmp/ccwdC0Nl.s:238 .rodata.APBPrescTable:0000000000000000 APBPrescTable
  559. /tmp/ccwdC0Nl.s:217 .rodata.AHBPrescTable:0000000000000000 AHBPrescTable
  560. /tmp/ccwdC0Nl.s:210 .data.SystemCoreClock:0000000000000000 SystemCoreClock
  561. /tmp/ccwdC0Nl.s:206 .data.SystemCoreClock:0000000000000000 $d
  562. /tmp/ccwdC0Nl.s:213 .rodata.AHBPrescTable:0000000000000000 $d
  563. /tmp/ccwdC0Nl.s:235 .rodata.APBPrescTable:0000000000000000 $d
  564. .debug_frame:0000000000000010 $d
  565. NO UNDEFINED SYMBOLS