Serial Buffer Overflow

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
pjpankhurst
Posts: 31
Joined: 07 Sep 2017 00:40

Serial Buffer Overflow

Post 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?
User avatar
PoltoS
Posts: 7571
Joined: 26 Jan 2011 19:36

Re: Serial Performance

Post 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
pjpankhurst
Posts: 31
Joined: 07 Sep 2017 00:40

Re: Serial Buffer Overflow

Post 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
Post Reply