UM1940
48.2.4
Peripheral State and Errors functions
This subsection provides a set of functions allowing to return the State of USART
communication process, return Peripheral Errors occurred during communication process
HAL_USART_GetState() API can be helpful to check in run-time the state of the
USART peripheral.
HAL_USART_GetError() check in run-time errors that could be occurred during
communication.
This section contains the following APIs:
HAL_USART_GetState()
HAL_USART_GetError()
48.2.5
Detailed description of functions
HAL_USART_Init
Function name
Function description
Parameters
Return values
HAL_USART_DeInit
Function name
Function description
Parameters
Return values
HAL_USART_MspInit
Function name
Function description
Parameters
Return values
HAL_USART_MspDeInit
Function name
HAL_StatusTypeDef HAL_USART_Init
(USART_HandleTypeDef * husart)
Initializes the USART mode according to the specified parameters
in the USART_InitTypeDef and create the associated handle.
husart: pointer to a USART_HandleTypeDef structure that
contains the configuration information for the specified
USART module.
HAL: status
HAL_StatusTypeDef HAL_USART_DeInit
(USART_HandleTypeDef * husart)
DeInitializes the USART peripheral.
husart: pointer to a USART_HandleTypeDef structure that
contains the configuration information for the specified
USART module.
HAL: status
void HAL_USART_MspInit (USART_HandleTypeDef * husart)
USART MSP Init.
husart: pointer to a USART_HandleTypeDef structure that
contains the configuration information for the specified
USART module.
None:
void HAL_USART_MspDeInit (USART_HandleTypeDef *
husart)
DocID028236 Rev 2
HAL USART Generic Driver
677/1371
Need help?
Do you have a question about the STM32F2 and is the answer not in the manual?