29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

RM0008<br />

characters or data. After a start bit has been detected, the circuit samples the next bits<br />

exactly like for the data (on the 8th, 9th <strong>and</strong> 10th samples). If 10 (when the LBDL = 0 in<br />

USART_CR2) or 11 (when LBDL=1 in USART_CR2) consecutive bits are detected as ‘0’,<br />

<strong>and</strong> are followed by a delimiter character, the LBD flag is set in USART_SR. If the LBDIE<br />

bit=1, an interrupt is generated. Before validating the break, the delimiter is checked for as it<br />

signifies that the RX line has returned to a high level.<br />

If a ‘1’ is sampled before the 10 or 11 have occurred, the break detection circuit cancels the<br />

current detection <strong>and</strong> searches for a start bit again.<br />

If the LIN mode is disabled (LINEN=0), the receiver continues working as normal USART,<br />

without taking into account the break detection.<br />

If the LIN mode is enabled (LINEN=1), as soon as a framing error occurs (i.e. stop bit<br />

detected at ‘0’, which will be the case for any break frame), the receiver stops until the break<br />

detection circuit receives either a ‘1’, if the break word was not complete, or a delimiter<br />

character if a break has been detected.<br />

The behavior of the break detector state machine <strong>and</strong> the break flag is shown on the<br />

Figure 246: Break detection in LIN mode (11-bit break length - LBDL bit is set) on page 671.<br />

Examples of break frames are given on Figure 247: Break detection in LIN mode vs.<br />

Framing error detection on page 672.<br />

670/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!