SRT912中断异常

[复制链接]
2763|2
 楼主| whredmaple 发表于 2009-3-3 09:59 | 显示全部楼层 |阅读模式
我的SRT912中断异常,连续下降沿中断,会出现死机,连续上升沿中断会出现部分中断丢失
我的中断配制程序:

void SetRFEdage(int fall)
{
        /*DCLK(P5.2)  pin configuration */
         GPIO_InitTypeDef GPIO_InitStruct;
    WIU_InitTypeDef WIU_InitStructure;

    if(fall==1)
    {
       //Set DCLK INT in falling edge
       WIU_ClearITPendingBit(WIU_Line10 );
          WIU_InitStructure.WIU_Mode = WIU_Mode_Interrupt ;
          WIU_InitStructure.WIU_Line = WIU_Line10 ;
          WIU_InitStructure.WIU_TriggerEdge = WIU_FallingEdge ;
          WIU_Init(&WIU_InitStructure);

         /* Configure the External interrupt group 3 priority */
        VIC_Config(EXTIT1_ITLine, VIC_IRQ, 11);

         
         /* Enable the External interrupt group 3 */
      VIC_ITCmd(EXTIT1_ITLine, ENABLE);    
              SCU_WakeUpLineConfig(10); 

         //Set DIO--P2.7 as output    
          GPIO_StructInit(&GPIO_InitStruct);
          GPIO_InitStruct.GPIO_Direction = GPIO_PinOutput;
          GPIO_InitStruct.GPIO_Pin = GPIO_Pin_7;
          GPIO_InitStruct.GPIO_Type = GPIO_Type_PushPull ;
          GPIO_InitStruct.GPIO_Alternate = GPIO_OutputAlt1;
          GPIO_Init (GPIO2, &GPIO_InitStruct); 
    
    }
    else 
    {
      //set DCLK INT on rising edge
           WIU_ClearITPendingBit(WIU_Line10 );
           WIU_InitStructure.WIU_Mode = WIU_Mode_Interrupt ;
           WIU_InitStructure.WIU_Line = WIU_Line10 ;
           WIU_InitStructure.WIU_TriggerEdge = WIU_RisingEdge ;
           WIU_Init(&WIU_InitStructure);

      /* Configure the External interrupt group 3 priority */
            VIC_Config(EXTIT1_ITLine, VIC_IRQ, 11);
      
         /* Enable the External interrupt group 3 */
          VIC_ITCmd(EXTIT1_ITLine, ENABLE);    
          SCU_WakeUpLineConfig(10); 

       //Set DIO--P2.7 as input       
       GPIO_StructInit(&GPIO_InitStruct);
       GPIO_InitStruct.GPIO_Direction = GPIO_PinInput;
         GPIO_InitStruct.GPIO_Pin = GPIO_Pin_7; 
          GPIO_InitStruct.GPIO_Type = GPIO_Type_PushPull ;
       GPIO_Init (GPIO2, &GPIO_InitStruct);          
      
    }



void EXTIT1_IRQHandler(void)
{

     InterruptHandler();
     WIU_ClearFlag(WIU_Line10);
}
 楼主| whredmaple 发表于 2009-3-3 12:47 | 显示全部楼层

要是改成FIQ中断方式,如何修改?

VIC_Config(EXTIT1_ITLine, VIC_IRQ, 11);
只改这行,没有效果
liuzheng2k 发表于 2009-12-14 22:59 | 显示全部楼层
中断程序也要修改啊就是91x_it.c
您需要登录后才可以回帖 登录 | 注册

本版积分规则

22

主题

69

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部