Home/Support/Support Forum/XBEE S2 Pro STM32F4 and 7 UART DMA

XBEE S2 Pro STM32F4 and 7 UART DMA

0 votes
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?
asked Aug 30, 2017 in ZigBee PRO Featureset (and legacy ZNet 2.5) by gvi70000 New to the Community (9 points)

Please log in or register to answer this question.

2 Answers

0 votes
Try what is described at https://stm32f4-discovery.net/2017/07/stm32-tutorial-efficiently-receive-uart-data-using-dma/
answered Sep 1, 2017 by mvut Veteran of the Digi Community (15,413 points)
0 votes
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
answered Sep 1, 2017 by gvi70000 New to the Community (9 points)
...