cancel
Showing results for 
Search instead for 
Did you mean: 

Loop problem on an STM32F4 Discovery

aurelio
Associate
Posted on October 22, 2014 at 11:17

Hi guys, I'm Aurelio, I'm 22 and I'm from Italy 🙂

Yesterday I bought an STM32F407VGT6 Discovery board, but I have a strange problem. I wrote this simple code to light the LEDs on the board when the user button is pressed:

http://pastebin.com/NxesBc5f

Now the problem is that the while loop doesn't work: when I press the button nothing happen, but if I hold it down and then I reset the board the LEDs turn on and stay on even if I release the button, just like the code in the while loop is executed one time only.

Another strange thing is that if I debug the code it works really well...

I don't know what to do... Can you help me?

Thank you
0 REPLIES 0