Commit aad3730
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 a65525b commit aad3730
1 file changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
688 | 694 | | |
689 | 695 | | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | 696 | | |
695 | 697 | | |
696 | 698 | | |
| |||
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
712 | 720 | | |
713 | 721 | | |
714 | 722 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | 723 | | |
721 | 724 | | |
722 | 725 | | |
| |||
0 commit comments