UM1581
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.
USART_LINBreakDetectLengthConfig()
USART_LINCmd()
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.
DocID023800 Rev 1
Universal synchronous asynchronous receiver
transmitter (USART)
541/584
Need help?
Do you have a question about the STM32F31xx and is the answer not in the manual?