STM32L443xx HAL User Manual
Defines
Helper Macros
LPUART Exported Macros

Defines

#define __LL_LPUART_DIV(__PERIPHCLK__, __BAUDRATE__)
 Compute LPUARTDIV value according to Peripheral Clock and expected Baud Rate (20-bit value of LPUARTDIV is returned)

Define Documentation

#define __LL_LPUART_DIV (   __PERIPHCLK__,
  __BAUDRATE__ 
)
Value:
(uint32_t)(((((uint64_t)(__PERIPHCLK__)*LPUART_LPUARTDIV_FREQ_MUL) + (uint32_t)((__BAUDRATE__)/2U))/(__BAUDRATE__))\
                                                                & LPUART_BRR_MASK)

Compute LPUARTDIV value according to Peripheral Clock and expected Baud Rate (20-bit value of LPUARTDIV is returned)

Parameters:
__PERIPHCLK__Peripheral Clock frequency used for LPUART Instance
__BAUDRATE__Baud Rate value to achieve
Return values:
LPUARTDIVvalue to be used for BRR register filling

Definition at line 505 of file stm32l4xx_ll_lpuart.h.

Referenced by LL_LPUART_SetBaudRate().