cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Clock config

Birdo
Associate II
Posted on October 24, 2013 at 16:13

Hi there,

Lately I'm experimenting with the STM32FXXX. Now I came across a problem when I want to configurate the ADC clock. I want to use the maximum frequency that is possible for the ADC. The manual says that the maximum clock frequency for the ADC is 14MHz.

I also want to use the maximum speed for my systemclock which is 72MHz. When I want to scale the ADC clock to 14MHz I can only devide by 2,4,6,8 of 72MHz. This results into 18MHz or 12MHz for the ADC clock.

Will the ADC clock works at 14MHz if it is set at 18MHz? Or will I get some trouble afterwards?

void RCC_Configuration(void) {

RCC_HSICmd(ENABLE);

FLASH_SetLatency(FLASH_Latency_2);

RCC_PLLConfig(RCC_PLLSource_HSI_Div1, RCC_PLLMul_9);

RCC_PLLCmd(ENABLE);

while (RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET);

RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

RCC_HCLKConfig(RCC_SYSCLK_Div1);

RCC_PCLK1Config(RCC_HCLK_Div2);

RCC_PCLK2Config(RCC_HCLK_Div1);

}

2 REPLIES 2
Posted on October 24, 2013 at 18:39

Will the ADC clock works at 14MHz if it is set at 18MHz? Or will I get some trouble afterwards?

I'm not sure I understand the question. The clock will be at the rate you set it, it won't magically transform into something else.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
raptorhal2
Lead
Posted on October 25, 2013 at 04:15

I think Clive1 is trying to get you to ask the question correctly.

You will be using the ADC outside of it's specified guaranteed clock frequency range. That means you are on your own if it doesn't work.

Cheers, Hal