2012-10-12 03:53 AM
2012-10-12 04:30 AM
Doesn't sound like you're running at 168 MHz. Make sure HSE_VALUE is correct.
You could also address your fractional problems by picking better factors.TIM_TimeBaseStructure.TIM_Period
=
2000-1
;
TIM_TimeBaseStructure.TIM_Prescaler
=
0
;
2012-10-12 07:10 AM
Clive a thousand thanks! :D
Your help has saved me many times! :DI solved it by changing the value in the file PLL_N system_stm32f4xx.cPLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_NI'm new in the world of microcontrollers, and still do not understand things very well!you could tell me where I learn the meaning of PLL_VCO and PLL_N? oh maybe give me a brief explanation? thanks again for all your help!2012-10-12 08:33 AM
VCO stands for Voltage Controlled Oscillator, it runs very fast and is tuned up/down with a control voltage generated by a phase comparator. The comparison frequency for STM32F4 parts should fall in the 1-2 MHz range, your input source (aka reference) is divided down by PLL_M, the VCO clock is divided down by PLL_N. The comparison of phase acts as a feedback loop of the PLL (Phase Locked Loop)
Lock occurs when the control voltage, and the VCO, stabilize. PLL_P is a used to divide the VCO clock as an input into the CPU, typically at least 2 so that the processor has a symmetrical clock (ie 50/50 duty).2012-10-13 07:36 AM
very kind :D thanks