Tagged: usart

STM32U5 – DMA for UART TX and RX 0

STM32U5 – DMA for UART TX and RX

STMicroelectronics last STM32 release was with STM32U5 series, in Q4 2021. Product focus are extreme ultra-low-power features, enhanced security, integration, size and performance. Its advanced integration and performance options are key driver for new innovative silicon IPs. Product integrates new and most advanced DMA block ever seen in any of STM32 lines. Online training is available here. Key new DMA features Linked List : Define next configuration after first has been completed Option to work in low-power modes Selectable buses...

STM32 tutorial: Efficiently receive UART data using DMA 23

STM32 tutorial: Efficiently receive UART data using DMA

Latest updates and examples are available at my official Github repository. STM32 + UART + DMA RX + unknown length This repository may give you information about how to read data on UART by using DMA when number of bytes to receive is not known in advance. In STM32 microcontroller family, U(S)ART reception can work in different modes: Polling mode (no DMA, no IRQ): Application must poll for status bits to check if new character has been received and read...

HAL Library 32- DMA extension for USART on STM32Fxxx 2

HAL Library 32- DMA extension for USART on STM32Fxxx

USART DMA library allows you to send data via USART in non-blocking mode. It is designed only for TX mode, because my USART library already uses RX interrupts and DMA RX is not necessary for that purpose. This library is extension for my USART library. It requires USART library as basic to make this to work. Library Read more about HAL libraries Features USART extension for non-blocking TX mode Supports all U(S)ART peripherals on STM32F4 and STM32F7 device Supports TX...

How to use scanf with USART 3

How to use scanf with USART

I’ve already posted how to use printf (send data to stream) on STM32Fxxx devices. Recently, I received a comment, how to use scanf function to read strings and convert them from USART. Here is a little bit more to do before it will work correct. When you call scanf function, it calls subfunction fgetc, where you return a character. This function is called until it does not return EOF (-1). And it is called very fast. If you check in this function, if...

HAL Library 07- USART for STM32Fxxx 59

HAL Library 07- USART for STM32Fxxx

Here it is. UART library for HAL based libraries. If you don’t know, how UART work on STM32Fxxx devices, then you might take a look at my first library, where I also explained how to used it. This library works successfully on F4 and F7 based devices for now. I will add support for F0 too as soon as possible. Library Read more about new HAL libraries Features Supports up to 8 UART peripherals at a time Interrupt driven RX...

All STM32 HAL libraries 106

All STM32 HAL libraries

In this section, I will write all libraries based on HAL drivers from ST. If you see this first time, make sure you read this post first about how structure of my libs looks like! License All my softwares are published under MIT license. This means that you are allow to modify, share and use my source and other stuff in personal or commercial use. If you modify source code, it has to stay under GNU GPL v3 license too. I...