cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple port interrupts on the same pin (PA13 and PC13)

russ
Associate II
Posted on October 27, 2008 at 15:20

Multiple port interrupts on the same pin (PA13 and PC13)

2 REPLIES 2
russ
Associate II
Posted on May 17, 2011 at 12:49

Note: All external pending interrupts are reset before going to sleep.

russ
Associate II
Posted on May 17, 2011 at 12:49

I am trying to get both PA13 and PC13 to trigger rising edge interrupts to wake the system from a sleep state with two separate inputs. I have configured both channels, but only PC13 is triggering the interrupt.

I have other wake-triggering interrupts on other pins of Port A, and they work fine. The only one that isn't working is the one that shares the interrupt with Port C on pin 13.

My EXTI initialization code is as follows:

void EXTI_Configuration(void)

{

EXTI_InitTypeDef EXTI_InitStructure;

//IGNITION INPUT

/* Connect Ignition Button EXTI Line to Ignition Button GPIO Pin */

GPIO_EXTILineConfig(GPIO_PortSourceGPIOC, GPIO_PinSource13);

/* Configure Key Button EXTI Line to generate an interrupt on rising edge to wake up from standby */

EXTI_InitStructure.EXTI_Line = EXTI_Line13;

EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;

EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;

EXTI_InitStructure.EXTI_LineCmd = ENABLE;

EXTI_Init(&EXTI_InitStructure);

if (AUXILIARY_KEYFOB_ENABLED)

{

/* Connect Keyfob Button EXTI Lines to Keyfob Button GPIO Pins */

GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource11 | GPIO_PinSource12 | GPIO_PinSource13 | GPIO_PinSource15);

//USB AUX 3 INPUT

/* Configure Keyfob Button EXTI Line to generate an interrupt on rising edge to wake up from standby */

EXTI_InitStructure.EXTI_Line = EXTI_Line11;

EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;

EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;

EXTI_InitStructure.EXTI_LineCmd = ENABLE;

EXTI_Init(&EXTI_InitStructure);

//USB AUX 4 INPUT

/* Configure Keyfob Button EXTI Line to generate an interrupt on rising edge to wake up from standby */

EXTI_InitStructure.EXTI_Line = EXTI_Line12;

EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;

EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;

EXTI_InitStructure.EXTI_LineCmd = ENABLE;

EXTI_Init(&EXTI_InitStructure);

//NEG AUX 2 INPUT

/* Configure Keyfob Button EXTI Line to generate an interrupt on rising edge to wake up from standby */

EXTI_InitStructure.EXTI_Line = EXTI_Line13;

EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;

EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;

EXTI_InitStructure.EXTI_LineCmd = ENABLE;

EXTI_Init(&EXTI_InitStructure);

//NEG AUX 1 INPUT

/* Configure Keyfob Button EXTI Line to generate an interrupt on rising edge to wake up from standby */

EXTI_InitStructure.EXTI_Line = EXTI_Line15;

EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;

EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;

EXTI_InitStructure.EXTI_LineCmd = ENABLE;

EXTI_Init(&EXTI_InitStructure);

}

}