Universal synchronous asynchronous receiver
transmitter (USART)
These parameters can be configured using the USART_ClockInit() function.
ï‚· USART_DeInit()
ï‚· USART_Init()
ï‚· USART_StructInit()
ï‚· USART_ClockInit()
ï‚· USART_ClockStructInit()
ï‚· USART_Cmd()
ï‚· USART_DirectionModeCmd()
ï‚· USART_OverSampling8Cmd()
ï‚· USART_OneBitMethodCmd()
ï‚· USART_MSBFirstCmd()
ï‚· USART_DataInvCmd()
ï‚· USART_InvPinCmd()
ï‚· USART_SWAPPinCmd()
ï‚· USART_ReceiverTimeOutCmd()
ï‚· USART_SetReceiverTimeOut()
ï‚· USART_SetPrescaler()
23.2.3 RS485 mode functions
This subsection provides a set of functions allowing to manage the USART RS485 flow
control.
RS485 flow control (Driver enable feature) handling 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. Enable the Driver Enable using the USART_DECmd() function.
3. Configures the Driver Enable polarity using the USART_DEPolarityConfig() function.
4. Configures the Driver Enable assertion time using USART_SetDEAssertionTime()
function and deassertion time using the USART_SetDEDeassertionTime() function.
5. Enable the USART using the USART_Cmd() function.
The assertion and dessertion times are expressed in sample time units (1/8 or
1/16 bit time, depending on the oversampling rate).
ï‚· USART_DECmd()
ï‚· USART_DEPolarityConfig()
ï‚· USART_SetDEAssertionTime()
ï‚· USART_SetDEDeassertionTime()
23.2.4 DMA transfers management functions
This section provides two functions that can be used only in DMA mode.
In DMA Mode, the USART communication can be managed by 2 DMA Channel requests:
1. USART_DMAReq_Tx: specifies the Tx buffer DMA transfer request.
2. USART_DMAReq_Rx: specifies the Rx buffer DMA transfer request.