2022-04-11 06:32 PM
Hello,
I'm posting a question to get advice on a problem about communication with UART using DMA.
I wrote code like followings : Transmit data only when HAL_DMA_STATE is ready.
if(HAL_DMA_GetState(hdma) == HAL_DMA_STATE_READY)
HAL_UART_Transmit(huart, msg, len);
During the experiment for several UART ports, the port using DMA1 Stream operated normally.
But the port using DMA2 Stream found a problem that data could not be transmitted.
During finding cause of this problem, It was confirmed that HAL_DMA_STATE is maintained in Busy state, after sending data for the first time.
How can I solve the problem that HAL_DMA_STATE of DMA2 not returning to Ready and remaining Busy?
<Note>
2022-04-12 04:04 AM
I solved this by changing the pinout settings.