XBEE S2 Pro STM32F4 and 7 UART DMA

Hi,
When using normal transmit on UART i can send a message from a router to a coordinator without no issue
HAL_UART_Transmit(&huart2, (uint8_t*)xFrame, sLen,100);
, but when i try to send it using
HAL_UART_Transmit_DMA(&huart2, (uint8_t*)xFrame, sLen);
{
_Error_Handler(FILE, LINE);
}
while (xUartReady != SET)
{
}
xUartReady = RESET;
The xUartReady is handled in the callback function.
Did any of you had this issue? How it was solved?

Try what is described at https://stm32f4-discovery.net/2017/07/stm32-tutorial-efficiently-receive-uart-data-using-dma/

Hi,
Thank you for your reply.
In the meanwhile i have done some more testing, i know that the DMA transmission is working properly.
Also adding a 1ms delay after HAL_UART_Transmit_DMA(&huart2, (uint8_t*)xFrame, sLen); makes the transmission from the router to coordinator to work.

Anyway, i believe that is better to use the Tx complete event than idle on the idle, in my case the receive works fine, the transmission has issues.

BR