HAL UART Types ¶
HAL UART Types ¶
- group UART_Exported_Types
-
Typedefs
-
typedef
struct
hal_uart_handle_s
hal_uart_handle_t
¶
-
HAL UART handler type
-
typedef
void
(
*
hal_uart_cb_t
)
(
hal_uart_handle_t
*
huart
)
¶
-
HAL UART Generic UART callback Type
-
typedef
void
(
*
hal_uart_rx_cplt_cb_t
)
(
hal_uart_handle_t
*
huart
,
uint32_t
size_byte
,
hal_uart_rx_event_types_t
rx_event
)
¶
-
HAL UART Reception Complete Callback Pointer Type
Enums
-
enum
hal_uart_t
¶
-
HAL UART Instance Definition.
Values:
-
enumerator
HAL_UART1
¶
-
Instance USART1
-
enumerator
HAL_UART2
¶
-
Instance USART2
-
enumerator
HAL_UART3
¶
-
Instance USART3
-
enumerator
HAL_UART4
¶
-
Instance UART4
-
enumerator
HAL_UART5
¶
-
Instance UART5
-
enumerator
HAL_LPUART1
¶
-
Instance LPUART1
-
enumerator
HAL_UART1
¶
-
enum
hal_uart_state_t
¶
-
HAL UART State Structure Definition.
Values:
-
enumerator
HAL_UART_STATE_RESET
¶
-
Peripheral is not initialized
-
enumerator
HAL_UART_STATE_INIT
¶
-
Peripheral is initialized but not configured
-
enumerator
HAL_UART_STATE_CONFIGURED
¶
-
Peripheral is initialized and a global config is set
-
enumerator
HAL_UART_STATE_RESET
¶
-
enum
hal_uart_rx_state_t
¶
-
HAL UART Reception State Definition.
Values:
-
enumerator
HAL_UART_RX_STATE_RESET
¶
-
Data Reception process is in reset
-
enumerator
HAL_UART_RX_STATE_IDLE
¶
-
Data Reception process is in idle
-
enumerator
HAL_UART_RX_STATE_ACTIVE
¶
-
Data Reception process is ongoing
-
enumerator
HAL_UART_RX_STATE_PAUSED
¶
-
Data Reception process is paused
-
enumerator
HAL_UART_RX_STATE_ABORT
¶
-
Data Reception process is aborting
-
enumerator
HAL_UART_RX_STATE_RESET
¶
-
enum
hal_uart_tx_state_t
¶
-
HAL UART Transmission State Definition.
Values:
-
enumerator
HAL_UART_TX_STATE_RESET
¶
-
Data Transmission process is in reset
-
enumerator
HAL_UART_TX_STATE_IDLE
¶
-
Data Transmission process is in idle
-
enumerator
HAL_UART_TX_STATE_ACTIVE
¶
-
Data Transmission process is ongoing
-
enumerator
HAL_UART_TX_STATE_PAUSED
¶
-
Data Transmission process is paused
-
enumerator
HAL_UART_TX_STATE_ABORT
¶
-
Data Transmission process is aborting
-
enumerator
HAL_UART_TX_STATE_RESET
¶
-
enum
hal_uart_rx_modes_t
¶
-
HAL UART reception mode definition.
Values:
-
enumerator
HAL_UART_RX_STANDARD
¶
-
Standard reception
-
enumerator
HAL_UART_RX_TO_IDLE
¶
-
Reception till completion or IDLE event
-
enumerator
HAL_UART_RX_TO_RTO
¶
-
Reception till completion or Receive TimeOut(RTO) event
-
enumerator
HAL_UART_RX_TO_CHAR_MATCH
¶
-
Reception till completion or character match (CM) event
-
enumerator
HAL_UART_RX_STANDARD
¶
-
enum
hal_uart_rx_event_types_t
¶
-
HAL UART reception event types definition.
Values:
-
enumerator
HAL_UART_RX_EVENT_TC
¶
-
RxEvent linked to Transfer Complete event
-
enumerator
HAL_UART_RX_EVENT_IDLE
¶
-
RxEvent linked to IDLE event
-
enumerator
HAL_UART_RX_EVENT_RTO
¶
-
RxEvent linked to TimeOut event
-
enumerator
HAL_UART_RX_EVENT_CHAR_MATCH
¶
-
RxEvent linked to Character Match event
-
enumerator
HAL_UART_RX_EVENT_TC
¶
-
struct
hal_uart_handle_s
¶
-
#include <stm32c5xx_hal_uart.h>
HAL UART handle structure type.
Public Members
-
hal_uart_t
instance
¶
-
Peripheral instance
-
const
uint8_t
*
p_tx_buff
¶
-
Pointer to USART Tx transfer buffer
-
volatile
uint32_t
tx_xfer_size
¶
-
USART Tx transfer size
-
volatile
uint32_t
tx_xfer_count
¶
-
USART Tx transfer counter
-
uint8_t
*
p_rx_buff
¶
-
Pointer to USART Rx transfer buffer
-
volatile
uint32_t
rx_xfer_size
¶
-
USART Rx transfer size
-
volatile
uint32_t
rx_xfer_count
¶
-
USART Rx transfer counter
-
volatile
uint16_t
rdr_mask
¶
-
USART Rx RDR register mask
-
hal_uart_fifo_mode_status_t
fifo_mode
¶
-
Specifies whether the FIFO mode is being used.
-
uint16_t
nb_rx_data_to_process
¶
-
Number of data to process during RX ISR execution
-
uint16_t
nb_tx_data_to_process
¶
-
Number of data to process during TX ISR execution
-
volatile
hal_uart_rx_modes_t
reception_type
¶
-
Type of ongoing reception
-
void
(
*
p_rx_isr
)
(
struct
hal_uart_handle_s
*
huart
)
¶
-
Function pointer on Rx IRQ handler
-
void
(
*
p_tx_isr
)
(
struct
hal_uart_handle_s
*
huart
)
¶
-
Function pointer on Tx IRQ handler
-
hal_dma_handle_t
*
hdma_tx
¶
-
USART Tx DMA handle parameters
-
hal_dma_handle_t
*
hdma_rx
¶
-
USART Rx DMA handle parameters
-
volatile
hal_uart_state_t
global_state
¶
-
USART state information related to global handle management
-
volatile
hal_uart_rx_state_t
rx_state
¶
-
USART state information related to Rx operations.
-
volatile
hal_uart_tx_state_t
tx_state
¶
-
USART state information related to Tx operations.
-
hal_uart_cb_t
p_tx_half_cplt_callback
¶
-
USART Tx half complete callback
-
hal_uart_cb_t
p_tx_cplt_callback
¶
-
USART Tx complete callback
-
hal_uart_cb_t
p_rx_half_cplt_callback
¶
-
USART Rx half complete callback
-
hal_uart_rx_cplt_cb_t
p_rx_cplt_callback
¶
-
USART Rx complete callback
-
hal_uart_cb_t
p_error_callback
¶
-
USART error callback
-
hal_uart_cb_t
p_abort_cplt_callback
¶
-
USART abort complete callback
-
hal_uart_cb_t
p_abort_transmit_cplt_callback
¶
-
USART abort transmit complete callback
-
hal_uart_cb_t
p_abort_receive_cplt_callback
¶
-
USART abort receive complete callback
-
hal_uart_cb_t
p_wakeup_callback
¶
-
USART wake-up callback
-
hal_uart_cb_t
p_rx_fifo_full_callback
¶
-
USART Rx FIFO full callback
-
hal_uart_cb_t
p_tx_fifo_empty_callback
¶
-
USART Tx FIFO empty callback
-
hal_uart_cb_t
p_clear_to_send_callback
¶
-
USART clear-to-send callback
-
hal_uart_cb_t
p_lin_break_callback
¶
-
USART LIN break callback
-
hal_os_semaphore_t
semaphore
¶
-
USART OS semaphore
-
const
void
*
p_user_data
¶
-
User Data Pointer
-
volatile
uint32_t
last_reception_error_codes
¶
-
Last error codes on reception side
-
volatile
uint32_t
last_transmission_error_codes
¶
-
Last error codes on transmission side
-
hal_uart_t
instance
¶
-
typedef
struct
hal_uart_handle_s
hal_uart_handle_t
¶
- group UART_Exported_Types
-
Typedefs
-
typedef
struct
hal_uart_handle_s
hal_uart_handle_t
-
HAL UART handler type
-
typedef
void
(
*
hal_uart_cb_t
)
(
hal_uart_handle_t
*
huart
)
-
HAL UART Generic UART callback Type
-
typedef
void
(
*
hal_uart_rx_cplt_cb_t
)
(
hal_uart_handle_t
*
huart
,
uint32_t
size_byte
,
hal_uart_rx_event_types_t
rx_event
)
-
HAL UART Reception Complete Callback Pointer Type
Enums
-
enum
hal_uart_t
-
HAL UART Instance Definition.
Values:
-
enumerator
HAL_UART1
-
Instance USART1
-
enumerator
HAL_UART2
-
Instance USART2
-
enumerator
HAL_UART3
-
Instance USART3
-
enumerator
HAL_UART4
-
Instance UART4
-
enumerator
HAL_UART5
-
Instance UART5
-
enumerator
HAL_UART6
¶
-
Instance USART6
-
enumerator
HAL_UART7
¶
-
Instance UART7
-
enumerator
HAL_LPUART1
-
Instance LPUART1
-
enumerator
HAL_UART1
-
enum
hal_uart_state_t
-
HAL UART State Structure Definition.
Values:
-
enumerator
HAL_UART_STATE_RESET
-
Peripheral is not initialized
-
enumerator
HAL_UART_STATE_INIT
-
Peripheral is initialized but not configured
-
enumerator
HAL_UART_STATE_CONFIGURED
-
Peripheral is initialized and a global config is set
-
enumerator
HAL_UART_STATE_RESET
-
enum
hal_uart_rx_state_t
-
HAL UART Reception State Definition.
Values:
-
enumerator
HAL_UART_RX_STATE_RESET
-
Data Reception process is in reset
-
enumerator
HAL_UART_RX_STATE_IDLE
-
Data Reception process is in idle
-
enumerator
HAL_UART_RX_STATE_ACTIVE
-
Data Reception process is ongoing
-
enumerator
HAL_UART_RX_STATE_PAUSED
-
Data Reception process is paused
-
enumerator
HAL_UART_RX_STATE_ABORT
-
Data Reception process is aborting
-
enumerator
HAL_UART_RX_STATE_RESET
-
enum
hal_uart_tx_state_t
-
HAL UART Transmission State Definition.
Values:
-
enumerator
HAL_UART_TX_STATE_RESET
-
Data Transmission process is in reset
-
enumerator
HAL_UART_TX_STATE_IDLE
-
Data Transmission process is in idle
-
enumerator
HAL_UART_TX_STATE_ACTIVE
-
Data Transmission process is ongoing
-
enumerator
HAL_UART_TX_STATE_PAUSED
-
Data Transmission process is paused
-
enumerator
HAL_UART_TX_STATE_ABORT
-
Data Transmission process is aborting
-
enumerator
HAL_UART_TX_STATE_RESET
-
enum
hal_uart_rx_modes_t
-
HAL UART reception mode definition.
Values:
-
enumerator
HAL_UART_RX_STANDARD
-
Standard reception
-
enumerator
HAL_UART_RX_TO_IDLE
-
Reception till completion or IDLE event
-
enumerator
HAL_UART_RX_TO_RTO
-
Reception till completion or Receive TimeOut(RTO) event
-
enumerator
HAL_UART_RX_TO_CHAR_MATCH
-
Reception till completion or character match (CM) event
-
enumerator
HAL_UART_RX_STANDARD
-
enum
hal_uart_rx_event_types_t
-
HAL UART reception event types definition.
Values:
-
enumerator
HAL_UART_RX_EVENT_TC
-
RxEvent linked to Transfer Complete event
-
enumerator
HAL_UART_RX_EVENT_IDLE
-
RxEvent linked to IDLE event
-
enumerator
HAL_UART_RX_EVENT_RTO
-
RxEvent linked to TimeOut event
-
enumerator
HAL_UART_RX_EVENT_CHAR_MATCH
-
RxEvent linked to Character Match event
-
enumerator
HAL_UART_RX_EVENT_TC
-
struct
hal_uart_handle_s
-
#include <stm32c5xx_hal_uart.h>
HAL UART handle structure type.
Public Members
-
hal_uart_t
instance
-
Peripheral instance
-
const
uint8_t
*
p_tx_buff
-
Pointer to USART Tx transfer buffer
-
volatile
uint32_t
tx_xfer_size
-
USART Tx transfer size
-
volatile
uint32_t
tx_xfer_count
-
USART Tx transfer counter
-
uint8_t
*
p_rx_buff
-
Pointer to USART Rx transfer buffer
-
volatile
uint32_t
rx_xfer_size
-
USART Rx transfer size
-
volatile
uint32_t
rx_xfer_count
-
USART Rx transfer counter
-
volatile
uint16_t
rdr_mask
-
USART Rx RDR register mask
-
hal_uart_fifo_mode_status_t
fifo_mode
-
Specifies whether the FIFO mode is being used.
-
uint16_t
nb_rx_data_to_process
-
Number of data to process during RX ISR execution
-
uint16_t
nb_tx_data_to_process
-
Number of data to process during TX ISR execution
-
volatile
hal_uart_rx_modes_t
reception_type
-
Type of ongoing reception
-
void
(
*
p_rx_isr
)
(
struct
hal_uart_handle_s
*
huart
)
-
Function pointer on Rx IRQ handler
-
void
(
*
p_tx_isr
)
(
struct
hal_uart_handle_s
*
huart
)
-
Function pointer on Tx IRQ handler
-
hal_dma_handle_t
*
hdma_tx
-
USART Tx DMA handle parameters
-
hal_dma_handle_t
*
hdma_rx
-
USART Rx DMA handle parameters
-
volatile
hal_uart_state_t
global_state
-
USART state information related to global handle management
-
volatile
hal_uart_rx_state_t
rx_state
-
USART state information related to Rx operations.
-
volatile
hal_uart_tx_state_t
tx_state
-
USART state information related to Tx operations.
-
hal_uart_cb_t
p_tx_half_cplt_callback
-
USART Tx half complete callback
-
hal_uart_cb_t
p_tx_cplt_callback
-
USART Tx complete callback
-
hal_uart_cb_t
p_rx_half_cplt_callback
-
USART Rx half complete callback
-
hal_uart_rx_cplt_cb_t
p_rx_cplt_callback
-
USART Rx complete callback
-
hal_uart_cb_t
p_error_callback
-
USART error callback
-
hal_uart_cb_t
p_abort_cplt_callback
-
USART abort complete callback
-
hal_uart_cb_t
p_abort_transmit_cplt_callback
-
USART abort transmit complete callback
-
hal_uart_cb_t
p_abort_receive_cplt_callback
-
USART abort receive complete callback
-
hal_uart_cb_t
p_wakeup_callback
-
USART wake-up callback
-
hal_uart_cb_t
p_rx_fifo_full_callback
-
USART Rx FIFO full callback
-
hal_uart_cb_t
p_tx_fifo_empty_callback
-
USART Tx FIFO empty callback
-
hal_uart_cb_t
p_clear_to_send_callback
-
USART clear-to-send callback
-
hal_uart_cb_t
p_lin_break_callback
-
USART LIN break callback
-
hal_os_semaphore_t
semaphore
-
USART OS semaphore
-
const
void
*
p_user_data
-
User Data Pointer
-
volatile
uint32_t
last_reception_error_codes
-
Last error codes on reception side
-
volatile
uint32_t
last_transmission_error_codes
-
Last error codes on transmission side
-
hal_uart_t
instance
-
typedef
struct
hal_uart_handle_s
hal_uart_handle_t
- group UART_Exported_Types
-
Typedefs
-
typedef
struct
hal_uart_handle_s
hal_uart_handle_t
-
HAL UART handler type
-
typedef
void
(
*
hal_uart_cb_t
)
(
hal_uart_handle_t
*
huart
)
-
HAL UART Generic UART callback Type
-
typedef
void
(
*
hal_uart_rx_cplt_cb_t
)
(
hal_uart_handle_t
*
huart
,
uint32_t
size_byte
,
hal_uart_rx_event_types_t
rx_event
)
-
HAL UART Reception Complete Callback Pointer Type
Enums
-
enum
hal_uart_t
-
HAL UART Instance Definition.
Values:
-
enumerator
HAL_UART1
-
Instance USART1
-
enumerator
HAL_UART2
-
Instance USART2
-
enumerator
HAL_UART4
-
Instance UART4
-
enumerator
HAL_UART5
-
Instance UART5
-
enumerator
HAL_LPUART1
-
Instance LPUART1
-
enumerator
HAL_UART1
-
enum
hal_uart_state_t
-
HAL UART State Structure Definition.
Values:
-
enumerator
HAL_UART_STATE_RESET
-
Peripheral is not initialized
-
enumerator
HAL_UART_STATE_INIT
-
Peripheral is initialized but not configured
-
enumerator
HAL_UART_STATE_CONFIGURED
-
Peripheral is initialized and a global config is set
-
enumerator
HAL_UART_STATE_RESET
-
enum
hal_uart_rx_state_t
-
HAL UART Reception State Definition.
Values:
-
enumerator
HAL_UART_RX_STATE_RESET
-
Data Reception process is in reset
-
enumerator
HAL_UART_RX_STATE_IDLE
-
Data Reception process is in idle
-
enumerator
HAL_UART_RX_STATE_ACTIVE
-
Data Reception process is ongoing
-
enumerator
HAL_UART_RX_STATE_PAUSED
-
Data Reception process is paused
-
enumerator
HAL_UART_RX_STATE_ABORT
-
Data Reception process is aborting
-
enumerator
HAL_UART_RX_STATE_RESET
-
enum
hal_uart_tx_state_t
-
HAL UART Transmission State Definition.
Values:
-
enumerator
HAL_UART_TX_STATE_RESET
-
Data Transmission process is in reset
-
enumerator
HAL_UART_TX_STATE_IDLE
-
Data Transmission process is in idle
-
enumerator
HAL_UART_TX_STATE_ACTIVE
-
Data Transmission process is ongoing
-
enumerator
HAL_UART_TX_STATE_PAUSED
-
Data Transmission process is paused
-
enumerator
HAL_UART_TX_STATE_ABORT
-
Data Transmission process is aborting
-
enumerator
HAL_UART_TX_STATE_RESET
-
enum
hal_uart_rx_modes_t
-
HAL UART reception mode definition.
Values:
-
enumerator
HAL_UART_RX_STANDARD
-
Standard reception
-
enumerator
HAL_UART_RX_TO_IDLE
-
Reception till completion or IDLE event
-
enumerator
HAL_UART_RX_TO_RTO
-
Reception till completion or Receive TimeOut(RTO) event
-
enumerator
HAL_UART_RX_TO_CHAR_MATCH
-
Reception till completion or character match (CM) event
-
enumerator
HAL_UART_RX_STANDARD
-
enum
hal_uart_rx_event_types_t
-
HAL UART reception event types definition.
Values:
-
enumerator
HAL_UART_RX_EVENT_TC
-
RxEvent linked to Transfer Complete event
-
enumerator
HAL_UART_RX_EVENT_IDLE
-
RxEvent linked to IDLE event
-
enumerator
HAL_UART_RX_EVENT_RTO
-
RxEvent linked to TimeOut event
-
enumerator
HAL_UART_RX_EVENT_CHAR_MATCH
-
RxEvent linked to Character Match event
-
enumerator
HAL_UART_RX_EVENT_TC
-
struct
hal_uart_handle_s
-
#include <stm32c5xx_hal_uart.h>
HAL UART handle structure type.
Public Members
-
hal_uart_t
instance
-
Peripheral instance
-
const
uint8_t
*
p_tx_buff
-
Pointer to USART Tx transfer buffer
-
volatile
uint32_t
tx_xfer_size
-
USART Tx transfer size
-
volatile
uint32_t
tx_xfer_count
-
USART Tx transfer counter
-
uint8_t
*
p_rx_buff
-
Pointer to USART Rx transfer buffer
-
volatile
uint32_t
rx_xfer_size
-
USART Rx transfer size
-
volatile
uint32_t
rx_xfer_count
-
USART Rx transfer counter
-
volatile
uint16_t
rdr_mask
-
USART Rx RDR register mask
-
hal_uart_fifo_mode_status_t
fifo_mode
-
Specifies whether the FIFO mode is being used.
-
uint16_t
nb_rx_data_to_process
-
Number of data to process during RX ISR execution
-
uint16_t
nb_tx_data_to_process
-
Number of data to process during TX ISR execution
-
volatile
hal_uart_rx_modes_t
reception_type
-
Type of ongoing reception
-
void
(
*
p_rx_isr
)
(
struct
hal_uart_handle_s
*
huart
)
-
Function pointer on Rx IRQ handler
-
void
(
*
p_tx_isr
)
(
struct
hal_uart_handle_s
*
huart
)
-
Function pointer on Tx IRQ handler
-
hal_dma_handle_t
*
hdma_tx
-
USART Tx DMA handle parameters
-
hal_dma_handle_t
*
hdma_rx
-
USART Rx DMA handle parameters
-
volatile
hal_uart_state_t
global_state
-
USART state information related to global handle management
-
volatile
hal_uart_rx_state_t
rx_state
-
USART state information related to Rx operations.
-
volatile
hal_uart_tx_state_t
tx_state
-
USART state information related to Tx operations.
-
hal_uart_cb_t
p_tx_half_cplt_callback
-
USART Tx half complete callback
-
hal_uart_cb_t
p_tx_cplt_callback
-
USART Tx complete callback
-
hal_uart_cb_t
p_rx_half_cplt_callback
-
USART Rx half complete callback
-
hal_uart_rx_cplt_cb_t
p_rx_cplt_callback
-
USART Rx complete callback
-
hal_uart_cb_t
p_error_callback
-
USART error callback
-
hal_uart_cb_t
p_abort_cplt_callback
-
USART abort complete callback
-
hal_uart_cb_t
p_abort_transmit_cplt_callback
-
USART abort transmit complete callback
-
hal_uart_cb_t
p_abort_receive_cplt_callback
-
USART abort receive complete callback
-
hal_uart_cb_t
p_wakeup_callback
-
USART wake-up callback
-
hal_uart_cb_t
p_rx_fifo_full_callback
-
USART Rx FIFO full callback
-
hal_uart_cb_t
p_tx_fifo_empty_callback
-
USART Tx FIFO empty callback
-
hal_uart_cb_t
p_clear_to_send_callback
-
USART clear-to-send callback
-
hal_uart_cb_t
p_lin_break_callback
-
USART LIN break callback
-
hal_os_semaphore_t
semaphore
-
USART OS semaphore
-
const
void
*
p_user_data
-
User Data Pointer
-
volatile
uint32_t
last_reception_error_codes
-
Last error codes on reception side
-
volatile
uint32_t
last_transmission_error_codes
-
Last error codes on transmission side
-
hal_uart_t
instance
-
typedef
struct
hal_uart_handle_s
hal_uart_handle_t
UART FIFO Mode Definition ¶
- group UART_FIFO_Mode
-
Enums
-
enum
hal_uart_fifo_threshold_t
¶
-
HAL UART FIFO threshold definition.
Values:
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_8
¶
-
FIFO reaches 1/8 of its depth FIFO reaches 1/8 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_4
¶
-
FIFO reaches 1/4 of its depth FIFO reaches 1/4 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_2
¶
-
FIFO reaches 1/2 of its depth FIFO reaches 1/2 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_3_4
¶
-
FIFO reaches 3/4 of its depth FIFO reaches 3/4 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_7_8
¶
-
FIFO reaches 7/8 of its depth FIFO reaches 7/8 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_8_8
¶
-
FIFO reaches 8/8 of its depth FIFO becomes empty for TX and full for RX
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_8
¶
-
enum
hal_uart_fifo_threshold_t
¶
- group UART_FIFO_Mode
-
Enums
-
enum
hal_uart_fifo_threshold_t
-
HAL UART FIFO threshold definition.
Values:
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_8
-
FIFO reaches 1/8 of its depth FIFO reaches 1/8 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_4
-
FIFO reaches 1/4 of its depth FIFO reaches 1/4 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_2
-
FIFO reaches 1/2 of its depth FIFO reaches 1/2 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_3_4
-
FIFO reaches 3/4 of its depth FIFO reaches 3/4 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_7_8
-
FIFO reaches 7/8 of its depth FIFO reaches 7/8 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_8_8
-
FIFO reaches 8/8 of its depth FIFO becomes empty for TX and full for RX
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_8
-
enum
hal_uart_fifo_mode_status_t
-
HAL UART FIFO mode status definition.
Values:
-
enumerator
HAL_UART_FIFO_MODE_DISABLED
-
UART FIFO mode is disabled
-
enumerator
HAL_UART_FIFO_MODE_ENABLED
-
UART FIFO mode is enabled
-
enumerator
HAL_UART_FIFO_MODE_DISABLED
-
enum
hal_uart_fifo_threshold_t
- group UART_FIFO_Mode
-
Enums
-
enum
hal_uart_fifo_threshold_t
-
HAL UART FIFO threshold definition.
Values:
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_8
-
FIFO reaches 1/8 of its depth FIFO reaches 1/8 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_4
-
FIFO reaches 1/4 of its depth FIFO reaches 1/4 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_2
-
FIFO reaches 1/2 of its depth FIFO reaches 1/2 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_3_4
-
FIFO reaches 3/4 of its depth FIFO reaches 3/4 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_7_8
-
FIFO reaches 7/8 of its depth FIFO reaches 7/8 of its depth
-
enumerator
HAL_UART_FIFO_THRESHOLD_8_8
-
FIFO reaches 8/8 of its depth FIFO becomes empty for TX and full for RX
-
enumerator
HAL_UART_FIFO_THRESHOLD_1_8
-
enum
hal_uart_fifo_mode_status_t
-
HAL UART FIFO mode status definition.
Values:
-
enumerator
HAL_UART_FIFO_MODE_DISABLED
-
UART FIFO mode is disabled
-
enumerator
HAL_UART_FIFO_MODE_ENABLED
-
UART FIFO mode is enabled
-
enumerator
HAL_UART_FIFO_MODE_DISABLED
-
enum
hal_uart_fifo_threshold_t
IRDA power mode Definition ¶
- group UART_IRDA_PowerMode
- group UART_IRDA_PowerMode
-
Enums
-
enum
hal_uart_irda_power_mode_t
-
HAL UART IRDA power mode definition.
Values:
-
enumerator
HAL_UART_IRDA_POWER_MODE_NORMAL
-
IRDA mode normal IrDA normal power mode
-
enumerator
HAL_UART_IRDA_POWER_MODE_LOW
-
IRDA mode low power 0x00000004 IrDA Low-Power IrDA low power mode
-
enumerator
HAL_UART_IRDA_POWER_MODE_NORMAL
-
enum
hal_uart_irda_power_mode_t
- group UART_IRDA_PowerMode
-
Enums
-
enum
hal_uart_irda_power_mode_t
-
HAL UART IRDA power mode definition.
Values:
-
enumerator
HAL_UART_IRDA_POWER_MODE_NORMAL
-
IRDA mode normal IrDA normal power mode
-
enumerator
HAL_UART_IRDA_POWER_MODE_LOW
-
IRDA mode low power 0x00000004 IrDA Low-Power IrDA low power mode
-
enumerator
HAL_UART_IRDA_POWER_MODE_NORMAL
-
enum
hal_uart_irda_power_mode_t
UART Basic configuration Definition ¶
- group UART_Basic_config
-
Enums
-
enum
hal_uart_word_length_t
¶
-
HAL UART Wordlength Definition.
Values:
-
enumerator
HAL_UART_WORD_LENGTH_7_BIT
¶
-
7-bit long UART frame 0x10000000 Word length - Bit 1 7 bit word length : Start bit, 7 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_8_BIT
¶
-
8-bit long UART frame 8 bit word length : Start bit, 8 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_9_BIT
¶
-
9-bit long UART frame 0x00001000 Word length - Bit 0 9 bit word length : Start bit, 9 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_7_BIT
¶
-
enum
hal_uart_stop_bits_t
¶
-
HAL UART Stop Bits Definition.
Values:
-
enumerator
HAL_UART_STOP_BIT_0_5
¶
-
UART frame with 0.5 stop bit 0x00001000 0.5 stop bit
-
enumerator
HAL_UART_STOP_BIT_1
¶
-
UART frame with 1 stop bit 1 stop bit
-
enumerator
HAL_UART_STOP_BIT_1_5
¶
-
UART frame with 1.5 stop bits 1.5 stop bits
-
enumerator
HAL_UART_STOP_BIT_2
¶
-
UART frame with 2 stop bits 0x00002000 2 stop bits
-
enumerator
HAL_UART_STOP_BIT_0_5
¶
-
enum
hal_uart_parity_t
¶
-
HAL UART Parity Definition.
Note
When parity is enabled, the computed parity is inserted at the MSB position of the transmitted data (9th bit when the word length is set to 9 data bits; 8th bit when the word length is set to 8 data bits).
Values:
-
enumerator
HAL_UART_PARITY_NONE
¶
-
No parity Parity control disabled
-
enumerator
HAL_UART_PARITY_EVEN
¶
-
Even parity 0x00000400 Parity Control Enable Parity control enabled and Even Parity is selected
-
enumerator
HAL_UART_PARITY_ODD
¶
-
Odd parity Parity control enabled and Odd Parity is selected
-
enumerator
HAL_UART_PARITY_NONE
¶
-
enum
hal_uart_hw_control_t
¶
-
HAL UART hardware control definition.
Values:
-
enumerator
HAL_UART_HW_CONTROL_NONE
¶
-
No hardware control CTS and RTS hardware flow control disabled
-
enumerator
HAL_UART_HW_CONTROL_RTS
¶
-
Request To Send 0x00000100 RTS Enable RTS output enabled, data is only requested when there is space in the receive buffer
-
enumerator
HAL_UART_HW_CONTROL_CTS
¶
-
Clear To Send 0x00000200 CTS Enable CTS mode enabled, data is only transmitted when the nCTS input is asserted (tied to 0)
-
enumerator
HAL_UART_HW_CONTROL_RTS_CTS
¶
-
Request and Clear To Send CTS and RTS hardware flow control enabled
-
enumerator
HAL_UART_HW_CONTROL_NONE
¶
-
enum
hal_uart_direction_t
¶
-
HAL UART direction definition.
Values:
-
enumerator
HAL_UART_DIRECTION_RX
¶
-
RX mode 0x00000004 Receiver Enable Transmitter is disabled and Receiver is enabled
-
enumerator
HAL_UART_DIRECTION_TX
¶
-
TX mode 0x00000008 Transmitter Enable Transmitter is enabled and Receiver is disabled
-
enumerator
HAL_UART_DIRECTION_TX_RX
¶
-
RX and TX mode Transmitter and Receiver are enabled
-
enumerator
HAL_UART_DIRECTION_RX
¶
-
enum
hal_uart_oversampling_t
¶
-
HAL UART oversampling definition.
Values:
-
enumerator
HAL_UART_OVERSAMPLING_16
¶
-
Oversampling by 16 Oversampling by 16
-
enumerator
HAL_UART_OVERSAMPLING_8
¶
-
Oversampling by 8. LPUART instances do not support this mode, USARTx instances are configured in LIN mode as well. 0x00008000 Oversampling by 8-bit or 16-bit mode Oversampling by 8
-
enumerator
HAL_UART_OVERSAMPLING_16
¶
-
enum
hal_uart_one_bit_sample_t
¶
-
HAL UART one-bit sampling definition.
Note
Selecting the single sample method increases the receiver tolerance to clock deviations.
Values:
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_DISABLE
¶
-
One-bit sampling disabled
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_ENABLE
¶
-
One-bit sampling enabled 0x00000800 One sample bit method enable
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_DISABLE
¶
-
enum
hal_uart_prescaler_t
¶
-
HAL UART clock prescaler definition.
Values:
-
enumerator
HAL_UART_PRESCALER_DIV1
¶
-
fclk_pres = fclk Input clock not divided
-
enumerator
HAL_UART_PRESCALER_DIV2
¶
-
fclk_pres = fclk/2 Input clock divided by 2
-
enumerator
HAL_UART_PRESCALER_DIV4
¶
-
fclk_pres = fclk/4 Input clock divided by 4
-
enumerator
HAL_UART_PRESCALER_DIV6
¶
-
fclk_pres = fclk/6 Input clock divided by 6
-
enumerator
HAL_UART_PRESCALER_DIV8
¶
-
fclk_pres = fclk/8 Input clock divided by 8
-
enumerator
HAL_UART_PRESCALER_DIV10
¶
-
fclk_pres = fclk/10 Input clock divided by 10
-
enumerator
HAL_UART_PRESCALER_DIV12
¶
-
fclk_pres = fclk/12 Input clock divided by 12
-
enumerator
HAL_UART_PRESCALER_DIV16
¶
-
fclk_pres = fclk/16 Input clock divided by 16
-
enumerator
HAL_UART_PRESCALER_DIV32
¶
-
fclk_pres = fclk/32 Input clock divided by 32
-
enumerator
HAL_UART_PRESCALER_DIV64
¶
-
fclk_pres = fclk/64 Input clock divided by 64
-
enumerator
HAL_UART_PRESCALER_DIV128
¶
-
fclk_pres = fclk/128 Input clock divided by 128
-
enumerator
HAL_UART_PRESCALER_DIV256
¶
-
fclk_pres = fclk/256 Input clock divided by 256
-
enumerator
HAL_UART_PRESCALER_DIV1
¶
-
struct
hal_uart_config_t
¶
-
#include <stm32c5xx_hal_uart.h>
HAL UART global config structure type.
Public Members
-
uint32_t
baud_rate
¶
-
This member configures the UART communication baud rate. Value between Min_Data=0 and Max_Data=18000000. For LPUART instances, Min_Data=0 and Max_Data=48000000. The baud rate register is computed using the following formula:
LPUART:
Baud Rate Register = ((256 * lpuart_ker_ckpres) / ((hal_uart_config_t->baud_rate))) where lpuart_ker_ck_pres is the UART input clock divided by a prescaler
UART:
If oversampling is 16 or in LIN mode, Baud Rate Register = ((uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))
If oversampling is 8, Baud Rate Register[15:4] = ((2 * uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))[15:4] Baud Rate Register[3] = 0 Baud Rate Register[2:0] = (((2 * uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))[3:0]) >> 1 where uart_ker_ck_pres is the UART input clock divided by a prescaler
-
hal_uart_prescaler_t
clock_prescaler
¶
-
Specifies the prescaler value used to divide the UART clock source.
-
hal_uart_word_length_t
word_length
¶
-
Specifies the number of data bits transmitted or received in a frame.
-
hal_uart_stop_bits_t
stop_bits
¶
-
Specifies the number of stop bits transmitted.
-
hal_uart_parity_t
parity
¶
-
Specifies the parity mode.
-
hal_uart_direction_t
direction
¶
-
Specifies whether the receive or transmit mode is enabled or disabled.
-
hal_uart_hw_control_t
hw_flow_ctl
¶
-
Specifies whether the hardware flow control mode is enabled or disabled.
-
hal_uart_oversampling_t
oversampling
¶
-
Specifies whether oversampling by 8 is enabled or disabled.
-
hal_uart_one_bit_sample_t
one_bit_sampling
¶
-
Specifies whether single-sample or three-sample majority vote is selected. This parameter is not available for LPUART instances.
-
uint32_t
baud_rate
¶
-
enum
hal_uart_word_length_t
¶
- group UART_Basic_config
-
Enums
-
enum
hal_uart_word_length_t
-
HAL UART Wordlength Definition.
Values:
-
enumerator
HAL_UART_WORD_LENGTH_7_BIT
-
7-bit long UART frame 0x10000000 Word length - Bit 1 7 bit word length : Start bit, 7 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_8_BIT
-
8-bit long UART frame 8 bit word length : Start bit, 8 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_9_BIT
-
9-bit long UART frame 0x00001000 Word length - Bit 0 9 bit word length : Start bit, 9 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_7_BIT
-
enum
hal_uart_stop_bits_t
-
HAL UART Stop Bits Definition.
Values:
-
enumerator
HAL_UART_STOP_BIT_0_5
-
UART frame with 0.5 stop bit 0x00001000 0.5 stop bit
-
enumerator
HAL_UART_STOP_BIT_1
-
UART frame with 1 stop bit 1 stop bit
-
enumerator
HAL_UART_STOP_BIT_1_5
-
UART frame with 1.5 stop bits 1.5 stop bits
-
enumerator
HAL_UART_STOP_BIT_2
-
UART frame with 2 stop bits 0x00002000 2 stop bits
-
enumerator
HAL_UART_STOP_BIT_0_5
-
enum
hal_uart_parity_t
-
HAL UART Parity Definition.
Note
When parity is enabled, the computed parity is inserted at the MSB position of the transmitted data (9th bit when the word length is set to 9 data bits; 8th bit when the word length is set to 8 data bits).
Values:
-
enumerator
HAL_UART_PARITY_NONE
-
No parity Parity control disabled
-
enumerator
HAL_UART_PARITY_EVEN
-
Even parity 0x00000400 Parity Control Enable Parity control enabled and Even Parity is selected
-
enumerator
HAL_UART_PARITY_ODD
-
Odd parity Parity control enabled and Odd Parity is selected
-
enumerator
HAL_UART_PARITY_NONE
-
enum
hal_uart_hw_control_t
-
HAL UART hardware control definition.
Values:
-
enumerator
HAL_UART_HW_CONTROL_NONE
-
No hardware control CTS and RTS hardware flow control disabled
-
enumerator
HAL_UART_HW_CONTROL_RTS
-
Request To Send 0x00000100 RTS Enable RTS output enabled, data is only requested when there is space in the receive buffer
-
enumerator
HAL_UART_HW_CONTROL_CTS
-
Clear To Send 0x00000200 CTS Enable CTS mode enabled, data is only transmitted when the nCTS input is asserted (tied to 0)
-
enumerator
HAL_UART_HW_CONTROL_RTS_CTS
-
Request and Clear To Send CTS and RTS hardware flow control enabled
-
enumerator
HAL_UART_HW_CONTROL_NONE
-
enum
hal_uart_direction_t
-
HAL UART direction definition.
Values:
-
enumerator
HAL_UART_DIRECTION_RX
-
RX mode 0x00000004 Receiver Enable Transmitter is disabled and Receiver is enabled
-
enumerator
HAL_UART_DIRECTION_TX
-
TX mode 0x00000008 Transmitter Enable Transmitter is enabled and Receiver is disabled
-
enumerator
HAL_UART_DIRECTION_TX_RX
-
RX and TX mode Transmitter and Receiver are enabled
-
enumerator
HAL_UART_DIRECTION_RX
-
enum
hal_uart_oversampling_t
-
HAL UART oversampling definition.
Values:
-
enumerator
HAL_UART_OVERSAMPLING_16
-
Oversampling by 16 Oversampling by 16
-
enumerator
HAL_UART_OVERSAMPLING_8
-
Oversampling by 8. LPUART instances do not support this mode, USARTx instances are configured in LIN mode as well. 0x00008000 Oversampling by 8-bit or 16-bit mode Oversampling by 8
-
enumerator
HAL_UART_OVERSAMPLING_16
-
enum
hal_uart_one_bit_sample_t
-
HAL UART one-bit sampling definition.
Note
Selecting the single sample method increases the receiver tolerance to clock deviations.
Values:
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_DISABLE
-
One-bit sampling disabled
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_ENABLE
-
One-bit sampling enabled 0x00000800 One sample bit method enable
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_DISABLE
-
enum
hal_uart_prescaler_t
-
HAL UART clock prescaler definition.
Values:
-
enumerator
HAL_UART_PRESCALER_DIV1
-
fclk_pres = fclk Input clock not divided
-
enumerator
HAL_UART_PRESCALER_DIV2
-
fclk_pres = fclk/2 Input clock divided by 2
-
enumerator
HAL_UART_PRESCALER_DIV4
-
fclk_pres = fclk/4 Input clock divided by 4
-
enumerator
HAL_UART_PRESCALER_DIV6
-
fclk_pres = fclk/6 Input clock divided by 6
-
enumerator
HAL_UART_PRESCALER_DIV8
-
fclk_pres = fclk/8 Input clock divided by 8
-
enumerator
HAL_UART_PRESCALER_DIV10
-
fclk_pres = fclk/10 Input clock divided by 10
-
enumerator
HAL_UART_PRESCALER_DIV12
-
fclk_pres = fclk/12 Input clock divided by 12
-
enumerator
HAL_UART_PRESCALER_DIV16
-
fclk_pres = fclk/16 Input clock divided by 16
-
enumerator
HAL_UART_PRESCALER_DIV32
-
fclk_pres = fclk/32 Input clock divided by 32
-
enumerator
HAL_UART_PRESCALER_DIV64
-
fclk_pres = fclk/64 Input clock divided by 64
-
enumerator
HAL_UART_PRESCALER_DIV128
-
fclk_pres = fclk/128 Input clock divided by 128
-
enumerator
HAL_UART_PRESCALER_DIV256
-
fclk_pres = fclk/256 Input clock divided by 256
-
enumerator
HAL_UART_PRESCALER_DIV1
-
struct
hal_uart_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART global config structure type.
Public Members
-
uint32_t
baud_rate
-
This member configures the UART communication baud rate. Value between Min_Data=0 and Max_Data=18000000. For LPUART instances, Min_Data=0 and Max_Data=48000000. The baud rate register is computed using the following formula:
LPUART:
Baud Rate Register = ((256 * lpuart_ker_ckpres) / ((hal_uart_config_t->baud_rate))) where lpuart_ker_ck_pres is the UART input clock divided by a prescaler
UART:
If oversampling is 16 or in LIN mode, Baud Rate Register = ((uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))
If oversampling is 8, Baud Rate Register[15:4] = ((2 * uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))[15:4] Baud Rate Register[3] = 0 Baud Rate Register[2:0] = (((2 * uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))[3:0]) >> 1 where uart_ker_ck_pres is the UART input clock divided by a prescaler
-
hal_uart_prescaler_t
clock_prescaler
-
Specifies the prescaler value used to divide the UART clock source.
-
hal_uart_word_length_t
word_length
-
Specifies the number of data bits transmitted or received in a frame.
-
hal_uart_stop_bits_t
stop_bits
-
Specifies the number of stop bits transmitted.
-
hal_uart_parity_t
parity
-
Specifies the parity mode.
-
hal_uart_direction_t
direction
-
Specifies whether the receive or transmit mode is enabled or disabled.
-
hal_uart_hw_control_t
hw_flow_ctl
-
Specifies whether the hardware flow control mode is enabled or disabled.
-
hal_uart_oversampling_t
oversampling
-
Specifies whether oversampling by 8 is enabled or disabled.
-
hal_uart_one_bit_sample_t
one_bit_sampling
-
Specifies whether single-sample or three-sample majority vote is selected. This parameter is not available for LPUART instances.
-
uint32_t
baud_rate
-
enum
hal_uart_word_length_t
- group UART_Basic_config
-
Enums
-
enum
hal_uart_word_length_t
-
HAL UART Wordlength Definition.
Values:
-
enumerator
HAL_UART_WORD_LENGTH_7_BIT
-
7-bit long UART frame 0x10000000 Word length - Bit 1 7 bit word length : Start bit, 7 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_8_BIT
-
8-bit long UART frame 8 bit word length : Start bit, 8 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_9_BIT
-
9-bit long UART frame 0x00001000 Word length - Bit 0 9 bit word length : Start bit, 9 data bits, n stop bits
-
enumerator
HAL_UART_WORD_LENGTH_7_BIT
-
enum
hal_uart_stop_bits_t
-
HAL UART Stop Bits Definition.
Values:
-
enumerator
HAL_UART_STOP_BIT_0_5
-
UART frame with 0.5 stop bit 0x00001000 0.5 stop bit
-
enumerator
HAL_UART_STOP_BIT_1
-
UART frame with 1 stop bit 1 stop bit
-
enumerator
HAL_UART_STOP_BIT_1_5
-
UART frame with 1.5 stop bits 1.5 stop bits
-
enumerator
HAL_UART_STOP_BIT_2
-
UART frame with 2 stop bits 0x00002000 2 stop bits
-
enumerator
HAL_UART_STOP_BIT_0_5
-
enum
hal_uart_parity_t
-
HAL UART Parity Definition.
Note
When parity is enabled, the computed parity is inserted at the MSB position of the transmitted data (9th bit when the word length is set to 9 data bits; 8th bit when the word length is set to 8 data bits).
Values:
-
enumerator
HAL_UART_PARITY_NONE
-
No parity Parity control disabled
-
enumerator
HAL_UART_PARITY_EVEN
-
Even parity 0x00000400 Parity Control Enable Parity control enabled and Even Parity is selected
-
enumerator
HAL_UART_PARITY_ODD
-
Odd parity Parity control enabled and Odd Parity is selected
-
enumerator
HAL_UART_PARITY_NONE
-
enum
hal_uart_hw_control_t
-
HAL UART hardware control definition.
Values:
-
enumerator
HAL_UART_HW_CONTROL_NONE
-
No hardware control CTS and RTS hardware flow control disabled
-
enumerator
HAL_UART_HW_CONTROL_RTS
-
Request To Send 0x00000100 RTS Enable RTS output enabled, data is only requested when there is space in the receive buffer
-
enumerator
HAL_UART_HW_CONTROL_CTS
-
Clear To Send 0x00000200 CTS Enable CTS mode enabled, data is only transmitted when the nCTS input is asserted (tied to 0)
-
enumerator
HAL_UART_HW_CONTROL_RTS_CTS
-
Request and Clear To Send CTS and RTS hardware flow control enabled
-
enumerator
HAL_UART_HW_CONTROL_NONE
-
enum
hal_uart_direction_t
-
HAL UART direction definition.
Values:
-
enumerator
HAL_UART_DIRECTION_RX
-
RX mode 0x00000004 Receiver Enable Transmitter is disabled and Receiver is enabled
-
enumerator
HAL_UART_DIRECTION_TX
-
TX mode 0x00000008 Transmitter Enable Transmitter is enabled and Receiver is disabled
-
enumerator
HAL_UART_DIRECTION_TX_RX
-
RX and TX mode Transmitter and Receiver are enabled
-
enumerator
HAL_UART_DIRECTION_RX
-
enum
hal_uart_oversampling_t
-
HAL UART oversampling definition.
Values:
-
enumerator
HAL_UART_OVERSAMPLING_16
-
Oversampling by 16 Oversampling by 16
-
enumerator
HAL_UART_OVERSAMPLING_8
-
Oversampling by 8. LPUART instances do not support this mode, USARTx instances are configured in LIN mode as well. 0x00008000 Oversampling by 8-bit or 16-bit mode Oversampling by 8
-
enumerator
HAL_UART_OVERSAMPLING_16
-
enum
hal_uart_one_bit_sample_t
-
HAL UART one-bit sampling definition.
Note
Selecting the single sample method increases the receiver tolerance to clock deviations.
Values:
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_DISABLE
-
One-bit sampling disabled
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_ENABLE
-
One-bit sampling enabled 0x00000800 One sample bit method enable
-
enumerator
HAL_UART_ONE_BIT_SAMPLE_DISABLE
-
enum
hal_uart_prescaler_t
-
HAL UART clock prescaler definition.
Values:
-
enumerator
HAL_UART_PRESCALER_DIV1
-
fclk_pres = fclk Input clock not divided
-
enumerator
HAL_UART_PRESCALER_DIV2
-
fclk_pres = fclk/2 Input clock divided by 2
-
enumerator
HAL_UART_PRESCALER_DIV4
-
fclk_pres = fclk/4 Input clock divided by 4
-
enumerator
HAL_UART_PRESCALER_DIV6
-
fclk_pres = fclk/6 Input clock divided by 6
-
enumerator
HAL_UART_PRESCALER_DIV8
-
fclk_pres = fclk/8 Input clock divided by 8
-
enumerator
HAL_UART_PRESCALER_DIV10
-
fclk_pres = fclk/10 Input clock divided by 10
-
enumerator
HAL_UART_PRESCALER_DIV12
-
fclk_pres = fclk/12 Input clock divided by 12
-
enumerator
HAL_UART_PRESCALER_DIV16
-
fclk_pres = fclk/16 Input clock divided by 16
-
enumerator
HAL_UART_PRESCALER_DIV32
-
fclk_pres = fclk/32 Input clock divided by 32
-
enumerator
HAL_UART_PRESCALER_DIV64
-
fclk_pres = fclk/64 Input clock divided by 64
-
enumerator
HAL_UART_PRESCALER_DIV128
-
fclk_pres = fclk/128 Input clock divided by 128
-
enumerator
HAL_UART_PRESCALER_DIV256
-
fclk_pres = fclk/256 Input clock divided by 256
-
enumerator
HAL_UART_PRESCALER_DIV1
-
struct
hal_uart_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART global config structure type.
Public Members
-
uint32_t
baud_rate
-
This member configures the UART communication baud rate. Value between Min_Data=0 and Max_Data=18000000. For LPUART instances, Min_Data=0 and Max_Data=48000000. The baud rate register is computed using the following formula:
LPUART:
Baud Rate Register = ((256 * lpuart_ker_ckpres) / ((hal_uart_config_t->baud_rate))) where lpuart_ker_ck_pres is the UART input clock divided by a prescaler
UART:
If oversampling is 16 or in LIN mode, Baud Rate Register = ((uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))
If oversampling is 8, Baud Rate Register[15:4] = ((2 * uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))[15:4] Baud Rate Register[3] = 0 Baud Rate Register[2:0] = (((2 * uart_ker_ckpres) / ((hal_uart_config_t->baud_rate)))[3:0]) >> 1 where uart_ker_ck_pres is the UART input clock divided by a prescaler
-
hal_uart_prescaler_t
clock_prescaler
-
Specifies the prescaler value used to divide the UART clock source.
-
hal_uart_word_length_t
word_length
-
Specifies the number of data bits transmitted or received in a frame.
-
hal_uart_stop_bits_t
stop_bits
-
Specifies the number of stop bits transmitted.
-
hal_uart_parity_t
parity
-
Specifies the parity mode.
-
hal_uart_direction_t
direction
-
Specifies whether the receive or transmit mode is enabled or disabled.
-
hal_uart_hw_control_t
hw_flow_ctl
-
Specifies whether the hardware flow control mode is enabled or disabled.
-
hal_uart_oversampling_t
oversampling
-
Specifies whether oversampling by 8 is enabled or disabled.
-
hal_uart_one_bit_sample_t
one_bit_sampling
-
Specifies whether single-sample or three-sample majority vote is selected. This parameter is not available for LPUART instances.
-
uint32_t
baud_rate
-
enum
hal_uart_word_length_t
UART Auto Baud Rate Definition ¶
- group UART_AutoBaudRate
-
Enums
-
enum
hal_uart_auto_baud_rate_mode_t
¶
-
HAL UART auto baud rate mode definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_START_BIT
¶
-
Auto Baud Rate detection on start bit Measurement of the start bit is used to detect the baud rate
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_FALLING_EDGE
¶
-
Auto Baud Rate detection on falling edge 0x00200000 Falling edge to falling edge measurement. Received frame must start with a single bit = 1 -> Frame = Start10xxxxxx
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_0X7F_FRAME
¶
-
Auto Baud Rate detection on 0x7F frame detection 0x00400000 0x7F frame detection
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_0X55_FRAME
¶
-
Auto Baud Rate detection on 0x55 frame detection 0x55 frame detection
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_START_BIT
¶
-
enum
hal_uart_auto_baud_rate_detection_status_t
¶
-
HAL UART auto baud rate detection definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_NOT_ENABLED
¶
-
Auto baud rate detection not enabled
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_ONGOING
¶
-
Auto baud rate detection started
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_SUCCESS
¶
-
Auto baud rate detection successful
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_ERROR
¶
-
Auto baud rate detection error
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_NOT_ENABLED
¶
-
enum
hal_uart_auto_baud_rate_mode_t
¶
- group UART_AutoBaudRate
-
Enums
-
enum
hal_uart_auto_baud_rate_mode_t
-
HAL UART auto baud rate mode definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_START_BIT
-
Auto Baud Rate detection on start bit Measurement of the start bit is used to detect the baud rate
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_FALLING_EDGE
-
Auto Baud Rate detection on falling edge 0x00200000 Falling edge to falling edge measurement. Received frame must start with a single bit = 1 -> Frame = Start10xxxxxx
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_0X7F_FRAME
-
Auto Baud Rate detection on 0x7F frame detection 0x00400000 0x7F frame detection
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_0X55_FRAME
-
Auto Baud Rate detection on 0x55 frame detection 0x55 frame detection
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_START_BIT
-
enum
hal_uart_auto_baud_rate_detection_status_t
-
HAL UART auto baud rate detection definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_NOT_ENABLED
-
Auto baud rate detection not enabled
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_ONGOING
-
Auto baud rate detection started
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_SUCCESS
-
Auto baud rate detection successful
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_ERROR
-
Auto baud rate detection error
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_NOT_ENABLED
-
enum
hal_uart_auto_baud_rate_status_t
-
HAL UART auto baud rate status definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DISABLED
-
UART auto baud rate is disabled
-
enumerator
HAL_UART_AUTO_BAUD_RATE_ENABLED
-
UART auto baud rate is enabled
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DISABLED
-
enum
hal_uart_auto_baud_rate_mode_t
- group UART_AutoBaudRate
-
Enums
-
enum
hal_uart_auto_baud_rate_mode_t
-
HAL UART auto baud rate mode definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_START_BIT
-
Auto Baud Rate detection on start bit Measurement of the start bit is used to detect the baud rate
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_FALLING_EDGE
-
Auto Baud Rate detection on falling edge 0x00200000 Falling edge to falling edge measurement. Received frame must start with a single bit = 1 -> Frame = Start10xxxxxx
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_0X7F_FRAME
-
Auto Baud Rate detection on 0x7F frame detection 0x00400000 0x7F frame detection
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_0X55_FRAME
-
Auto Baud Rate detection on 0x55 frame detection 0x55 frame detection
-
enumerator
HAL_UART_AUTO_BAUD_DET_ON_START_BIT
-
enum
hal_uart_auto_baud_rate_detection_status_t
-
HAL UART auto baud rate detection definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_NOT_ENABLED
-
Auto baud rate detection not enabled
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_ONGOING
-
Auto baud rate detection started
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_SUCCESS
-
Auto baud rate detection successful
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_ERROR
-
Auto baud rate detection error
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DET_NOT_ENABLED
-
enum
hal_uart_auto_baud_rate_status_t
-
HAL UART auto baud rate status definition.
Values:
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DISABLED
-
UART auto baud rate is disabled
-
enumerator
HAL_UART_AUTO_BAUD_RATE_ENABLED
-
UART auto baud rate is enabled
-
enumerator
HAL_UART_AUTO_BAUD_RATE_DISABLED
-
enum
hal_uart_auto_baud_rate_mode_t
UART Modes Definition ¶
- group UART_Modes
-
Enums
-
enum
hal_uart_wakeup_method_t
¶
-
HAL UART multiprocessor mute mode wake-up method definition.
Values:
-
enumerator
HAL_UART_WAKEUP_METHOD_IDLE_LINE
¶
-
UART wake-up on idle line USART wake up from Mute mode on Idle Line
-
enumerator
HAL_UART_WAKEUP_METHOD_ADDRESS_MARK
¶
-
UART wake-up on address mark 0x00000800 Receiver Wakeup method USART wake up from Mute mode on Address Mark
-
enumerator
HAL_UART_WAKEUP_METHOD_IDLE_LINE
¶
-
enum
hal_uart_multi_processor_mode_mute_status_t
¶
-
HAL UART multiprocessor mute mode status.
Values:
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_ACTIVE
¶
-
UART in active mode
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_MUTE
¶
-
UART in mute mode
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_ACTIVE
¶
-
enum
hal_uart_lin_break_detect_length_t
¶
-
HAL UART LIN break detect length definition.
Values:
-
enumerator
HAL_UART_LIN_BREAK_DETECT_10_BIT
¶
-
LIN 10-bit break detection length 10-bit break detection method selected
-
enumerator
HAL_UART_LIN_BREAK_DETECT_11_BIT
¶
-
LIN 11-bit break detection length 0x00000020 LIN Break Detection Length 11-bit break detection method selected
-
enumerator
HAL_UART_LIN_BREAK_DETECT_10_BIT
¶
-
enum
hal_uart_de_polarity_t
¶
-
HAL UART driver enable (DE) polarity definition.
Values:
-
enumerator
HAL_UART_DE_POLARITY_HIGH
¶
-
Driver Enable(DE) Polarity High DE signal is active high
-
enumerator
HAL_UART_DE_POLARITY_LOW
¶
-
Driver Enable(DE) Polarity Low 0x00008000 Driver Enable Polarity Selection DE signal is active low
-
enumerator
HAL_UART_DE_POLARITY_HIGH
¶
-
enum
hal_uart_lin_mode_status_t
¶
-
HAL UART LIN mode status definition.
Values:
-
enumerator
HAL_UART_LIN_MODE_DISABLED
¶
-
UART LIN mode is disabled
-
enumerator
HAL_UART_LIN_MODE_ENABLED
¶
-
UART LIN mode is enabled
-
enumerator
HAL_UART_LIN_MODE_DISABLED
¶
-
enum
hal_uart_half_duplex_mode_status_t
¶
-
HAL UART half-duplex mode status definition.
Values:
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_DISABLED
¶
-
UART Half Duplex Mode is disabled
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_ENABLED
¶
-
UART Half Duplex Mode is enabled
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_DISABLED
¶
-
struct
hal_uart_multi_processor_mode_wakeup_config_t
¶
-
#include <stm32c5xx_hal_uart.h>
HAL UART multiprocessor communication wake-up from mute mode configuration type.
Public Members
-
hal_uart_wakeup_method_t
wakeup_method
¶
-
UART wakeup method (Idle Line/Address).
-
hal_uart_address_detect_length_t
address_length
¶
-
Specifies whether the address is 4 or 7-bit long.
-
uint8_t
address
¶
-
UART node address (7-bit long max).
-
hal_uart_wakeup_method_t
wakeup_method
¶
-
struct
hal_uart_rs485_config_t
¶
-
#include <stm32c5xx_hal_uart.h>
HAL UART RS485 config type.
Public Members
-
uint32_t
assertion_time_samples
¶
-
UART assertion time, value between 0x00 -> 0x1FU in sample time unit (1/8 or 1/16 bit time, depending on the oversampling).
-
uint32_t
deassertion_time_samples
¶
-
UART deassertion time, value between 0x00 -> 0x1FU in sample time unit (1/8 or 1/16 bit time, depending on the oversampling).
-
hal_uart_de_polarity_t
polarity
¶
-
UART driver enable (DE) polarity.
-
uint32_t
assertion_time_samples
¶
-
enum
hal_uart_wakeup_method_t
¶
- group UART_Modes
-
Enums
-
enum
hal_uart_wakeup_method_t
-
HAL UART multiprocessor mute mode wake-up method definition.
Values:
-
enumerator
HAL_UART_WAKEUP_METHOD_IDLE_LINE
-
UART wake-up on idle line USART wake up from Mute mode on Idle Line
-
enumerator
HAL_UART_WAKEUP_METHOD_ADDRESS_MARK
-
UART wake-up on address mark 0x00000800 Receiver Wakeup method USART wake up from Mute mode on Address Mark
-
enumerator
HAL_UART_WAKEUP_METHOD_IDLE_LINE
-
enum
hal_uart_multi_processor_mode_mute_status_t
-
HAL UART multiprocessor mute mode status.
Values:
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_ACTIVE
-
UART in active mode
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_MUTE
-
UART in mute mode
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_ACTIVE
-
enum
hal_uart_lin_break_detect_length_t
-
HAL UART LIN break detect length definition.
Values:
-
enumerator
HAL_UART_LIN_BREAK_DETECT_10_BIT
-
LIN 10-bit break detection length 10-bit break detection method selected
-
enumerator
HAL_UART_LIN_BREAK_DETECT_11_BIT
-
LIN 11-bit break detection length 0x00000020 LIN Break Detection Length 11-bit break detection method selected
-
enumerator
HAL_UART_LIN_BREAK_DETECT_10_BIT
-
enum
hal_uart_de_polarity_t
-
HAL UART driver enable (DE) polarity definition.
Values:
-
enumerator
HAL_UART_DE_POLARITY_HIGH
-
Driver Enable(DE) Polarity High DE signal is active high
-
enumerator
HAL_UART_DE_POLARITY_LOW
-
Driver Enable(DE) Polarity Low 0x00008000 Driver Enable Polarity Selection DE signal is active low
-
enumerator
HAL_UART_DE_POLARITY_HIGH
-
enum
hal_uart_lin_mode_status_t
-
HAL UART LIN mode status definition.
Values:
-
enumerator
HAL_UART_LIN_MODE_DISABLED
-
UART LIN mode is disabled
-
enumerator
HAL_UART_LIN_MODE_ENABLED
-
UART LIN mode is enabled
-
enumerator
HAL_UART_LIN_MODE_DISABLED
-
enum
hal_uart_half_duplex_mode_status_t
-
HAL UART half-duplex mode status definition.
Values:
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_DISABLED
-
UART Half Duplex Mode is disabled
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_ENABLED
-
UART Half Duplex Mode is enabled
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_DISABLED
-
enum
hal_uart_rs485_mode_status_t
-
HAL UART RS485 Mode Status Definition.
Values:
-
enumerator
HAL_UART_RS485_MODE_DISABLED
-
UART RS485 mode is disabled
-
enumerator
HAL_UART_RS485_MODE_ENABLED
-
UART RS485 mode is enabled
-
enumerator
HAL_UART_RS485_MODE_DISABLED
-
enum
hal_uart_multi_processor_mode_status_t
-
HAL UART multiprocessor mode status definition.
Values:
-
enumerator
HAL_UART_MULTI_PROCESSOR_MODE_DISABLED
-
UART multiprocessor mode is disabled
-
enumerator
HAL_UART_MULTI_PROCESSOR_MODE_ENABLED
-
UART multiprocessor mode is enabled
-
enumerator
HAL_UART_MULTI_PROCESSOR_MODE_DISABLED
-
struct
hal_uart_multi_processor_mode_wakeup_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART multiprocessor communication wake-up from mute mode configuration type.
Public Members
-
hal_uart_wakeup_method_t
wakeup_method
-
UART wakeup method (Idle Line/Address).
-
hal_uart_address_detect_length_t
address_length
-
Specifies whether the address is 4 or 7-bit long.
-
uint8_t
address
-
UART node address (7-bit long max).
-
hal_uart_wakeup_method_t
wakeup_method
-
struct
hal_uart_rs485_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART RS485 config type.
Public Members
-
uint32_t
assertion_time_samples
-
UART assertion time, value between 0x00 -> 0x1FU in sample time unit (1/8 or 1/16 bit time, depending on the oversampling).
-
uint32_t
deassertion_time_samples
-
UART deassertion time, value between 0x00 -> 0x1FU in sample time unit (1/8 or 1/16 bit time, depending on the oversampling).
-
hal_uart_de_polarity_t
polarity
-
UART driver enable (DE) polarity.
-
uint32_t
assertion_time_samples
-
enum
hal_uart_wakeup_method_t
- group UART_Modes
-
Enums
-
enum
hal_uart_wakeup_method_t
-
HAL UART multiprocessor mute mode wake-up method definition.
Values:
-
enumerator
HAL_UART_WAKEUP_METHOD_IDLE_LINE
-
UART wake-up on idle line USART wake up from Mute mode on Idle Line
-
enumerator
HAL_UART_WAKEUP_METHOD_ADDRESS_MARK
-
UART wake-up on address mark 0x00000800 Receiver Wakeup method USART wake up from Mute mode on Address Mark
-
enumerator
HAL_UART_WAKEUP_METHOD_IDLE_LINE
-
enum
hal_uart_multi_processor_mode_mute_status_t
-
HAL UART multiprocessor mute mode status.
Values:
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_ACTIVE
-
UART in active mode
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_MUTE
-
UART in mute mode
-
enumerator
HAL_UART_MULTIPROCESSOR_MODE_IN_ACTIVE
-
enum
hal_uart_lin_break_detect_length_t
-
HAL UART LIN break detect length definition.
Values:
-
enumerator
HAL_UART_LIN_BREAK_DETECT_10_BIT
-
LIN 10-bit break detection length 10-bit break detection method selected
-
enumerator
HAL_UART_LIN_BREAK_DETECT_11_BIT
-
LIN 11-bit break detection length 0x00000020 LIN Break Detection Length 11-bit break detection method selected
-
enumerator
HAL_UART_LIN_BREAK_DETECT_10_BIT
-
enum
hal_uart_de_polarity_t
-
HAL UART driver enable (DE) polarity definition.
Values:
-
enumerator
HAL_UART_DE_POLARITY_HIGH
-
Driver Enable(DE) Polarity High DE signal is active high
-
enumerator
HAL_UART_DE_POLARITY_LOW
-
Driver Enable(DE) Polarity Low 0x00008000 Driver Enable Polarity Selection DE signal is active low
-
enumerator
HAL_UART_DE_POLARITY_HIGH
-
enum
hal_uart_lin_mode_status_t
-
HAL UART LIN mode status definition.
Values:
-
enumerator
HAL_UART_LIN_MODE_DISABLED
-
UART LIN mode is disabled
-
enumerator
HAL_UART_LIN_MODE_ENABLED
-
UART LIN mode is enabled
-
enumerator
HAL_UART_LIN_MODE_DISABLED
-
enum
hal_uart_half_duplex_mode_status_t
-
HAL UART half-duplex mode status definition.
Values:
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_DISABLED
-
UART Half Duplex Mode is disabled
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_ENABLED
-
UART Half Duplex Mode is enabled
-
enumerator
HAL_UART_HALF_DUPLEX_MODE_DISABLED
-
enum
hal_uart_rs485_mode_status_t
-
HAL UART RS485 Mode Status Definition.
Values:
-
enumerator
HAL_UART_RS485_MODE_DISABLED
-
UART RS485 mode is disabled
-
enumerator
HAL_UART_RS485_MODE_ENABLED
-
UART RS485 mode is enabled
-
enumerator
HAL_UART_RS485_MODE_DISABLED
-
enum
hal_uart_multi_processor_mode_status_t
-
HAL UART multiprocessor mode status definition.
Values:
-
enumerator
HAL_UART_MULTI_PROCESSOR_MODE_DISABLED
-
UART multiprocessor mode is disabled
-
enumerator
HAL_UART_MULTI_PROCESSOR_MODE_ENABLED
-
UART multiprocessor mode is enabled
-
enumerator
HAL_UART_MULTI_PROCESSOR_MODE_DISABLED
-
struct
hal_uart_multi_processor_mode_wakeup_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART multiprocessor communication wake-up from mute mode configuration type.
Public Members
-
hal_uart_wakeup_method_t
wakeup_method
-
UART wakeup method (Idle Line/Address).
-
hal_uart_address_detect_length_t
address_length
-
Specifies whether the address is 4 or 7-bit long.
-
uint8_t
address
-
UART node address (7-bit long max).
-
hal_uart_wakeup_method_t
wakeup_method
-
struct
hal_uart_rs485_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART RS485 config type.
Public Members
-
uint32_t
assertion_time_samples
-
UART assertion time, value between 0x00 -> 0x1FU in sample time unit (1/8 or 1/16 bit time, depending on the oversampling).
-
uint32_t
deassertion_time_samples
-
UART deassertion time, value between 0x00 -> 0x1FU in sample time unit (1/8 or 1/16 bit time, depending on the oversampling).
-
hal_uart_de_polarity_t
polarity
-
UART driver enable (DE) polarity.
-
uint32_t
assertion_time_samples
-
enum
hal_uart_wakeup_method_t
UART Stop Mode Definition ¶
- group UART_Stop_Mode
-
Enums
-
enum
hal_uart_stop_mode_status_t
¶
-
HAL UART stop mode status definition.
Values:
-
enumerator
HAL_UART_STOP_MODE_DISABLED
¶
-
UART not functional in low-power mode
-
enumerator
HAL_UART_STOP_MODE_ENABLED
¶
-
UART functional in low-power mode
-
enumerator
HAL_UART_STOP_MODE_DISABLED
¶
-
enum
hal_uart_wakeup_source_t
¶
-
HAL UART stop mode wake-up source definition.
Values:
-
enumerator
HAL_UART_WAKEUP_ON_ADDRESS
¶
-
UART wake-up on address Wake up active on address match
-
enumerator
HAL_UART_WAKEUP_ON_STARTBIT
¶
-
UART wake-up on start bit 0x00200000 Wake up active on Start bit detection
-
enumerator
HAL_UART_WAKEUP_ON_READDATA_NONEMPTY
¶
-
UART wake-up on receive data register not empty or Rx FIFO is not empty Wake up active on RXNE
-
enumerator
HAL_UART_WAKEUP_ON_ADDRESS
¶
-
enum
hal_uart_address_detect_length_t
¶
-
HAL UART address detection length definition.
Values:
-
enumerator
HAL_UART_ADDRESS_DETECT_4_BIT
¶
-
4-bit long wake-up address 4-bit address detection method selected
-
enumerator
HAL_UART_ADDRESS_DETECT_7_BIT
¶
-
7-bit long wake-up address 0x00000010 7-bit or 4-bit Address Detection 7-bit address detection (in 8-bit data mode) method selected
-
enumerator
HAL_UART_ADDRESS_DETECT_4_BIT
¶
-
enum
hal_uart_stop_mode_status_t
¶
- group UART_Stop_Mode
-
Enums
-
enum
hal_uart_stop_mode_status_t
-
HAL UART stop mode status definition.
Values:
-
enumerator
HAL_UART_STOP_MODE_DISABLED
-
UART not functional in low-power mode
-
enumerator
HAL_UART_STOP_MODE_ENABLED
-
UART functional in low-power mode
-
enumerator
HAL_UART_STOP_MODE_DISABLED
-
enum
hal_uart_wakeup_source_t
-
HAL UART stop mode wake-up source definition.
Values:
-
enumerator
HAL_UART_WAKEUP_ON_ADDRESS
-
UART wake-up on address Wake up active on address match
-
enumerator
HAL_UART_WAKEUP_ON_STARTBIT
-
UART wake-up on start bit 0x00200000 Wake up active on Start bit detection
-
enumerator
HAL_UART_WAKEUP_ON_READDATA_NONEMPTY
-
UART wake-up on receive data register not empty or Rx FIFO is not empty Wake up active on RXNE
-
enumerator
HAL_UART_WAKEUP_ON_ADDRESS
-
enum
hal_uart_address_detect_length_t
-
HAL UART address detection length definition.
Values:
-
enumerator
HAL_UART_ADDRESS_DETECT_4_BIT
-
4-bit long wake-up address 4-bit address detection method selected
-
enumerator
HAL_UART_ADDRESS_DETECT_7_BIT
-
7-bit long wake-up address 0x00000010 7-bit or 4-bit Address Detection 7-bit address detection (in 8-bit data mode) method selected
-
enumerator
HAL_UART_ADDRESS_DETECT_4_BIT
-
enum
hal_uart_stop_mode_status_t
- group UART_Stop_Mode
-
Enums
-
enum
hal_uart_stop_mode_status_t
-
HAL UART stop mode status definition.
Values:
-
enumerator
HAL_UART_STOP_MODE_DISABLED
-
UART not functional in low-power mode
-
enumerator
HAL_UART_STOP_MODE_ENABLED
-
UART functional in low-power mode
-
enumerator
HAL_UART_STOP_MODE_DISABLED
-
enum
hal_uart_wakeup_source_t
-
HAL UART stop mode wake-up source definition.
Values:
-
enumerator
HAL_UART_WAKEUP_ON_ADDRESS
-
UART wake-up on address Wake up active on address match
-
enumerator
HAL_UART_WAKEUP_ON_STARTBIT
-
UART wake-up on start bit 0x00200000 Wake up active on Start bit detection
-
enumerator
HAL_UART_WAKEUP_ON_READDATA_NONEMPTY
-
UART wake-up on receive data register not empty or Rx FIFO is not empty Wake up active on RXNE
-
enumerator
HAL_UART_WAKEUP_ON_ADDRESS
-
enum
hal_uart_address_detect_length_t
-
HAL UART address detection length definition.
Values:
-
enumerator
HAL_UART_ADDRESS_DETECT_4_BIT
-
4-bit long wake-up address 4-bit address detection method selected
-
enumerator
HAL_UART_ADDRESS_DETECT_7_BIT
-
7-bit long wake-up address 0x00000010 7-bit or 4-bit Address Detection 7-bit address detection (in 8-bit data mode) method selected
-
enumerator
HAL_UART_ADDRESS_DETECT_4_BIT
-
enum
hal_uart_stop_mode_status_t
UART Advanced Configuration Definition ¶
- group UART_Advanced_config
-
Enums
-
enum
hal_uart_tx_pin_level_invert_status_t
¶
-
HAL UART TX Pin Level Invert Status Definition.
Values:
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_DISABLED
¶
-
UART Tx Pin Level Inversion is disabled
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_ENABLED
¶
-
UART Tx Pin Level Inversion is enabled
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_DISABLED
¶
-
enum
hal_uart_rx_pin_level_invert_status_t
¶
-
HAL UART Rx pin level invert status definition.
Values:
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_DISABLED
¶
-
UART Rx Pin Level Inversion is disabled
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_ENABLED
¶
-
UART Rx Pin Level Inversion is enabled
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_DISABLED
¶
-
enum
hal_uart_data_invert_status_t
¶
-
HAL UART data invert status definition.
Values:
-
enumerator
HAL_UART_DATA_INVERT_DISABLED
¶
-
UART Data Binary Inversion is disabled
-
enumerator
HAL_UART_DATA_INVERT_ENABLED
¶
-
UART Data Binary Inversion is enabled
-
enumerator
HAL_UART_DATA_INVERT_DISABLED
¶
-
enum
hal_uart_tx_rx_swap_status_t
¶
-
HAL UART swap Tx/Rx status definition.
Values:
-
enumerator
HAL_UART_TX_RX_SWAP_DISABLED
¶
-
UART Tx Rx Swap Pins is disabled
-
enumerator
HAL_UART_TX_RX_SWAP_ENABLED
¶
-
UART Tx Rx Swap Pins is enabled
-
enumerator
HAL_UART_TX_RX_SWAP_DISABLED
¶
-
enum
hal_uart_rx_overrun_detection_status_t
¶
-
HAL UART overrun status definition.
Values:
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_DISABLED
¶
-
UART Rx Overrun Detection is disabled
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_ENABLED
¶
-
UART Rx Overrun Detection is enabled
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_DISABLED
¶
-
enum
hal_uart_dma_stop_on_rx_error_status_t
¶
-
HAL UART DMA disable on Rx error status definition.
Values:
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_DISABLED
¶
-
UART DMA Stop On Rx Error is disabled
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_ENABLED
¶
-
UART DMA Stop On Rx Error is enabled
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_DISABLED
¶
-
enum
hal_uart_msb_first_status_t
¶
-
HAL UART Most Significant Bit First Status Definition.
Values:
-
enumerator
HAL_UART_MSB_FIRST_DISABLED
¶
-
UART Most Significant Bit First is disabled
-
enumerator
HAL_UART_MSB_FIRST_ENABLED
¶
-
UART Most Significant Bit First is enabled
-
enumerator
HAL_UART_MSB_FIRST_DISABLED
¶
-
enum
hal_uart_receiver_timeout_status_t
¶
-
HAL UART receiver timeout status definition.
Values:
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_DISABLED
¶
-
UART Receiver TimeOut is disabled
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_ENABLED
¶
-
UART Receiver TimeOut is enabled
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_DISABLED
¶
-
enum
hal_uart_tx_pin_level_invert_status_t
¶
- group UART_Advanced_config
-
Enums
-
enum
hal_uart_tx_pin_level_invert_status_t
-
HAL UART TX Pin Level Invert Status Definition.
Values:
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_DISABLED
-
UART Tx Pin Level Inversion is disabled
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_ENABLED
-
UART Tx Pin Level Inversion is enabled
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_DISABLED
-
enum
hal_uart_rx_pin_level_invert_status_t
-
HAL UART Rx pin level invert status definition.
Values:
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_DISABLED
-
UART Rx Pin Level Inversion is disabled
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_ENABLED
-
UART Rx Pin Level Inversion is enabled
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_DISABLED
-
enum
hal_uart_data_invert_status_t
-
HAL UART data invert status definition.
Values:
-
enumerator
HAL_UART_DATA_INVERT_DISABLED
-
UART Data Binary Inversion is disabled
-
enumerator
HAL_UART_DATA_INVERT_ENABLED
-
UART Data Binary Inversion is enabled
-
enumerator
HAL_UART_DATA_INVERT_DISABLED
-
enum
hal_uart_tx_rx_swap_status_t
-
HAL UART swap Tx/Rx status definition.
Values:
-
enumerator
HAL_UART_TX_RX_SWAP_DISABLED
-
UART Tx Rx Swap Pins is disabled
-
enumerator
HAL_UART_TX_RX_SWAP_ENABLED
-
UART Tx Rx Swap Pins is enabled
-
enumerator
HAL_UART_TX_RX_SWAP_DISABLED
-
enum
hal_uart_rx_overrun_detection_status_t
-
HAL UART overrun status definition.
Values:
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_DISABLED
-
UART Rx Overrun Detection is disabled
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_ENABLED
-
UART Rx Overrun Detection is enabled
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_DISABLED
-
enum
hal_uart_dma_stop_on_rx_error_status_t
-
HAL UART DMA disable on Rx error status definition.
Values:
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_DISABLED
-
UART DMA Stop On Rx Error is disabled
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_ENABLED
-
UART DMA Stop On Rx Error is enabled
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_DISABLED
-
enum
hal_uart_msb_first_status_t
-
HAL UART Most Significant Bit First Status Definition.
Values:
-
enumerator
HAL_UART_MSB_FIRST_DISABLED
-
UART Most Significant Bit First is disabled
-
enumerator
HAL_UART_MSB_FIRST_ENABLED
-
UART Most Significant Bit First is enabled
-
enumerator
HAL_UART_MSB_FIRST_DISABLED
-
enum
hal_uart_receiver_timeout_status_t
-
HAL UART receiver timeout status definition.
Values:
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_DISABLED
-
UART Receiver TimeOut is disabled
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_ENABLED
-
UART Receiver TimeOut is enabled
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_DISABLED
-
enum
hal_uart_transmitter_status_t
-
HAL UART transmitter status definition.
Values:
-
enumerator
HAL_UART_TRANSMITTER_DISABLED
-
UART Transmitter is disabled
-
enumerator
HAL_UART_TRANSMITTER_ENABLED
-
UART transmitter is enabled
-
enumerator
HAL_UART_TRANSMITTER_DISABLED
-
enum
hal_uart_receiver_status_t
-
HAL UART receiver status definition.
Values:
-
enumerator
HAL_UART_RECEIVER_DISABLED
-
UART receiver is disabled
-
enumerator
HAL_UART_RECEIVER_ENABLED
-
UART receiver is enabled
-
enumerator
HAL_UART_RECEIVER_DISABLED
-
enum
hal_uart_tx_pin_level_invert_status_t
- group UART_Advanced_config
-
Enums
-
enum
hal_uart_tx_pin_level_invert_status_t
-
HAL UART TX Pin Level Invert Status Definition.
Values:
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_DISABLED
-
UART Tx Pin Level Inversion is disabled
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_ENABLED
-
UART Tx Pin Level Inversion is enabled
-
enumerator
HAL_UART_TX_PIN_LEVEL_INVERT_DISABLED
-
enum
hal_uart_rx_pin_level_invert_status_t
-
HAL UART Rx pin level invert status definition.
Values:
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_DISABLED
-
UART Rx Pin Level Inversion is disabled
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_ENABLED
-
UART Rx Pin Level Inversion is enabled
-
enumerator
HAL_UART_RX_PIN_LEVEL_INVERT_DISABLED
-
enum
hal_uart_data_invert_status_t
-
HAL UART data invert status definition.
Values:
-
enumerator
HAL_UART_DATA_INVERT_DISABLED
-
UART Data Binary Inversion is disabled
-
enumerator
HAL_UART_DATA_INVERT_ENABLED
-
UART Data Binary Inversion is enabled
-
enumerator
HAL_UART_DATA_INVERT_DISABLED
-
enum
hal_uart_tx_rx_swap_status_t
-
HAL UART swap Tx/Rx status definition.
Values:
-
enumerator
HAL_UART_TX_RX_SWAP_DISABLED
-
UART Tx Rx Swap Pins is disabled
-
enumerator
HAL_UART_TX_RX_SWAP_ENABLED
-
UART Tx Rx Swap Pins is enabled
-
enumerator
HAL_UART_TX_RX_SWAP_DISABLED
-
enum
hal_uart_rx_overrun_detection_status_t
-
HAL UART overrun status definition.
Values:
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_DISABLED
-
UART Rx Overrun Detection is disabled
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_ENABLED
-
UART Rx Overrun Detection is enabled
-
enumerator
HAL_UART_RX_OVERRUN_DETECTION_DISABLED
-
enum
hal_uart_dma_stop_on_rx_error_status_t
-
HAL UART DMA disable on Rx error status definition.
Values:
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_DISABLED
-
UART DMA Stop On Rx Error is disabled
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_ENABLED
-
UART DMA Stop On Rx Error is enabled
-
enumerator
HAL_UART_DMA_STOP_ON_RX_ERROR_DISABLED
-
enum
hal_uart_msb_first_status_t
-
HAL UART Most Significant Bit First Status Definition.
Values:
-
enumerator
HAL_UART_MSB_FIRST_DISABLED
-
UART Most Significant Bit First is disabled
-
enumerator
HAL_UART_MSB_FIRST_ENABLED
-
UART Most Significant Bit First is enabled
-
enumerator
HAL_UART_MSB_FIRST_DISABLED
-
enum
hal_uart_receiver_timeout_status_t
-
HAL UART receiver timeout status definition.
Values:
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_DISABLED
-
UART Receiver TimeOut is disabled
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_ENABLED
-
UART Receiver TimeOut is enabled
-
enumerator
HAL_UART_RECEIVER_TIMEOUT_DISABLED
-
enum
hal_uart_transmitter_status_t
-
HAL UART transmitter status definition.
Values:
-
enumerator
HAL_UART_TRANSMITTER_DISABLED
-
UART Transmitter is disabled
-
enumerator
HAL_UART_TRANSMITTER_ENABLED
-
UART transmitter is enabled
-
enumerator
HAL_UART_TRANSMITTER_DISABLED
-
enum
hal_uart_receiver_status_t
-
HAL UART receiver status definition.
Values:
-
enumerator
HAL_UART_RECEIVER_DISABLED
-
UART receiver is disabled
-
enumerator
HAL_UART_RECEIVER_ENABLED
-
UART receiver is enabled
-
enumerator
HAL_UART_RECEIVER_DISABLED
-
enum
hal_uart_tx_pin_level_invert_status_t
UART Advanced I/O operation Definition ¶
- group UART_Advanced_IO
-
Enums
-
enum
hal_uart_request_t
¶
-
HAL UART request definition.
Values:
-
enumerator
HAL_UART_REQUEST_AUTO_BAUD_RATE
¶
-
Auto-baud rate request. LPUART instances do not support this request. Auto-Baud Rate Request Auto Baud Rate Request
-
enumerator
HAL_UART_REQUEST_SEND_BREAK
¶
-
Send Break Request Send Break Request Send Break Request
-
enumerator
HAL_UART_REQUEST_MUTE_MODE
¶
-
Mute Mode Request Mute Mode Request Mute Mode Request
-
enumerator
HAL_UART_REQUEST_RX_DATA_FLUSH
¶
-
Receive data flush request Receive Data flush Request Receive Data flush Request
-
enumerator
HAL_UART_REQUEST_TX_DATA_FLUSH
¶
-
Transmit data flush request Transmit data flush Request Transmit Data flush Request
-
enumerator
HAL_UART_REQUEST_AUTO_BAUD_RATE
¶
-
enum
hal_uart_request_t
¶
- group UART_Advanced_IO
-
Enums
-
enum
hal_uart_request_t
-
HAL UART request definition.
Values:
-
enumerator
HAL_UART_REQUEST_AUTO_BAUD_RATE
-
Auto-baud rate request. LPUART instances do not support this request. Auto-Baud Rate Request Auto Baud Rate Request
-
enumerator
HAL_UART_REQUEST_SEND_BREAK
-
Send Break Request Send Break Request Send Break Request
-
enumerator
HAL_UART_REQUEST_MUTE_MODE
-
Mute Mode Request Mute Mode Request Mute Mode Request
-
enumerator
HAL_UART_REQUEST_RX_DATA_FLUSH
-
Receive data flush request Receive Data flush Request Receive Data flush Request
-
enumerator
HAL_UART_REQUEST_TX_DATA_FLUSH
-
Transmit data flush request Transmit data flush Request Transmit Data flush Request
-
enumerator
HAL_UART_REQUEST_AUTO_BAUD_RATE
-
enum
hal_uart_request_t
- group UART_Advanced_IO
-
Enums
-
enum
hal_uart_request_t
-
HAL UART request definition.
Values:
-
enumerator
HAL_UART_REQUEST_AUTO_BAUD_RATE
-
Auto-baud rate request. LPUART instances do not support this request. Auto-Baud Rate Request Auto Baud Rate Request
-
enumerator
HAL_UART_REQUEST_SEND_BREAK
-
Send Break Request Send Break Request Send Break Request
-
enumerator
HAL_UART_REQUEST_MUTE_MODE
-
Mute Mode Request Mute Mode Request Mute Mode Request
-
enumerator
HAL_UART_REQUEST_RX_DATA_FLUSH
-
Receive data flush request Receive Data flush Request Receive Data flush Request
-
enumerator
HAL_UART_REQUEST_TX_DATA_FLUSH
-
Transmit data flush request Transmit data flush Request Transmit Data flush Request
-
enumerator
HAL_UART_REQUEST_AUTO_BAUD_RATE
-
enum
hal_uart_request_t
UART_IRDA_config ¶
- group UART_IRDA_config
-
-
struct
hal_uart_irda_config_t
¶
-
#include <stm32c5xx_hal_uart.h>
HAL UART IRDA config structure type.
Public Members
-
uint32_t
baud_rate
¶
-
This member configures the IRDA communication baud rate (value to be set at 115200 baud following IRDA specifications). You can, however, still set the value between Min_Data=0 and Max_Data=18000000 for specific use cases. The baud rate register is computed using the following formula:
Baud Rate Register = ((uart_ker_ckpres) / ((hal_uart_irda_config_t->baud_rate))) where uart_ker_ck_pres is the UART input clock divided by a prescaler
-
hal_uart_prescaler_t
clock_prescaler
¶
-
Specifies the prescaler value used to divide the IRDA clock source.
-
hal_uart_word_length_t
word_length
¶
-
Specifies the number of data bits transmitted or received in a frame.
-
hal_uart_irda_power_mode_t
irda_power_mode
¶
-
Specifies the IRDA mode to be used.
-
hal_uart_direction_t
direction
¶
-
Specifies whether the receive or transmit mode is enabled or disabled.
-
uint32_t
irda_prescaler
¶
-
Specifies the prescaler value for dividing the UART/USART source clock to achieve low-power frequency. Value must be between 0x01 and 0xFF.
-
hal_uart_parity_t
parity
¶
-
Specifies the parity mode.
-
hal_uart_one_bit_sample_t
one_bit_sampling
¶
-
Specifies whether single-sample or three-sample majority vote is selected.
-
uint32_t
baud_rate
¶
-
struct
hal_uart_irda_config_t
¶
- group UART_IRDA_config
-
-
struct
hal_uart_irda_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART IRDA config structure type.
Public Members
-
uint32_t
baud_rate
-
This member configures the IRDA communication baud rate (value to be set at 115200 baud following IRDA specifications). You can, however, still set the value between Min_Data=0 and Max_Data=18000000 for specific use cases. The baud rate register is computed using the following formula:
Baud Rate Register = ((uart_ker_ckpres) / ((hal_uart_irda_config_t->baud_rate))) where uart_ker_ck_pres is the UART input clock divided by a prescaler
-
hal_uart_prescaler_t
clock_prescaler
-
Specifies the prescaler value used to divide the IRDA clock source.
-
hal_uart_word_length_t
word_length
-
Specifies the number of data bits transmitted or received in a frame.
-
hal_uart_irda_power_mode_t
irda_power_mode
-
Specifies the IRDA mode to be used.
-
hal_uart_direction_t
direction
-
Specifies whether the receive or transmit mode is enabled or disabled.
-
uint32_t
irda_prescaler
-
Specifies the prescaler value for dividing the UART/USART source clock to achieve low-power frequency. Value must be between 0x01 and 0xFF.
-
hal_uart_parity_t
parity
-
Specifies the parity mode.
-
hal_uart_one_bit_sample_t
one_bit_sampling
-
Specifies whether single-sample or three-sample majority vote is selected.
-
uint32_t
baud_rate
-
struct
hal_uart_irda_config_t
- group UART_IRDA_config
-
-
struct
hal_uart_irda_config_t
-
#include <stm32c5xx_hal_uart.h>
HAL UART IRDA config structure type.
Public Members
-
uint32_t
baud_rate
-
This member configures the IRDA communication baud rate (value to be set at 115200 baud following IRDA specifications). You can, however, still set the value between Min_Data=0 and Max_Data=18000000 for specific use cases. The baud rate register is computed using the following formula:
Baud Rate Register = ((uart_ker_ckpres) / ((hal_uart_irda_config_t->baud_rate))) where uart_ker_ck_pres is the UART input clock divided by a prescaler
-
hal_uart_prescaler_t
clock_prescaler
-
Specifies the prescaler value used to divide the IRDA clock source.
-
hal_uart_word_length_t
word_length
-
Specifies the number of data bits transmitted or received in a frame.
-
hal_uart_irda_power_mode_t
irda_power_mode
-
Specifies the IRDA mode to be used.
-
hal_uart_direction_t
direction
-
Specifies whether the receive or transmit mode is enabled or disabled.
-
uint32_t
irda_prescaler
-
Specifies the prescaler value for dividing the UART/USART source clock to achieve low-power frequency. Value must be between 0x01 and 0xFF.
-
hal_uart_parity_t
parity
-
Specifies the parity mode.
-
hal_uart_one_bit_sample_t
one_bit_sampling
-
Specifies whether single-sample or three-sample majority vote is selected.
-
uint32_t
baud_rate
-
struct
hal_uart_irda_config_t