35.5.2.3 Clock Generation – Baud Rate Generator

Each SERCOM contains a Baud Rate Generator (BRG), which can generate an internal clock for asynchronous or synchronous communication. The output frequency (fBAUD) is determined by the Baud register (BAUD) setting and the Baud Reference Clock Frequency (fREF). The baud reference clock is the serial engine clock, and it can be internal, GCLK_SERCOMn_CORE), or external, (XCK ; SERCOMn PAD[1]).

For asynchronous transmit communication, the (divide-by-16/8/3) output is used whereas the /1 (divide by-1) output is used while receiving.

For synchronous transmit and receive communication, the /2 (divide-by-2) output is used. In synchronous mode transmit and receive always use the same clock. Tx data on leading clock edge and Rx data on trailing clock edge. This functionality is automatically configured, depending on the selected operating mode.

Table 35-4. Baud Rate Equations
Operating ModeConditionBaud Rate (Bits/Second)BAUD Register Value Calculation
Asynchronous ArithmeticfBAUD ≤ fREF / SfBAUD = (fREF / S) * (1 – (BAUD / 65536))BAUD = 65536 * [1 – (S * (fBAUD / fREF))]
Asynchronous FractionalfBAUD ≤ fREF / SfBAUD = (fREF / [S * (BAUD + (FP / 8))])BAUD = (fREF / (S * fBAUD)) – (FP / 8)
SynchronousfBAUD ≤ fREF / 2fBAUD = (fREF / [2 * (BAUD+1)])BAUD = ( fREF / (2 * fBAUD)) – 1
Note:
  1. S - Number of samples per bit, which can be 3, 8, or 16.
  2. fBAUD = The user desired bits per second data rate.
  3. fREF = fGLCK_SERCOMn_CORE or fXCK from SERCOM PAD[1] clock input in client mode.
  4. Asynchronous Fractional option is used for auto-baud detection.

The baud rate error is represented by the following formula:

Error%=100*(1ExpectedBaudRateActualBaudRate)