1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-02 13:24:12 +01:00
Arduino/hardware/arduino/avr
Matthijs Kooijman 08fa593916 Disable the RX PCINT inside SoftwareSerial::recv
Before, the interrupt would remain enabled during reception, which would
re-set the PCINT flag because of the level changes inside the received
byte. Because interrupts are globally disabled, this would not
immediately trigger an interrupt, but the flag would be remembered to
trigger another PCINT interrupt immediately after the first one is
processed.

Typically this was not a problem, because the second interrupt would see
the stop bit, or an idle line, and decide that the interrupt triggered
for someone else. However, at high baud rates, this could cause the
next interrupt for the real start bit to be delayed so much that the
byte got corrupted.

By clearing the interrupt mask bit for just the RX pin (as opposed to
the PCINT mask bit for the entire port), any PCINT events on other bits
can still set the PCINT flag and be processed as normal. In this case,
it's likely that there will be corruption, but that's inevitable when
(other) interrupts happen during SoftwareSerial reception.
2015-01-26 17:03:25 +01:00
..
bootloaders merge 2013-10-14 12:42:42 +02:00
cores/arduino Temporary fix for pulseIn() regression. 2015-01-18 17:34:40 +01:00
firmwares Merge branch 'master' into ide-1.5.x 2014-09-16 12:19:39 +02:00
libraries Disable the RX PCINT inside SoftwareSerial::recv 2015-01-26 17:03:25 +01:00
variants Merge branch 'master' into ide-1.5.x 2014-02-12 17:17:33 +01:00
boards.txt set correct max size for mega2560 2014-09-20 03:09:54 +05:30
platform.txt Upped version to 1.6.0 2014-11-18 14:48:01 +01:00
programmers.txt added support for the ArduinoISP 2014-07-02 15:03:12 +02:00