cancel
Showing results for 
Search instead for 
Did you mean: 

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

MattiaB
Associate

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

2 REPLIES 2
Douglas MILLER
ST Employee

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.

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