UART Serial Communication
From serial protocol principles to interrupt-driven reception, building an STM32 UART driver and command processor with modern C++23.
Phase 1: Motivation
- Part 31: From Buttons to Serial — Why UART is the cornerstone of embedded communication
Phase 2: Hardware Fundamentals
- Part 32: UART Protocol in Detail — How to synchronize without a clock line
- Part 33: STM32 USART Peripheral — The serial engine inside the chip
Phase 3: HAL + Blocking I/O
- Part 34: HAL Initialization and Transmission — Making the chip speak
- Part 35: printf Redirection and Blocking Reception — Making the chip speak with printf, and teaching it to listen
Phase 4: Interrupt-Driven
- Part 36: Interrupt Fundamentals and NVIC — Letting hardware proactively notify the CPU
- Part 37: Lock-Free Ring Buffer — A safe channel between the ISR and the main loop
- Part 38: UART IRQ Handling and Callbacks — The complete puzzle of interrupt reception
Phase 5: C++ Abstractions
- Part 39: std::expected Error Handling — A better choice than exceptions in embedded systems
- Part 40: UART Driver Template — Zero-size abstractions and compile-time dispatch
- Part 41: Concepts + UartManager — Type-safe assembly
- Part 42: Command Processor and Full Walkthrough — From serial input to LED control
Phase 6: Summary
- Part 43: Common Pitfalls and Exercises — Mastering UART with flair