Skip to main content
mehdi23
Associate
July 8, 2013
Question

Using User Button on stm32f3 discovery

  • July 8, 2013
  • 2 replies
  • 1324 views
Posted on July 08, 2013 at 17:21

Hello

I'm new to stm32 and I'm now working on the stm32f3 discovery board with a 7-segment display.

I want to use the User Button to make the digit on the display increment whenever the button is pressed. But I couldn't figure out how to configure it. 

So I would appreciate if someone could help me with that.

thank you 

#display #external-interrupts-button #stm32f3 #gpio
This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
July 8, 2013
Posted on July 08, 2013 at 17:53

It's connected to GPIO PA0, configure that as an input or use the FW library, check STM_EVAL_PBInit() and STM_EVAL_PBGetState()

STM32F3-Discovery_FW_V1.1.0\Project\Peripheral_Examples\PWR_CurrentConsumption\main.c

Check also STM32F3-Discovery_FW_V1.1.0\Project\Peripheral_Examples\EXTI_Example which uses the button to generate an interrupt.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
mehdi23
mehdi23Author
Associate
July 9, 2013
Posted on July 09, 2013 at 16:28

Thank you for the response

I tried to follow the example on the Demonstration project on the stm32f3 but I couldn't figure out how even when using the STM_EVAL_PBInit but I missed something for sure.

I'll check out the examples and try to make it work. 

Have a nice day