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