Initialization

Full-Duplex Mode:

  1. 1.Set the baud rate (USARTn.BAUD).
  2. 2.Set the frame format and mode of operation (USARTn.CTRLC).
  3. 3.Configure the TXD pin as an output.
  4. 4.Enable the transmitter and the receiver (USARTn.CTRLB).
Notes:

One-Wire Half-Duplex Mode:

  1. 1.Internally connect the TXD to the USART receiver (the LBME bit in the USARTn.CTRLA register).
  2. 2.Enable internal pull-up for the RX/TX pin (the PULLUPEN bit in the PORTx.PINnCTRL register).
  3. 3.Enable Open-Drain mode (the ODME bit in the USARTn.CTRLB register).
  4. 4.Set the baud rate (USARTn.BAUD).
  5. 5.Set the frame format and mode of operation (USARTn.CTRLC).
  6. 6.Enable the transmitter and the receiver (USARTn.CTRLB).
Notes: