AnsweredAssumed Answered

STM32F4Discovery external interrupt problem

Question asked by sisickij.lich on May 13, 2013
Latest reply on May 13, 2013 by Clive One
Hello,
I have a problem with external interrupts on STM32F4Discovery triggered via push-button. The button is connected to pin PA4 using the same technique used for USER button (the picture is from the user manual):
http://img248.imageshack.us/img248/8849/stm32f4discoveryuserbut.png
The external interrupt is generated and the switch button performs its function, but the problem is that the interrupt is generated not only via pushing the button, but for example by touching only one of the legs of the push-button with a multimeter probe or by touching certain individual pins (not short circuiting several pins with a probe, but touching only one) on the board (e.g. PORTA pins, which are left unconfigured in the code). I am posting the relevant code portion:
void EXTI4_IRQHandler(void){
    if(EXTI_GetITStatus(EXTI_Line4) != RESET)
    {
        GPIO_ToggleBits(GPIOD, GPIO_Pin_14);
          
    EXTI_ClearITPendingBit(EXTI_Line4);
    
}
void init_func(void){
//output omitted
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
//pin init
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
GPIO_Init(GPIOA, &GPIO_InitStructure);
         
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA, EXTI_PinSource4);
  
//exti4 init
EXTI_InitStructure.EXTI_Line = EXTI_Line4;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);
      
//nvic exti4 init
NVIC_InitStructure.NVIC_IRQChannel = EXTI4_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
//output omitted
}
Perhaps you can help?

Outcomes