Trivial, instructive examples in C for STM32CubeMX and Atollic TrueSTUDIO, executable on an STM32F103C8 Blue Pill board (LED on PC13).

STM32F103C8T6 Blue Pill.

I2C – Demonstrates very rudimentary output to, and input from, a device connected by the I2C peripheral and bus.

ADC DMA – Demonstrates scan mode ADC conversion of multiple input voltages, DMA transfer of samples to memory, and output to PWM peripheral.

ADC TIM – Demonstrates timer output based, periodic ADC conversion of voltage input, with conversion output to PWM peripheral.

ADC Single – Demonstrates ADC single conversion of voltage inputs, with conversion output to PWM peripheral.

TIM PWM Output – Demonstrates PWM output using a timer peripheral.

USB VCOM – Demonstrates the USB peripheral serial communications, whilst configured as a virtual COM port.

Printf UART – Demonstrates formatted asynchronous UART serial output using printf() function.

UART DMA – Demonstrates asynchronous UART communication with DMA control of receive buffer.

Sleep EXTI – Demonstrates low power sleep mode, with wake from sleep on external interrupt .

SysTick TIM1 – Demonstrates timer TIM1 employed as HAL time-base source, displacing the intrinsic system tick timer.

GPIO INT – Demonstrates interrupt-driven IO. Each time the BOOT1 input is grounded, the LED output is toggled during interrupt.

Blinky – Simple LED output flasher. A handy Blue Pill board support starter template.