2015-04-28 02:47 PM
Hi,
I have a question concerning the clock configuration of an STM32F103RBT6. I used several STM32F4 chips before and generated the system_stm32f4xx.c file with the STM32F4 Clock Configuration Tool. It seems that there is no equivalent tool for the STM32F103? However, as the system_stm32f10x.c file contains functions to set the SysClock like ''SetSysClockTo36'' I thought the clock configuration should work by just setting the define to use the correct ''SetSysClockTo...'' function and defining the HSE Value in stm32f10x.c (as the SetSysClockTo functions are dependent on the HSE Value).This works for STM32F103 Boards with the standard 8MHz HSE oscillator. For my boards with a 16MHz HSE oscillator, it does not work. So my question is, if it is possible to use the SetSysClockTo functions with different HSE Values and if there are any further steps to perform, despite defining the correct functions and the HSE Value. My goal is to set the CPU Speed to 72MHz with an 16MHz HSE. Thanks in advance! #clock #stm32f1 #config2015-04-29 05:25 AM
I'd imagine you'd select HSE/2 as the PLL Input, and 9 as the multiplier.
The F1 design has significantly less options for the clocking and is less complicated than the other platforms. The reference manual should illustrate the available settings, and diagrammed in the Clock Tree2015-04-29 10:38 AM
Yes I intented PLLMUL 9 and HSE/2...
However, it seems that I overlooked the HSE/2. I edited the device specific line (1056) to RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE | RCC_CFGR_PLLMULL9 | RCC_CFGR_PLLXTPRE);and now it works. I am not sure if this is the correct way to include the HSE/2 (RCC_CFGR_PLLXTPRE) but all clocks are working as they should.