EasyManuals Logo

ST STM32F31xx User Manual

ST STM32F31xx
584 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 #542 background imageLoading...
Page #542 background image
Universal synchronous asynchronous receiver
transmitter (USART)
UM1581
542/584
DocID023800 Rev 1
23.2.11 Half-duplex mode function
This subsection provides a set of functions allowing to manage the USART Half-duplex
communication.
The USART can be configured to follow a single-wire half-duplex protocol where the TX
and RX lines are internally connected.
USART Half duplex communication is possible through the following procedure:
1. Program the Baud rate, Word length, Stop bits, Parity, Mode transmitter or Mode
receiver and hardware flow control values using the USART_Init() function.
2. Configures the USART address using the USART_SetAddress() function.
3. Enable the half duplex mode using USART_HalfDuplexCmd() function.
4. Enable the USART using the USART_Cmd() function.
The RX pin is no longer used.
In Half-duplex 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.
ï‚· USART_HalfDuplexCmd()
23.2.12 Smartcard mode functions
This subsection provides a set of functions allowing to manage the USART Smartcard
communication.
The Smartcard interface is designed to support asynchronous protocol Smartcards as
defined in the ISO 7816-3 standard. The USART can provide a clock to the smartcard
through the SCLK output. In smartcard mode, SCLK is not associated to the
communication but is simply derived from the internal peripheral input clock through a 5-bit
prescaler.
Smartcard communication is possible through the following procedure:
1. Configures the Smartcard Prsecaler using the USART_SetPrescaler() function.
2. Configures the Smartcard Guard Time using the USART_SetGuardTime() function.
3. Program the USART clock using the USART_ClockInit() function as following:
 USART Clock enabled.
 USART CPOL Low.
 USART CPHA on first edge.
 USART Last Bit Clock Enabled.
4. Program the Smartcard interface using the USART_Init() function as following:
 Word Length = 9 Bits.
 1.5 Stop Bit.
 Even parity.
 BaudRate = 12096 baud.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals