HAL_UART_Transmit_DMA transmits data with delay
Hi,
I have written an STM32 program that transmits data using HAL_UART_Transmit_DMA .
However, for some reason, the first time I call this HAL function, Rx line only outputs 0s.
The second message I'm sending actually sends the first message,
The third message sends the second, and so on.
I have verified with debug that each call to the HAL function has the correct message in the buffer parameter, and I have verified with scope (the scope I used can interpret the outgoing message) that every message that goes out of the Rx pin is the previous one.
this is the code that is called in a loop, please note that I'm always getting HAL_OK as a return value:
if( m_configuration.huart->gState == HAL_UART_STATE_READY ) {
if( HAL_OK == HAL_UART_Transmit_DMA( m_configuration.huart, reinterpret_cast< U08 * >( pData ), static_cast< uint16_t >( length ))) {
amount = length ;
}
}
else{
amount = itsTUtilityCircularBufferTx.putElements( reinterpret_cast< U08 * >( pData ), length ) ;
}Is this a known issue?
