Keil Logo Arm Logo

STM32 General-Purpose I/O Example

The STM32 GPIO example program shows how to configure and use the GPIO ports of STMicroelectronics STM32F103xx microcontroller.

Pins PB8..PB15 (LEDs) are configured as output and pins PA0 (S2) and PC13 (S3) are configured as input. By pressing buttons S2 or S3 the lit LED moves to the left or to the right.

The configuration of the clocks and the GPIO ports is done using the Configuration Wizard in file STM32_Init.c.

Two µVision targets are available:

  • Simulator where the program runs in the software simulator. A debug script (gpio.ini) is used to simulate the buttons S2, S3.
  • MCBSTM32 where the program runs from internal Flash located on the microcontroller.

The example is tesed with the Keil Evaluation Board MCBSTM32.

STM32_GPIO.ZIP (31K)
Thursday, February 12, 2009

Estimated File Download Time:
< 10 Seconds: 56Kb Modem
< 10 Seconds: 128Kb ISDN
< 10 Seconds: T1/Broadband

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings