2009-09-15 12:39 AM
STM32F103RCT - USB CLock configuration
2011-05-17 04:23 AM
Hi All
Please forgive me if the answer to this is really obvious I'm a bit of a newbie and confused. I have a board with a STM32F103RCT designed in. It's crystal is 12MHz. I am trying to take the DfuSe (Device firmware upgrade) project from 'STM32_USB-FS-Device_Lib' USB projects and make it work on my hardware. I'm using the Keil RealView tools and have noticed that the USB Clock is not configured for 48MHz. I'm hoping someone can help or at least point me in the right directions. So far I've failed miserably to work out what I nned to look at/change. Thanks in advance Anbeyon2011-05-17 04:23 AM
fixed it
1. in hw_config.c -> set_system() change /* PLLCLK = 8MHz * 9 = 72 MHz */ RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); to /* PLLCLK = 12MHz * 6 = 72 MHz */ RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6); 2. For a correct USART Baudrate in stm32f10x_conf.h change #define HSE_Value ((u32)8000000) /* Value of the External oscillator in Hz*/ to #define HSE_Value ((u32)12000000) /* Value of the External oscillator in Hz*/