This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interrupt problem = using External Interrupts

Hi,

I am trying to use External Interrupts in a program where I have already several active interrupts and modules.
It happens that after I make the pin description for this external interrupt, any of the VIC interrupts occur anymore?!?

GPIO_InitStructure.GPIO_Direction = GPIO_PinInput;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1; //lines 8 and 9
GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ;
GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Enable; // HERE IS THE PROBLEM!!
GPIO_Init (GPIO5, &GPIO_InitStructure);

So if I use IPConnected enable the interrupt stop working, if I use disable the external interrupt doesn't work properly.
After reading about it, it looks that there is a error in the library according to the errata and ST sugest us to use a Dummy_handler:


void Dummy_Handler(void)
{
VIC0->VAR = 0xFF;
VIC1->VAR = 0XFF;
}


void VIC_InitDefaultVectors(void)
{
VIC0->DVAR = (u32)Dummy_Handler;
VIC1->DVAR = (u32)Dummy_Handler;
}

But for me still doesn't work.
Does anyone have a clue what is going on??

Thanks

Parents
  • Hi, I have exactly the same problem as well and I don not use switches ... The interrupt is triggered two times for no reason.
    On top of this I work with a couple of interrupts dealing with the WIU interrupt witch only serve the first line in the handler ...

    void WIU_IRQHandler(void)
    {
    vu32 a=0;
    a= VIC1->VAR;
    
    if (WIU_GetITStatus(WIU_Line8)==SET)
        {
            ExtInt1Handler(1);
            WIU_ClearITPendingBit(WIU_Line8);
        }
    
    
    
    if (WIU_GetITStatus(WIU_Line9)==SET)
        {
            ExtInt1Handler(2);
            WIU_ClearITPendingBit(WIU_Line9);
        }
    
    /*write any value to VIC1 VAR*/
    VIC1->VAR = 0xFF;
    }
    
    

    Thanks

Reply
  • Hi, I have exactly the same problem as well and I don not use switches ... The interrupt is triggered two times for no reason.
    On top of this I work with a couple of interrupts dealing with the WIU interrupt witch only serve the first line in the handler ...

    void WIU_IRQHandler(void)
    {
    vu32 a=0;
    a= VIC1->VAR;
    
    if (WIU_GetITStatus(WIU_Line8)==SET)
        {
            ExtInt1Handler(1);
            WIU_ClearITPendingBit(WIU_Line8);
        }
    
    
    
    if (WIU_GetITStatus(WIU_Line9)==SET)
        {
            ExtInt1Handler(2);
            WIU_ClearITPendingBit(WIU_Line9);
        }
    
    /*write any value to VIC1 VAR*/
    VIC1->VAR = 0xFF;
    }
    
    

    Thanks

Children
No data