29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

RM0008<br />

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

25.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 239).<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 <strong>and</strong> 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 <strong>and</strong> receiver.<br />

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

Figure 239. Word length programming<br />

Clock<br />

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

Possible<br />

Data frame<br />

parity<br />

bit<br />

Start<br />

bit Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 Bit8<br />

Idle frame<br />

**<br />

Stop<br />

bit<br />

Next<br />

Start<br />

bit<br />

Start<br />

bit<br />

Next data frame<br />

Clock<br />

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

Start<br />

Bit<br />

Break frame<br />

Data frame<br />

Possible<br />

Parity<br />

Bit<br />

Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7<br />

Stop<br />

Bit<br />

Next<br />

Start<br />

Bit<br />

Stop<br />

bit<br />

Start<br />

bit<br />

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

****<br />

**<br />

Next data frame<br />

Idle frame<br />

Break frame<br />

Start<br />

bit<br />

Stop<br />

bit<br />

Start<br />

bit<br />

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

Doc ID 13902 Rev 9 657/995

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

Saved successfully!

Ooh no, something went wrong!