2017-10-17 03:49 AM
Hi All,
in order to build new project (using STM32l073v8t processor) folder, I used the STM32cubeMX.
I've set all IOs, change the clock tree using its UI and etc' according to my project.
When I check the generated code source folder I see that all files are updated while the system_stm32l07xx.c is old and doesn't modify also I change the clock tree parameters.
Also, i can't find clock generator tool for this processor family.
Please advise how should I modify the clock file.
Thanks in advance,
Moran.
#stm32l073v8t #cubemx2017-10-18 09:33 PM
Hello Moran.
There is nothing modificable by STM32cubeMX inside system_stm32l0xx.c
The only modification in this file must be done manualy by the user, is to change the HSE_VALUE parameter to fit to crystal's frequency.
The clock generator tool, is the 'Clock Configuration' tab in STM32cubeMX.
No need for an external clock generator.
The PLL values, etc calculated by STM32cubeMX .
The produced code for clocks, resides inside 'main.c' file in 'SystemClock_Config' function.
Regards
vf
2017-10-19 12:47 AM
Thanks vf,
I still don't understand why to keep the clock setting function in the main for STM32L0XX while STM32L1XX excel (
same as clock configuration tab
) modify thesystem_stm32l1xx.c with the selected clock tree.
It seemed to me like a bug... or I missing something.
2017-10-19 03:27 PM
Hi!
It is not a bug. This is the way STM32cubeMX works . When use the cube, excel is obsolete.
STM32cubeMX produces clock initialization code that uses timeouts for some delayed flags and has also error handling.(old
system_stm32l1xx.c
not)cube's
system_stm32l1xx.c
version is far away newer than this from excel .Of course a programmer may use the clock generator but must delete the call to SystemClock_Config().
After every cube's code regeneration, it will appears again.!
Note:this excel is for L1 and not for L0 family.
Regards
vf