STM32L486xx HAL User Manual
Functions
Initialization and de-initialization functions
LPUART Exported Functions

Functions

ErrorStatus LL_LPUART_DeInit (USART_TypeDef *LPUARTx)
 De-initialize LPUART registers (Registers restored to their default values).
ErrorStatus LL_LPUART_Init (USART_TypeDef *LPUARTx, LL_LPUART_InitTypeDef *LPUART_InitStruct)
 Initialize LPUART registers according to the specified parameters in LPUART_InitStruct.
void LL_LPUART_StructInit (LL_LPUART_InitTypeDef *LPUART_InitStruct)
 Set each LL_LPUART_InitTypeDef field to default value.

Function Documentation

ErrorStatus LL_LPUART_DeInit ( USART_TypeDef *  LPUARTx)

De-initialize LPUART registers (Registers restored to their default values).

Parameters:
LPUARTxLPUART Instance
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: LPUART registers are de-initialized
  • ERROR: not applicable

Definition at line 148 of file stm32l4xx_ll_lpuart.c.

References assert_param, LL_APB1_GRP2_ForceReset(), LL_APB1_GRP2_PERIPH_LPUART1, and LL_APB1_GRP2_ReleaseReset().

ErrorStatus LL_LPUART_Init ( USART_TypeDef *  LPUARTx,
LL_LPUART_InitTypeDef LPUART_InitStruct 
)

Initialize LPUART registers according to the specified parameters in LPUART_InitStruct.

Note:
As some bits in LPUART configuration registers can only be written when the LPUART is disabled (USART_CR1_UE bit =0), LPUART IP should be in disabled state prior calling this function. Otherwise, ERROR result will be returned.
Baud rate value stored in LPUART_InitStruct BaudRate field, should be valid (different from 0).
Parameters:
LPUARTxLPUART Instance
LPUART_InitStructpointer to a LL_LPUART_InitTypeDef structure that contains the configuration information for the specified LPUART peripheral.
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: LPUART registers are initialized according to LPUART_InitStruct content
  • ERROR: Problem occurred during LPUART Registers initialization

Definition at line 184 of file stm32l4xx_ll_lpuart.c.

References assert_param, LL_LPUART_InitTypeDef::BaudRate, LL_LPUART_InitTypeDef::DataWidth, LL_LPUART_InitTypeDef::HardwareFlowControl, IS_LL_LPUART_BAUDRATE, IS_LL_LPUART_BRR_MAX, IS_LL_LPUART_BRR_MIN, IS_LL_LPUART_DATAWIDTH, IS_LL_LPUART_DIRECTION, IS_LL_LPUART_HWCONTROL, IS_LL_LPUART_PARITY, IS_LL_LPUART_STOPBITS, LL_LPUART_IsEnabled(), LL_LPUART_SetBaudRate(), LL_LPUART_SetHWFlowCtrl(), LL_LPUART_SetStopBitsLength(), LL_RCC_GetLPUARTClockFreq(), LL_RCC_LPUART1_CLKSOURCE, LL_RCC_PERIPH_FREQUENCY_NO, LL_LPUART_InitTypeDef::Parity, LL_LPUART_InitTypeDef::StopBits, and LL_LPUART_InitTypeDef::TransferDirection.

void LL_LPUART_StructInit ( LL_LPUART_InitTypeDef LPUART_InitStruct)