新手上路
- 积分
- 34
- 金钱
- 34
- 注册时间
- 2015-6-9
- 在线时间
- 0 小时
|
5金钱
中断函数如下:
void TIM4_IRQHandler(void)
{
if ( TIM_GetITStatus(TIM4 , TIM_IT_Update) != RESET )
{
time++;
if(number == time)
{
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2,DISABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4,DISABLE);
time = 0;
number = 0;
}
TIM_ClearITPendingBit(TIM4 , TIM_FLAG_Update);
}
}
在TIM4的溢出中断中,我已经将TIM4时钟的RCC关闭了,但是程序还一直在TIM4的 TIM_GetITStatus(TIM4 , TIM_IT_Update)中循环,请问一下是什么原因? |
|