Using External Interrupts WIU

Hi,

I am using the STR912FA44 and I am trying to use two external interrupts of the same port but for some reason it doesn't work.
Both interrupts work properly when used separated but when used together it just doesn't work, I don't get any interrupt anymore.
The interrupt lines are WIU_Line8 and WIU_Line9 that correspond to the Port5 pin 0 and pin 1.
This is my code:

Port/pin declaration:

// GPIO 5
SCU_APBPeriphClockConfig(__GPIO5, ENABLE);
SCU_APBPeriphReset(__GPIO5, DISABLE);
GPIO_DeInit(GPIO5);
// SJA1000 Chip Interrupts
GPIO_InitStructure.GPIO_Direction = GPIO_PinInput;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1;  // INT_1, INT_2  // lines 8 and 9
GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Disable;
GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ;
GPIO_Init (GPIO5, &GPIO_InitStructure);


Interrupt Initialization:


WIU_Cmd(ENABLE );
WIU_ClearITPendingBit(WIU_Line8); // EXT Group 1 Port 5.0 -> INT_CAN1
WIU_ClearITPendingBit(WIU_Line9); // EXT Group 1 Port 5.1 -> INT_CAN2
WIU_StructInit(&WIU_InitStructure);
WIU_InitStructure.WIU_Line = WIU_Line8|WIU_Line9;
WIU_InitStructure.WIU_TriggerEdge = WIU_FallingEdge ;
WIU_Init(&WIU_InitStructure);
SCU_WakeUpLineConfig(9);
SCU_WakeUpLineConfig(8);
/* Configure the External interrupt group 1 priority as IRQ interrupt */
VIC_Config(EXTIT1_ITLine, VIC_IRQ, 6);
/* Enable the External interrupt group 1 */
VIC_ITCmd(EXTIT1_ITLine, ENABLE);

In case that in not possible to use two wake up lines in the same port, what is the alternative besides using different ports?
Thanks for your help!

Milton

Parents Reply Children
No data
More questions in this forum