Ll_Usart_Configsmartcardmode; Ll_Usart_Configirdamode - ST STM32F2 User Manual

Description of stm32f2 hal and low layer drivers
Hide thumbs Also See for STM32F2:
Table of Contents

Advertisement

UM1940

LL_USART_ConfigSmartcardMode

Function name
Function description
Parameters
Return values
Notes
Reference Manual to
LL API cross
reference:

LL_USART_ConfigIrdaMode

Function name
Function description
Parameters
Return values
Notes
__STATIC_INLINE void LL_USART_ConfigSmartcardMode
(USART_TypeDef * USARTx)
Perform basic configuration of USART for enabling use in
Smartcard Mode.
USARTx: USART Instance
None:
In Smartcard mode, the following bits must be kept cleared:
LINEN bit in the USART_CR2 register,IREN bit in the
USART_CR3 register,HDSEL bit in the USART_CR3 register.
This function also configures Stop bits to 1.5 bits and sets the
USART in Smartcard mode (SCEN bit). Clock Output is also
enabled (CLKEN).
Macro IS_SMARTCARD_INSTANCE(USARTx) can be used
to check whether or not Smartcard feature 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 IREN in CR3 using
LL_USART_DisableIrda() functionClear HDSEL in CR3 using
LL_USART_DisableHalfDuplex() functionConfigure STOP in
CR2 using LL_USART_SetStopBitsLength() functionSet
CLKEN in CR2 using LL_USART_EnableSCLKOutput()
functionSet SCEN in CR3 using
LL_USART_EnableSmartcard() function
Other remaining configurations items related to Smartcard
Mode (as Baud Rate, Word length, Parity, ...) should be set
using dedicated functions
CR2 LINEN LL_USART_ConfigSmartcardMode
CR2 STOP LL_USART_ConfigSmartcardMode
CR2 CLKEN LL_USART_ConfigSmartcardMode
CR3 HDSEL LL_USART_ConfigSmartcardMode
CR3 SCEN LL_USART_ConfigSmartcardMode
__STATIC_INLINE void LL_USART_ConfigIrdaMode
(USART_TypeDef * USARTx)
Perform basic configuration of USART for enabling use in Irda
Mode.
USARTx: USART Instance
None:
In IRDA mode, the following bits must be kept cleared: LINEN
bit in the USART_CR2 register,STOP and CLKEN bits in the
USART_CR2 register,SCEN bit in the USART_CR3
register,HDSEL bit in the USART_CR3 register. This function
also sets the UART/USART in IRDA mode (IREN bit).
Macro IS_IRDA_INSTANCE(USARTx) can be used to check
whether or not IrDA feature is supported by the USARTx
DocID028236 Rev 2
LL USART Generic Driver
1269/1371

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF