AnsweredAssumed Answered

STM32F4 User Push Button Interrupt Issue

Question asked by singh.savi on Apr 6, 2014
Latest reply on Apr 6, 2014 by Clive One
Hey,

I'm currently working on a project for my class with the STM32F4 board, and am having difficulty trying to configure the user push button to cause an interrupt. I have used the F3 board a few times, and have made the same approach to configuring and handling the user button, however, can not get it to function correctly on the F4. 

- I am using the IAR Embedded Workbench IDE
- I have initialized the pin as follows:

STM_EVAL_PBInit(BUTTON_USER, BUTTON_MODE_EXTI);

- My interrupt handler is as follows:

void EXTI0_IRQHandler(void)
{
  if(EXTI_GetITStatus(EXTI_Line0) != RESET){
    button_push = 1; // Global variable
    EXTI_ClearFlag(EXTI_Line0);
  }
 
  EXTI_ClearITPendingBit(EXTI_Line0);
}

I apologize if I have left any other details out. I have tried to configure EXTI0 without the use of "STM_EVAL_PBInit", and still was unable to configure the button.

Any help would be much appreciated! Thanks!

Outcomes