Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more
LIN mode functions
[USART_Private_Functions]
LIN mode functions. More...
Functions | |
| void | USART_LINBreakDetectLengthConfig (USART_TypeDef *USARTx, uint32_t USART_LINBreakDetectLength) |
| Sets the USART LIN Break detection length. | |
| void | USART_LINCmd (USART_TypeDef *USARTx, FunctionalState NewState) |
| Enables or disables the USART's LIN mode. | |
Detailed Description
LIN mode functions.
===============================================================================
##### 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:
(#) 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.
(#) Enable the LIN mode using the USART_LINCmd() function.
(#) Enable the USART using the USART_Cmd() function.
(#) Send the break character using USART_SendBreak() function.
[..] USART LIN Master receiver communication is possible through the
following procedure:
(#) 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.
(#) Configures the break detection length
using the USART_LINBreakDetectLengthConfig() function.
(#) Enable the LIN mode using the USART_LINCmd() function.
(#) 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.
Function Documentation
| void USART_LINBreakDetectLengthConfig | ( | USART_TypeDef * | USARTx, |
| uint32_t | USART_LINBreakDetectLength | ||
| ) |
Sets the USART LIN Break detection length.
- Parameters:
-
USARTx,: Select the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5. USART_LINBreakDetectLength,: specifies the LIN break detection length. This parameter can be one of the following values: - USART_LINBreakDetectLength_10b: 10-bit break detection
- USART_LINBreakDetectLength_11b: 11-bit break detection
- Return values:
-
None
Definition at line 1119 of file stm32f30x_usart.c.
| void USART_LINCmd | ( | USART_TypeDef * | USARTx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the USART's LIN mode.
- Parameters:
-
USARTx,: Select the USART peripheral. This parameter can be one of the following values: USART1 or USART2 or USART3 or UART4 or UART5. NewState,: new state of the USART LIN mode. This parameter can be: ENABLE or DISABLE.
- Return values:
-
None
Definition at line 1137 of file stm32f30x_usart.c.
Generated on Tue Jul 12 2022 17:34:46 by
1.7.2