STM32F439xx HAL User Manual
Functions
Initialization and de-initialization functions
SPI Exported Functions

Functions

ErrorStatus LL_SPI_DeInit (SPI_TypeDef *SPIx)
 De-initialize the SPI registers to their default reset values.
ErrorStatus LL_SPI_Init (SPI_TypeDef *SPIx, LL_SPI_InitTypeDef *SPI_InitStruct)
 Initialize the SPI registers according to the specified parameters in SPI_InitStruct.
void LL_SPI_StructInit (LL_SPI_InitTypeDef *SPI_InitStruct)
 Set each LL_SPI_InitTypeDef field to default value.

Function Documentation

ErrorStatus LL_SPI_DeInit ( SPI_TypeDef *  SPIx)

De-initialize the SPI registers to their default reset values.

Parameters:
SPIxSPI Instance
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: SPI registers are de-initialized
  • ERROR: SPI registers are not de-initialized

Definition at line 139 of file stm32f4xx_ll_spi.c.

References assert_param, LL_APB1_GRP1_ForceReset(), LL_APB1_GRP1_PERIPH_SPI2, LL_APB1_GRP1_PERIPH_SPI3, LL_APB1_GRP1_ReleaseReset(), LL_APB2_GRP1_ForceReset(), LL_APB2_GRP1_PERIPH_SPI1, LL_APB2_GRP1_PERIPH_SPI4, LL_APB2_GRP1_PERIPH_SPI5, LL_APB2_GRP1_PERIPH_SPI6, and LL_APB2_GRP1_ReleaseReset().

Referenced by LL_I2S_DeInit().

ErrorStatus LL_SPI_Init ( SPI_TypeDef *  SPIx,
LL_SPI_InitTypeDef SPI_InitStruct 
)

Initialize the SPI registers according to the specified parameters in SPI_InitStruct.

Note:
As some bits in SPI configuration registers can only be written when the SPI is disabled (SPI_CR1_SPE bit =0), SPI IP should be in disabled state prior calling this function. Otherwise, ERROR result will be returned.
Parameters:
SPIxSPI Instance
SPI_InitStructpointer to a LL_SPI_InitTypeDef structure
Return values:
AnErrorStatus enumeration value. (Return always SUCCESS)

Definition at line 230 of file stm32f4xx_ll_spi.c.

References assert_param, LL_SPI_InitTypeDef::BaudRate, LL_SPI_InitTypeDef::BitOrder, LL_SPI_InitTypeDef::ClockPhase, LL_SPI_InitTypeDef::ClockPolarity, LL_SPI_InitTypeDef::CRCCalculation, LL_SPI_InitTypeDef::CRCPoly, LL_SPI_InitTypeDef::DataWidth, IS_LL_SPI_BAUDRATE, IS_LL_SPI_BITORDER, IS_LL_SPI_CRC_POLYNOMIAL, IS_LL_SPI_CRCCALCULATION, IS_LL_SPI_DATAWIDTH, IS_LL_SPI_MODE, IS_LL_SPI_NSS, IS_LL_SPI_PHASE, IS_LL_SPI_POLARITY, IS_LL_SPI_TRANSFER_DIRECTION, LL_SPI_CRCCALCULATION_ENABLE, LL_SPI_IsEnabled(), LL_SPI_SetCRCPolynomial(), LL_SPI_InitTypeDef::Mode, LL_SPI_InitTypeDef::NSS, SPI_CR1_CLEAR_MASK, and LL_SPI_InitTypeDef::TransferDirection.

void LL_SPI_StructInit ( LL_SPI_InitTypeDef SPI_InitStruct)