EasyManuals Logo

ST STM32L0x3 User Manual

ST STM32L0x3
1043 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #793 background imageLoading...
Page #793 background image
RM0367 Rev 7 793/1043
RM0367 Universal synchronous/asynchronous receiver transmitter (USART/UART)
872
29.5.12 USART Single-wire Half-duplex communication
Single-wire Half-duplex mode is selected by setting the HDSEL bit in the USART_CR3
register. In this mode, the following bits must be kept cleared:
LINEN and CLKEN bits in the USART_CR2 register,
SCEN and IREN bits in the USART_CR3 register.
The USART can be configured to follow a Single-wire Half-duplex protocol where the TX
and RX lines are internally connected. The selection between half- and Full-duplex
communication is made with a control bit HDSEL in USART_CR3.
As soon as HDSEL is written to 1:
The TX and RX lines are internally connected
The RX pin is no longer used
The TX pin is always released when no data is transmitted. Thus, it acts as a standard
I/O in idle or in reception. It means that the I/O must be configured so that TX is
configured as alternate function open-drain with an external pull-up.
Apart from this, the communication protocol is similar to normal USART mode. Any conflicts
on the line must be managed by software (by the use of a centralized arbiter, for instance).
In particular, the transmission is never blocked by hardware and continues as soon as data
is written in the data register while the TE bit is set.
For code example, refer to A.17.8: USART single-wire half-duplex code example.
29.5.13 USART Smartcard mode
This section is relevant only when Smartcard mode is supported. Please refer to
Section 29.4: USART implementation on page 766.
Smartcard mode is selected by setting the SCEN bit in the USART_CR3 register. In
Smartcard mode, the following bits must be kept cleared:
LINEN bit in the USART_CR2 register,
HDSEL and IREN bits in the USART_CR3 register.
Moreover, the CLKEN bit may be set in order to provide a clock to the smartcard.
The smartcard interface is designed to support asynchronous protocol for smartcards as
defined in the ISO 7816-3 standard. Both T=0 (character mode) and T=1 (block mode) are
supported.
The USART should be configured as:
8 bits plus parity: where word length is set to 8 bits and PCE=1 in the USART_CR1
register
1.5 stop bits: where STOP=11 in the USART_CR2 register. It is also possible to choose
0.5 stop bit for receiving.
For code example, refer to A.17.9: USART smartcard mode code example.
In T=0 (character) mode, the parity error is indicated at the end of each character during the
guard time period.
Figure 257 shows examples of what can be seen on the data line with and without parity
error.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32L0x3 and is the answer not in the manual?

ST STM32L0x3 Specifications

General IconGeneral
BrandST
ModelSTM32L0x3
CategoryMicrocontrollers
LanguageEnglish

Related product manuals