cancel
Showing results for 
Search instead for 
Did you mean: 

DISABLE/ENABLE EXTI interrupt

khouja_houssem
Associate II
Posted on April 09, 2013 at 15:34

I need to DISABLE EXTI interrupt inside EXTI_IRQ_Handler and re-ENABLE it later through my code. Is there a way to do that?

1 REPLY 1
Posted on April 09, 2013 at 15:45

Disabling, using parameters per Init routine

uint32_t tmp = (uint32_t)EXTI_BASE;
tmp += EXTI_InitStruct->EXTI_Mode; // Nominally EXTI_Mode_Interrupt;
/* Disable the selected external lines */
*(__IO uint32_t *) tmp &= ~EXTI_InitStruct->EXTI_Line; // EXTI_LineX

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..