- Introduction
- The right way
- Configuring UART ports
- Simple receive and transmit experiment
- Receiving single byte
- Calculating available unprocessed bytes count
- Receiving multiple bytes
- Transmitting single or multiple bytes
- Creating UART library and it’s functions
- Additional features
- UART library usage examples
- Introduction to next modules
What you'll learn
- Sending and receiving single bytes
- Making reliable DMA-based serial library
- Working with multiple UART ports
- Adding RS-485 support
Description
Through this module, you’ll learn how to use STM32’s UART the right way. Everything you’ve seen before is garbage! Just trash it… We will create a serial library which is fast, reliable and can be easily reused in different projects. Multi-port, powered by HAL and compatible with any STM32 microcontroller series.
There are many STM32 UART myths created by incompetent people. E.g., that DMA can’t be used with variable-size data packets and other nonsense. Avoiding DMA peripheral is one of the worst things you can do. It is much simpler to make really good UART code when DMA is used.
Many will say that their UART code is reliable, good, etc. Do you believe it? We will perform two simple tests to ensure that our serial library is reliable:
Loopback test to ensure that each byte is sent and received correctly.
Hot-plug test to ensure that communication can be resumed after cable is re-connected.
Our serial library must be portable across multiple STM32 series. Generally, we should consider portability across microcontrollers from different manufactures. E.g., porting code to Microchip’s PIC32 would be complicated if our library heavily relies on STM32’s “idle” interrupt. Thus, we know what functions to avoid if we want our library to be more portable.
Other Courses
SQL Crash Course for Aspiring Data Scientist
Learn SQL and Data Science FAST with hands on labs!
Agile vs. Scrum: Deciphering the Project Management Duel
Agile vs. Scrum: A Project Management Battle
Crash Course: Manage Network Security With pfSense Firewall
Use an open source firewall to protect your network. Use features like Failover, Load Balancer, OpenVPN, IPSec, Squid
SaaS Marketing Masterclass - Become a Top SaaS Marketer
Master the SaaS Marketing Strategies, SaaS Business Concepts, SaaS Sales Funnel, SaaS Metrics, Best Practices & more!
About the instructors
- 4.11 Calificación
- 459 Estudiantes
- 1 Cursos
Georgy Moshkin
R&D Engineer
I am R&D Engineer with great experience in electronic engineering, microwave design and digital signal processing. I started to create simple computer programs in middle school using QBasic and Turbo Pascal. I've spent significant time learning computer graphics algorithms and game creation using Delphi and OpenGL during my years at university. This hobby was a great motivation for learning linear algebra and analytic geometry. I started to learn C after my first encounter with STM32 microcontrollers. Shortly afterwards, I moved from Delphi to CodeBlocks to ease process of reusing my computer algorithms on microcontroller. Now I am working on hardware products. My software and hardware designs are robust, reliable and easy to use. I hope you will sense it through my courses.
Student feedback
Course Rating
Reviews
Greats! Wait next modules! Keep forward!
You must have tutor it using Any IDE Ex. Cube IDE or any Other IDE