3 Replies Latest reply on Oct 20, 2016 6:50 AM by wibrc_2199236


      Hi  SeyhanA_31


      wiced_uart_return_received() is a very useful function.  Thank you for providing the patch.


      I have a question.


      Is the timeout parameter the time from when the function is called?

      Or is it the time from when the last character was received?




        • 1. Re: wiced_uart_return_received

          I is the timeout parameter where the timer tic starts from when the function called. Logically if there is no data then the API should return timeout.

          • 2. Re: wiced_uart_return_received

            Actually the function ALWAYS returns a timeout unless the buffer limit is exceeded.  I am using it to wait for a response where I don't know what the length will be.  So I allocate a buffer big enough to fit a worst case response.  This guarantees that I will always timeout which is a waste of time.  If I knew that the timeout was the time since the last character was received, then I could shorten up the timeout parameter which would speed up the transaction.

            • 3. Re: wiced_uart_return_received

              As an experiment I shortened the timeout parameter to one that would be too small given the size of the data packet I am expecting.  If the timeout was only from the time of the initial call then the data would be truncated.  Happily it was not.  I got the entire message meaning that the timeout is re-triggered as each character is received.  This is good news because it allows me to set a smaller timeout number than worst case and not suffer a long latency for every message.