24.3.2.1.1 Internal Clock Generation - The Fractional Baud Rate Generator

The baud rate generator is used for internal clock generation for asynchronous modes, synchronous master mode, and master SPI mode operation. The output frequency generated (fBAUD) is determined by the Baud register value (BAUD in USART.BAUD) and the peripheral clock frequency (fCLK_PER). The following table contains equations for calculating the baud rate (in bits per second) and for calculating the BAUD value for each mode of operation. It also shows the maximum baud rate versus peripheral clock frequency. For asynchronous operation, the BAUD register value is 16 bits. The 10 MSBs (BAUD[15:6]) hold the integer part, while the 6 LSBs (BAUD[5:0]) hold the fractional part. In synchronous mode, only the integer part of the BAUD register determine the baud rate.

Table 24-2. Equations for Calculating Baud Rate Register Setting
Operating Mode Conditions Baud Rate (Bits Per Seconds) USART.BAUD Register Value Calculation
Asynchronous
f B A U D f C L K _ P E R S
f B A U D = 64 × f C L K _ P E R S × B A U D
B A U D = 64 × f C L K _ P E R S × f B A U D
Synchronous
f B A U D f C L K _ P E R 2
f B A U D = f C L K _ P E R 2 × B A U D [ 15 : 6 ]
B A U D [ 15 : 6 ] = f C L K _ P E R 2 × f B A U D

S is the number of samples per bit. In Asynchronous operating mode (CMODE[0]=0), it could be set as 16 (NORMAL mode) or 8 (CLK2X mode) by RXMODE in USART.CTRLB. For Synchronous operating mode (CMODE[0]=1), S equals 2.