STM32F103C8 Examples logo

STM32F103C8 Examples

Free

STM32F103C8 example projects covering a wide range of peripherals

FreeFree tier
Type
Open Source

About STM32F103C8 Examples

A collection of example programs for the STM32F103C8 microcontroller (commonly known as Blue Pill). Covers a wide range of peripherals including ADC, DMA, I2C, SPI, USART, PWM, USB (keyboard, mass storage, virtual COM port), timers, external interrupts, power management modes (sleep, stop, standby), watchdog, real-time clock (RTC), bootloader, and various sensors (BMP280, MS5611) and displays (Nokia5110, SSD1331, WG12864A). Also includes motor control examples for BLDC (sensorless and sensored), PMSM, and stepper motors. Written primarily in C with some C++, Makefile, and assembly. Provides a practical, hands-on resource for learning embedded development on the STM32 platform.

Key Features

Over 50 example projects for STM32F103C8
Covers ADC, DMA, I2C, SPI, USART, PWM, USB, and more
Includes sensor drivers (BMP280, MS5611) and display drivers (Nokia5110, SSD1331)
Motor control examples: BLDC (sensorless), PMSM, stepper
Power management examples: sleep, stop, standby, with RTC
Bootloader example for firmware updates
Written primarily in C with Makefile build system
Open source under the avislab repository on GitHub
965 stars and 553 forks indicating community popularity

Pros & Cons

Pros
  • Comprehensive coverage of common STM32 peripherals
  • Free and open-source with no licensing restrictions
  • Large collection of examples in one repository (55 commits)
  • Well-structured with separate folders for each example
  • Community-tested with high star and fork counts
Cons
  • No published releases or versioned documentation
  • Limited code comments or explanation beyond the code itself
  • Repository may not be actively maintained (no recent commits visible)
  • Examples are specific to STM32F103C8; not directly portable to other STM32 series without modification

Best For

Learning STM32 microcontroller programming and peripheral configurationRapid prototyping and reference for embedded projectsEducational resource for embedded systems coursesEvaluating STM32F103C8 capabilities before designing custom hardwareUnderstanding USB device implementations (keyboard, mass storage, virtual COM port)

FAQ

What microcontroller is this repository for?
The examples are specifically for the STM32F103C8 microcontroller, commonly found on the Blue Pill development board.
What programming language are the examples written in?
Most examples are written in C (99% of the repository), with some C++, Makefile, assembly, and PHP.
Does this repository include USB examples?
Yes, there are USB examples for keyboard, mass storage, and virtual COM port.
Are there examples for sensor interfacing?
Yes, there are examples for BMP280 (pressure/temperature) and MS5611 (pressure) sensors.