Question
missing ADCPRE configuration in systeminit() ?
Posted on June 03, 2013 at 16:57
Hello everybody,
I set up the (new) 3.5.0 lib in our project and configured the clock (via &sharpdefine SYSCLK_FREQ_36MHz 36000000) but the ADCPRE register did not get configured correctly. I'm missing the part where ADCPRE gets configured. It seems it has its initial/default value ''00'' -> so PCLK2 will be divided by2 and this makes ADCCLK 18MHz(!) ADCCLK shall be 14MHz or less so i have to get the ADCPRE to ''4'' / ''01''. (-> 9MHz) We used lib V2.0.1 earlier and there was a statement like ''RCC_ADCCLKConfig(RCC_PCLK2_Div4);'' this was done in a non-ST function. Do i have to do this the same way? (like adding this statement in systeminit() ) or where is the part i'm missing? Thanks in advance! #rcc-adcpre-pcclk2-stdperiph_lib