24.5.7 Control B

Name: CTRLB
Offset: 0x06
Reset: 0x00
Property: -

Bit 76543210 
 RXENTXEN SFDENODMERXMODE[1:0]MPCM 
Access R/WR/WR/WR/WR/WR/WR/W 
Reset 0000000 

Bit 7 – RXEN Receiver Enable

Writing this bit to ‘1’ enables the USART receiver. Disabling the receiver will flush the receive buffer invalidating the FERR, BUFOVF, and PERR flags. In GENAUTO and LINAUTO mode, disabling the receiver will reset the auto-baud detection logic.

Bit 6 – TXEN Transmitter Enable

Writing this bit to ‘1’ enables the USART transmitter. The transmitter will override normal port operation for the TXD pin when enabled. Disabling the transmitter (writing the TXEN bit to ‘0’) will not become effective until ongoing and pending transmissions are completed (that is, when the Transmit Shift register and Transmit Buffer register does not contain data to be transmitted). When the transmitter is disabled, it will no longer override the TXD pin, and the pin direction is automatically set as input by hardware, even if it was configured as output by the user.

Bit 4 – SFDEN Start-of-Frame Detection Enable

Writing this bit to ‘1’ enables the USART Start-of-Frame Detection mode. The Start-of-Frame detector is able to wake up the system from Idle or Standby Sleep modes when a high (IDLE) to low (START) transition is detected on the RxD line.

Bit 3 – ODME Open Drain Mode Enable

Writing this bit to ‘1’ gives the TXD pin open-drain functionality. Internal Pull-up should be enabled for the TXD pin (the PULLUPEN bit in the PORTx.PINnCTRL register) to prevent the line from floating when a logic ‘1’ is output to the TXD pin.

Bits 2:1 – RXMODE[1:0] Receiver Mode

Writing these bits select the receiver mode of the USART. In the CLK2X mode, the divisor of the baud rate divider will be reduced from 16 to 8 effectively doubling the transfer rate for Asynchronous Communication modes. For synchronous operation, the CLK2X mode has no effect, and the RXMODE bits should always be written to 0x00. RXMODE must be 0x00 when the USART Communication mode is configured to IRCOM. Setting RXMODE to GENAUTO enables generic auto-baud where the SYNC character is valid when eight bits alternating between ‘0’ and ‘1’ have been registered. In this mode, any SYNC character that gives a valid BAUD rate will be accepted. In LINAUTO mode the SYNC character is constrained and found valid if every two bits falls within 32 ±6 baud samples of the internal baud rate and match data value 0x55. The GENAUTO and LINAUTO modes are only supported for USART operated in Asynchronous Slave mode.

ValueNameDescription
0x00 NORMAL Normal USART mode, standard transmission speed
0x01 CLK2X Normal USART mode, double transmission speed
0x02 GENAUTO Generic Auto-Baud mode
0x03 LINAUTO LIN Constrained Auto-Baud mode

Bit 0 – MPCM Multi-Processor Communication Mode

Writing a ‘1’ to this bit enables the Multi-Processor Communication mode: The USART receiver ignores all incoming frames that do not contain address information. The transmitter is unaffected by the MPCM setting. For more information see 24.3.4.3 Multiprocessor Communication.