Minggu, 29 Maret 2026

STM32 Key Pins & Functions

The STM32 development board is a powerful microcontroller platform designed for embedded systems, industrial automation, and real-time applications. Below is a complete breakdown of its power system, GPIO capabilities, communication interfaces, and performance limits.


1. Power Distribution & Regulation

The STM32 typically operates at 3.3V logic, though some variants support 5V-tolerant inputs.

Section

Pins / Components

Function

Strategic Impact

Main Power Input

USB (Micro USB / USB-C)

5V DC from computer or adapter

Common method for development and debugging

Regulated Output

3.3V Pin

Provides stable 3.3V

Powers sensors like DHT22, OLED, BMP280

Ground

GND (multiple pins)

Electrical reference point

Ensures stable system operation

External Power Input

VIN / 5V Pin

Accepts 5V supply

Suitable for standalone systems

Voltage Regulation

Onboard Regulator

Converts 5V → 3.3V

Maintains safe voltage for MCU

Important Note
Most STM32 GPIO pins are 3.3V logic, but some are 5V tolerant (input only) depending on the series (e.g., STM32F1, STM32F4). Always check the datasheet.


2. Digital Control & Signal Processing

STM32 boards offer highly flexible GPIO with advanced peripheral functions.

Pin Type

Count / Labels

Logic Level

Capabilities & Impact

Digital I/O

30–100+ GPIO pins

3.3V

Control LEDs, relays, read sensors

PWM Output

Many GPIO pins

0–3.3V (PWM)

Motor control, LED dimming

Built-in LED

Varies (often PC13)

Onboard LED

Quick debugging

External Interrupts

Most GPIO

Event Trigger

Real-time response to events

ADC Input

Multiple pins

12-bit ADC

Analog sensor reading

DAC Output

Some models (e.g., STM32F4)

12-bit DAC

Generate analog signals

Timers

Advanced timers

High precision

Used in motor control, robotics


3. Typical STM32 GPIO Mapping (Example: STM32F103C8 “Blue Pill”)

Pin Label

GPIO

Primary Function

Resolution

Value Range

Real-World Impact

A0

PA0

ADC / Digital

12-bit

0–4095

Analog sensors

A1

PA1

ADC / Digital

12-bit

0–4095

Sensor input

A2

PA2

UART TX

Digital

0–3.3V

Serial communication

A3

PA3

UART RX

Digital

0–3.3V

Data reception

A4

PA4

SPI NSS

Digital

0–3.3V

SPI device select

A5

PA5

SPI SCK

Digital

0–3.3V

Clock signal

A6

PA6

SPI MISO

Digital

0–3.3V

Data input

A7

PA7

SPI MOSI

Digital

0–3.3V

Data output

B6

PB6

I2C SCL

Digital

0–3.3V

Clock line

B7

PB7

I2C SDA

Digital

0–3.3V

Data line

C13

PC13

Built-in LED

Digital

0–3.3V

Debugging LED

Additional Power & Control Pins

Pin Label

Function

Value Range

Real-World Impact

3.3V

Regulated Output

3.3V

Sensor power

5V

Input/Output

~5V

External power

GND

Ground

0V

Circuit reference

NRST

Reset Pin

LOW trigger

Restart MCU

BOOT0

Boot Mode Select

HIGH/LOW

Programming mode selection


4. Communication Protocols

STM32 supports a wide variety of communication interfaces, making it suitable for complex embedded systems.

Protocol

Pins Used

Description

Common Use Case

UART

TX/RX (varies)

Serial communication

Debugging, GPS, GSM

I2C

SDA, SCL

Two-wire communication

Sensors, RTC

SPI

MOSI, MISO, SCK, NSS

High-speed communication

Displays, SD cards

CAN

CAN_RX, CAN_TX

Industrial communication

Automotive systems

USB

D+, D-

Device/Host communication

PC interface

Ethernet

RMII (on some models)

Network communication

IoT gateways

SWD

SWDIO, SWCLK

Debugging interface

