AnsweredAssumed Answered

STM32 HAL_UART Receive

Question asked by adeshra.vimmi on Jul 11, 2016
Latest reply on Apr 27, 2017 by Guo.Bryan.001

We are using HAL_UART_Receive function as mentioned below in the code for testing:

 while(__HAL_UART_GET_FLAG(&huart1,UART_FLAG_RXNE)== RESET){};
     {
      for (uint8_t i=0; i < 5 ; i++)
      {
       HAL_UART_Receive(&huart1,RData,RdSize1,Timeout_test1);
        RxDataStr = RxData[i];
      }
     }

 RData is defined as uint8_t RData[5];

When we send the data for example "Test1". I can see only 1st character from the data. I debugged through the code and it seems that Timeout is occurring and it is not going through the HAL_UART_Receive loop to receive the rest of the data.

Please help!

Outcomes