AnsweredAssumed Answered

GPIO example from STM32F2 Cube question

Question asked by ed@mtrx on Aug 8, 2014


I am using a STM3221G-EVAL board from ST. Attached is the IAR project I downloaded from the STM32CubeF2 folder that examples the GPIO.

The example uses 2 Pushbuttons, KEY and WAKEUP to turn ON 2 LEDs on the board. It also utilize the EXTI interrupt module to sense the switches.

The issue that I have is that the KEY pushbutton works but the WAKEUP button works erratically.  I can't figure it out why. Both buttons got similar code. When I debug the code, It looks like the clearing of the interrupt flag for WAKEUP doesn't happen consistently, sometimes happens sometimes don't. So it will toggle the LED twice per push, producing the effect that the LED actually doesn't turn when pressing the button.

Any ideas?