Clock Generation

Being a host device in a synchronous communication interface, the USART in Host SPI mode must generate the interface clock to be shared with the client devices. The interface clock is generated using the fractional Baud Rate Generator, which is described in The Fractional Baud Rate Generator.

Each Data bit is transmitted by pulling the data line high or low for one full clock period. The receiver will sample bits in the middle of the transmitter hold period, as shown in the figure below. It also shows how the timing scheme can be configured using the Inverted I/O Enable (INVEN) bit in the PORTx.PINnCTRL register and the USART Clock Phase (UCPHA) bit in the USARTn.CTRLC register.

Figure 23-5. Data Transfer Timing Diagrams

The table below further explains the figure above.

Table 23-2. Functionality of the INVEN and UCPHA Bits
INVENUCPHALeading Edge (1)Trailing Edge (1)
00Rising, sampleFalling, transmit
01Rising, transmitFalling, sample
10Falling, sampleRising, transmit
11Falling, transmitRising, sample
Note:
  1. The leading edge is the first clock edge of a clock cycle. The trailing edge is the last clock edge of a clock cycle.