这个程序运行到EIC_IRQConfig( ENABLE );就不执行了,屏蔽掉可继续执行,但不能中断了,不知道是哪里出错了?还请指教。
LCD_Init(); AD_Init();
TIM_Init(TIM0); EIC_Init();
TIM_PrescalerConfig(TIM0, 0x0); TIM_ITConfig(TIM0, TIM_TO_IT, ENABLE); TIM_OCMPModeConfig(TIM0, TIM_CHANNEL_A, 0x01, TIM_TIMING, TIM_HIGH); TIM_CounterConfig(TIM0, TIM_STOP); TIM_CounterConfig(TIM0, TIM_CLEAR); EIC_IRQChannelPriorityConfig( T0TIMI_IRQChannel,2); EIC_IRQChannelConfig( T0TIMI_IRQChannel, ENABLE ); GPIO_Config(GPIO0,0X0040,GPIO_IN_TRI_TTL); XTI_Init(); XTI_LineModeConfig(XTI_Line11, XTI_FallingEdge); XTI_LineConfig(XTI_Line11, ENABLE); XTI_ModeConfig(XTI_Interrupt, ENABLE); EIC_IRQChannelPriorityConfig(XTI_IRQChannel,3); EIC_IRQChannelConfig(XTI_IRQChannel,ENABLE); //EIC_IRQConfig( ENABLE ); |