2023-05-30 12:11 PM
Dear eveyone,
I' little confuse..
I'm trying to send dat over uart from a nucleo board (F103 + FDTI). If a use "normal"method, it's work great.
I mean, i receive "1234567890" WITH a new line.
uint8_t start [20]= "1234567890 \n\r";
HAL_UART_Transmit(&huart1, start, sizeof(start),10);
But when i use DMA
uint8_t start [20]= "1234567890 \n\r";
HAL_UART_Transmit_DMA(&huart1, start, sizeof(start));
I get a lot of<NULL> character before data...
Maybe a need to reinit the buffer DMA ?
if you have an idea...
Solved! Go to Solution.
2023-05-30 01:07 PM
Use strlen() not sizeof() for strings.
HAL DMA functions return IMMEDIATELY, make sure that the variable remains in SCOPE for the entirety of the transfer, and make sure not to start new transfers until the prior one has completed.
2023-05-30 12:48 PM
error : the junk charater appears after the \n\r...
2023-05-30 01:07 PM
Use strlen() not sizeof() for strings.
HAL DMA functions return IMMEDIATELY, make sure that the variable remains in SCOPE for the entirety of the transfer, and make sure not to start new transfers until the prior one has completed.
2023-05-30 01:11 PM
recess... thanks a lot !
2023-05-30 01:33 PM