cancel
Showing results for 
Search instead for 
Did you mean: 

UART DMA transmit works only one time

Thierry.1
Associate

Hello,

I got a problem with HAL library 10.4 for STM32L152RE in UART DMA transmission, the data is transmited only one time using the function HAL_UART_Transmit_DMA(&huart3,t_Buffer ,11) using uart3,  after that the UART3 structure keep the "flag" huart3.gState to HAL_UART_STATE_BUSY and all the other transmissions failed

it never come back to the  HAL_UART_STATE_READY so it is impossible to make another transmission.

 

I solve the problem by changing this flag state back to "ready" when transmission is done  using indirectly the (callback) transmission interrupt provided in  DMA1_Channel2_IRQHandler but it is not really a solution !! 

it should be OK once the data has been transmitted properly by HAL_UART_Transmit_DMA.

 

is it a bug in 10.4 HAL STM32L1 release ( maybe previous ones too ) or this behavior is normal and I need to use that "manual solution" ?

 

thanks

 

Thierry 

10 REPLIES 10

@MichalPorazko 

I don't use Cube/HAL but I am quite sure you are not supposed to do that, and you are just masking some other problem.

If you want to discuss this further, please start a new thread and in it state what's your hardware, software, what is the expected behaviour and how is your observation different from that.

@JCase.1 

> finally read the DMA1_LISR register after executing, and get 3 error flags set: TCIF, HTIF, FEIF. None of those make any sense

Why wouldn't that make sense?

I know it's an older post, but if you want to discuss it further, you too please start a new thread.

JW