cancel
Showing results for 
Search instead for 
Did you mean: 

External interrupts

Nmv1608
Associate II

The line where the external interrupt is set  SYSCFG->EXTICR [2] |= (3 << 12); I want to set it for port D pin 10. How the masking and unmasking is done for port D?

4 REPLIES 4

Which STM32?

JW

stm32l476 mcu

Bits 11:8 EXTI10[3:0]: EXTI 10 configuration bits

These bits are written by software to select the source input for the EXTI10 external 

interrupt. 

0000: PA[10] pin

0001: PB[10] pin

0010: PC[10] pin

0011: PD[10] pin

0100: PE[10] pin

0101: PF[10] pin

0110: PG[10] pin

so for PD10 you probably want

SYSCFG->EXTICR [2] |= (3 << 8); 

JW

Nmv1608
Associate II

Thank you for the answer.