外部晶振是8M,现在7分频,计数 1,但结果是差不多8us,请问这是什么问题?
CLK_HSECmd(ENABLE);//外部时钟开
CLK_ClockSwitchCmd(ENABLE); //切换使能
CLK_ClockSwitchConfig(CLK_SWITCHMODE_AUTO ,CLK_SOURCE_HSE,DISABLE,CLK_CURRENTCLOCKSTATE_DISABLE);//切换配置
/* TIM1 Peripheral Configuration */
TIM1_DeInit();
/* Time Base configuration */
TIM1_ARRPreloadConfig(ENABLE);
TIM1_TimeBaseInit(0x07, TIM1_COUNTERMODE_UP,1, 0);
TIM1_ITConfig(TIM1_IT_UPDATE ,ENABLE);
enableInterrupts();
/* TIM1 counter enable */
TIM1_Cmd(ENABLE); |