16.3 Clock Generation

The Clock Generation logic generates the base clock for the Transmitter and Receiver. For USART MSPIM mode of operation only internal clock generation (i.e. master operation) is supported. The Data Direction Register for the XCKn pin (DDR_XCKn) must therefore be set to one (i.e. as output) for the USART in MSPIM to operate correctly. Preferably the DDR_XCKn should be set up before the USART in MSPIM is enabled (i.e. TXENn and RXENn bit set to one).

The internal clock generation used in MSPIM mode is identical to the USART synchronous master mode. The table below contains the equations for calculating the baud rate or UBRRn setting for Synchronous Master Mode.

Table 16-1. Equations for Calculating Baud Rate Register Setting
Operating ModeEquation for Calculating Baud Rate(1)Equation for Calculating UBRRn Value
Synchronous Master mode
BAUD=fOSC2UBRRn+1
UBRRn=fOSC2BAUD1

Note: 1. The baud rate is defined to be the transfer rate in bit per second (bps)

BAUDBaud rate (in bits per second, bps)
fOSCSystem Oscillator clock frequency
UBRRnContents of the UBRRnH and UBRRnL Registers, (0-4095)