打印

SRT912中断异常

[复制链接]
1967|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

粉丝