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
STM32 max. clock speed
Moderator: Benj
-
- 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
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
― C.S. Lewis
- 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
Hi
For ST ARM the Project Options speed needs to be set to the oscillator frequency, not the PLL frequency
For ST ARM the Project Options speed needs to be set to the oscillator frequency, not the PLL frequency
Re: STM32 max. clock speed
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.
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.
- 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
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.
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.