cancel
Showing results for 
Search instead for 
Did you mean: 

Feature Request: HAL_UART_DMAPauseReceive, HAL_UART_DMAPauseTransmit

Rob.Riggs
Senior

Currently the STM32_L4 HAL provides HAL_UART_DMAPause and HAL_UART_DMAResume. These pause/resume both TX and RX on the UART.

I am using DMA for both transmit and receive on a UART. I have a case where I need to pause the receive (for flow control) but must still continue to transmit. It would be desirable to have this feature available in the HAL. For now I have resorted to copying the HAL_UART_DMAPause & HAL_UART_DMAResume code and removing the TX bits to make it work for my needs.

2 REPLIES 2
Guenael Cadier
ST Employee

Hi @Rob.Riggs​ 

Thanks for the input. I take note of the request.

I will check what could be done to serve it in future versions of HAL.

Regards

Guenael

I generally don't recommend to suspend DMA, unless you like inexplicable data loss

https://community.st.com/s/feed/0D50X00009XkW5oSAF

I know the above thread is 'F4 specific and I am aware of the fact that the 'L4 uses a different model of the DMA controller (1-port, vs. the 2-port DMA of 'F4); so this is more warning to the ST Cube coders, who already added these functions into 'F4 (and other Cubes) too.

JW