cancel
Showing results for 
Search instead for 
Did you mean: 

UART DMA receive to Idle with LL

L_Kopp
Associate II

Hello all,

at the moment I use the HAL function HAL_UARTEx_ReceiveToIdle_DMA to receive the data from the UART. This works very well but I have a timing problem because I want to send and receive a lot of bytes. To speed this up I want to use the LL functions. Is there an example to achieve the same functionality as with the HAL functions ?

Many greetings and thanks, Lena

2 REPLIES 2

You may want to have a look at https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx

I'm not sure it will help, though - data are moved using hardware (DMA), so I am not sure how moving to LL would improve upon that.

JW

Guenael Cadier
ST Employee

Dear @Community member​

I'm not sure this exists.

Are you using DMA in Circular mode ?

In this configuration, once the HAL_UARTEx_ReceiveToIdle_DMA() is called, reception is started and no more HAL API calls will be required. Only callbacks to be executed. Then, in order to speed up process in callbacks, use of LL at this moment could be useful.

You might already have gone though this, but just in case, here is an example implementation using HAL_UARTEx_ReceiveToIdle_DMA() with a circular DMA config

Hope this helps.