STM32 Basics Tutorial
Introduction
In this STM32 Basics Tutorial, you will learn to use GPIO, USB, SWD, UART, Timer and other peripherals of STM32 microcontroller. This tutorial is for beginners who are new to STM32 microcontroller. We will use STM32CubeMX to generate the code and arm-none-eabi-gcc to compile and stlink-tools or STM32CubeProgrammer to flash the code. See the installation.
For this tutorial, we are using STM32F407VGT6 microcontroller used in STM32F407VG-DISC1
board. You can use any other microcontroller as well. The basic concepts are same for all microcontrollers. Before we works on the microcontroller, we need to know about it.
About STM32F407VGT6
![]() STM32F407VGT6 |
![]() STM32F407VG-DISC1 |
Specification |
Details |
---|---|
Processor |
ARM Cortex-M4 |
Word length |
32-bit |
Max frequency |
168 MHz |
Type |
High performance |
Total pin count |
100 |
Typical operating voltage |
3.3 V |
Power supply voltage |
1.8 V - 3.6 V (Typical 3.3 V) |
Max power consumption |
240 mA |
Max I/O pins consumption |
25 mA each |
I/O pin voltage tolerant |
5 V |
RAM |
192 KB |
Flash |
1 MB |
You can find its features on STM32CubeMX. You also can find datasheet, reference mannual, schematic, footprints and other resources there.
About STM32F103C8T6
![]() STM32F103C8 |
![]() Bluepill |
Specification |
Details |
---|---|
Processor |
ARM Cortex-M3 |
Word length |
32-bit |
Max frequency |
72 MHz |
Type |
Mainstream performance |
Total pin count |
48 |
Typical operating voltage |
3.3 V |
Power supply voltage |
2.0 V - 3.6 V |
Max power consumption |
34 mA at 72 MHz |
Max I/O pins consumption |
25 mA each |
I/O pin voltage tolerant |
5 V |
RAM |
20 KB |
Flash |
64 KB (some variant have 128 KB) |
Warning
Many bluepills found in Nepal use STM32F103C6T6
microcontroller. It hass less memory and peripherals than STM32F103C8T6
.