I'm currently working on a project, where serial data is "received" in data bursts. These bursts happen every few seconds and are about 100-200bytes long. I'm currently receiving at a rate 9600 baude. So far, so good - everything works. The problem starts, when the data is received while the display gets updatet. The display update-cycle takes 60ms which is 8times longer then the data-burst (7ms) and the data can't be read before the serial-buffer is overflowed.
Maybe i missed it, but i coulnd't find a "overflow" handler method/callback in the hardware serial implementation which would be invoked on an overflow.. What i (would) need is some interrupt (or callback) which has a higher priority and would interrput the display update if new data arrives.
Ok, i could modify the HardwareSerial to either invoke a callback or set a pin-interrupt...but i would appriciate a solution without modifying the original (ardiuino) code Any suggestions ?