This tests the polarity inversion on the TX and RX serial line depending on the TXPOLARITY and RXPOLARITY control signals.