Page 1 of 1

STM32 max. clock speed

Posted: Wed Nov 07, 2018 12:20 am
by x79133000
STM32F4 system clock speed can go up to 168MHz using PLL. But in the Project Options we can't set any value higher than 26MHz which is the maximum oscillator frequency. When we use interrupts then, it uses system clock but calculates based on Oscillator frequency.
Am I doing something wrong or it is a bug?

Thanks

Re: STM32 max. clock speed

Posted: Wed Nov 07, 2018 7:48 am
by kersing
You can enter any value you want, the drop down suggests you are limited to the values listed but the field allows you to enter your own value.

Re: STM32 max. clock speed

Posted: Wed Nov 07, 2018 10:41 am
by LeighM
Hi
For ST ARM the Project Options speed needs to be set to the oscillator frequency, not the PLL frequency

Re: STM32 max. clock speed

Posted: Wed Nov 07, 2018 5:09 pm
by x79133000
LeighM,

As you said it needs to be set to the oscillator frequency, but the problem is when working with interrupts, for example, the interrupts work based on the system clock which in my case is PLL clock. But in the Interrupt Properties page, it does calculations based on the Oscillator frequency which is set in the Project Options, and shows a wrong interrupt frequency.

Re: STM32 max. clock speed

Posted: Wed Nov 07, 2018 5:36 pm
by LeighM
Ah, yes, sorry, you are correct about the interrupt timings, unfortunately Flowcode can't currently work out the true frequency from the ST ARM clock config settings, so you will need to do the calculations manually.
Because we use the ST HAL the system does need to know the Oscillator frequency, which is set in the Project Options, and passed to the build process.

Re: STM32 max. clock speed

Posted: Wed Nov 07, 2018 6:56 pm
by x79133000
Thanks