Showing results for 
Search instead for 
Did you mean: 

How to transmit USART data by DMA with STM32MP1xx HAL Driver (HAL_USART_Transmit_DMA)?


Hi, all.

I use STM32MP151CAA3.

I want to transmit USART data by DMA with HAL Driver.

I’m trying to use HAL_USART_Transmit_DMA () function to transmit data.

In the case of STM32F437ZI(using STM32F4xx HAL Driver), when calling HAL_USART_Transmit_DMA(), USART_DMATransmitCplt() were called after USART transmission completed, and husart->State changed to HAL_USART_STATE_READY (stm32f4xx_hal_usart.c Line 1331).

However, in the case of STM32MP151(using STM32mp1xx HAL Driver), when to called HAL_USART_Transmit_DMA(), USART_DMATransmitCplt() were also called after transmission completed, but husart->State doesn't changed to HAL_USART_STATE_READY.

So, next time I try to call HAL_USART_Transmit_DMA(), I cannot transmit data because if statement (if (husart->State == HAL_USART_STATE_READY)) excludes to transmit USART data. (stm32mp1xx_hal_usart.c Line 1375).

Has the usage of the USART HAL driver changed compared to STM32F4xx HAL Driver?

Do I need to change the variable husart->State myself anywhere?

Best regards.

H. Masuda


Would you please give me some information on the above HAL driver questions?

Please let me know if you seem to lack information about above question.

Best Regards.

H. Masuda