Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
162
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

RM0016

 

 

Universal asynchronous receiver transmitter (UART)

 

 

 

 

 

 

 

 

 

 

 

 

 

Table 54. Baud rate programming and error calculation

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Baud

 

fMASTER = 10 MHz

 

 

 

fMASTER = 16 MHz

 

 

 

rate

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

in

Actual

% Error (1)

UART_DIV

BRR1

BRR2

Actual

% Error(1)

UART_DIV

BRR1

BRR2

 

kbps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2.4

2.399

−0.008%

0x1047

0x04

0x17

2.399

−0.005%

0x1A0B

0xA0

0x1B

 

 

 

 

 

 

 

 

 

 

 

 

 

9.6

9.596

−0.032%

0x0412

0x41

0x02

9.598

−0.020%

0x0693

0x68h

0x03

 

 

 

 

 

 

 

 

 

 

 

 

 

19.2

19.193

−0.032%

0x0209

0x20

0x09

19.208

−0.040%

0x0341

0x34

0x01

 

 

 

 

 

 

 

 

 

 

 

 

 

57.6

57.471

−0.224%

0x00AE

0x0A

0x0E

57.554

−0.080%

0x0116

0x11

0x06

 

 

 

 

 

 

 

 

 

 

 

 

 

115.2

114.942

−0.224%

0x0057

0x05

0x07

115.108

−0.080%

0x008B

0x08

0x0B

 

 

 

 

 

 

 

 

 

 

 

 

 

230.4

232.558

−0.937%

0x002B

0x02

0x0B

231.884

−0.644%

0x0045

0x04

0x05

 

 

 

 

 

 

 

 

 

 

 

 

 

460.8

454.545

−1.358%

0x0016

0x01

0x06

457.143

−0.794%

0x0023

0x02

0x03

 

 

 

 

 

 

 

 

 

 

 

 

 

921.6

NA

NA

NA

NA

NA

941.176

−2.124%

0x11

0x01

0x01

 

 

 

 

 

 

 

 

 

 

 

 

 

1. Error % = (Calculated - Desired) Baud Rate / Desired Baud Rate

 

 

 

 

 

 

Note:

The lower the fMASTER frequency, the lower will be the accuracy for a particular baud

 

 

 

rate.The upper limit of the achievable baud rate can be fixed with this data.

 

 

 

22.3.5Clock deviation tolerance of the UART receiver

The USART’s asynchronous receiver works correctly only if the total clock system deviation is less than the USART receiver’s tolerance. The causes which contribute to the total deviation are:

DTRA: Deviation due to the transmitter error (which also includes the deviation of the transmitter’s local oscillator)

DQUANT: Error due to the baud rate quantization of the receiver

DREC: Deviation of the receiver’s local oscillator

DTCL: Deviation due to the transmission line (generally due to the transceivers which can introduce an asymmetry between the low-to-high transition timing and the high-to- low transition timing)

DTRA + DQUANT + DREC + DTCL < UART receiver’s tolerance

The UART receiver’s tolerance to properly receive data is equal to the maximum tolerated deviation and depends on the following choices:

10or 11-bit character length defined by the M bit in the UART_CR1 register

Use of fractional baud rate or not

Table 55. UART receiver tolerance when UART_DIV[3:0] is zero

M bit

NF is an error

NF is don’t care

 

 

 

0

3.75%

4.375%

 

 

 

1

3.41%

3.97%

 

 

 

Doc ID 14587 Rev 9

323/454

Соседние файлы в папке Минимум документации STM8_1