thanks for your replay. I already used GPIO_EXTILineConfig(port, pin) to set up the right port pin. But this was not working. After a closer look on this function i found that the parameter are not port and pin, i.e. GPIOB and GPIO_Pin_7. Instead of this they have to be GPIO_PortSourceGPIOB and GPIO_PinSource7 in this case. And with this it works like expected. I was only a bit confused because the function was working (or even not working) with the wrong parameters without any error message. I would have expect a compiler error. Best regards Tom