Arduino Forum

Products => MKR Boards => MKR1000 => Topic started by: newhobby on Apr 10, 2016, 07:03 am

Title: Problem with Serial1 buffer
Post by: newhobby on Apr 10, 2016, 07:03 am
I'm having an issue when using Serial1.
If I send data at 57600 baud that is more than 64 bytes, I never receive the remaining data.
It seems that the buffer is only 64 bytes and it overruns and discards the rest of the incoming data.
How do I resolve this problem?
Title: Re: Problem with Serial1 buffer
Post by: sandeepmistry on Apr 11, 2016, 03:03 pm
Hi @newhobby,

I can confirm the RX buffer has a size of 64 bytes, see RingBuffer.h (https://github.com/arduino/ArduinoCore-samd/blob/master/cores/arduino/RingBuffer.h#L28).

Could you please share a sketch that is causing issues? Maybe you are not calling Serial.read(...) frequently enough?
Title: Re: Problem with Serial1 buffer
Post by: newhobby on May 02, 2016, 02:16 am
I fixed my issue by storing it in a String variable and then using it at the end of the line, instead of trying to process every single character as they would be coming.