User Manual
629
Rev. 1.1
2019-03-18
TLE984xQX
Microcontroller with LIN and Power Switches for Automotive Applications
UART1/UART2
19.6
Baud Rate Generation
There are several ways to generate the baud rate clock for the serial port, depending on the mode in which
they are operating.
The baud rates in modes 0 and 2 are fixed to
f
sys
/2 and
f
sys
/64 respectively, while the variable baud rate in
modes 1 and 3 is generated based on the setting of the Baud-rate generator in SCU (see
).
“Baud rate clock” and “baud rate” must be distinguished from each other. The serial interface requires a clock
rate that is 16 times the baud rate for internal synchronization. Therefore, the UART baud-rate generator must
provide a “baud rate clock” to the serial interface where it is divided by 16 to obtain the actual “baud rate”.
The abbreviation
f
sys
refers to the input clock frequency.
19.6.1
Baud Rate Generator
Note:
The register names used here refer to UART1. For UART2, the register names need to be adapted
accordingly.
The baud-rate generator in SCU is used to generate the variable baud rate for the UART in modes 1 and 3. It
has programmable 11-bit reload value, 3-bit prescaler and 5-bit fractional divider.
The baud-rate generator clock is derived via a prescaler (
f
DIV
) from the input clock
f
sys
. The baud rate timer
counts downwards and can be started or stopped through the baud rate control run bit BCON1.BR1_R. Each
underflow of the timer provides one clock pulse to the serial channel. The timer is reloaded with the 11-bit
BG1.BG1_BR_VALUE stored in its reload register BG1 each time it underflows. The duration between
underflows depends on the ‘n’ value in the fractional divider, which can be selected by the bits
BGL1.BG1_FD_SEL. ‘n’ times out of 32, the timer counts one cycle more than specified by BG1.BG1_BR_VALUE.
The prescaler is selected by the bits BCON1.BR1_PRE.
Register BG1 is the dual-function Baud-rate Generator/Reload register. Reading BG1 returns the contents of
the timer (not the configured reload value!), while writing to BG1 updates the reload register.
The register BG1 should be written only when BCON1.BR1_R is 0. An auto-reload of the timer with the contents
of the reload register is performed one instruction cycle after the next time BCON1.BR1_R is set. Any write to
BG1, while BCON1.BR1_R is set, will be ignored.
The baud rate of the baud-rate generator depends on the following bits and register values:
• Input clock
f
sys
• Value of bit field BCON1.BR1_PRE.
• Value of bit field BGL1.BG1_FD_SEL
• Value of the 11-bit reload value BG1.BG1_BR_VALUE
shows a simplified block diagram of the baud rate generator.
Figure 165 Simplified Baud Rate Generator Block Diagram
f
BR
Prescaler
f
DIV
f
sys
R
Baud rate timer
with
Fractional Divider