Page 1 of 1

Serial Buffer Overflow

Posted: 26 Oct 2017 00:41
by pjpankhurst
I have an application that is using RX1/TX1 setup at 19200 for serial comms with a external 'device'.

The device sends messages usually at a rate of one every few seconds and they are typically only around 10-15 bytes in size, so nothing too heavy.
It all seems to work fine except in situations where a few things change on the device and a burst of a few messages comes through fairly close together, and I see bytes dropped.

From some diagnostics I've added I can see that I am getting a buffer overflow. Is there a way of increasing the serial RX buffer size?

Re: Serial Performance

Posted: 26 Oct 2017 01:23
by PoltoS
Don't forget that unlike Arduino Z-Uno is doing quite a lot with RF processing. But we have made a lot in last few releases - please make sure to test 2.1.1

Re: Serial Buffer Overflow

Posted: 26 Oct 2017 01:44
by pjpankhurst
Yes, I have just realised that my issue is that I am doing too much processing for each message I am receiving to prevent buffer overflow under burst load.

I am going to have to structure the code so that it holds off sending channel reports and updating the LCD until the load decreases