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.

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

has been written). This means that it is not possible to receive a synchronous data without<br />

transmitting data.<br />

The LBCL, CPOL and CPHA bits have to be selected when both the transmitter and the<br />

receiver are disabled (TE=RE=0) to ensure that the clock pulses function correctly. These<br />

bits should not be changed while the transmitter or the receiver is enabled.<br />

It is advised that TE and RE are set in the same instruction in order to minimize the setup<br />

and the hold time of the receiver.<br />

The USART supports master mode only: it cannot receive or send data related to an input<br />

clock (SCLK is always an output).<br />

Figure 256. USART example of synchronous transmission<br />

USART<br />

Figure 257. USART data clock timing diagram (M=0)<br />

Idle or preceding<br />

transmission<br />

Clock (CPOL=0, CPHA=0)<br />

Clock (CPOL=0, CPHA=1)<br />

Clock (CPOL=1, CPHA=0)<br />

Clock (CPOL=1, CPHA=1)<br />

Data on TX<br />

(from master)<br />

Start<br />

767/1416 Doc ID 018909 Rev 3<br />

RX<br />

TX<br />

SCLK<br />

Data out<br />

Data in<br />

Synchronous device<br />

(e.g. slave SPI)<br />

Clock<br />

M=0 (8 data bits)<br />

0 1 2 3 4 5 6 7<br />

Stop<br />

Start LSB MSB Stop<br />

Data on RX 0 1 2 3 4 5 6 7<br />

(from slave)<br />

LSB<br />

MSB<br />

Capture Strobe<br />

*<br />

*<br />

*<br />

*<br />

*<br />

Idle or next<br />

transmission<br />

* LBCL bit controls last data clock pulse

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

Saved successfully!

Ooh no, something went wrong!