STM32WL DMA transfer error | UART Overrun error when receiving
I am trying to receive data from one device and transfer it to another via UART DMA. I created a function for this using hal dma receive, waiting for the uart state becomes ready and then Hal dma transmit, then waiting for the uart state to be ready.
which works when calling the function the first time. However, a DMA transfer error or a UART overrun error is asserted the second time I call it during the receive part. Any ideas?
What I have tried:
I had tried to see if a regular receive would work, but I experience a timeout on the second call.
I had tried putting the UART init() for the device I am receiving from in my function. This allows me to receive the data when calling the function multiple times and fixes the problem. However, I do not think that reinitializing the UART every time is good practice.
So I am not sure what the problem is for the UART involving the device I am receiving from.
