LL USART Macros ¶
Common register Write and Read Macros ¶
- group USART_LL_EM_WRITE_READ
-
Defines
-
LL_USART_WRITE_REG
(
instance
,
reg
,
value
)
STM32_WRITE_REG((instance)->reg,
(value))
¶
-
Write a value in USART register.
- Parameters :
-
-
instance – USART Instance
-
reg – Register to be written
-
value – Value to be written in the register
-
-
LL_USART_READ_REG
(
instance
,
reg
)
STM32_READ_REG((instance)->reg)
¶
-
Read a value in USART register.
- Parameters :
-
-
instance – USART Instance
-
reg – Register to be read
-
- Return values :
-
Register – value
-
LL_USART_WRITE_REG
(
instance
,
reg
,
value
)
STM32_WRITE_REG((instance)->reg,
(value))
¶
- group USART_LL_EM_WRITE_READ
-
Defines
-
LL_USART_WRITE_REG
(
instance
,
reg
,
value
)
STM32_WRITE_REG((instance)->reg,
(value))
-
Write a value in USART register.
- Parameters :
-
-
instance – USART Instance
-
reg – Register to be written
-
value – Value to be written in the register
-
-
LL_USART_READ_REG
(
instance
,
reg
)
STM32_READ_REG((instance)->reg)
-
Read a value in USART register.
- Parameters :
-
-
instance – USART Instance
-
reg – Register to be read
-
- Return values :
-
Register – value
-
LL_USART_WRITE_REG
(
instance
,
reg
,
value
)
STM32_WRITE_REG((instance)->reg,
(value))
- group USART_LL_EM_WRITE_READ
-
Defines
-
LL_USART_WRITE_REG
(
instance
,
reg
,
value
)
STM32_WRITE_REG((instance)->reg,
(value))
-
Write a value in USART register.
- Parameters :
-
-
instance – USART Instance
-
reg – Register to be written
-
value – Value to be written in the register
-
-
LL_USART_READ_REG
(
instance
,
reg
)
STM32_READ_REG((instance)->reg)
-
Read a value in USART register.
- Parameters :
-
-
instance – USART Instance
-
reg – Register to be read
-
- Return values :
-
Register – value
-
LL_USART_WRITE_REG
(
instance
,
reg
,
value
)
STM32_WRITE_REG((instance)->reg,
(value))
Exported_Macros_Helper ¶
- group USART_LL_EM_Exported_Macros_Helper
-
Defines
-
LL_USART_DIV_SAMPLING8
(
periph_clock
,
prescaler
,
baudrate
)
(((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))*2U)/(baudrate))
+
1U)
¶
-
Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 8 bits sampling mode (32 bits value of USARTDIV is returned)
- Parameters :
-
-
periph_clock – Peripheral Clock frequency used for USART instance
-
prescaler – This parameter can be one of the following values:
-
baudrate – Baud rate value to achieve
-
- Return values :
-
USARTDIV – value to be used for BRR register filling in OverSampling_8 case
-
LL_USART_DIV_SAMPLING16
(
periph_clock
,
prescaler
,
baudrate
)
((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))\
+ ((baudrate)/2U))/(baudrate))
¶
-
Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 16 bits sampling mode (32 bits value of USARTDIV is returned)
- Parameters :
-
-
periph_clock – Peripheral Clock frequency used for USART instance
-
prescaler – This parameter can be one of the following values:
-
baudrate – Baud rate value to achieve
-
- Return values :
-
USARTDIV – value to be used for BRR register filling in OverSampling_16 case
-
LL_USART_DIV_SAMPLING8
(
periph_clock
,
prescaler
,
baudrate
)
(((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))*2U)/(baudrate))
+
1U)
¶
- group USART_LL_EM_Exported_Macros_Helper
-
Defines
-
LL_USART_DIV_SAMPLING8
(
periph_clock
,
prescaler
,
baudrate
)
(((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))*2U)/(baudrate))
+
1U)
-
Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 8 bits sampling mode (32 bits value of USARTDIV is returned)
- Parameters :
-
-
periph_clock – Peripheral Clock frequency used for USART instance
-
prescaler – This parameter can be one of the following values:
-
baudrate – Baud rate value to achieve
-
- Return values :
-
USARTDIV – value to be used for BRR register filling in OverSampling_8 case
-
LL_USART_DIV_SAMPLING16
(
periph_clock
,
prescaler
,
baudrate
)
((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))\
+ ((baudrate)/2U))/(baudrate))
-
Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 16 bits sampling mode (32 bits value of USARTDIV is returned)
- Parameters :
-
-
periph_clock – Peripheral Clock frequency used for USART instance
-
prescaler – This parameter can be one of the following values:
-
baudrate – Baud rate value to achieve
-
- Return values :
-
USARTDIV – value to be used for BRR register filling in OverSampling_16 case
-
LL_USART_DIV_SAMPLING8
(
periph_clock
,
prescaler
,
baudrate
)
(((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))*2U)/(baudrate))
+
1U)
- group USART_LL_EM_Exported_Macros_Helper
-
Defines
-
LL_USART_DIV_SAMPLING8
(
periph_clock
,
prescaler
,
baudrate
)
(((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))*2U)/(baudrate))
+
1U)
-
Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 8 bits sampling mode (32 bits value of USARTDIV is returned)
- Parameters :
-
-
periph_clock – Peripheral Clock frequency used for USART instance
-
prescaler – This parameter can be one of the following values:
-
baudrate – Baud rate value to achieve
-
- Return values :
-
USARTDIV – value to be used for BRR register filling in OverSampling_8 case
-
LL_USART_DIV_SAMPLING16
(
periph_clock
,
prescaler
,
baudrate
)
((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))\
+ ((baudrate)/2U))/(baudrate))
-
Compute USARTDIV value according to Peripheral Clock and expected Baud Rate in 16 bits sampling mode (32 bits value of USARTDIV is returned)
- Parameters :
-
-
periph_clock – Peripheral Clock frequency used for USART instance
-
prescaler – This parameter can be one of the following values:
-
baudrate – Baud rate value to achieve
-
- Return values :
-
USARTDIV – value to be used for BRR register filling in OverSampling_16 case
-
LL_USART_DIV_SAMPLING8
(
periph_clock
,
prescaler
,
baudrate
)
(((((periph_clock)/(
USART_PRESCALER_TAB
[(prescaler)]))*2U)/(baudrate))
+
1U)