UM1581
5.
Optionally you can enable the parity error interrupt using the USART_ITConfig()
function.
6.
Enable the Smartcard NACK using the USART_SmartCardNACKCmd() function.
7.
Enable the Smartcard interface using the USART_SmartCardCmd() function.
8.
Enable the USART using the USART_Cmd() function.
Please refer to the ISO 7816-3 specification for more details.
USART_SetGuardTime()
USART_SmartCardCmd()
USART_SmartCardNACKCmd()
USART_SetAutoRetryCount()
USART_SetBlockLength()
23.2.13
IrDA mode functions
This subsection provides a set of functions allowing to manage the USART IrDA
communication.
IrDA is a half duplex communication protocol. If the Transmitter is busy, any data on the
IrDA receive line will be ignored by the IrDA decoder and if the Receiver is busy, data on
the TX from the USART to IrDA will not be encoded by IrDA. While receiving data,
transmission should be avoided as the data to be transmitted could be corrupted.
IrDA communication is possible through the following procedure:
1.
Program the Baud rate, Word length = 8 bits, Stop bits, Parity, Transmitter/Receiver
modes and hardware flow control values using the USART_Init() function.
2.
Configures the IrDA pulse width by configuring the prescaler using the
USART_SetPrescaler() function.
3.
Configures the IrDA USART_IrDAMode_LowPower or USART_IrDAMode_Normal
mode using the USART_IrDAConfig() function.
4.
Enable the IrDA using the USART_IrDACmd() function.
5.
Enable the USART using the USART_Cmd() function.
Hardware flow control disabled (RTS and CTS signals).
Tx and Rx enabled
It is also possible to choose 0.5 stop bit for receiving but it is recommended to
use 1.5 stop bits for both transmitting and receiving to avoid switching between
the two configurations.
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.
A pulse of width less than two and greater than one PSC period(s) may or may
not be rejected.
DocID023800 Rev 1
Universal synchronous asynchronous receiver
transmitter (USART)
543/584
Need help?
Do you have a question about the STM32F31xx and is the answer not in the manual?