cancel
Showing results for 
Search instead for 
Did you mean: 

Std Periph Lib --> Project Setup / Debug

hackerli90
Associate II
Posted on October 29, 2015 at 17:46

Hello

Currently i work with the HAL lib where i can graphically setup the system clock of my STM32F4xx controller. I do have to set up the same libraries i wrote (mostly copy paste except interface commands,.. ) in a project file using the StdPeriphLib exept the hal lib

I'd like to set up the system core frequency through PLL at 100MHz like i did it with the graphic Cube configurator. Which file and which commands do i have to edit to achieve my goal? Also, id like to set up all the clock prescalers exactly the same like in HAL.

Next problem is, when i run the project in the debug mode with the default settings (no idea which clock speed) i can set breakpoints in e.g. the startup file but not in my main file or other files. what could cause that?
2 REPLIES 2
Posted on October 29, 2015 at 19:15

The PLL and clock setting for the SPL live in the system_stm32f4xx.c file, SetSysClock(). There might be an Excel sheet to do it, but it's math a 10 year old could do, it's not that complicated, the interrelationships are diagrammed in the Reference Manual.

No idea what tool chain you're using. Some tools stop you placing break-points where the code doesn't exist on the target. ie routine is never called, linker does dead-code removal.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hackerli90
Associate II
Posted on October 29, 2015 at 19:24

hi clive

thanks for your quick answer.

im gonna check the file tomorrow. and for the debug problem: im using keil v5 with a nucleo board where the st link programmer is onboard.