AnsweredAssumed Answered

STM32F107 TIMERs

Question asked by rodriguey.pablo on Sep 23, 2011
Latest reply on Sep 23, 2011 by zivkovic.dragan
Hello again,
This time with a problem in setting the times.
I have a simple application that after the main call the SystemInit() function which set all the timers. This function is inside the system_stm32f10x.c file. Look at the code inside, I see:

#define SYSCLK_FREQ_72MHz  72000000

#elif defined SYSCLK_FREQ_72MHz
 const uint32_t SystemFrequency         = SYSCLK_FREQ_72MHz;      /*!< System Clock Frequency (Core Clock) */
  const uint32_t SystemFrequency_SysClk  = SYSCLK_FREQ_72MHz;      /*!< System clock                        */
  const uint32_t SystemFrequency_AHBClk  = SYSCLK_FREQ_72MHz;      /*!< AHB System bus speed                */
  const uint32_t SystemFrequency_APB1Clk = (SYSCLK_FREQ_72MHz/2);  /*!< APB Peripheral bus 1 (low)  speed   */
  const uint32_t SystemFrequency_APB2Clk = SYSCLK_FREQ_72MHz;      /*!< APB Peripheral bus 2 (high) speed   */


and finally, the call to the SetSysClockTo72() function at the bottom of the file. In summary, after calling this function, the system clock should be set to 72MHz.

If I call RCC_GetClocksFreq(&RCC_Clocks) just after callingSystemInit() and I use the debugger, I can see this numbers:

SYSCLK_Frequency=4182367265
HCLK_Frequency=2124520693
PCLK1_Frequency=1051260827

The question is: shouldn't I see SYSCLK_Frequency equal to 72000000 or similar? and why these numbers in term s of billions and millions, as maximum 72?

thanks for any help.



Outcomes