Skip to main content
hukhongcongtu26111993
Associate III
September 22, 2015
Question

I don't know how to use HAL_UART_Receive();

  • September 22, 2015
  • 2 replies
  • 563 views
Posted on September 22, 2015 at 11:25

I am trying to receive string from my PC then put it on the LCD. This my code :

char recieve[10];
while(__HAL_UART_GET_FLAG(&huart2,UART_FLAG_RXNE)==0){};
for(i=0;i<=9;i++)
{
HAL_UART_Receive(&huart2,(uint8_t *)&recieve[i],1,0xffff);
LCDString(&recieve[i]);
HAL_Delay(1000);
}

but LCD show 2 character only... ( if I send ''abcd'', LCD show ab only).... anyone tell me about this problem and code for mypurpose please... thanks!!!
    This topic has been closed for replies.

    2 replies

    hukhongcongtu26111993
    Associate III
    September 22, 2015
    Posted on September 23, 2015 at 01:45

     You are very kind ! Thanks a lot !