cancel
Showing results for 
Search instead for 
Did you mean: 

2 Pins interrupts

raducara
Associate II
Posted on June 29, 2013 at 11:13

Hi , 

I have the following initialisation :

//ADXL interrupt port pin 

AFIO->EXTICR[0] |= AFIO_EXTICR1_EXTI2_PD;

EXTI->IMR |= EXTI_IMR_MR2;

EXTI->RTSR = EXTI_RTSR_TR2;

NVIC_EnableIRQ(EXTI2_IRQn);

//user alert button PA0 input pulled down by external resistor

AFIO->EXTICR[0] |= AFIO_EXTICR1_EXTI0_PA;

EXTI->IMR |= EXTI_IMR_MR0;

EXTI->RTSR = EXTI_RTSR_TR0;

NVIC_EnableIRQ(EXTI0_IRQn);

If i leave them both the interrupt for ADXL wont trigger . If i comment the pin init for the Button , the adxl interrupt is triggered when signal asserted .

What am i doing wrong ? 

I use ST32Discovery board with 32f100 uc
1 REPLY 1
raducara
Associate II
Posted on June 29, 2013 at 11:27

No more need for help . I found the mistake EXTI->RTSR = EXTI_RTSR_TR2; I didn;t used |= .