做UC/os移植,做时钟节拍,在中断中,只有执行OSIntExit功能,系统就无论如何也进不了TIME1的时间中断了,但软中断可以执行。弄到头痛了都不知什么原因,郁闷中……
void T1TIMI_IRQHandler(void)
{
TIM_FlagClear ( TIM1 , TIM_OCFA ); //清输出比较中断标志
TIM_CounterConfig( TIM1 , TIM_STOP );
TIM_CounterConfig( TIM1 , TIM_CLEAR );
TIM_CounterConfig( TIM1 , TIM_START );
if(led_status)
{
GPIO_BitWrite ( GPIO2 , LED , 0 );
led_status = 0x00;
}
else
{
GPIO_BitWrite ( GPIO2 , LED , 1 );
led_status = 0x55;
}
OSIntEnter();
OSTimeTick();
OSIntExit();
//while(1); |