cancel
Showing results for 
Search instead for 
Did you mean: 

Uart Transmits only 2 bytes of data not more with MCSDK

STuser2
Senior II

I want to enable the UART communication in MCSDK software which is very time critical task, i enabled UART with DMA, the problem is it cannot transmit more than 2 bytes even if i give 3 or more for transmission

HAL_UART_Transmit_DMA(&huart3, buffer, 3);

I get the call back 

void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
{
	uartransmissioncomplete = true;
}

after every 2 bytes. 

I tested the same program only with UART it works fine transferring more bytes. So, can i just go ahead with transmitting 2 bytes for every call back function, or will i really be able to transfer more bytes in the complete project, since i don't want to disturb the main functionality, i want UART data for data logging. 

1 REPLY 1
Saket_Om
ST Employee

Hello @STuser2 


@STuser2 wrote: 

I tested the same program only with UART it works fine transferring more bytes.


You mean UART without DMA?

Please refer to the example below: 

Projects/NUCLEO-G474RE/Examples/UART/UART_TwoBoards_ComDMA

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om