2015-06-03 08:43 AM
Hello!
Until this time I did not called the so called Systeminit() function. Now I set up some frequencies for the clocks with the help of the clock_configuration xls. I would like to know what are the default settings for these clocks and prescalers, to be able to compare both setups. Thanks for your further answer! #frequency-settings2015-06-03 09:49 AM
Not sure there are ''default'' settings, the PLL is turned off at reset, with whatever states the manual gives for the registers.
The part starts at 16 MHz running from the HSI source. Normally SystemInit() is called prior to main() as part of the CMSIS startup sequence, unless you use things like CooCox which does it's own thing. Some of the nominal settings for the PLL are to get the input clock down to 1 MHz, then multiply it by 336, and finally divided by 2. It's run twice as fast and divided down by 2 because the VCO is generating sharp pulses, not 50/50 duty waveforms, dividing by two gets you to that. The APB1 is normally at DIV4 (42 MHz) and APB2 is nominally at DIV2 (84 MHz) I'm not convinced an Excel sheet is required here, the math is pretty pedestrian.