Programming & debugging


5. Memory & Performance Limits

STM32 microcontrollers come in many variants, but here is a general overview (e.g., STM32F1/F4 series):

Memory Type

Capacity

Role

Impact

Flash Memory

64KB – 1MB+

Firmware storage

Stores application code

SRAM

20KB – 256KB+

Runtime memory

Handles variables & stack

EEPROM

Limited / Emulated

Non-volatile storage

Stores configuration

Clock Speed

72 MHz – 180+ MHz

CPU frequency

Determines processing speed

CPU

ARM Cortex-M

Efficient processing

Real-time applications


Key Summary for Developers

Choosing STM32 means selecting a platform built for high-performance embedded systems and precise hardware control.

1 High Precision & Real-Time Control

STM32 is widely used in:

Industrial automation

Robotics systems

Motor control applications

Thanks to:

Advanced timers

Interrupt handling

Real-time processing capability


2 Flexible Communication Support

STM32 supports many protocols simultaneously:

UART, SPI, I2C

CAN for industrial systems

USB and Ethernet (on advanced models)

This makes it ideal for:

Multi-device communication

Complex sensor networks


3 Wide Range of Variants

STM32 family includes:

Low-power (STM32L series)

Mainstream (STM32F1, F4)

High-performance (STM32H7)

This allows developers to choose based on:

Power consumption

Performance needs

Project complexity


4 Large GPIO & Peripheral Ecosystem

Compared to simpler microcontrollers, STM32 offers:

Dozens of GPIO pins

Multiple ADC channels (12-bit or higher)

Hardware timers and PWM

DAC (in some models)

This enables advanced projects such as:

Smart control systems

Industrial monitoring

Embedded AI and signal processing

Robotics and automation systems

 

Minggu, 08 Maret 2026

ESP32 Key Pins & Functions

 

The ESP32 development board is a powerful microcontroller platform designed for Internet of Things (IoT), embedded systems, and wireless automation. Below is a complete breakdown of its power system, GPIO capabilities, communication interfaces, and performance limits.


1. Power Distribution & Regulation

The ESP32 operates internally at 3.3V logic, but the board allows several input power methods.

Section

Pins / Components

Function

Strategic Impact

Main Power Input

Micro USB

5V DC from computer or adapter

Most common method during development and firmware uploading

Regulated Output

3.3V Pin

Provides stable 3.3V

Powers sensors like DHT22, OLED, BMP280

Ground

GND (multiple pins)

Electrical reference point

Allows multiple modules to share common ground

External Power Input

VIN / 5V Pin

Accepts 5V external supply

Useful for battery packs or external power systems

Voltage Regulation

Onboard Voltage Regulator

Converts 5V → 3.3V

Protects ESP32 chip and maintains stable voltage

Important Note

ESP32 GPIO pins are NOT 5V tolerant.
All sensors connected directly must operate at 3.3V logic level.


2. Digital Control & Signal Processing

The ESP32 provides a large number of GPIO pins capable of multiple functions.

Pin Type

Count / Labels

Logic Level

Capabilities & Impact

Digital I/O

~34 GPIO pins

3.3V

Read switches or control LEDs, relays, sensors

PWM Output

Most GPIO pins

0–3.3V (PWM)

Used for motor speed control, LED dimming

Built-in LED

GPIO2 (often)

Onboard LED

Useful for quick debugging

External Interrupts

Most GPIO

Event Trigger

Allows immediate CPU reaction to sensors

DAC Output

GPIO25, GPIO26

8-bit DAC

Generates analog voltage signals

Touch Sensors

T0–T9 pins

Capacitive sensing

Used for touch buttons

Hall Sensor

Internal

Magnetic detection

Useful for magnetic sensing applications


3. Typical ESP32 GPIO Mapping

Below is a simplified commonly used ESP32 pin mapping for real-world projects.

Pin Label

GPIO

Primary Function

Resolution

Value Range

Real-World Impact

VP

GPIO36

Analog Input

12-bit ADC

0–4095

