STM32F439xx HAL User Manual
Functions
SPI Private Functions
SPI

Private functions. More...

Functions

static void SPI_DMATransmitCplt (DMA_HandleTypeDef *hdma)
 DMA SPI transmit process complete callback.
static void SPI_DMAReceiveCplt (DMA_HandleTypeDef *hdma)
 DMA SPI receive process complete callback.
static void SPI_DMATransmitReceiveCplt (DMA_HandleTypeDef *hdma)
 DMA SPI transmit receive process complete callback.
static void SPI_DMAHalfTransmitCplt (DMA_HandleTypeDef *hdma)
 DMA SPI half transmit process complete callback.
static void SPI_DMAHalfReceiveCplt (DMA_HandleTypeDef *hdma)
 DMA SPI half receive process complete callback.
static void SPI_DMAHalfTransmitReceiveCplt (DMA_HandleTypeDef *hdma)
 DMA SPI half transmit receive process complete callback.
static void SPI_DMAError (DMA_HandleTypeDef *hdma)
 DMA SPI communication error callback.
static void SPI_DMAAbortOnError (DMA_HandleTypeDef *hdma)
 DMA SPI communication abort callback, when initiated by HAL services on Error (To be called at end of DMA Abort procedure following error occurrence).
static void SPI_DMATxAbortCallback (DMA_HandleTypeDef *hdma)
 DMA SPI Tx communication abort callback, when initiated by user (To be called at end of DMA Tx Abort procedure following user abort request).
static void SPI_DMARxAbortCallback (DMA_HandleTypeDef *hdma)
 DMA SPI Rx communication abort callback, when initiated by user (To be called at end of DMA Rx Abort procedure following user abort request).
static HAL_StatusTypeDef SPI_WaitFlagStateUntilTimeout (SPI_HandleTypeDef *hspi, uint32_t Flag, uint32_t State, uint32_t Timeout, uint32_t Tickstart)
 Handle SPI Communication Timeout.
static void SPI_TxISR_8BIT (struct __SPI_HandleTypeDef *hspi)
 Handle the data 8-bit transmit in Interrupt mode.
static void SPI_TxISR_16BIT (struct __SPI_HandleTypeDef *hspi)
 Handle the data 16-bit transmit in Interrupt mode.
static void SPI_RxISR_8BIT (struct __SPI_HandleTypeDef *hspi)
 Manage the receive 8-bit in Interrupt context.
static void SPI_RxISR_16BIT (struct __SPI_HandleTypeDef *hspi)
 Manage the 16-bit receive in Interrupt context.
static void SPI_2linesRxISR_8BIT (struct __SPI_HandleTypeDef *hspi)
 Rx 8-bit handler for Transmit and Receive in Interrupt mode.
static void SPI_2linesTxISR_8BIT (struct __SPI_HandleTypeDef *hspi)
 Tx 8-bit handler for Transmit and Receive in Interrupt mode.
static void SPI_2linesTxISR_16BIT (struct __SPI_HandleTypeDef *hspi)
 Tx 16-bit handler for Transmit and Receive in Interrupt mode.
static void SPI_2linesRxISR_16BIT (struct __SPI_HandleTypeDef *hspi)
 Rx 16-bit handler for Transmit and Receive in Interrupt mode.
static void SPI_RxISR_8BITCRC (struct __SPI_HandleTypeDef *hspi)
 Manage the CRC 8-bit receive in Interrupt context.
static void SPI_RxISR_16BITCRC (struct __SPI_HandleTypeDef *hspi)
 Manage the CRC 16-bit receive in Interrupt context.
static void SPI_2linesRxISR_8BITCRC (struct __SPI_HandleTypeDef *hspi)
 Rx 8-bit handler for Transmit and Receive in Interrupt mode.
static void SPI_2linesRxISR_16BITCRC (struct __SPI_HandleTypeDef *hspi)
 Manage the CRC 16-bit receive for Transmit and Receive in Interrupt mode.
static void SPI_CloseRxTx_ISR (SPI_HandleTypeDef *hspi)
 Handle the end of the RXTX transaction.
static void SPI_CloseRx_ISR (SPI_HandleTypeDef *hspi)
 Handle the end of the RX transaction.
static void SPI_CloseTx_ISR (SPI_HandleTypeDef *hspi)
 Handle the end of the TX transaction.
static HAL_StatusTypeDef SPI_CheckFlag_BSY (SPI_HandleTypeDef *hspi, uint32_t Timeout, uint32_t Tickstart)
 Handle to check BSY flag before start a new transaction.

Detailed Description

Private functions.


Function Documentation

static void SPI_2linesRxISR_16BIT ( struct __SPI_HandleTypeDef hspi) [static]

Rx 16-bit handler for Transmit and Receive in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2649 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE_IT, SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pRxBuffPtr, __SPI_HandleTypeDef::RxISR, __SPI_HandleTypeDef::RxXferCount, SPI_2linesRxISR_16BITCRC(), SPI_CloseRxTx_ISR(), SPI_CRCCALCULATION_ENABLE, SPI_IT_RXNE, and __SPI_HandleTypeDef::TxXferCount.

Referenced by HAL_SPI_TransmitReceive_IT().

static void SPI_2linesRxISR_16BITCRC ( struct __SPI_HandleTypeDef hspi) [static]

Manage the CRC 16-bit receive for Transmit and Receive in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2683 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE_IT, __SPI_HandleTypeDef::Instance, SPI_CloseRxTx_ISR(), and SPI_IT_RXNE.

Referenced by SPI_2linesRxISR_16BIT().

static void SPI_2linesRxISR_8BIT ( struct __SPI_HandleTypeDef hspi) [static]

Rx 8-bit handler for Transmit and Receive in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2555 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE_IT, SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pRxBuffPtr, __SPI_HandleTypeDef::RxISR, __SPI_HandleTypeDef::RxXferCount, SPI_2linesRxISR_8BITCRC(), SPI_CloseRxTx_ISR(), SPI_CRCCALCULATION_ENABLE, SPI_IT_ERR, SPI_IT_RXNE, and __SPI_HandleTypeDef::TxXferCount.

Referenced by HAL_SPI_TransmitReceive_IT().

static void SPI_2linesRxISR_8BITCRC ( struct __SPI_HandleTypeDef hspi) [static]

Rx 8-bit handler for Transmit and Receive in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2589 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE_IT, __SPI_HandleTypeDef::Instance, SPI_CloseRxTx_ISR(), SPI_IT_ERR, SPI_IT_RXNE, and __SPI_HandleTypeDef::TxXferCount.

Referenced by SPI_2linesRxISR_8BIT().

static void SPI_2linesTxISR_16BIT ( struct __SPI_HandleTypeDef hspi) [static]

Tx 16-bit handler for Transmit and Receive in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2707 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE_IT, SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pTxBuffPtr, __SPI_HandleTypeDef::RxXferCount, SPI_CloseRxTx_ISR(), SPI_CRCCALCULATION_ENABLE, SPI_IT_TXE, and __SPI_HandleTypeDef::TxXferCount.

Referenced by HAL_SPI_TransmitReceive_IT().

static void SPI_2linesTxISR_8BIT ( struct __SPI_HandleTypeDef hspi) [static]

Tx 8-bit handler for Transmit and Receive in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2616 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE_IT, SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pTxBuffPtr, __SPI_HandleTypeDef::RxXferCount, SPI_CloseRxTx_ISR(), SPI_CRCCALCULATION_ENABLE, SPI_IT_TXE, and __SPI_HandleTypeDef::TxXferCount.

Referenced by HAL_SPI_TransmitReceive_IT().

static HAL_StatusTypeDef SPI_CheckFlag_BSY ( SPI_HandleTypeDef hspi,
uint32_t  Timeout,
uint32_t  Tickstart 
) [static]

Handle to check BSY flag before start a new transaction.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
TimeoutTimeout duration
Tickstarttick start value
Return values:
HALstatus

Definition at line 2953 of file stm32f4xx_hal_spi.c.

References __SPI_HandleTypeDef::ErrorCode, HAL_SPI_ERROR_FLAG, SPI_FLAG_BSY, and SPI_WaitFlagStateUntilTimeout().

Referenced by HAL_SPI_Transmit(), HAL_SPI_TransmitReceive(), SPI_CloseRxTx_ISR(), SPI_CloseTx_ISR(), SPI_DMATransmitCplt(), and SPI_DMATransmitReceiveCplt().

static void SPI_CloseRx_ISR ( SPI_HandleTypeDef hspi) [static]
static void SPI_CloseRxTx_ISR ( SPI_HandleTypeDef hspi) [static]
static void SPI_CloseTx_ISR ( SPI_HandleTypeDef hspi) [static]
static void SPI_DMAAbortOnError ( DMA_HandleTypeDef hdma) [static]

DMA SPI communication abort callback, when initiated by HAL services on Error (To be called at end of DMA Abort procedure following error occurrence).

Parameters:
hdmaDMA handle.
Return values:
None

Definition at line 2438 of file stm32f4xx_hal_spi.c.

References HAL_SPI_ErrorCallback(), __SPI_HandleTypeDef::RxXferCount, and __SPI_HandleTypeDef::TxXferCount.

Referenced by HAL_SPI_IRQHandler().

static void SPI_DMAError ( DMA_HandleTypeDef hdma) [static]

DMA SPI communication error callback.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module.
Return values:
None

Definition at line 2420 of file stm32f4xx_hal_spi.c.

References __SPI_HandleTypeDef::ErrorCode, HAL_SPI_ERROR_DMA, HAL_SPI_ErrorCallback(), HAL_SPI_STATE_READY, __SPI_HandleTypeDef::Instance, and __SPI_HandleTypeDef::State.

Referenced by HAL_SPI_Receive_DMA(), HAL_SPI_Transmit_DMA(), and HAL_SPI_TransmitReceive_DMA().

static void SPI_DMAHalfReceiveCplt ( DMA_HandleTypeDef hdma) [static]

DMA SPI half receive process complete callback.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module.
Return values:
None

Definition at line 2394 of file stm32f4xx_hal_spi.c.

References HAL_SPI_RxHalfCpltCallback().

Referenced by HAL_SPI_Receive_DMA(), and HAL_SPI_TransmitReceive_DMA().

static void SPI_DMAHalfTransmitCplt ( DMA_HandleTypeDef hdma) [static]

DMA SPI half transmit process complete callback.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module.
Return values:
None

Definition at line 2381 of file stm32f4xx_hal_spi.c.

References HAL_SPI_TxHalfCpltCallback().

Referenced by HAL_SPI_Transmit_DMA().

static void SPI_DMAHalfTransmitReceiveCplt ( DMA_HandleTypeDef hdma) [static]

DMA SPI half transmit receive process complete callback.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA module.
Return values:
None

Definition at line 2407 of file stm32f4xx_hal_spi.c.

References HAL_SPI_TxRxHalfCpltCallback().

Referenced by HAL_SPI_TransmitReceive_DMA().

static void SPI_DMAReceiveCplt ( DMA_HandleTypeDef hdma) [static]
static void SPI_DMARxAbortCallback ( DMA_HandleTypeDef hdma) [static]

DMA SPI Rx communication abort callback, when initiated by user (To be called at end of DMA Rx Abort procedure following user abort request).

Note:
When this callback is executed, User Abort complete call back is called only if no Abort still ongoing for Tx DMA Handle.
Parameters:
hdmaDMA handle.
Return values:
None

Definition at line 2510 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_CLEAR_FREFLAG, __HAL_SPI_CLEAR_OVRFLAG, __HAL_SPI_DISABLE, __SPI_HandleTypeDef::ErrorCode, HAL_SPI_AbortCpltCallback(), HAL_SPI_ERROR_NONE, HAL_SPI_STATE_READY, __SPI_HandleTypeDef::hdmarx, __SPI_HandleTypeDef::hdmatx, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::RxXferCount, __SPI_HandleTypeDef::State, __SPI_HandleTypeDef::TxXferCount, and __DMA_HandleTypeDef::XferAbortCallback.

Referenced by HAL_SPI_Abort_IT().

static void SPI_DMATransmitCplt ( DMA_HandleTypeDef hdma) [static]
static void SPI_DMATransmitReceiveCplt ( DMA_HandleTypeDef hdma) [static]
static void SPI_DMATxAbortCallback ( DMA_HandleTypeDef hdma) [static]

DMA SPI Tx communication abort callback, when initiated by user (To be called at end of DMA Tx Abort procedure following user abort request).

Note:
When this callback is executed, User Abort complete call back is called only if no Abort still ongoing for Rx DMA Handle.
Parameters:
hdmaDMA handle.
Return values:
None

Definition at line 2455 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_CLEAR_FREFLAG, HAL_SPI_AbortCpltCallback(), HAL_SPI_ERROR_FLAG, HAL_SPI_ERROR_NONE, HAL_SPI_STATE_READY, __SPI_HandleTypeDef::hdmatx, SPI_DEFAULT_TIMEOUT, SPI_FLAG_TXE, and __DMA_HandleTypeDef::XferAbortCallback.

