Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SetSysClock called twice?
Breakpoint 6, SystemInit ()
at /Users/mike/Code/cross-compilers/STM32F0xx_StdPeriph_Lib_V1.5.0/Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:162
162 RCC->CR |= (uint32_t)0x00000001;
(gdb) step
160 {
(gdb) step
162 RCC->CR |= (uint32_t)0x00000001;
(gdb) step
166 RCC->CFGR &= (uint32_t)0xF8FFB80C;
(gdb) step
173 RCC->CR &= (uint32_t)0xFEF6FFFF;
(gdb) step
176 RCC->CR &= (uint32_t)0xFFFBFFFF;
(gdb) step
179 RCC->CFGR &= (uint32_t)0xFFC0FFFF;
(gdb)
182 RCC->CFGR2 &= (uint32_t)0xFFFFFFF0;
(gdb)
179 RCC->CFGR &= (uint32_t)0xFFC0FFFF;
(gdb)
182 RCC->CFGR2 &= (uint32_t)0xFFFFFFF0;
(gdb)
185 RCC->CFGR3 &= (uint32_t)0xFFFFFEAC;
(gdb)
188 RCC->CR2 &= (uint32_t)0xFFFFFFFE;
(gdb)
191 RCC->CIR = 0x00000000;
(gdb)
194 SetSysClock();
(gdb)
SetSysClock ()
at /Users/mike/Code/cross-compilers/STM32F0xx_StdPeriph_Lib_V1.5.0/Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:290
290 RCC->CR |= ((uint32_t)RCC_CR_HSEON);
(gdb)
SystemInit ()
at /Users/mike/Code/cross-compilers/STM32F0xx_StdPeriph_Lib_V1.5.0/Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:191
191 RCC->CIR = 0x00000000;
(gdb)
194 SetSysClock();
(gdb)
SetSysClock ()
at /Users/mike/Code/cross-compilers/STM32F0xx_StdPeriph_Lib_V1.5.0/Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:286
286 __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
(gdb)
290 RCC->CR |= ((uint32_t)RCC_CR_HSEON);
(gdb)
295 HSEStatus = RCC->CR & RCC_CR_HSERDY;
(gdb)
296 StartUpCounter++;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment