STM32 max. clock speed

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
x79133000
Posts: 4
Joined: Mon Oct 22, 2018 2:28 am
Has thanked: 1 time
Contact:

STM32 max. clock speed

Post 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

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: STM32 max. clock speed

Post 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.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32 max. clock speed

Post by LeighM »

Hi
For ST ARM the Project Options speed needs to be set to the oscillator frequency, not the PLL frequency

x79133000
Posts: 4
Joined: Mon Oct 22, 2018 2:28 am
Has thanked: 1 time
Contact:

Re: STM32 max. clock speed

Post 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.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32 max. clock speed

Post 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.

x79133000
Posts: 4
Joined: Mon Oct 22, 2018 2:28 am
Has thanked: 1 time
Contact:

Re: STM32 max. clock speed

Post by x79133000 »

Thanks

Post Reply