Referenced by HAL_SPI_Abort_IT().

static void SPI_RxISR_16BIT ( struct __SPI_HandleTypeDef hspi) [static]

Manage the 16-bit receive in Interrupt context.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2819 of file stm32f4xx_hal_spi.c.

References SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pRxBuffPtr, __SPI_HandleTypeDef::RxISR, __SPI_HandleTypeDef::RxXferCount, SPI_CloseRx_ISR(), SPI_CRCCALCULATION_ENABLE, and SPI_RxISR_16BITCRC().

Referenced by HAL_SPI_Receive_IT().

static void SPI_RxISR_16BITCRC ( struct __SPI_HandleTypeDef hspi) [static]

Manage the CRC 16-bit receive in Interrupt context.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2796 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE_IT, __SPI_HandleTypeDef::Instance, SPI_CloseRx_ISR(), SPI_IT_ERR, and SPI_IT_RXNE.

Referenced by SPI_RxISR_16BIT().

static void SPI_RxISR_8BIT ( struct __SPI_HandleTypeDef hspi) [static]

Manage the receive 8-bit in Interrupt context.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2763 of file stm32f4xx_hal_spi.c.

References SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pRxBuffPtr, __SPI_HandleTypeDef::RxISR, __SPI_HandleTypeDef::RxXferCount, SPI_CloseRx_ISR(), SPI_CRCCALCULATION_ENABLE, and SPI_RxISR_8BITCRC().

Referenced by HAL_SPI_Receive_IT().

static void SPI_RxISR_8BITCRC ( struct __SPI_HandleTypeDef hspi) [static]

Manage the CRC 8-bit receive in Interrupt context.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2743 of file stm32f4xx_hal_spi.c.

References __SPI_HandleTypeDef::Instance, and SPI_CloseRx_ISR().

Referenced by SPI_RxISR_8BIT().

static void SPI_TxISR_16BIT ( struct __SPI_HandleTypeDef hspi) [static]

Handle the data 16-bit transmit in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2876 of file stm32f4xx_hal_spi.c.

References SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pTxBuffPtr, SPI_CloseTx_ISR(), SPI_CRCCALCULATION_ENABLE, and __SPI_HandleTypeDef::TxXferCount.

Referenced by HAL_SPI_Transmit_IT().

static void SPI_TxISR_8BIT ( struct __SPI_HandleTypeDef hspi) [static]

Handle the data 8-bit transmit in Interrupt mode.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values:
None

Definition at line 2852 of file stm32f4xx_hal_spi.c.

References SPI_InitTypeDef::CRCCalculation, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, __SPI_HandleTypeDef::pTxBuffPtr, SPI_CloseTx_ISR(), SPI_CRCCALCULATION_ENABLE, and __SPI_HandleTypeDef::TxXferCount.

Referenced by HAL_SPI_Transmit_IT().

static HAL_StatusTypeDef SPI_WaitFlagStateUntilTimeout ( SPI_HandleTypeDef hspi,
uint32_t  Flag,
uint32_t  State,
uint32_t  Timeout,
uint32_t  Tickstart 
) [static]

Handle SPI Communication Timeout.

Parameters:
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
FlagSPI flag to check
Stateflag state to check
TimeoutTimeout duration
Tickstarttick start value
Return values:
HALstatus

Definition at line 2906 of file stm32f4xx_hal_spi.c.

References __HAL_SPI_DISABLE, __HAL_SPI_DISABLE_IT, SPI_InitTypeDef::CRCCalculation, SPI_InitTypeDef::Direction, HAL_GetTick(), HAL_SPI_STATE_READY, __SPI_HandleTypeDef::Init, __SPI_HandleTypeDef::Instance, SPI_InitTypeDef::Mode, SPI_CRCCALCULATION_ENABLE, SPI_DIRECTION_1LINE, SPI_DIRECTION_2LINES_RXONLY, SPI_IT_ERR, SPI_IT_RXNE, SPI_IT_TXE, SPI_MODE_MASTER, SPI_RESET_CRC, and __SPI_HandleTypeDef::State.

Referenced by HAL_SPI_Receive(), HAL_SPI_Transmit(), HAL_SPI_TransmitReceive(), SPI_CheckFlag_BSY(), SPI_DMAReceiveCplt(), and SPI_DMATransmitReceiveCplt().