I have a simple serial command processor that gets ASCII commands terminated with a CR/LF.
I am finding that Serial.read does not return in certain circumstances.
I wrote the following test code:
if (Serial.available() == true)
{
buff[index++] = Serial.read();
Serial.printf( "<%u>", buff[ index - 1 ] );
}
Whenever I hit a key in my serial terminal, I see it appear with its ASCII code. If I enter CR I get <13> and if I send LF I get <10> but if I set my terminal to transmit CR+LF on hitting the enter key I get nothing and my serial command read routine locks up. I suspect it is now stuck in read for some reason !
What am I missing?
Andy