Commit d4498e7
Fix serial port full-duplex bug
When a receive IT fires while the HAL handle is locked, the receive callback fails to re-enable the IT and the serial port stops receiving anymore. This can happen when transmit IT is enabled outside the IRQ in HardwareSerial::write(), following a buffer full condition that disables transmit IT in HAL_UART_TxCpltCallback().
Solution is to temporarily disable the IRQ while the interrupt enable flags are modified.1 parent a22150c commit d4498e7
1 file changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
697 | 703 | | |
698 | 704 | | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | 705 | | |
704 | 706 | | |
705 | 707 | | |
| |||
718 | 720 | | |
719 | 721 | | |
720 | 722 | | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
721 | 729 | | |
722 | 730 | | |
723 | 731 | | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | 732 | | |
730 | 733 | | |
731 | 734 | | |
| |||
0 commit comments