AnsweredAssumed Answered

HSI Clock Configuraion

Question asked by amer.sherif.001 on Jan 28, 2013
Latest reply on Jan 29, 2013 by Clive One

I'm using stm32f10xc4, low density value line, it supports an HSE of 8 MHz, my hardware has 20 MHz which is wrong and that's the reason why the clock configuration doesn't go properly - i guess -.

So i tried to get the HSI through the PLL, the target is to reach 24MHz.

Here's my code, but it still doesn't work!

     /* Enable Internal High Speed oscillator */

     /* Set PLL clock output to 24MHz using HSI (8MHz) as entry clock */
     RCC_PLLConfig(RCC_PLLSource_HSI_Div2, RCC_PLLMul_6);

     /* Select the PLL as system clock source */

     /* Enable the PLL */

     /* Output PLL clock divided by 2 on MCO pin */

     /* Configure HCLK such as HCLK = SYSCLK */

     /* Configure PCLK1 such as PCLK1 = HCLK/2 */

     /* Configure PCLK2 such as PCLK2 = HCLK */

     /* Configure ADCCLK such as ADCCLK = PCLK2/2 */

The while(1) inside main contains this:
     GPIO_WriteBit(GPIOB, GPIO_Pin_0, Bit_SET);
     GPIO_WriteBit(GPIOB, GPIO_Pin_0, Bit_RESET);
to measure the frequency, i'm exposing PB.0 to scope.

I tried to use this one but didn't work out either, gave me an unavailable item when watched.
     RCC_ClocksTypeDef RCC_Clocks;

Any idea?