High precision analog sensors

VN

GPIO39

Analog Input

12-bit ADC

0–4095

Sensor data acquisition

D34

GPIO34

Analog Input Only

12-bit

0–4095

Input-only pin

D35

GPIO35

Analog Input Only

12-bit

0–4095

Sensor monitoring

D32

GPIO32

Digital / ADC / Touch

Digital

0–3.3V

Flexible GPIO usage

D33

GPIO33

Digital / ADC / Touch

Digital

0–3.3V

General purpose I/O

D25

GPIO25

DAC Output

8-bit

0–255

Analog signal generation

D26

GPIO26

DAC Output

8-bit

0–255

Audio / analog control

D27

GPIO27

Digital / Touch

Digital

0–3.3V

Sensors or switches

D14

GPIO14

SPI Clock

Digital

0–3.3V

SPI communication

D12

GPIO12

SPI MISO

Digital

0–3.3V

Receives SPI data

D13

GPIO13

SPI MOSI

Digital

0–3.3V

Sends SPI data

D23

GPIO23

SPI MOSI

Digital

0–3.3V

High-speed SPI output

D19

GPIO19

SPI MISO

Digital

0–3.3V

High-speed SPI input

D18

GPIO18

SPI Clock

Digital

0–3.3V

SPI timing

D5

GPIO5

SPI CS

Digital

0–3.3V

Device selection

RX

GPIO3

UART Receive

Serial

0–3.3V

Receives data

TX

GPIO1

UART Transmit

Serial

0–3.3V

Sends debug messages


Additional Power & Control Pins

Pin Label

Function

Value Range

Real-World Impact

3.3V

Regulated Output

3.3V

Power for sensors

VIN / 5V

External Input

~5V

Power from external supply

GND

Ground

0V

Reference for circuit

EN

Chip Enable

HIGH = active

Enables ESP32

RST

Reset Pin

LOW trigger

Restarts the ESP32


4. Communication Protocols

The ESP32 supports many communication interfaces, making it ideal for sensor networks and IoT systems.

Protocol

Pins Used

Description

Common Use Case

UART

TX (GPIO1), RX (GPIO3)

Serial communication

Debugging with Serial Monitor

I2C

GPIO21 (SDA), GPIO22 (SCL)

Sensor communication bus

OLED, RTC, temperature sensors

SPI

GPIO5,18,19,23

High-speed communication

Displays, SD cards

WiFi

Internal Radio

802.11 b/g/n

IoT cloud communication

Bluetooth

Internal Radio

BLE / Classic BT

Mobile device communication

CAN

GPIO4,5 (configurable)

Industrial communication

Automotive or robotics


5. Memory & Performance Limits

The ESP32 has significantly more processing power compared to ESP8266.

Memory Type

Capacity

Role

Impact

Flash Memory

4MB – 16MB

Firmware storage

Stores code, web files

SRAM

~520 KB

Runtime memory

Handles multitasking and networking

EEPROM (Emulated)

~4 KB

Non-volatile storage

Saves WiFi credentials or configuration

Clock Speed

240 MHz

CPU frequency

Fast data processing

CPU

Dual Core

Parallel processing

Multitasking applications


Key Summary for Developers

Choosing the ESP32 means selecting a platform designed for advanced IoT systems, automation, and real-time embedded processing.

1️ Integrated WiFi + Bluetooth

ESP32 supports both WiFi and Bluetooth, allowing direct connection to:

IoT cloud platforms

Mobile apps

Local wireless networks


2️ High Processing Performance

With a dual-core processor up to 240 MHz, ESP32 can:

Run web servers

Handle real-time sensor processing

Manage multiple communication protocols simultaneously


3️ Large GPIO & Peripheral Support

Compared to ESP8266, ESP32 provides:

More than 30 GPIO pins

12-bit ADC

2 DAC channels

Touch sensors

PWM on almost every pin

This allows complex systems like:

Smart notice boards

Weather monitoring stations

Smart home controllers

Robotics and automation systems