2011-03-17 05:40 AM
Problem in setting the clock of my device .
2011-05-17 05:28 AM
2011-05-17 05:28 AM
You will need to look through Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c
Check the SetSysClockTo72() routine. This seems to have some hard coded expectations of a 25 MHz source clock. Perhaps step your way through it in the debugger. Look at the RCC->CFGR2, RCC->CFGR, RCC->CR PREDIV1 PLL PREDIV2 PLL22011-05-17 05:28 AM
2011-05-17 05:28 AM
Thank you Clive ,
Anyone from ST team to check this issue ? How to contact the ST support directly like that the case in microchip or TI?2011-05-17 05:28 AM
I think the assumption is that if your hardware design differs from the reference designs, you need to read the reference manual, and modify the library to suit your needs. The library source is provided as a starting point, so you can actually modify it.
You need to look at the RCC registers, compare their current settings to those described in the reference manuals, and do the math on the settings vs the input clocks. I'm not using the CL devices, but I don't think it would take long to look at the clock tree diagram, and program the PLL(s) to the appropriate values for your hardware. We're talking about modifying perhaps 5-6 lines of code.2011-05-17 05:28 AM
2011-05-17 05:28 AM
How did you calculate 23.04 MHz ,Clive ?
Thank you2011-05-17 05:28 AM
How did you calculate 23.04 MHz
I scaled the clocks, based on the oscillator the code thinks it's using (25 MHz), against the one you are actually providing (8 MHz). And the PLL setting to get 72 MHz. (72 / 25) * 8 = 23.04 ; How fast the PLL/CPU run with the wrong clock 25 / 8 = 3.125 ; How many times slower is your system/crystal 72 / 3.125 = 23.04Thank you again , but is there away to modify the library since it is locked ? If your files are marked READ ONLY, go change the properties of the Files/Folders2011-05-17 05:28 AM