1
STM 32 Networking
●CourseTitle: Embedded Systems & IoT
●Course Code: CSE233
PREPARED BY:
Muha. Humayet Islam
Lecturer, Dept. of CSE, DIU
CSE233@DIU, SPRING 2025
2.
2
Overview ofSTM32
STM32 Development Environment
Setting up the First STM32 Project
STM32 Microcontroller Architecture
Interrupts in STM32
STM32 Peripherals and Communication Protocols
Power Management and Low-Power Modes
Debugging and Troubleshooting
Agenda
3.
3
Overview of STM32
STM32is a family of 32-bit microcontrollers from
STMicroelectronics, based on ARM Cortex-M cores.
It includes various series like
• STM32F0 (entry-level),
• STM32F4 (high-performance),
• STM32L (low-power), and others.
STM32 offers a wide range of peripherals, power
management features, and processing power,
making it suitable for embedded applications.
4.
4
Overview of STM32
STM32F103C8T6Full Form & Meaning:
“Blue Pill” or STM32F103C8T6 name has a meaning
behind it.
STM – stands for the manufacturer’s name
STMicroelectronics
32 – stands for 32-bit ARM architecture
F103 – stands to indicate that the architecture ARM
Cortex M3
C – 48-pin
8 – 64KB Flash memory
T – package type is LQFP
6 – operating temperature -40°C to +85°C
5.
5
STM32 Nucleo-64
• SupportsArduino and ST morpho connectivity
• ARDUINO®
Uno V3 expansion connector
• 32.768 kHz crystal oscillator
• 1 user and 1 reset push-buttons
• 24 MHz or 48 MHz HSE
• USB Type-C®, Micro-B, or Mini-B connector for the ST-
LINK
• CAN FD header
• Memories: 256kB Flash, 48kB RAM
6.
6
Why use stm32over Arduino?
Uno STM32 Blue Pill
Pricing $20-23 $3-5
I/O Pins 14 37
PWM Pins 6 15
Analog In Pins 6 10
Flash Memory 32 kB 64 kB
SRAM 2 kB 20 kB
Clock speed 16 MHz 72 MHz
Voltage Level 5V 3.3 V
USB Connectivity Standard A/B USB Micro-USB
Hardware Serial Ports 1 3
I2C Support Yes (1x) Yes (2x)
7.
7
STM32 Development Environment
TopIDEs for STM32 Development:
• Keil MDK (Microcontroller Development Kit)
• STM32CubeIDE
• PlatformIO with VSCode
• Atollic TrueSTUDIO
• IAR Embedded Workbench
• Eclipse IDE for STM32 Development
STM32CubeIDE
STM32CubeIDE is an official IDE developed by STMicroelectronics, specifically tailored for STM32
microcontrollers. It offers seamless integration with STM32CubeMX, a graphical tool for hardware
configuration, which speeds up the initialization process. The IDE is based on Eclipse and provides an
extensive range of plugins to enhance productivity. Moreover, STM32CubeIDE comes with advanced
debugging features like runtime variable monitoring and data visualization.
8.
8
ARM Architecture
ARM standsfor Advanced Risk
Machine.
It is one of the most popular
architectures used in devices like
cameras, mobile phones and
embedded system devices.
These are known for their low-
power-consumption vs better
performance abilities.
9.
9
STM32 project toblink an LED
while (1)
{
// Toggle the LED
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);
// Wait for 500 ms
HAL_Delay(500);
}