Unknown length data multiple ports UART library with rs-485 that works on F0,F1, F4, H7, G0, G1, G4 and other STM32 series.
00:10 Introduction
00:34 Table of contents
01:02 Lesson A: The right way
02:53 Lesson B: Configuring UART ports
04:10 Lesson C: Simple receive and transmit experiment
07:18 Lesson D: Receiving single byte
11:17 Lesson E: Calculating available unprocessed bytes count
13:24 Lesson F: Receiving multiple bytes
14:19 Lesson G: Transmitting single or multiple bytes
16:12 Lesson H: Creating UART library and it's functions
19:44 Lesson I: Additional features
25:56 Lesson J: UART library usage examples
29:57 Introduction to next modules
30:26 Where to download
Download link (PDF + ioc files + uart.c/uart.h + two examples source code)
www.thundertro...
Source code on GitHub:
github.com/geo...
How to use (Using STM32CubeIDE):
1) Enable UARTs that you need
2) Enable "global interrupt" for each UART (checkbox in UART interrupt settings)
3) Enable DMA RX channel for each UART
4) Set DMA RX channel mode to Circular for each UART
5) Enable DMA TX channel for each UART
6) Generate code
7) Add UART_Init() for each uart (after HAL initialization functions, before main loop)
8) Use UART_ComSelect() to select uart
9) Use UART_Read() / UART_Write()
Module 1: Creating convenient library for transmitting and receiving data using STM32's UART.
More modules on STM32’s UART are being prepared!
- Checksum calculation and retry algorithms
- Communication protocols and how to work with them
- Custom bootloader, encryption and firmware update
- UART to UART bridging over DMA
- Data pumping for DIY oscilloscopes, audio, etc.
- Porting STM32 library to PIC32MK or other MCUs
Feel free to ask questions in comments section! Let me know if you need any help understanding this tutorial.
24 авг 2024