Universal synchronous asynchronous receiver
transmitter (USART)
1. Program the Baud rate, Word length = 9 bits, 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. Configures the wake up methode (USART_WakeUp_IdleLine or
USART_WakeUp_AddressMark) using USART_WakeUpConfig() function only for the
slaves.
4. Enable the USART using the USART_Cmd() function.
5. Enter the USART slaves in mute mode using USART_ReceiverWakeUpCmd()
function.
The USART Slave exit from mute mode when receive the wake up condition.
ï‚· USART_SetAddress()
ï‚· USART_MuteModeCmd()
ï‚· USART_MuteModeWakeUpConfig()
ï‚· USART_AddressDetectionConfig()
23.2.10 LIN mode functions
This subsection provides a set of functions allowing to manage the USART LIN Mode
communication.
In LIN mode, 8-bit data format with 1 stop bit is required in accordance with the LIN
standard.
Only this LIN Feature is supported by the USART IP:
ï‚· LIN Master Synchronous Break send capability and LIN slave break detection
capability : 13-bit break generation and 10/11 bit break detection.
USART LIN Master transmitter communication is possible through the following procedure:
1. Program the Baud rate, Word length = 8bits, Stop bits = 1bit, Parity, Mode transmitter
or Mode receiver and hardware flow control values using the USART_Init() function.
2. Enable the LIN mode using the USART_LINCmd() function.
3. Enable the USART using the USART_Cmd() function.
4. Send the break character using USART_SendBreak() function.
USART LIN Master receiver communication is possible through the following procedure:
1. Program the Baud rate, Word length = 8bits, Stop bits = 1bit, Parity, Mode transmitter
or Mode receiver and hardware flow control values using the USART_Init() function.
2. Configures the break detection length using the
USART_LINBreakDetectLengthConfig() function.
3. Enable the LIN mode using the USART_LINCmd() function.
4. Enable the USART using the USART_Cmd() function.
In LIN mode, the following bits must be kept cleared:
ï‚· CLKEN in the USART_CR2 register.
ï‚· STOP[1:0], SCEN, HDSEL and IREN in the USART_CR3 register.
ï‚· USART_LINBreakDetectLengthConfig()
ï‚· USART_LINCmd()