Keil Logo

Example Programs

The Keil MDK-ARM Development Tools download includes several example programs that are configured for the Keil MCBSTM32C Board.

All examples are configured for two µVision targets:

  • Simulator - where the program runs in the software simulator.
  • MCBSTM32C - where the program runs from internal Flash located on the microcontroller.

All examples use the same file structure:

  • Abstract.txt contains a short description of the example.
  • system_stm32fxxx.s contains the startup code for the microcontroller.
  • Example dependent source code.


  • STMicroelectronics provides a firmware library with sample code (C sources) but the examples described here do not use this library (except LCD driver) to keep the executable as small as possible.

Each example program is stored in a separate folder in \KEIL\ARM\BOARDS\KEIL\MCBSTM32C\ along with project files that help you quickly build the project and run the program.

The following example program is installed automatically:

    The Blinky project shows the combination of configuring peripherals via STM32_Init.c and own initialization functions. GPIO, USART and timer are configured via STM32_Init.c. DMA and ADC are set up with a seperate initialisation function. The LEDs blink with a speed depending on potentiometer position. SysTimer is used in interrupt mode and ticks every 10ms. The color LCD display shows init message and bargraph depending on potentiometer position. AD value is output onto serial port USART2 (115200 baud, 8 data bits, no parity, 1 stop bit) and LCD. AD is used with DMA and 12 bit resolution.


  • More example projects and programs are available for Keil MCBSTM32 Board and it is easy to port these examples to Keil MCBSTM32C Board. Main difference between the boards are the LCD, the Push Buttons which are connected to different GPIO Ports and the use of an other USART.
  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

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.