mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-02 13:24:12 +01:00
08fa593916
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. |
||
---|---|---|
.. | ||
bootloaders | ||
cores/arduino | ||
firmwares | ||
libraries | ||
variants | ||
boards.txt | ||
platform.txt | ||
programmers.txt |