Skip to main content
MattiaB
Associate III
November 14, 2023
Question

STM32H7: DMA+UART+RTS/CTS HW Flow Control

  • November 14, 2023
  • 2 replies
  • 1868 views

Good evening evryone,

I'm actually working on a NUCLEO-H743ZI2 evaluation board and my objective is to develop an mTLS socket via UART.

I've configured the UART for working with circular DMA for data reception, and let RTS/CTS works "automatically" (enabled from STM32CubeMX). At every bytes received on UART, RTS signal goes high level and after returns back to low level, and it's correct as reported on RM0433.

But I was expecting that RTS was put high also if serial data consumer process is slow and reception buffer (the buffer communicated during data reception start to the DMA: HAL_UART_Receive_DMA(&huart2, DMA_FIFO, DMA_FIFO_SIZE) is full or almost full.


Since the mechanism doesn't work "automatically",  at the moment I've configured UART for manipulate only CTS signal, the RTS signal instead is configured and moved "manually" by myself:
- when space left in DMA_FIFO is below a certain threshold value (for example 1/5 of DMA_FIFO) RTS signal is put HIGH level.

- when space left in DMA_FIFO is major than a certain threshold value (for example 1/3 of DMA_FIFO) RTS signal is put LOW level.


And this works well.

There is any manner to force RTS to high level instead move manually the RTS pin using UART or DMA registers?

Thank you in advance

This topic has been closed for replies.

2 replies

Douglas MILLER
ST Employee
November 14, 2023

This forum thread was marked by the moderator as needing a little more investigation, so a Support case was created in your name and will be handled off-line.

MattiaB
MattiaBAuthor
Associate III
November 15, 2023

OK, thank you, I'll wait for your investigations!