|
RCC_HCLKConfig(RCC_SYSCLK_Div1); RCC_PCLK2Config(RCC_HCLK_Div1); RCC_PCLK1Config(RCC_HCLK_Div2); RCC_ADCCLKConfig(RCC_PCLK2_Div4); RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);
SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK); SysTick_SetReload(72000);
TIM_TimeBaseStructure.TIM_Period = 9000; TIM_TimeBaseStructure.TIM_Prescaler = 4; TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Down; TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure); 我这样配置的时钟,可是SysTick比TIM3跑的快,这是为什么
|
|