09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>RM0090</strong> Universal synchronous asynchronous receiver transmitter (USART)<br />

26.3.1 USART character description<br />

Word length may be selected as being either 8 or 9 bits by programming the M bit in the<br />

USART_CR1 register (see Figure 246).<br />

The TX pin is in low state during the start bit. It is in high state during the stop bit.<br />

An Idle character is interpreted as an entire frame of “1”s followed by the start bit of the next<br />

frame which contains data (The number of “1” ‘s will include the number of stop bits).<br />

A Break character is interpreted on receiving “0”s for a frame period. At the end of the<br />

break frame the transmitter inserts either 1 or 2 stop bits (logic “1” bit) to acknowledge the<br />

start bit.<br />

Transmission and reception are driven by a common baud rate generator, the clock for each<br />

is generated when the enable bit is set respectively for the transmitter and receiver.<br />

The details of each block is given below.<br />

Figure 246. Word length programming<br />

9-bit word length (M bit is set), 1 stop bit<br />

Start<br />

bit Bit0<br />

Data frame<br />

Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7<br />

Possible<br />

parity<br />

bit<br />

Bit8<br />

Clock<br />

**<br />

Clock<br />

Idle frame<br />

Idle frame<br />

Stop<br />

bit<br />

Start<br />

bit<br />

Next data frame<br />

Next<br />

Start<br />

bit<br />

Break frame<br />

Stop<br />

bit<br />

Start<br />

bit<br />

** LBCL bit controls last data clock pulse<br />

8-bit word length (M bit is reset), 1 stop bit<br />

Start<br />

Bit Bit0<br />

Data frame<br />

Bit1 Bit2 Bit3 Bit4 Bit5<br />

Possible<br />

Parity<br />

Bit<br />

Stop<br />

Bit6 Bit7<br />

bit<br />

****<br />

**<br />

Next data frame<br />

Next<br />

start<br />

bit<br />

Break frame<br />

Stop<br />

bit<br />

Start<br />

bit<br />

Start<br />

bit<br />

** LBCL bit controls last data clock pulse<br />

Doc ID 018909 Rev 3 742/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!