cancel
Showing results for 
Search instead for 
Did you mean: 

Default frequency settings for STM32F4

janos
Associate
Posted on June 03, 2015 at 17:43

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-settings
1 REPLY 1
Posted on June 03, 2015 at 18:49

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..