Transmit Errors and Events
The UART is capable of detecting bus collisions. The received byte is compared against the last byte transmitted to identify differences. The UxTX and UxRX pin functions need to be mapped to separate pins using Peripheral Pin Select (PPS). The UxRX pin has to be able to receive a byte in order for the comparison to happen. If the pin is stuck at Vdd or ground, such that a valid Start and Stop bit are not detected, the comparison cannot take place. If a bus collision is detected, it is flagged by the TXCIF bit (UxSTAT[0]). If the TXCIE bit (UxSTAT[8]) is set, an error interrupt will be generated.
If a write to UxTXB is done when the buffer is already full, a transmit write error is indicated by the TXWRE bit (UxSTAT[23]).
The Transmit Shift Register (TSR) has a status flag, TXMTIF (UxSTAT[7]), associated with it to indicate when a byte transmission is complete. An interrupt can be generated by setting the TXMTIE bit (UxSTAT[15]).