cancel
Showing results for 
Search instead for 
Did you mean: 

clock configuration in STM32F107Rc

yasamin
Associate II
Posted on May 17, 2015 at 08:49

Hi

I want to use the dSPIN family firmware library for my board. The STM32F107RC and a 8MHz crystal are integrated on my board. I have problem with this library (system clock configuration) and I confused.

I want to have a 72MHz system clock of a HSE 8MHz.

Do I change SetSysClock() function in two source files, system_stm32f10x.c and Clock.c ?

I corrected the SetSysClock() to configure SetSysClockTo72() to have a system clock 72 MHz of my 8MHz at system_stm32f10x.c. But in SetSysClock() calling of Clock.c, the system clock configuration is switched to SetSysClockTo24().

I see this function (SetSysClock()) is defined at two different source files in firmware library and called two times. One time in system_stm32f10x.c and another at Clock.c!!

Thank you in advance for your help in this matter.

Yasamin Gharib

#clock.c-setsysclockto72
2 REPLIES 2
Posted on May 17, 2015 at 16:28

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/problem%20with%20dSPIN%20family%20firmware%20library&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx&currentviews=15]Earlier thread on same topic

Ok, but it's unlikely to have two copies of the same function, the name space would collide in the linker. You'll have to look at this at the project level and determine which file is being used, and modify that one.

If you use a debugger, and from main() step into the function you should be able to see which copy is used, and the .MAP file might be indicative.

Not many participants here using dSpin.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
yasamin
Associate II
Posted on May 18, 2015 at 06:26

in debug mode, both of function is called, one before application main from start up and another from main.

I submit my question in Motor control firmware and software forum.

thanks