|
STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
Functions | |
| HAL_StatusTypeDef | UART_Start_Receive_IT (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
| Start Receive operation in interrupt mode. | |
| HAL_StatusTypeDef | UART_Start_Receive_DMA (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) |
| Start Receive operation in DMA mode. | |
| 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) |
| Initialize the callbacks to their default values. | |
| static void | UART_DMAReceiveCplt (DMA_HandleTypeDef *hdma) |
| DMA UART receive process complete callback. | |
| static void | UART_DMATxHalfCplt (DMA_HandleTypeDef *hdma) |
| DMA UART transmit process half complete callback. | |
| static void | UART_DMARxHalfCplt (DMA_HandleTypeDef *hdma) |
| DMA UART receive 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 HAL_StatusTypeDef | UART_Transmit_IT (UART_HandleTypeDef *huart) |
| Sends an amount of data in non blocking mode. | |
| static HAL_StatusTypeDef | UART_EndTransmit_IT (UART_HandleTypeDef *huart) |
| Wraps up transmission in non blocking mode. | |
| static HAL_StatusTypeDef | UART_Receive_IT (UART_HandleTypeDef *huart) |
| Receives an amount of data in non blocking mode. | |
| static HAL_StatusTypeDef | UART_WaitOnFlagUntilTimeout (UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout) |
| This function handles UART Communication Timeout. It waits until a flag is no longer in the specified status. | |
| static void | UART_SetConfig (UART_HandleTypeDef *huart) |
| Configures the UART peripheral. | |
| HAL_StatusTypeDef UART_Start_Receive_IT | ( | UART_HandleTypeDef * | huart, |
| uint8_t * | pData, | ||
| uint16_t | Size ) |
#include <stm32f4xx_hal_uart.h>
Start Receive operation in interrupt mode.
| huart | UART handle. |
| pData | Pointer to data buffer (u8 or u16 data elements). |
| Size | Amount of data elements (u8 or u16) to be received. |
| HAL | status |
Definition at line 3236 of file stm32f4xx_hal_uart.c.
References __HAL_UART_ENABLE_IT, __UART_HandleTypeDef::ErrorCode, HAL_OK, HAL_UART_ERROR_NONE, HAL_UART_STATE_BUSY_RX, __UART_HandleTypeDef::Init, UART_InitTypeDef::Parity, __UART_HandleTypeDef::pRxBuffPtr, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::RxXferSize, UART_IT_ERR, UART_IT_PE, UART_IT_RXNE, and UART_PARITY_NONE.
Referenced by HAL_UART_Receive_IT(), and HAL_UARTEx_ReceiveToIdle_IT().
| HAL_StatusTypeDef UART_Start_Receive_DMA | ( | UART_HandleTypeDef * | huart, |
| uint8_t * | pData, | ||
| uint16_t | Size ) |
#include <stm32f4xx_hal_uart.h>
Start Receive operation in DMA mode.
| huart | UART handle. |
| pData | Pointer to data buffer (u8 or u16 data elements). |
| Size | Amount of data elements (u8 or u16) to be received. |
| HAL | status |
Definition at line 3271 of file stm32f4xx_hal_uart.c.
References __HAL_UART_CLEAR_OREFLAG, __UART_HandleTypeDef::ErrorCode, HAL_DMA_Start_IT(), HAL_OK, HAL_UART_ERROR_NONE, HAL_UART_STATE_BUSY_RX, __UART_HandleTypeDef::hdmarx, __UART_HandleTypeDef::Init, __UART_HandleTypeDef::Instance, UART_InitTypeDef::Parity, __UART_HandleTypeDef::pRxBuffPtr, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferSize, UART_DMAError(), UART_DMAReceiveCplt(), UART_DMARxHalfCplt(), UART_PARITY_NONE, __DMA_HandleTypeDef::XferAbortCallback, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.
Referenced by HAL_UART_Receive_DMA(), and HAL_UARTEx_ReceiveToIdle_DMA().
|
static |
#include <stm32f4xx_hal_uart.c>
End ongoing Tx transfer on UART peripheral (following error detection or Transmit completion).
| huart | UART handle. |
| None |
Definition at line 3321 of file stm32f4xx_hal_uart.c.
References __UART_HandleTypeDef::gState, HAL_UART_STATE_READY, and __UART_HandleTypeDef::Instance.
Referenced by HAL_UART_DMAStop(), and UART_DMAError().
|
static |
#include <stm32f4xx_hal_uart.c>
End ongoing Rx transfer on UART peripheral (following error detection or Reception completion).
| huart | UART handle. |
| None |
Definition at line 3335 of file stm32f4xx_hal_uart.c.
References HAL_UART_RECEPTION_STANDARD, HAL_UART_RECEPTION_TOIDLE, HAL_UART_STATE_READY, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::ReceptionType, and __UART_HandleTypeDef::RxState.
Referenced by HAL_UART_DMAStop(), HAL_UART_IRQHandler(), UART_DMAError(), and UART_WaitOnFlagUntilTimeout().
|
static |
#include <stm32f4xx_hal_uart.c>
Initialize the callbacks to their default values.
| huart | UART handle. |
| none |
DMA UART transmit process complete callback.
| hdma | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 2988 of file stm32f4xx_hal_uart.c.
References HAL_UART_TxCpltCallback(), __DMA_HandleTypeDef::Instance, __UART_HandleTypeDef::Instance, and __UART_HandleTypeDef::TxXferCount.
Referenced by HAL_UART_Transmit_DMA().
|
static |
#include <stm32f4xx_hal_uart.c>
DMA UART receive process complete callback.
| hdma | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3042 of file stm32f4xx_hal_uart.c.
References HAL_UART_RECEPTION_TOIDLE, HAL_UART_RxCpltCallback(), HAL_UART_RXEVENT_TC, HAL_UART_STATE_READY, HAL_UARTEx_RxEventCallback(), __DMA_HandleTypeDef::Instance, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxEventType, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, and __UART_HandleTypeDef::RxXferSize.
Referenced by UART_Start_Receive_DMA().
|
static |
#include <stm32f4xx_hal_uart.c>
DMA UART transmit process half complete callback.
| hdma | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3023 of file stm32f4xx_hal_uart.c.
References HAL_UART_TxHalfCpltCallback().
Referenced by HAL_UART_Transmit_DMA().
|
static |
#include <stm32f4xx_hal_uart.c>
DMA UART receive process half complete callback.
| hdma | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3104 of file stm32f4xx_hal_uart.c.
References HAL_UART_RECEPTION_TOIDLE, HAL_UART_RXEVENT_HT, HAL_UART_RxHalfCpltCallback(), HAL_UARTEx_RxEventCallback(), __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxEventType, and __UART_HandleTypeDef::RxXferSize.
Referenced by UART_Start_Receive_DMA().
|
static |
#include <stm32f4xx_hal_uart.c>
DMA UART communication error callback.
| hdma | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3143 of file stm32f4xx_hal_uart.c.
References __UART_HandleTypeDef::ErrorCode, __UART_HandleTypeDef::gState, HAL_IS_BIT_SET, HAL_UART_ERROR_DMA, HAL_UART_ErrorCallback(), HAL_UART_STATE_BUSY_RX, HAL_UART_STATE_BUSY_TX, __UART_HandleTypeDef::Instance, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::TxXferCount, UART_EndRxTransfer(), and UART_EndTxTransfer().
Referenced by HAL_UART_Transmit_DMA(), and UART_Start_Receive_DMA().
|
static |
#include <stm32f4xx_hal_uart.c>
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 | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3359 of file stm32f4xx_hal_uart.c.
References HAL_UART_ErrorCallback(), __UART_HandleTypeDef::RxXferCount, and __UART_HandleTypeDef::TxXferCount.
Referenced by HAL_UART_IRQHandler().
|
static |
#include <stm32f4xx_hal_uart.c>
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 | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3383 of file stm32f4xx_hal_uart.c.
References __UART_HandleTypeDef::ErrorCode, __UART_HandleTypeDef::gState, HAL_UART_AbortCpltCallback(), HAL_UART_ERROR_NONE, HAL_UART_RECEPTION_STANDARD, HAL_UART_STATE_READY, __UART_HandleTypeDef::hdmarx, __UART_HandleTypeDef::hdmatx, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::TxXferCount, and __DMA_HandleTypeDef::XferAbortCallback.
Referenced by HAL_UART_Abort_IT().
|
static |
#include <stm32f4xx_hal_uart.c>
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 | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3429 of file stm32f4xx_hal_uart.c.
References __UART_HandleTypeDef::ErrorCode, __UART_HandleTypeDef::gState, HAL_UART_AbortCpltCallback(), HAL_UART_ERROR_NONE, HAL_UART_RECEPTION_STANDARD, HAL_UART_STATE_READY, __UART_HandleTypeDef::hdmarx, __UART_HandleTypeDef::hdmatx, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::TxXferCount, and __DMA_HandleTypeDef::XferAbortCallback.
Referenced by HAL_UART_Abort_IT().
|
static |
#include <stm32f4xx_hal_uart.c>
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 | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3475 of file stm32f4xx_hal_uart.c.
References __UART_HandleTypeDef::gState, HAL_UART_AbortTransmitCpltCallback(), HAL_UART_STATE_READY, and __UART_HandleTypeDef::TxXferCount.
Referenced by HAL_UART_AbortTransmit_IT().
|
static |
#include <stm32f4xx_hal_uart.c>
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 | Pointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module. |
| None |
Definition at line 3503 of file stm32f4xx_hal_uart.c.
References HAL_UART_AbortReceiveCpltCallback(), HAL_UART_RECEPTION_STANDARD, HAL_UART_STATE_READY, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxState, and __UART_HandleTypeDef::RxXferCount.
Referenced by HAL_UART_AbortReceive_IT().
|
static |
#include <stm32f4xx_hal_uart.c>
Sends an amount of data in non blocking mode.
| huart | Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 3529 of file stm32f4xx_hal_uart.c.
References __HAL_UART_DISABLE_IT, __HAL_UART_ENABLE_IT, __UART_HandleTypeDef::gState, HAL_BUSY, HAL_OK, HAL_UART_STATE_BUSY_TX, __UART_HandleTypeDef::Init, __UART_HandleTypeDef::Instance, UART_InitTypeDef::Parity, __UART_HandleTypeDef::pTxBuffPtr, __UART_HandleTypeDef::TxXferCount, UART_IT_TC, UART_IT_TXE, UART_PARITY_NONE, UART_WORDLENGTH_9B, and UART_InitTypeDef::WordLength.
Referenced by HAL_UART_IRQHandler().
|
static |
#include <stm32f4xx_hal_uart.c>
Wraps up transmission in non blocking mode.
| huart | Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 3569 of file stm32f4xx_hal_uart.c.
References __HAL_UART_DISABLE_IT, __UART_HandleTypeDef::gState, HAL_OK, HAL_UART_STATE_READY, HAL_UART_TxCpltCallback(), and UART_IT_TC.
Referenced by HAL_UART_IRQHandler().
|
static |
#include <stm32f4xx_hal_uart.c>
Receives an amount of data in non blocking mode.
| huart | Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| HAL | status |
Definition at line 3594 of file stm32f4xx_hal_uart.c.
References __HAL_UART_CLEAR_IDLEFLAG, __HAL_UART_DISABLE_IT, __HAL_UART_GET_FLAG, HAL_BUSY, HAL_OK, HAL_UART_RECEPTION_STANDARD, HAL_UART_RECEPTION_TOIDLE, HAL_UART_RxCpltCallback(), HAL_UART_RXEVENT_TC, HAL_UART_STATE_BUSY_RX, HAL_UART_STATE_READY, HAL_UARTEx_RxEventCallback(), __UART_HandleTypeDef::Init, __UART_HandleTypeDef::Instance, UART_InitTypeDef::Parity, __UART_HandleTypeDef::pRxBuffPtr, __UART_HandleTypeDef::ReceptionType, __UART_HandleTypeDef::RxEventType, __UART_HandleTypeDef::RxState, __UART_HandleTypeDef::RxXferCount, __UART_HandleTypeDef::RxXferSize, UART_FLAG_IDLE, UART_IT_ERR, UART_IT_PE, UART_IT_RXNE, UART_PARITY_NONE, UART_WORDLENGTH_8B, UART_WORDLENGTH_9B, and UART_InitTypeDef::WordLength.
Referenced by HAL_UART_IRQHandler().
|
static |
#include <stm32f4xx_hal_uart.c>
This function handles UART Communication Timeout. It waits until a flag is no longer in the specified status.
| huart | Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| Flag | specifies the UART flag to check. |
| Status | The actual Flag status (SET or RESET). |
| Tickstart | Tick start value |
| Timeout | Timeout duration |
| HAL | status |
Definition at line 3185 of file stm32f4xx_hal_uart.c.
References __HAL_UART_CLEAR_OREFLAG, __HAL_UART_GET_FLAG, __HAL_UNLOCK, __UART_HandleTypeDef::ErrorCode, HAL_ERROR, HAL_GetTick(), HAL_MAX_DELAY, HAL_OK, HAL_TIMEOUT, HAL_UART_ERROR_ORE, __UART_HandleTypeDef::Instance, UART_EndRxTransfer(), UART_FLAG_ORE, UART_FLAG_TC, and UART_FLAG_TXE.
Referenced by HAL_UART_Receive(), and HAL_UART_Transmit().
|
static |
#include <stm32f4xx_hal_uart.c>
Configures the UART peripheral.
| huart | Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. |
| None |
Definition at line 3695 of file stm32f4xx_hal_uart.c.
References assert_param, UART_InitTypeDef::BaudRate, HAL_RCC_GetPCLK1Freq(), HAL_RCC_GetPCLK2Freq(), UART_InitTypeDef::HwFlowCtl, __UART_HandleTypeDef::Init, __UART_HandleTypeDef::Instance, IS_UART_BAUDRATE, IS_UART_MODE, IS_UART_PARITY, IS_UART_STOPBITS, UART_InitTypeDef::Mode, UART_InitTypeDef::OverSampling, UART_InitTypeDef::Parity, UART_InitTypeDef::StopBits, UART_BRR_SAMPLING16, UART_BRR_SAMPLING8, UART_OVERSAMPLING_8, and UART_InitTypeDef::WordLength.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), and HAL_UART_Init().