Hi,
I am working with a STM32F411. I have up to now been working with it set up with no PLL and external osc @ 16Mhz. This works perfectly, LED flashing etc
I am having some issues with the i2c hardware component (i dont seem to be able to get it to work) so i thought i will increase the oscillator speed so that the software i2c essentially runs faster (or so i thought)
Following the settings found online, i have apparently set my speed up to 96Mhz?? But because i still have the oscillator speed set to 16Mhz in the setup (it wont allow me to set it to 96Mhz) the speed of the program doesnt appear to change.
Is there any way i can see what speed the core is actually running at?
STM32 Speed
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: STM32 Speed
For ST ARM projects the setting of “Build->Project Options->Clock Speed” should be set to the source (e.g. external crystal) frequency
(not any of the internal system clock frequency)
You can check the HCLK frequency at run time by using the C code function HAL_RCC_GetHCLKFreq().
For example, create a global ULONG variable named FREQ, then add the following in a C code icon
(not any of the internal system clock frequency)
You can check the HCLK frequency at run time by using the C code function HAL_RCC_GetHCLKFreq().
For example, create a global ULONG variable named FREQ, then add the following in a C code icon
Code: Select all
FCV_FREQ = HAL_RCC_GetHCLKFreq();
Re: STM32 Speed
I have used the HAL function. Im getting back 84Mhz.
Im not sure what i am getting on the i2c bus. Its bitbanged at the moment so i dont expect fantastic speeds. I will need to scope the clock line at some point and see what its putting out.