LED Blink with STM32Cube Framework
Let's blink an LED on the Blackpill STM32 board using the STM32Cube framework.
STM32Cube Framework
With STM32Cube framework, you can access the full power of the STM32 microcontroller. The STM32Cube framework provides low-level access to the STM32 hardware, allowing you to write code that is more efficient and optimized for performance.
Prerequisites
In this tutorial, the following hardware is used:
Blackpill STM32 board
MCU: STM32F411CEU6
Board: WeAct Black Pill V2.0
Schematic
You can purchase a cheap clone Blackpill STM32 board under $4. You can use other STM32 boards, but you need to modify platformio.ini file and the LED pin number.
ST-LINK V2 Programmer
You need this to upload the firmware to the board. You can purchase a cheap clone ST-LINK V2 under $5.
Installation
VScode with PlatformIO
You can install PlatformIO from the VSCode extension marketplace.
STM32CubeProgrammer
You need this to flash the firmware to the board.