STM32L486xx HAL User Manual
|
Functions | |
void | UART_InitCallbacksToDefault (UART_HandleTypeDef *huart) |
Initialize the callbacks to their default values. | |
static void | UART_EndTxTransfer (UART_HandleTypeDef *huart) |
End ongoing Tx transfer on UART peripheral (following error detection or Transmit completion). | |
static void | UART_EndRxTransfer (UART_HandleTypeDef *huart) |
End ongoing Rx transfer on UART peripheral (following error detection or Reception completion). | |
static void | UART_DMATransmitCplt (DMA_HandleTypeDef *hdma) |
DMA UART transmit process complete callback. | |
static void | UART_DMAReceiveCplt (DMA_HandleTypeDef *hdma) |
DMA UART receive process complete callback. | |
static void | UART_DMARxHalfCplt (DMA_HandleTypeDef *hdma) |
DMA UART receive process half complete callback. | |
static void | UART_DMATxHalfCplt (DMA_HandleTypeDef *hdma) |
DMA UART transmit process half complete callback. | |
static void | UART_DMAError (DMA_HandleTypeDef *hdma) |
DMA UART communication error callback. | |
static void | UART_DMAAbortOnError (DMA_HandleTypeDef *hdma) |
DMA UART communication abort callback, when initiated by HAL services on Error (To be called at end of DMA Abort procedure following error occurrence). | |
static void | UART_DMATxAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Tx communication abort callback, when initiated by user (To be called at end of DMA Tx Abort procedure following user abort request). | |
static void | UART_DMARxAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Rx communication abort callback, when initiated by user (To be called at end of DMA Rx Abort procedure following user abort request). | |
static void | UART_DMATxOnlyAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Tx communication abort callback, when initiated by user by a call to HAL_UART_AbortTransmit_IT API (Abort only Tx transfer) (This callback is executed at end of DMA Tx Abort procedure following user abort request, and leads to user Tx Abort Complete callback execution). | |
static void | UART_DMARxOnlyAbortCallback (DMA_HandleTypeDef *hdma) |
DMA UART Rx communication abort callback, when initiated by user by a call to HAL_UART_AbortReceive_IT API (Abort only Rx transfer) (This callback is executed at end of DMA Rx Abort procedure following user abort request, and leads to user Rx Abort Complete callback execution). | |
static void | UART_TxISR_8BIT (UART_HandleTypeDef *huart) |
TX interrrupt handler for 7 or 8 bits data word length . | |
static void | UART_TxISR_16BIT (UART_HandleTypeDef *huart) |
TX interrrupt handler for 9 bits data word length. | |
static void | UART_EndTransmit_IT (UART_HandleTypeDef *huart) |
Wrap up transmission in non-blocking mode. | |
static void | UART_RxISR_8BIT (UART_HandleTypeDef *huart) |
RX interrrupt handler for 7 or 8 bits data word length . | |
static void | UART_RxISR_16BIT (UART_HandleTypeDef *huart) |
RX interrrupt handler for 9 bits data word length . | |
HAL_StatusTypeDef | UART_SetConfig (UART_HandleTypeDef *huart) |
Configure the UART peripheral. | |
void | UART_AdvFeatureConfig (UART_HandleTypeDef *huart) |
Configure the UART peripheral advanced features. | |
HAL_StatusTypeDef | UART_CheckIdleState (UART_HandleTypeDef *huart) |
Check the UART Idle State. | |
HAL_StatusTypeDef | UART_WaitOnFlagUntilTimeout (UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout) |
Handle UART Communication Timeout. |
void UART_AdvFeatureConfig | ( | UART_HandleTypeDef * | huart | ) |
Configure the UART peripheral advanced features.
huart | UART handle. |
None |
Definition at line 3089 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::AdvancedInit, UART_AdvFeatureInitTypeDef::AdvFeatureInit, assert_param, UART_AdvFeatureInitTypeDef::AutoBaudRateEnable, UART_AdvFeatureInitTypeDef::AutoBaudRateMode, UART_AdvFeatureInitTypeDef::DataInvert, UART_AdvFeatureInitTypeDef::DMADisableonRxError, __UART_HandleTypeDef::Instance, IS_UART_ADVFEATURE_AUTOBAUDRATE, IS_UART_ADVFEATURE_AUTOBAUDRATEMODE, IS_UART_ADVFEATURE_DATAINV, IS_UART_ADVFEATURE_DMAONRXERROR, IS_UART_ADVFEATURE_INIT, IS_UART_ADVFEATURE_MSBFIRST, IS_UART_ADVFEATURE_RXINV, IS_UART_ADVFEATURE_SWAP, IS_UART_ADVFEATURE_TXINV, IS_UART_OVERRUN, UART_AdvFeatureInitTypeDef::MSBFirst, UART_AdvFeatureInitTypeDef::OverrunDisable, UART_AdvFeatureInitTypeDef::RxPinLevelInvert, UART_AdvFeatureInitTypeDef::Swap, UART_AdvFeatureInitTypeDef::TxPinLevelInvert, UART_ADVFEATURE_AUTOBAUDRATE_ENABLE, UART_ADVFEATURE_AUTOBAUDRATE_INIT, UART_ADVFEATURE_DATAINVERT_INIT, UART_ADVFEATURE_DMADISABLEONERROR_INIT, UART_ADVFEATURE_MSBFIRST_INIT, UART_ADVFEATURE_RXINVERT_INIT, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT, UART_ADVFEATURE_SWAP_INIT, and UART_ADVFEATURE_TXINVERT_INIT.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), HAL_RS485Ex_Init(), and HAL_UART_Init().
HAL_StatusTypeDef UART_CheckIdleState | ( | UART_HandleTypeDef * | huart | ) |
Check the UART Idle State.
huart | UART handle. |
HAL | status |
Definition at line 3163 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::ErrorCode, __UART_HandleTypeDef::gState, HAL_GetTick(), HAL_UART_ERROR_NONE, HAL_UART_STATE_READY, HAL_UART_TIMEOUT_VALUE, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::RxState, and UART_WaitOnFlagUntilTimeout().
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_DisableMuteMode(), HAL_MultiProcessor_EnableMuteMode(), HAL_MultiProcessor_Init(), HAL_MultiProcessorEx_AddressLength_Set(), HAL_RS485Ex_Init(), and HAL_UART_Init().
static void UART_DMAAbortOnError | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART communication abort callback, when initiated by HAL services on Error (To be called at end of DMA Abort procedure following error occurrence).
hdma | DMA handle. |
None |
Definition at line 3437 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::ErrorCallback, HAL_UART_ErrorCallback(), __DMA_HandleTypeDef::Parent, __UART_HandleTypeDef::RxXferCount, and __UART_HandleTypeDef::TxXferCount.
Referenced by HAL_UART_IRQHandler().
static void UART_DMAError | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART communication error callback.
hdma | DMA handle. |
None |
Definition at line 3400 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::ErrorCallback, __UART_HandleTypeDef::ErrorCode, __UART_HandleTypeDef::gState, HAL_UART_ERROR_DMA, HAL_UART_ErrorCallback(), HAL_UART_STATE_BUSY_RX, HAL_UART_STATE_BUSY_TX, __UART_HandleTypeDef::Instance, __DMA_HandleTypeDef::Parent, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::TxXferCount, UART_EndRxTransfer(), and UART_EndTxTransfer().
Referenced by HAL_UART_Receive_DMA(), and HAL_UART_Transmit_DMA().
static void UART_DMAReceiveCplt | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART receive process complete callback.
hdma | DMA handle. |
None |
Definition at line 3347 of file stm32l4xx_hal_uart.c.
References HAL_UART_RxCpltCallback(), HAL_UART_STATE_READY, __DMA_HandleTypeDef::Instance, __UART_HandleTypeDef::Instance, __DMA_HandleTypeDef::Parent, __UART_HandleTypeDef::RxCpltCallback, __UART_HandleTypeDef::RxState, and __UART_HandleTypeDef::RxXferCount.
Referenced by HAL_UART_Receive_DMA().
static void UART_DMARxAbortCallback | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART Rx communication abort callback, when initiated by user (To be called at end of DMA Rx Abort procedure following user abort request).
hdma | DMA handle. |
None |
Definition at line 3516 of file stm32l4xx_hal_uart.c.
References __HAL_UART_CLEAR_FLAG, __HAL_UART_SEND_REQ, __UART_HandleTypeDef::AbortCpltCallback, __UART_HandleTypeDef::ErrorCode, __UART_HandleTypeDef::gState, HAL_UART_AbortCpltCallback(), HAL_UART_ERROR_NONE, HAL_UART_STATE_READY, __UART_HandleTypeDef::hdmarx, __UART_HandleTypeDef::hdmatx, __DMA_HandleTypeDef::Parent, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::TxXferCount, UART_CLEAR_FEF, UART_CLEAR_NEF, UART_CLEAR_OREF, UART_CLEAR_PEF, UART_RXDATA_FLUSH_REQUEST, and __DMA_HandleTypeDef::XferAbortCallback.
Referenced by HAL_UART_Abort_IT().
static void UART_DMARxHalfCplt | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART receive process half complete callback.
hdma | DMA handle. |
None |
Definition at line 3382 of file stm32l4xx_hal_uart.c.
References HAL_UART_RxHalfCpltCallback(), __DMA_HandleTypeDef::Parent, and __UART_HandleTypeDef::RxHalfCpltCallback.
Referenced by HAL_UART_Receive_DMA().
static void UART_DMARxOnlyAbortCallback | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART Rx communication abort callback, when initiated by user by a call to HAL_UART_AbortReceive_IT API (Abort only Rx transfer) (This callback is executed at end of DMA Rx Abort procedure following user abort request, and leads to user Rx Abort Complete callback execution).
hdma | DMA handle. |
None |
Definition at line 3602 of file stm32l4xx_hal_uart.c.
References __HAL_UART_CLEAR_FLAG, __HAL_UART_SEND_REQ, __UART_HandleTypeDef::AbortReceiveCpltCallback, HAL_UART_AbortReceiveCpltCallback(), HAL_UART_STATE_READY, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, UART_CLEAR_FEF, UART_CLEAR_NEF, UART_CLEAR_OREF, UART_CLEAR_PEF, and UART_RXDATA_FLUSH_REQUEST.
Referenced by HAL_UART_AbortReceive_IT().
static void UART_DMATransmitCplt | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART transmit process complete callback.
hdma | DMA handle. |
None |
Definition at line 3295 of file stm32l4xx_hal_uart.c.
References HAL_UART_TxCpltCallback(), __DMA_HandleTypeDef::Instance, __UART_HandleTypeDef::Instance, __DMA_HandleTypeDef::Parent, __UART_HandleTypeDef::TxCpltCallback, and __UART_HandleTypeDef::TxXferCount.
Referenced by HAL_UART_Transmit_DMA().
static void UART_DMATxAbortCallback | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART Tx communication abort callback, when initiated by user (To be called at end of DMA Tx Abort procedure following user abort request).
hdma | DMA handle. |
None |
Definition at line 3460 of file stm32l4xx_hal_uart.c.
References __HAL_UART_CLEAR_FLAG, __HAL_UART_SEND_REQ, __UART_HandleTypeDef::AbortCpltCallback, __UART_HandleTypeDef::ErrorCode, __UART_HandleTypeDef::gState, HAL_UART_AbortCpltCallback(), HAL_UART_ERROR_NONE, HAL_UART_STATE_READY, __UART_HandleTypeDef::hdmarx, __UART_HandleTypeDef::hdmatx, __DMA_HandleTypeDef::Parent, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::TxXferCount, UART_CLEAR_FEF, UART_CLEAR_NEF, UART_CLEAR_OREF, UART_CLEAR_PEF, UART_TXDATA_FLUSH_REQUEST, and __DMA_HandleTypeDef::XferAbortCallback.
Referenced by HAL_UART_Abort_IT().
static void UART_DMATxHalfCplt | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART transmit process half complete callback.
hdma | DMA handle. |
None |
Definition at line 3329 of file stm32l4xx_hal_uart.c.
References HAL_UART_TxHalfCpltCallback(), __DMA_HandleTypeDef::Parent, and __UART_HandleTypeDef::TxHalfCpltCallback.
Referenced by HAL_UART_Transmit_DMA().
static void UART_DMATxOnlyAbortCallback | ( | DMA_HandleTypeDef * | hdma | ) | [static] |
DMA UART Tx communication abort callback, when initiated by user by a call to HAL_UART_AbortTransmit_IT API (Abort only Tx transfer) (This callback is executed at end of DMA Tx Abort procedure following user abort request, and leads to user Tx Abort Complete callback execution).
hdma | DMA handle. |
None |
Definition at line 3567 of file stm32l4xx_hal_uart.c.
References __HAL_UART_SEND_REQ, __UART_HandleTypeDef::AbortTransmitCpltCallback, __UART_HandleTypeDef::gState, HAL_UART_AbortTransmitCpltCallback(), HAL_UART_STATE_READY, __DMA_HandleTypeDef::Parent, __UART_HandleTypeDef::TxXferCount, and UART_TXDATA_FLUSH_REQUEST.
Referenced by HAL_UART_AbortTransmit_IT().
static void UART_EndRxTransfer | ( | UART_HandleTypeDef * | huart | ) | [static] |
End ongoing Rx transfer on UART peripheral (following error detection or Reception completion).
huart | UART handle. |
None |
Definition at line 3271 of file stm32l4xx_hal_uart.c.
References HAL_UART_STATE_READY, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::RxISR, and __UART_HandleTypeDef::RxState.
Referenced by HAL_UART_DMAStop(), HAL_UART_IRQHandler(), and UART_DMAError().
static void UART_EndTransmit_IT | ( | UART_HandleTypeDef * | huart | ) | [static] |
Wrap up transmission in non-blocking mode.
huart | pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. |
None |
Definition at line 3776 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::gState, HAL_UART_STATE_READY, HAL_UART_TxCpltCallback(), __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::TxCpltCallback, and __UART_HandleTypeDef::TxISR.
Referenced by HAL_UART_IRQHandler().
static void UART_EndTxTransfer | ( | UART_HandleTypeDef * | huart | ) | [static] |
End ongoing Tx transfer on UART peripheral (following error detection or Transmit completion).
huart | UART handle. |
None |
Definition at line 3250 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::gState, HAL_UART_STATE_READY, and __UART_HandleTypeDef::Instance.
Referenced by HAL_UART_DMAStop(), and UART_DMAError().
void UART_InitCallbacksToDefault | ( | UART_HandleTypeDef * | huart | ) |
Initialize the callbacks to their default values.
huart | UART handle. |
none |
Definition at line 2761 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::AbortCpltCallback, __UART_HandleTypeDef::AbortReceiveCpltCallback, __UART_HandleTypeDef::AbortTransmitCpltCallback, __UART_HandleTypeDef::ErrorCallback, HAL_UART_AbortCpltCallback(), HAL_UART_AbortReceiveCpltCallback(), HAL_UART_AbortTransmitCpltCallback(), HAL_UART_ErrorCallback(), HAL_UART_RxCpltCallback(), HAL_UART_RxHalfCpltCallback(), HAL_UART_TxCpltCallback(), HAL_UART_TxHalfCpltCallback(), HAL_UARTEx_WakeupCallback(), __UART_HandleTypeDef::RxCpltCallback, __UART_HandleTypeDef::RxHalfCpltCallback, __UART_HandleTypeDef::TxCpltCallback, __UART_HandleTypeDef::TxHalfCpltCallback, and __UART_HandleTypeDef::WakeupCallback.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), HAL_RS485Ex_Init(), and HAL_UART_Init().
static void UART_RxISR_16BIT | ( | UART_HandleTypeDef * | huart | ) | [static] |
RX interrrupt handler for 9 bits data word length .
huart | UART handle. |
None |
Definition at line 3853 of file stm32l4xx_hal_uart.c.
References __HAL_UART_SEND_REQ, HAL_UART_RxCpltCallback(), HAL_UART_STATE_BUSY_RX, HAL_UART_STATE_READY, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::Mask, __UART_HandleTypeDef::pRxBuffPtr, __UART_HandleTypeDef::RxCpltCallback, __UART_HandleTypeDef::RxISR, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, and UART_RXDATA_FLUSH_REQUEST.
Referenced by HAL_UART_Receive_IT().
static void UART_RxISR_8BIT | ( | UART_HandleTypeDef * | huart | ) | [static] |
RX interrrupt handler for 7 or 8 bits data word length .
huart | UART handle. |
None |
Definition at line 3801 of file stm32l4xx_hal_uart.c.
References __HAL_UART_SEND_REQ, HAL_UART_RxCpltCallback(), HAL_UART_STATE_BUSY_RX, HAL_UART_STATE_READY, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::Mask, __UART_HandleTypeDef::pRxBuffPtr, __UART_HandleTypeDef::RxCpltCallback, __UART_HandleTypeDef::RxISR, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, and UART_RXDATA_FLUSH_REQUEST.
Referenced by HAL_UART_Receive_IT().
HAL_StatusTypeDef UART_SetConfig | ( | UART_HandleTypeDef * | huart | ) |
Configure the UART peripheral.
huart | UART handle. |
HAL | status |
Definition at line 2786 of file stm32l4xx_hal_uart.c.
References assert_param, UART_InitTypeDef::BaudRate, HAL_RCC_GetPCLK1Freq(), HAL_RCC_GetPCLK2Freq(), HAL_RCC_GetSysClockFreq(), HSI_VALUE, UART_InitTypeDef::HwFlowCtl, __UART_HandleTypeDef::Init, __UART_HandleTypeDef::Instance, IS_LPUART_STOPBITS, IS_UART_BAUDRATE, IS_UART_HARDWARE_FLOW_CONTROL, IS_UART_MODE, IS_UART_ONE_BIT_SAMPLE, IS_UART_OVERSAMPLING, IS_UART_PARITY, IS_UART_STOPBITS, IS_UART_WORD_LENGTH, LPUART_BRR_MAX, LPUART_BRR_MIN, LSE_VALUE, UART_InitTypeDef::Mode, UART_InitTypeDef::OneBitSampling, UART_InitTypeDef::OverSampling, UART_InitTypeDef::Parity, __UART_HandleTypeDef::RxISR, UART_InitTypeDef::StopBits, __UART_HandleTypeDef::TxISR, UART_BRR_MAX, UART_BRR_MIN, UART_CLOCKSOURCE_HSI, UART_CLOCKSOURCE_LSE, UART_CLOCKSOURCE_PCLK1, UART_CLOCKSOURCE_PCLK2, UART_CLOCKSOURCE_SYSCLK, UART_CLOCKSOURCE_UNDEFINED, UART_DIV_LPUART, UART_DIV_SAMPLING16, UART_DIV_SAMPLING8, UART_GETCLOCKSOURCE, UART_INSTANCE_LOWPOWER, UART_OVERSAMPLING_8, USART_CR1_FIELDS, USART_CR3_FIELDS, and UART_InitTypeDef::WordLength.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), HAL_RS485Ex_Init(), and HAL_UART_Init().
static void UART_TxISR_16BIT | ( | UART_HandleTypeDef * | huart | ) | [static] |
TX interrrupt handler for 9 bits data word length.
huart | UART handle. |
None |
Definition at line 3666 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::gState, HAL_UART_STATE_BUSY_TX, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::pTxBuffPtr, and __UART_HandleTypeDef::TxXferCount.
Referenced by HAL_UART_Transmit_IT().
static void UART_TxISR_8BIT | ( | UART_HandleTypeDef * | huart | ) | [static] |
TX interrrupt handler for 7 or 8 bits data word length .
huart | UART handle. |
None |
Definition at line 3634 of file stm32l4xx_hal_uart.c.
References __UART_HandleTypeDef::gState, HAL_UART_STATE_BUSY_TX, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::pTxBuffPtr, and __UART_HandleTypeDef::TxXferCount.
Referenced by HAL_UART_Transmit_IT().
HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout | ( | UART_HandleTypeDef * | huart, |
uint32_t | Flag, | ||
FlagStatus | Status, | ||
uint32_t | Tickstart, | ||
uint32_t | Timeout | ||
) |
Handle UART Communication Timeout.
huart | UART handle. |
Flag | Specifies the UART flag to check |
Status | Flag status (SET or RESET) |
Tickstart | Tick start value |
Timeout | Timeout duration |
HAL | status |
Definition at line 3213 of file stm32l4xx_hal_uart.c.
References __HAL_UART_GET_FLAG, __UART_HandleTypeDef::gState, HAL_GetTick(), HAL_UART_STATE_READY, __UART_HandleTypeDef::Instance, and __UART_HandleTypeDef::RxState.
Referenced by HAL_UART_Receive(), HAL_UART_Transmit(), HAL_UARTEx_StopModeWakeUpSourceConfig(), and UART_CheckIdleState().