Hal Drivers for L4
Dependents: BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo
Fork of STM32L4xx_HAL_Driver by
Advanced Configurations services
[USART Exported Functions]
Functions | |
__STATIC_INLINE void | LL_USART_ConfigAsyncMode (USART_TypeDef *USARTx) |
Perform basic configuration of USART for enabling use in Asynchronous Mode (UART) | |
__STATIC_INLINE void | LL_USART_ConfigSyncMode (USART_TypeDef *USARTx) |
Perform basic configuration of USART for enabling use in Synchronous Mode. | |
__STATIC_INLINE void | LL_USART_ConfigLINMode (USART_TypeDef *USARTx) |
Perform basic configuration of USART for enabling use in LIN Mode. | |
__STATIC_INLINE void | LL_USART_ConfigHalfDuplexMode (USART_TypeDef *USARTx) |
Perform basic configuration of USART for enabling use in Half Duplex Mode. | |
__STATIC_INLINE void | LL_USART_ConfigSmartcardMode (USART_TypeDef *USARTx) |
Perform basic configuration of USART for enabling use in Smartcard Mode. | |
__STATIC_INLINE void | LL_USART_ConfigIrdaMode (USART_TypeDef *USARTx) |
Perform basic configuration of USART for enabling use in Irda Mode. | |
__STATIC_INLINE void | LL_USART_ConfigMultiProcessMode (USART_TypeDef *USARTx) |
Perform basic configuration of USART for enabling use in Multi processor Mode (several USARTs connected in a network, one of the USARTs can be the master, its TX output connected to the RX inputs of the other slaves USARTs). |
Function Documentation
__STATIC_INLINE void LL_USART_ConfigAsyncMode | ( | USART_TypeDef * | USARTx ) |
Perform basic configuration of USART for enabling use in Asynchronous Mode (UART)
- Note:
- In UART mode, the following bits must be kept cleared: LINEN, and CLKEN bits in the USART_CR2 register, SCEN, IREN and HDSEL bits in the USART_CR3 register.
-
Call of this function is equivalent to following function call sequence :
- Clear LINEN in CR2 using LL_USART_DisableLIN() function
- Clear CLKEN in CR2 using LL_USART_DisableSCLKOutput() function
- Clear SCEN in CR3 using LL_USART_DisableSmartcard() function
- Clear IREN in CR3 using LL_USART_DisableIrda() function
- Clear HDSEL in CR3 using LL_USART_DisableHalfDuplex() function
-
Other remaining configurations items related to Asynchronous Mode (as Baudrate, Word length, Parity, ...) should be set using dedicated functions CR2 LINEN LL_USART_ConfigAsyncMode
CR2 CLKEN LL_USART_ConfigAsyncMode
CR3 SCEN LL_USART_ConfigAsyncMode
CR3 IREN LL_USART_ConfigAsyncMode
CR3 HDSEL LL_USART_ConfigAsyncMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 2133 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigHalfDuplexMode | ( | USART_TypeDef * | USARTx ) |
Perform basic configuration of USART for enabling use in Half Duplex Mode.
- Note:
- In Half Duplex mode, the following bits must be kept cleared: LINEN, and CLKEN bits in the USART_CR2 register, SCEN and IREN bits in the USART_CR3 register. This function also sets the UART/USART in Half Duplex mode.
-
Call of this function is equivalent to following function call sequence :
- Clear LINEN in CR2 using LL_USART_DisableLIN() function
- Clear CLKEN in CR2 using LL_USART_DisableSCLKOutput() function
- Clear SCEN in CR3 using LL_USART_DisableSmartcard() function
- Clear IREN in CR3 using LL_USART_DisableIrda() function
- Set HDSEL in CR3 using LL_USART_EnableHalfDuplex() function
- Other remaining configurations items related to Half Duplex Mode (as Baudrate, Word length, Parity, ...) should be set using dedicated functions
-
Macro IS_UART_HALFDUPLEX_INSTANCE(USARTx) can be used to check whether or not Half-Duplex mode is supported by the USARTx instance. 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
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 2241 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigIrdaMode | ( | USART_TypeDef * | USARTx ) |
Perform basic configuration of USART for enabling use in Irda Mode.
- Note:
- In IRDA mode, the following bits must be kept cleared: LINEN, STOP and CLKEN bits in the USART_CR2 register, SCEN and HDSEL bits in the USART_CR3 register. This function also sets the UART/USART in IRDA mode (IREN bit).
-
Call of this function is equivalent to following function call sequence :
- Clear LINEN in CR2 using LL_USART_DisableLIN() function
- Clear CLKEN in CR2 using LL_USART_DisableSCLKOutput() function
- Clear SCEN in CR3 using LL_USART_DisableSmartcard() function
- Clear HDSEL in CR3 using LL_USART_DisableHalfDuplex() function
- Configure STOP in CR2 using LL_USART_SetStopBitsLength() function
- Set IREN in CR3 using LL_USART_EnableIrda() function
- Other remaining configurations items related to Irda Mode (as Baudrate, Word length, Power mode, ...) should be set using dedicated functions
-
Macro IS_IRDA_INSTANCE(USARTx) can be used to check whether or not IrDA feature is supported by the USARTx instance. CR2 LINEN LL_USART_ConfigIrdaMode
CR2 CLKEN LL_USART_ConfigIrdaMode
CR2 STOP LL_USART_ConfigIrdaMode
CR3 SCEN LL_USART_ConfigIrdaMode
CR3 HDSEL LL_USART_ConfigIrdaMode
CR3 IREN LL_USART_ConfigIrdaMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 2321 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigLINMode | ( | USART_TypeDef * | USARTx ) |
Perform basic configuration of USART for enabling use in LIN Mode.
- Note:
- In LIN mode, the following bits must be kept cleared: STOP and CLKEN bits in the USART_CR2 register, IREN, SCEN and HDSEL bits in the USART_CR3 register. This function also set the UART/USART in LIN mode.
-
Call of this function is equivalent to following function call sequence :
- Clear CLKEN in CR2 using LL_USART_DisableSCLKOutput() function
- Clear STOP in CR2 using LL_USART_SetStopBitsLength() function
- Clear SCEN in CR3 using LL_USART_DisableSmartcard() function
- Clear IREN in CR3 using LL_USART_DisableIrda() function
- Clear HDSEL in CR3 using LL_USART_DisableHalfDuplex() function
- Set LINEN in CR2 using LL_USART_EnableLIN() function
- Other remaining configurations items related to LIN Mode (as Baudrate, Word length, LIN Break Detection Length, ...) should be set using dedicated functions
-
Macro IS_UART_LIN_INSTANCE(USARTx) can be used to check whether or not LIN feature is supported by the USARTx instance. 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
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 2205 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigMultiProcessMode | ( | USART_TypeDef * | USARTx ) |
Perform basic configuration of USART for enabling use in Multi processor Mode (several USARTs connected in a network, one of the USARTs can be the master, its TX output connected to the RX inputs of the other slaves USARTs).
- Note:
- In MultiProcessor mode, the following bits must be kept cleared: LINEN, CLKEN bits in the USART_CR2 register, IREN, SCEN and HDSEL bits in the USART_CR3 register.
-
Call of this function is equivalent to following function call sequence :
- Clear LINEN in CR2 using LL_USART_DisableLIN() function
- Clear CLKEN in CR2 using LL_USART_DisableSCLKOutput() function
- Clear SCEN in CR3 using LL_USART_DisableSmartcard() function
- Clear IREN in CR3 using LL_USART_DisableIrda() function
- Clear HDSEL in CR3 using LL_USART_DisableHalfDuplex() function
-
Other remaining configurations items related to Multi processor Mode (as Baudrate, Wake Up Method, Node address, ...) should be set using dedicated functions CR2 LINEN LL_USART_ConfigMultiProcessMode
CR2 CLKEN LL_USART_ConfigMultiProcessMode
CR3 SCEN LL_USART_ConfigMultiProcessMode
CR3 HDSEL LL_USART_ConfigMultiProcessMode
CR3 IREN LL_USART_ConfigMultiProcessMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 2356 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigSmartcardMode | ( | USART_TypeDef * | USARTx ) |
Perform basic configuration of USART for enabling use in Smartcard Mode.
- Note:
- In Smartcard mode, the following bits must be kept cleared: LINEN bit in the USART_CR2 register, IREN and HDSEL bits 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).
-
Call of this function is equivalent to following function call sequence :
- Clear LINEN in CR2 using LL_USART_DisableLIN() function
- Clear IREN in CR3 using LL_USART_DisableIrda() function
- Clear HDSEL in CR3 using LL_USART_DisableHalfDuplex() function
- Configure STOP in CR2 using LL_USART_SetStopBitsLength() function
- Set CLKEN in CR2 using LL_USART_EnableSCLKOutput() function
- Set SCEN in CR3 using LL_USART_EnableSmartcard() function
- Other remaining configurations items related to Smartcard Mode (as Baudrate, Word length, Parity, ...) should be set using dedicated functions
-
Macro IS_SMARTCARD_INSTANCE(USARTx) can be used to check whether or not Smartcard feature is supported by the USARTx instance. 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
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 2280 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigSyncMode | ( | USART_TypeDef * | USARTx ) |
Perform basic configuration of USART for enabling use in Synchronous Mode.
- Note:
- In Synchronous mode, the following bits must be kept cleared: LINEN bit in the USART_CR2 register, SCEN, IREN and HDSEL bits in the USART_CR3 register. This function also sets the USART in Synchronous mode.
-
Call of this function is equivalent to following function call sequence :
- Clear LINEN in CR2 using LL_USART_DisableLIN() function
- Clear IREN in CR3 using LL_USART_DisableSmartcard() function
- Clear SCEN in CR3 using LL_USART_DisableSmartcard() function
- Clear HDSEL in CR3 using LL_USART_DisableHalfDuplex() function
- Set CLKEN in CR2 using LL_USART_EnableSCLKOutput() function
- Other remaining configurations items related to Synchronous Mode (as Baudrate, Word length, Parity, Clock Polarity, ...) should be set using dedicated functions
-
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 LINEN LL_USART_ConfigSyncMode
CR2 CLKEN LL_USART_ConfigSyncMode
CR3 SCEN LL_USART_ConfigSyncMode
CR3 IREN LL_USART_ConfigSyncMode
CR3 HDSEL LL_USART_ConfigSyncMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 2167 of file stm32l4xx_ll_usart.h.
Generated on Tue Jul 12 2022 11:35:29 by
