Closed AnHardt closed 8 years ago
Reading a bit in https://github.com/arduino/Arduino/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+HardwareSerial+ i got the idea we might have a similar problem - having a race condition when program and interrupt are updating tail and head.
Switching from int to 'volatile uint8_t' is save as long the buffers are small enough.
int
My tests tell about a recognizable reduced error rate at 250000bd.
Reading a bit in https://github.com/arduino/Arduino/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+HardwareSerial+ i got the idea we might have a similar problem - having a race condition when program and interrupt are updating tail and head.
Switching from
int
to 'volatile uint8_t' is save as long the buffers are small enough.My tests tell about a recognizable reduced error rate at 250000bd.