Welcome to the STM32-HAL repository!
This repository contains hands-on STM32 example projects, covering HAL drivers, peripherals, FreeRTOS, Ethernet, IoT, Modbus TCP, and more.
All projects are designed for beginners and professionals to learn embedded development efficiently.
Most STM32 examples are tested on F1, F4, H7 series boards.
- Blocking Transmit
- Interrupt Transmit/Receive
- DMA Transmit/Receive
- Idle Line Detection
- Single Wire Communication
- 1-Wire Protocol
- LIN Protocol (Parts 1–3)
- Single Channel Polling
- Single Channel Interrupt/DMA
- Multi-Channel DMA (Normal & Circular)
- Multi-Channel without DMA
- ADC Conversion Time
- External Trigger & Injected Conversion
- PWM Generation
- Measure PWM Input
- Encoder Mode
- Timer Sync / Slave / Reset
- 48-bit Counter
- Task Creation & Priorities
- Semaphores (Binary/Counting)
- Queues
- Mutex
- Software Timers
- W5500 TCP Server, DHCP, Static IP
- STM32 LWIP Projects (HTTP Server, TCP/UDP)
- Modbus TCP Examples
- ESP8266 WiFi Projects with STM32
- ESP8266 MQTT & IoT Projects
- STM32 LVGL Series
- TouchGFX Series
- SPI and I2C Displays
- SPI and QSPI FLash Tutorials
- STM32 FLash Programming Series
- SD Card Interfacing
- STM32: STM32CubeIDE, HAL Drivers (CubeMX generated)
- Boards Tested: STM32 F1, F4, H7
- Project Structure: Each folder contains a complete project with README and optional diagrams
STM32-HAL/
├── uart/ # UART communication examples (blocking, interrupt, DMA, LIN, etc.)
├── adc/ # ADC projects (single channel, multi-channel, DMA, external triggers)
├── timers/ # Timer examples (PWM, input capture, encoder mode, timer sync)
├── freertos/ # FreeRTOS projects (tasks, semaphores, queues, mutex, software timers)
├── ethernet/ # Ethernet & networking projects
│ ├── w5500/ # W5500 Ethernet TCP/UDP, DHCP, static IP examples
│ └── lwip/ # STM32 LWIP stack projects (HTTP server, TCP/UDP communication)
├── iot/ # IoT & ESP projects
│ ├── esp8266/ # ESP8266 WiFi projects and IoT examples
│ └── esp32/ # ESP32 projects (MQTT, TCP/UDP, IoT)
├── modbus/ # Modbus TCP / RTU projects
└── README.md # Main repository overview
Each folder contains:
- Complete project files
- README for that example
- Images, diagrams, or wiring references
Step-by-step guides and detailed explanations are available at Controllerstech:
All examples are provided for educational purposes.
You are free to use and adapt them for learning or personal projects.