2019-11-29 04:38 AM
I am using stm32f779I eval kit. I am using example UART_HyperTerminal_DMA by en.stm32cubef7.
I am trying to implement UART in DMA mode to transmit a simple string.
So I have used CubeMX to generate the code and I have configured UART1 TX DMA in normal mode.
Whenever I run the code in debugging mode, I see the first time I attemp to send the string, it works ok and sends the string.
But I couldn't send a second transmission.
Can any one please suggest the correct way to use Uart Tx in DMA mode? How can I send successive strings one after another?
E.g. :
i used
if(HAL_UART_Transmit_DMA(&UartHandle, (uint8_t*)aTxStartMessage, TXSTARTMESSAGESIZE-10)!= HAL_OK)
{
/* Transfer error in transmission process */
Error_Handler();
}
if(HAL_UART_Transmit_DMA(&UartHandle, (uint8_t*)aTxStartMessage, TXSTARTMESSAGESIZE-10)!= HAL_OK)
{
/* Transfer error in transmission process */
Error_Handler();
}
2 times HAL_UART_Transmit_DMA() API. 2nd time API has huart->gState == HAL_UART_STATE_BUSY_TX
2019-12-01 11:59 PM
polling UART (HAL_UART_Transmit) and HAL_UART_Transmit_IT both are working properly.
Even Uart Rx in dma mode is also working properly.
Having issues with Uart TX DMA only.
2019-12-02 12:05 AM
i forgot please change (&huart1, str_tx, str_tx_len); to>> (&huart1, &str_tx[0], str_tx_len);
2022-02-09 07:15 AM
Hey,
I am facing the same issue. How did you solve it? Thank you for your Answer.
I am using a STM32G4
2024-08-11 10:55 PM
Facing exactly same issue, have you ever find the solution and root cause? DISCOVERY 1 stm32f407 board...
2024-08-12 02:01 PM
You haven't posted any code so no telling what could be wrong.
See if this helps https://github.com/karlyamashita/Nucleo-G431RB_Three_UART/wiki