LL_USART_DisableSCLKOutput() functionClear STOP in
CR2 using LL_USART_SetStopBitsLength() functionClear
SCEN in CR3 using LL_USART_DisableSmartcard()
functionClear IREN in CR3 using LL_USART_DisableIrda()
functionClear HDSEL in CR3 using
LL_USART_DisableHalfDuplex() functionSet LINEN in CR2
using LL_USART_EnableLIN() function
Other remaining configurations items related to LIN Mode (as
Baud Rate, Word length, LIN Break Detection Length, ...)
should be set using dedicated functions
Reference Manual to
LL API cross
reference:
CR2 CLKEN LL_USART_ConfigLINMode
CR2 STOP LL_USART_ConfigLINMode
CR2 LINEN LL_USART_ConfigLINMode
CR3 IREN LL_USART_ConfigLINMode
CR3 SCEN LL_USART_ConfigLINMode
CR3 HDSEL LL_USART_ConfigLINMode
LL_USART_ConfigHalfDuplexMode
__STATIC_INLINE void LL_USART_ConfigHalfDuplexMode
(USART_TypeDef * USARTx)
Perform basic configuration of USART for enabling use in Half
Duplex Mode.
In Half Duplex mode, the following bits must be kept cleared:
LINEN bit in the USART_CR2 register,CLKEN bit in the
USART_CR2 register,SCEN bit in the USART_CR3
register,IREN bit in the USART_CR3 register, This function
also sets the UART/USART in Half Duplex mode.
Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can
be used to check whether or not Half-Duplex mode is
supported by the USARTx instance.
Call of this function is equivalent to following function call
sequence : Clear LINEN in CR2 using
LL_USART_DisableLIN() functionClear CLKEN in CR2 using
LL_USART_DisableSCLKOutput() functionClear SCEN in
CR3 using LL_USART_DisableSmartcard() functionClear
IREN in CR3 using LL_USART_DisableIrda() functionSet
HDSEL in CR3 using LL_USART_EnableHalfDuplex()
function
Other remaining configurations items related to Half Duplex
Mode (as Baud Rate, Word length, Parity, ...) should be set
using dedicated functions
Reference Manual to
LL API cross
reference:
CR2 LINEN LL_USART_ConfigHalfDuplexMode
CR2 CLKEN LL_USART_ConfigHalfDuplexMode
CR3 HDSEL LL_USART_ConfigHalfDuplexMode
CR3 SCEN LL_USART_ConfigHalfDuplexMode
CR3 IREN LL_USART_ConfigHalfDuplexMode