How can I change the main clock source to the internal oscillator for the STM32F4?
I've tried changing this line in mcuconf.h:
#define STM32_PLLSRC STM32_PLLSRC_HSE
to this:
#define STM32_PLLSRC STM32_PLLSRC_HSI
but this gives compiler errors:
STM32_PLLVCO outside acceptable ranges
I'm working from the F4 Discovery board project. Does the PLLVC0 require the HSE clock?
To add a little more detail: I'm working from a new PCB layout now where the HSE clock is not populated yet. I'd like to first try with only the internal clock.
STM32F4 Clock source select
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: STM32F4 Clock source select
Hi,
You can switch the clock source but you have also to adjust the other parameters in order to keep the various clock points within the acceptable range. In you case the values are calculated for an 8MHz HSE source, if you want to switch to the 16MHz internal source you also have to double the PLL input divider value:
#define STM32_PLLM_VALUE 16
Figure 9 on page 85 of the reference manual explains the various clock paths and dividers.
Giovanni
You can switch the clock source but you have also to adjust the other parameters in order to keep the various clock points within the acceptable range. In you case the values are calculated for an 8MHz HSE source, if you want to switch to the 16MHz internal source you also have to double the PLL input divider value:
#define STM32_PLLM_VALUE 16
Figure 9 on page 85 of the reference manual explains the various clock paths and dividers.
Giovanni
Re: STM32F4 Clock source select
Here you may find an utility for clock configuration - it may give you the insides:
http://www.st.com/internet/mcu/product/252149.jsp
Design support
CONFIGURATION UTILITIES
Clock configuration tool for STM32F40x/41x microcontrollers v1.0.1
http://www.st.com/internet/mcu/product/252149.jsp
Design support
CONFIGURATION UTILITIES
Clock configuration tool for STM32F40x/41x microcontrollers v1.0.1