STM32H735xx HAL User Manual
Functions
Initialization and de-initialization functions
SPI Exported Functions | I2S 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.
ErrorStatus LL_I2S_DeInit (SPI_TypeDef *SPIx)
 De-initialize the SPI/I2S registers to their default reset values.
ErrorStatus LL_I2S_Init (SPI_TypeDef *SPIx, LL_I2S_InitTypeDef *I2S_InitStruct)
 Initializes the SPI/I2S registers according to the specified parameters in I2S_InitStruct.
void LL_I2S_StructInit (LL_I2S_InitTypeDef *I2S_InitStruct)
 Set each LL_I2S_InitTypeDef field to default value.
void LL_I2S_ConfigPrescaler (SPI_TypeDef *SPIx, uint32_t PrescalerLinear, uint32_t PrescalerParity)
 Set linear and parity prescaler.

Function Documentation

void LL_I2S_ConfigPrescaler ( SPI_TypeDef *  SPIx,
uint32_t  PrescalerLinear,
uint32_t  PrescalerParity 
)

Set linear and parity prescaler.

Note:
To calculate value of PrescalerLinear(I2SDIV[7:0] bits) and PrescalerParity(ODD bit)
Check Audio frequency table and formulas inside Reference Manual (SPI/I2S).
Parameters:
SPIxSPI Instance
PrescalerLinearValue between Min_Data=0x00 and Max_Data=0xFF
Note:
PrescalerLinear '1' is not authorized with parity LL_I2S_PRESCALER_PARITY_ODD
Parameters:
PrescalerParityThis parameter can be one of the following values:
Return values:
None

Definition at line 722 of file stm32h7xx_ll_spi.c.

References assert_param, IS_LL_I2S_PRESCALER_LINEAR, and IS_LL_I2S_PRESCALER_PARITY.

ErrorStatus LL_I2S_DeInit ( SPI_TypeDef *  SPIx)

De-initialize the SPI/I2S 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 551 of file stm32h7xx_ll_spi.c.

References LL_SPI_DeInit().

ErrorStatus LL_I2S_Init ( SPI_TypeDef *  SPIx,
LL_I2S_InitTypeDef I2S_InitStruct 
)

Initializes the SPI/I2S registers according to the specified parameters in I2S_InitStruct.

Note:
As some bits in I2S 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.
I2S (SPI) source clock must be ready before calling this function. Otherwise will results in wrong programming.
Parameters:
SPIxSPI Instance
I2S_InitStructpointer to a LL_I2S_InitTypeDef structure
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: SPI registers are Initialized
  • ERROR: SPI registers are not Initialized

Definition at line 569 of file stm32h7xx_ll_spi.c.

References assert_param, LL_I2S_InitTypeDef::AudioFreq, LL_I2S_InitTypeDef::ClockPolarity, LL_I2S_InitTypeDef::DataFormat, I2S_I2SCFGR_CLEAR_MASK, IS_LL_I2S_AUDIO_FREQ, IS_LL_I2S_CKPOL, IS_LL_I2S_DATAFORMAT, IS_LL_I2S_MCLK_OUTPUT, IS_LL_I2S_MODE, IS_LL_I2S_STANDARD, LL_I2S_AUDIOFREQ_DEFAULT, LL_I2S_DATAFORMAT_16B, LL_I2S_MCLK_OUTPUT_ENABLE, LL_I2S_STANDARD_PCM_LONG, LL_I2S_STANDARD_PCM_SHORT, LL_RCC_GetSPIClockFreq(), LL_RCC_SPI123_CLKSOURCE, LL_RCC_SPI6_CLKSOURCE, LL_SPI_IsEnabled(), LL_I2S_InitTypeDef::MCLKOutput, LL_I2S_InitTypeDef::Mode, and LL_I2S_InitTypeDef::Standard.

void LL_I2S_StructInit ( LL_I2S_InitTypeDef I2S_InitStruct)
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 242 of file stm32h7xx_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_ReleaseReset(), LL_APB4_GRP1_ForceReset(), LL_APB4_GRP1_PERIPH_SPI6, and LL_APB4_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 340 of file stm32h7xx_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_BAUDRATEPRESCALER, 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_GetNSSPolarity(), LL_SPI_IsEnabled(), LL_SPI_MODE_MASTER, LL_SPI_MODE_SLAVE, LL_SPI_NSS_POLARITY_HIGH, LL_SPI_NSS_POLARITY_LOW, LL_SPI_NSS_SOFT, LL_SPI_SetCRCPolynomial(), LL_SPI_SetInternalSSLevel(), LL_SPI_SS_LEVEL_HIGH, LL_SPI_InitTypeDef::Mode, LL_SPI_InitTypeDef::NSS, and LL_SPI_InitTypeDef::TransferDirection.

void LL_SPI_StructInit ( LL_SPI_InitTypeDef SPI_InitStruct)