Hi,
I am curious if anyone has experienced a problem with $RXCOUNT showing a positive value (received data waiting in receive buffer), but the comgetc command returns a -1, which indicates no data in the receive buffer.
If I continue looping, the correct data appears in the recieve buffer, and the comgetc command then returns a valid character.
It looks like the $RXCOUNT value is updated prior to the data actually appearing in the receive buffer.
This problem only occurs during a long response (>1000 chars received) and does not always happen at the same depth. Adding "fluff" code seems to change the apparent response depth when the condition occurs.
I have a possible work around, but am curious how others have resolved this problem.
Any suggestions.
Thank you.
Putz
I am curious if anyone has experienced a problem with $RXCOUNT showing a positive value (received data waiting in receive buffer), but the comgetc command returns a -1, which indicates no data in the receive buffer.
If I continue looping, the correct data appears in the recieve buffer, and the comgetc command then returns a valid character.
It looks like the $RXCOUNT value is updated prior to the data actually appearing in the receive buffer.
This problem only occurs during a long response (>1000 chars received) and does not always happen at the same depth. Adding "fluff" code seems to change the apparent response depth when the condition occurs.
I have a possible work around, but am curious how others have resolved this problem.
Any suggestions.
Thank you.
Putz