STM32L443xx HAL User Manual
|
Extended Peripheral Control functions. More...
Functions | |
HAL_StatusTypeDef | HAL_UARTEx_EnableClockStopMode (UART_HandleTypeDef *huart) |
Keep UART Clock enabled when in Stop Mode. | |
HAL_StatusTypeDef | HAL_UARTEx_DisableClockStopMode (UART_HandleTypeDef *huart) |
Disable UART Clock when in Stop Mode. | |
HAL_StatusTypeDef | HAL_MultiProcessorEx_AddressLength_Set (UART_HandleTypeDef *huart, uint32_t AddressLength) |
By default in multiprocessor mode, when the wake up method is set to address mark, the UART handles only 4-bit long addresses detection; this API allows to enable longer addresses detection (6-, 7- or 8-bit long). | |
HAL_StatusTypeDef | HAL_UARTEx_StopModeWakeUpSourceConfig (UART_HandleTypeDef *huart, UART_WakeUpTypeDef WakeUpSelection) |
Set Wakeup from Stop mode interrupt flag selection. | |
HAL_StatusTypeDef | HAL_UARTEx_EnableStopMode (UART_HandleTypeDef *huart) |
Enable UART Stop Mode. | |
HAL_StatusTypeDef | HAL_UARTEx_DisableStopMode (UART_HandleTypeDef *huart) |
Disable UART Stop Mode. | |
HAL_StatusTypeDef | HAL_UARTEx_ReceiveToIdle (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint16_t *RxLen, uint32_t Timeout) |
Receive an amount of data in blocking mode till either the expected number of data is received or an IDLE event occurs. | |
HAL_StatusTypeDef | HAL_UARTEx_ReceiveToIdle_IT (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
Receive an amount of data in interrupt mode till either the expected number of data is received or an IDLE event occurs. | |
HAL_StatusTypeDef | HAL_UARTEx_ReceiveToIdle_DMA (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
Receive an amount of data in DMA mode till either the expected number of data is received or an IDLE event occurs. |
Extended Peripheral Control functions.
=============================================================================== ##### Peripheral Control functions ##### =============================================================================== [..] This section provides the following functions: (+) HAL_UARTEx_EnableClockStopMode() API enables the UART clock (HSI or LSE only) during stop mode (+) HAL_UARTEx_DisableClockStopMode() API disables the above functionality (+) HAL_MultiProcessorEx_AddressLength_Set() API optionally sets the UART node address detection length to more than 4 bits for multiprocessor address mark wake up. (+) HAL_UARTEx_StopModeWakeUpSourceConfig() API defines the wake-up from stop mode trigger: address match, Start Bit detection or RXNE bit status. (+) HAL_UARTEx_EnableStopMode() API enables the UART to wake up the MCU from stop mode (+) HAL_UARTEx_DisableStopMode() API disables the above functionality (+) HAL_UARTEx_EnableFifoMode() API enables the FIFO mode (+) HAL_UARTEx_DisableFifoMode() API disables the FIFO mode (+) HAL_UARTEx_SetTxFifoThreshold() API sets the TX FIFO threshold (+) HAL_UARTEx_SetRxFifoThreshold() API sets the RX FIFO threshold [..] This subsection also provides a set of additional functions providing enhanced reception services to user. (For example, these functions allow application to handle use cases where number of data to be received is unknown). (#) Compared to standard reception services which only consider number of received data elements as reception completion criteria, these functions also consider additional events as triggers for updating reception status to caller : (+) Detection of inactivity period (RX line has not been active for a given period). (++) RX inactivity detected by IDLE event, i.e. RX line has been in idle state (normally high state) for 1 frame time, after last received byte. (++) RX inactivity detected by RTO, i.e. line has been in idle state for a programmable time, after last received byte. (+) Detection that a specific character has been received. (#) There are two mode of transfer: (+) Blocking mode: The reception is performed in polling mode, until either expected number of data is received, or till IDLE event occurs. Reception is handled only during function execution. When function exits, no data reception could occur. HAL status and number of actually received data elements, are returned by function after finishing transfer. (+) Non-Blocking mode: The reception is performed using Interrupts or DMA. These API's return the HAL status. The end of the data processing will be indicated through the dedicated UART IRQ when using Interrupt mode or the DMA IRQ when using DMA mode. The HAL_UARTEx_RxEventCallback() user callback will be executed during Receive process The HAL_UART_ErrorCallback()user callback will be executed when a reception error is detected. (#) Blocking mode API: (+) HAL_UARTEx_ReceiveToIdle() (#) Non-Blocking mode API with Interrupt: (+) HAL_UARTEx_ReceiveToIdle_IT() (#) Non-Blocking mode API with DMA: (+) HAL_UARTEx_ReceiveToIdle_DMA()
HAL_StatusTypeDef HAL_MultiProcessorEx_AddressLength_Set | ( | UART_HandleTypeDef * | huart, |
uint32_t | AddressLength | ||
) |
By default in multiprocessor mode, when the wake up method is set to address mark, the UART handles only 4-bit long addresses detection; this API allows to enable longer addresses detection (6-, 7- or 8-bit long).
huart | UART handle. |
AddressLength | This parameter can be one of the following values:
|
HAL | status |
Definition at line 439 of file stm32l4xx_hal_uart_ex.c.
References __HAL_UART_DISABLE, __HAL_UART_ENABLE, assert_param, __UART_HandleTypeDef::gState, HAL_UART_STATE_BUSY, __UART_HandleTypeDef::Instance, IS_UART_ADDRESSLENGTH_DETECT, and UART_CheckIdleState().
HAL_StatusTypeDef HAL_UARTEx_DisableClockStopMode | ( | UART_HandleTypeDef * | huart | ) |
Disable UART Clock when in Stop Mode.
huart | UART handle. |
HAL | status |
Definition at line 411 of file stm32l4xx_hal_uart_ex.c.
References __UART_HandleTypeDef::Instance.
HAL_StatusTypeDef HAL_UARTEx_DisableStopMode | ( | UART_HandleTypeDef * | huart | ) |
Disable UART Stop Mode.
huart | UART handle. |
HAL | status |
Definition at line 551 of file stm32l4xx_hal_uart_ex.c.
References __UART_HandleTypeDef::Instance.
HAL_StatusTypeDef HAL_UARTEx_EnableClockStopMode | ( | UART_HandleTypeDef * | huart | ) |
Keep UART Clock enabled when in Stop Mode.
huart | UART handle. |
HAL | status |
Definition at line 392 of file stm32l4xx_hal_uart_ex.c.
References __UART_HandleTypeDef::Instance.
HAL_StatusTypeDef HAL_UARTEx_EnableStopMode | ( | UART_HandleTypeDef * | huart | ) |
Enable UART Stop Mode.
huart | UART handle. |
HAL | status |
Definition at line 532 of file stm32l4xx_hal_uart_ex.c.
References __UART_HandleTypeDef::Instance.
HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle | ( | UART_HandleTypeDef * | huart, |
uint8_t * | pData, | ||
uint16_t | Size, | ||
uint16_t * | RxLen, | ||
uint32_t | Timeout | ||
) |
Receive an amount of data in blocking mode till either the expected number of data is received or an IDLE event occurs.
huart | UART handle. |
pData | Pointer to data buffer (uint8_t or uint16_t data elements). |
Size | Amount of data elements (uint8_t or uint16_t) to be received. |
RxLen | Number of data elements finally received (could be lower than Size, in case reception ends on IDLE event) |
Timeout | Timeout duration expressed in ms (covers the whole reception sequence). |
HAL | status |
Definition at line 765 of file stm32l4xx_hal_uart_ex.c.
References __HAL_UART_CLEAR_FLAG, __HAL_UART_GET_FLAG, __UART_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_UART_ERROR_NONE, HAL_UART_RECEPTION_TOIDLE, HAL_UART_STATE_BUSY_RX, HAL_UART_STATE_READY, __UART_HandleTypeDef::Init, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::Mask, UART_InitTypeDef::Parity, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::RxXferSize, UART_CLEAR_IDLEF, UART_FLAG_IDLE, UART_FLAG_RXNE, UART_MASK_COMPUTATION, UART_PARITY_NONE, UART_WORDLENGTH_9B, and UART_InitTypeDef::WordLength.
HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle_DMA | ( | UART_HandleTypeDef * | huart, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Receive an amount of data in DMA mode till either the expected number of data is received or an IDLE event occurs.
huart | UART handle. |
pData | Pointer to data buffer (uint8_t or uint16_t data elements). |
Size | Amount of data elements (uint8_t or uint16_t) to be received. |
HAL | status |
Definition at line 952 of file stm32l4xx_hal_uart_ex.c.
References __HAL_UART_CLEAR_FLAG, HAL_UART_RECEPTION_TOIDLE, HAL_UART_STATE_READY, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxState, UART_CLEAR_IDLEF, and UART_Start_Receive_DMA().
HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle_IT | ( | UART_HandleTypeDef * | huart, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Receive an amount of data in interrupt mode till either the expected number of data is received or an IDLE event occurs.
huart | UART handle. |
pData | Pointer to data buffer (uint8_t or uint16_t data elements). |
Size | Amount of data elements (uint8_t or uint16_t) to be received. |
HAL | status |
Definition at line 890 of file stm32l4xx_hal_uart_ex.c.
References __HAL_UART_CLEAR_FLAG, HAL_UART_RECEPTION_TOIDLE, HAL_UART_STATE_READY, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxState, UART_CLEAR_IDLEF, and UART_Start_Receive_IT().
HAL_StatusTypeDef HAL_UARTEx_StopModeWakeUpSourceConfig | ( | UART_HandleTypeDef * | huart, |
UART_WakeUpTypeDef | WakeUpSelection | ||
) |
Set Wakeup from Stop mode interrupt flag selection.
huart | UART handle. |
WakeUpSelection | Address match, Start Bit detection or RXNE/RXFNE bit status. This parameter can be one of the following values: |
HAL | status |
Definition at line 477 of file stm32l4xx_hal_uart_ex.c.
References __HAL_UART_DISABLE, __HAL_UART_ENABLE, assert_param, __UART_HandleTypeDef::gState, HAL_GetTick(), HAL_UART_STATE_BUSY, HAL_UART_STATE_READY, HAL_UART_TIMEOUT_VALUE, __UART_HandleTypeDef::Instance, IS_UART_WAKEUP_SELECTION, UART_WaitOnFlagUntilTimeout(), UART_WAKEUP_ON_ADDRESS, UARTEx_Wakeup_AddressConfig(), and UART_WakeUpTypeDef::WakeUpEvent.