LL SPI Functions

Configuration

group SPI_LL_EF_Configuration

Functions

void LL_SPI_Enable ( SPI_TypeDef * p_spix )

Enable SPI peripheral.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 SPE LL_SPI_Enable

Parameters :

p_spix – SPI Instance

void LL_SPI_Disable ( SPI_TypeDef * p_spix )

Disable SPI peripheral.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 SPE LL_SPI_Disable

Note

When disabling the SPI, follow the procedure described in the Reference Manual.

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabled ( const SPI_TypeDef * p_spix )

Check if SPI peripheral is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 SPE LL_SPI_IsEnabled

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_EnableMosiMisoSwap ( SPI_TypeDef * p_spix )

Swap the MOSI and MISO pin.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 IOSWP LL_SPI_EnableMosiMisoSwap

Note

This configuration can not be changed when SPI is enabled.

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableMosiMisoSwap ( SPI_TypeDef * p_spix )

Restore default function for MOSI and MISO pin.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 IOSWP LL_SPI_DisableMosiMisoSwap

Note

This configuration can not be changed when SPI is enabled.

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledMosiMisoSwap ( const SPI_TypeDef * p_spix )

Check if MOSI and MISO pin are swapped.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 IOSWP LL_SPI_IsEnabledMosiMisoSwap

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_EnableGPIOControl ( SPI_TypeDef * p_spix )

Enable GPIO control.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 AFCNTR LL_SPI_EnableGPIOControl

Note

This configuration can not be changed when SPI is enabled.

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableGPIOControl ( SPI_TypeDef * p_spix )

Disable GPIO control.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 AFCNTR LL_SPI_DisableGPIOControl

Note

This configuration can not be changed when SPI is enabled.

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledGPIOControl ( const SPI_TypeDef * p_spix )

Check if GPIO control is active.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 AFCNTR LL_SPI_IsEnabledGPIOControl

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_SetMode ( SPI_TypeDef * p_spix , uint32_t mode )

Set SPI Mode to Master or Slave.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 MASTER LL_SPI_SetMode

Note

This configuration can not be changed when SPI is enabled.

Parameters :
uint32_t LL_SPI_GetMode ( const SPI_TypeDef * p_spix )

Get SPI Mode (Master or Slave)

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 MASTER LL_SPI_GetMode

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetMasterSSIdleness ( SPI_TypeDef * p_spix , uint32_t master_ss_idleness )

Configure the Idleness applied by master between active edge of SS and first send data.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 MSSI LL_SPI_SetMasterSSIdleness

Parameters :
uint32_t LL_SPI_GetMasterSSIdleness ( const SPI_TypeDef * p_spix )

Get the configured Idleness applied by master.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 MSSI LL_SPI_GetMasterSSIdleness

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetInterDataIdleness ( SPI_TypeDef * p_spix , uint32_t master_Inter_data_idleness )

Configure the idleness applied by master between data frame.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 MIDI LL_SPI_SetInterDataIdleness

Parameters :
uint32_t LL_SPI_GetInterDataIdleness ( const SPI_TypeDef * p_spix )

Get the configured inter data idleness.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 MIDI LL_SPI_SetInterDataIdleness

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetTransferSize ( SPI_TypeDef * p_spix , uint32_t count )

Set transfer size.

Reference Manual to LL API cross reference (Register Field Functions)

CR2 TSIZE LL_SPI_SetTransferSize

Note

count is the number of frame to be transferred

Parameters :
  • p_spix – SPI Instance

  • count – 0..0xFFFF

uint32_t LL_SPI_GetTransferSize ( const SPI_TypeDef * p_spix )

Get transfer size.

Reference Manual to LL API cross reference (Register Field Functions)

CR2 TSIZE LL_SPI_GetTransferSize

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFF

void LL_SPI_EnableIOLock ( SPI_TypeDef * p_spix )

Lock the AF configuration of associated IOs.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 IOLOCK LL_SPI_EnableIOLock

Note

Once this bit is set, the AF configuration remains locked until a hardware reset occurs. the reset of the IOLock bit is done by hardware. for that, LL_SPI_DisableIOLock can not exist.

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledIOLock ( const SPI_TypeDef * p_spix )

Check if the AF configuration is locked.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 IOLOCK LL_SPI_IsEnabledIOLock

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_SetTxCRCInitPattern ( SPI_TypeDef * p_spix , uint32_t txcrc_init_all )

Set Tx CRC Initialization Pattern.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 TCRCINI LL_SPI_SetTxCRCInitPattern

Parameters :
uint32_t LL_SPI_GetTxCRCInitPattern ( const SPI_TypeDef * p_spix )

Get Tx CRC Initialization Pattern.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 TCRCINI LL_SPI_GetTxCRCInitPattern

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetRxCRCInitPattern ( SPI_TypeDef * p_spix , uint32_t rxcrc_init_all )

Set Rx CRC Initialization Pattern.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 RCRCINI LL_SPI_SetRxCRCInitPattern

Parameters :
uint32_t LL_SPI_GetRxCRCInitPattern ( const SPI_TypeDef * p_spix )

Get Rx CRC Initialization Pattern.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 RCRCINI LL_SPI_GetRxCRCInitPattern

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetCRCInitPattern ( SPI_TypeDef * p_spix , uint32_t txcrc_init_all , uint32_t rxcrc_init_all )

Set CRC Initialization Pattern.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 RCRCINI LL_SPI_SetCRCInitPattern

CR1 TCRCINI LL_SPI_SetCRCInitPattern

Parameters :
uint32_t LL_SPI_GetCRCInitPattern ( const SPI_TypeDef * p_spix )

Get CRC Initialization Pattern.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 RCRCINI LL_SPI_GetRxCRCInitPattern

Parameters :

p_spix – SPI Instance

void LL_SPI_SetInternalSSLevel ( SPI_TypeDef * p_spix , uint32_t ss_level )

Set internal SS input level ignoring what comes from PIN.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 SSI LL_SPI_SetInternalSSLevel

Note

This configuration has effect only with config LL_SPI_NSS_SOFT

Parameters :
uint32_t LL_SPI_GetInternalSSLevel ( const SPI_TypeDef * p_spix )

Get internal SS input level.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 SSI LL_SPI_GetInternalSSLevel

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_EnableFullSizeCRC ( SPI_TypeDef * p_spix )

Enable CRC computation on 33/17 bits.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 CRC33_17 LL_SPI_EnableFullSizeCRC

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableFullSizeCRC ( SPI_TypeDef * p_spix )

Disable CRC computation on 33/17 bits.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 CRC33_17 LL_SPI_DisableFullSizeCRC

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledFullSizeCRC ( const SPI_TypeDef * p_spix )

Check if Enable CRC computation on 33/17 bits is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 CRC33_17 LL_SPI_IsEnabledFullSizeCRC

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_SuspendMasterTransfer ( SPI_TypeDef * p_spix )

Suspend an ongoing transfer for Master configuration.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 CSUSP LL_SPI_SuspendMasterTransfer

Parameters :

p_spix – SPI Instance

void LL_SPI_StartMasterTransfer ( SPI_TypeDef * p_spix )

Start effective transfer on wire for Master configuration.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 CSTART LL_SPI_StartMasterTransfer

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsActiveMasterTransfer ( const SPI_TypeDef * p_spix )

Check if there is an unfinished master transfer.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 CSTART LL_SPI_IsActiveMasterTransfer

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_EnableMasterRxAutoSuspend ( SPI_TypeDef * p_spix )

Enable Master Rx auto suspend in case of overrun.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 MASRX LL_SPI_EnableMasterRxAutoSuspend

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableMasterRxAutoSuspend ( SPI_TypeDef * p_spix )

Disable Master Rx auto suspend in case of overrun.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 MASRX LL_SPI_DisableMasterRxAutoSuspend

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledMasterRxAutoSuspend ( const SPI_TypeDef * p_spix )

Check if Master Rx auto suspend is activated.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 MASRX LL_SPI_IsEnabledMasterRxAutoSuspend

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_SetUDRConfiguration ( SPI_TypeDef * p_spix , uint32_t udr_config )

Set Underrun Configuration.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 UDRCFG LL_SPI_SetUDRConfiguration

Note

This configuration can not be changed when SPI is enabled.

Parameters :
uint32_t LL_SPI_GetUDRConfiguration ( const SPI_TypeDef * p_spix )

Get Underrun Configuration.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 UDRCFG LL_SPI_GetUDRConfiguration

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetStandard ( SPI_TypeDef * p_spix , uint32_t standard )

Set Serial protocol used.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SP LL_SPI_SetStandard

Note

This configuration can not be changed when SPI is enabled.

Parameters :
uint32_t LL_SPI_GetStandard ( const SPI_TypeDef * p_spix )

Get Serial protocol used.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SP LL_SPI_GetStandard

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetClockPhase ( SPI_TypeDef * p_spix , uint32_t clock_phase )

Set Clock phase.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 CPHA LL_SPI_SetClockPhase

Note

This configuration can not be changed when SPI is enabled. This bit is not used in SPI TI mode.

Parameters :
uint32_t LL_SPI_GetClockPhase ( const SPI_TypeDef * p_spix )

Get Clock phase.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 CPHA LL_SPI_GetClockPhase

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetClockPolarity ( SPI_TypeDef * p_spix , uint32_t clock_polarity )

Set Clock polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 CPOL LL_SPI_SetClockPolarity

Note

This configuration can not be changed when SPI is enabled. This bit is not used in SPI TI mode.

Parameters :
uint32_t LL_SPI_GetClockPolarity ( const SPI_TypeDef * p_spix )

Get Clock polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 CPOL LL_SPI_GetClockPolarity

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_EnableReadyPin ( SPI_TypeDef * p_spix )

Enable ReadyPin.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 RDIOM LL_SPI_EnableReadyPin

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableReadyPin ( SPI_TypeDef * p_spix )

Disable ReadyPin.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 RDIOM LL_SPI_DisableReadyPin

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledReadyPin ( const SPI_TypeDef * p_spix )

Check if ReadyPin is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 RDIOM LL_SPI_IsEnabledReadyPin

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

void LL_SPI_SetReadyPinPolarity ( SPI_TypeDef * p_spix , uint32_t polarity )

Set ReadyPin polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 RDIOP LL_SPI_SetReadyPinPolarity

Parameters :
uint32_t LL_SPI_GetReadyPinPolarity ( const SPI_TypeDef * p_spix )

Get ReadyPin polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 RDIOP LL_SPI_GetReadyPinPolarity

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetNSSPolarity ( SPI_TypeDef * p_spix , uint32_t nss_polarity )

Set NSS polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSIOP LL_SPI_SetNSSPolarity

Note

This configuration can not be changed when SPI is enabled. This bit is not used in SPI TI mode.

Parameters :
uint32_t LL_SPI_GetNSSPolarity ( const SPI_TypeDef * p_spix )

Get NSS polarity.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSIOP LL_SPI_GetNSSPolarity

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetBaudRatePrescaler ( SPI_TypeDef * p_spix , uint32_t baudrate )

Set Baudrate Prescaler.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 MBR LL_SPI_SetBaudRatePrescaler

CFG1 BPASS LL_SPI_SetBaudRatePrescaler

Note

This configuration can not be changed when SPI is enabled. SPI BaudRate = fPCLK/Pescaler.

Note

This configuration can not be changed when SPI is enabled. SPI BaudRate = fPCLK/Pescaler.

Parameters :
uint32_t LL_SPI_GetBaudRatePrescaler ( const SPI_TypeDef * p_spix )

Get Baudrate Prescaler.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 MBR LL_SPI_GetBaudRatePrescaler

CFG1 BPASS LL_SPI_GetBaudRatePrescaler

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetConfig ( SPI_TypeDef * p_spix , uint32_t cfg1_config , uint32_t cfg2_config )

Configure the SPI Bus.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 SSI LL_SPI_SetConfig

CFG2 MASTER LL_SPI_SetConfig

CFG2 COMM LL_SPI_SetConfig

CFG2 CPOL LL_SPI_SetConfig

CFG2 CPHA LL_SPI_SetConfig

CFG2 LSBFRST LL_SPI_SetConfig

CFG1 DSIZE LL_SPI_SetConfig

CFG1 MBR LL_SPI_SetConfig

CFG1 BPASS LL_SPI_SetConfig

Note

This configuration can not be changed when SPI is enabled.

Parameters :
void LL_SPI_SetTransferBitOrder ( SPI_TypeDef * p_spix , uint32_t bit_order )

Set Transfer Bit Order.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 LSBFRST LL_SPI_SetTransferBitOrder

Note

This configuration can not be changed when SPI is enabled. This bit is not used in SPI TI mode.

Parameters :
uint32_t LL_SPI_GetTransferBitOrder ( const SPI_TypeDef * p_spix )

Get Transfer Bit Order.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 LSBFRST LL_SPI_GetTransferBitOrder

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetTransferDirection ( SPI_TypeDef * p_spix , uint32_t transfer_direction )

Set Transfer Mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 COMM LL_SPI_SetTransferDirection

Note

This configuration can not be changed when SPI is enabled except for half duplex direction using LL_SPI_SetHalfDuplexDirection.

Parameters :
uint32_t LL_SPI_GetTransferDirection ( const SPI_TypeDef * p_spix )

Get Transfer Mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 COMM LL_SPI_GetTransferDirection

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetHalfDuplexDirection ( SPI_TypeDef * p_spix , uint32_t half_duplex_direction )

Set direction for Half-Duplex Mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 HDDIR LL_SPI_SetHalfDuplexDirection

Note

In master mode the MOSI pin is used and in slave mode the MISO pin is used for Half-Duplex.

Parameters :
uint32_t LL_SPI_GetHalfDuplexDirection ( const SPI_TypeDef * p_spix )

Get direction for Half-Duplex Mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR1 HDDIR LL_SPI_GetHalfDuplexDirection

Note

In master mode the MOSI pin is used and in slave mode the MISO pin is used for Half-Duplex.

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

uint32_t LL_SPI_IsHalfDuplexDirection ( const SPI_TypeDef * p_spix )

Check if the direction is Half duplex.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 COMM LL_SPI_IsHalfDuplexDirection

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_SetDataWidth ( SPI_TypeDef * p_spix , uint32_t data_width )

Set Frame Data Size.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 DSIZE LL_SPI_SetDataWidth

Note

This configuration can not be changed when SPI is enabled.

Parameters :
uint32_t LL_SPI_GetDataWidth ( const SPI_TypeDef * p_spix )

Get Frame Data Size.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 DSIZE LL_SPI_GetDataWidth

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetFIFOThreshold ( SPI_TypeDef * p_spix , uint32_t threshold )

Set threshold of FIFO that triggers a transfer event.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 FTHLV LL_SPI_SetFIFOThreshold

Note

This configuration can not be changed when SPI is enabled.

Parameters :
uint32_t LL_SPI_GetFIFOThreshold ( const SPI_TypeDef * p_spix )

Get threshold of FIFO that triggers a transfer event.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 FTHLV LL_SPI_GetFIFOThreshold

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_EnableCRC ( SPI_TypeDef * p_spix )

Enable CRC.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 CRCEN LL_SPI_EnableCRC

Note

This configuration can not be changed when SPI is enabled.

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableCRC ( SPI_TypeDef * p_spix )

Disable CRC.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 CRCEN LL_SPI_DisableCRC

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledCRC ( const SPI_TypeDef * p_spix )

Check if CRC is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 CRCEN LL_SPI_IsEnabledCRC

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

void LL_SPI_SetCRCWidth ( SPI_TypeDef * p_spix , uint32_t crc_length )

Set CRC Length.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 CRCSIZE LL_SPI_SetCRCWidth

Note

This configuration can not be changed when SPI is enabled.

Parameters :
uint32_t LL_SPI_GetCRCWidth ( const SPI_TypeDef * p_spix )

Get CRC Length.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 CRCSIZE LL_SPI_GetCRCWidth

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_SetNSSMode ( SPI_TypeDef * p_spix , uint32_t nss )

Set NSS Mode This bit is not used in SPI TI mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSM LL_SPI_SetNSSMode

CFG2 SSOE LL_SPI_SetNSSMode

Note

This configuration can not be changed when SPI is enabled.

Parameters :
uint32_t LL_SPI_GetNSSMode ( const SPI_TypeDef * p_spix )

Get NSS Mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSM LL_SPI_GetNSSMode

CFG2 SSOE LL_SPI_GetNSSMode

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_EnableNSSPulseMgt ( SPI_TypeDef * p_spix )

Enable NSS pulse mgt This bit is not used in SPI TI mode.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSOM LL_SPI_EnableNSSPulseMgt

Note

This configuration can not be changed when SPI is enabled.

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableNSSPulseMgt ( SPI_TypeDef * p_spix )

Disable NSS pulse mgt.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSOM LL_SPI_DisableNSSPulseMgt

Note

This configuration can not be changed when SPI is enabled. This bit is not used in SPI TI mode.

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledNSSPulse ( const SPI_TypeDef * p_spix )

Check if NSS pulse is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSOM LL_SPI_IsEnabledNSSPulse

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_SetNSSConfig ( SPI_TypeDef * p_spix , uint32_t cfg2_config )

Set NSS Config.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSIOP LL_SPI_SetNSSConfig

CFG2 SSOM LL_SPI_SetNSSConfig

CFG2 MSSI LL_SPI_SetNSSConfig

Note

This configuration can not be changed when SPI is enabled. Those bits are not used in SPI TI mode.

Parameters :
uint32_t LL_SPI_GetNSSConfig ( const SPI_TypeDef * p_spix )

Get NSS Config.

Reference Manual to LL API cross reference (Register Field Functions)

CFG2 SSIOP LL_SPI_GetNSSConfig

CFG2 SSOM LL_SPI_GetNSSConfig

CFG2 MSSI LL_SPI_GetNSSConfig

Note

This configuration can not be changed when SPI is enabled. Those bits are not used in SPI TI mode.

Parameters :

p_spix – SPI Instance

Return values :

This – function returns a combinason of the following values :

FLAG_Management

group SPI_LL_EF_FLAG_Management

Functions

uint32_t LL_SPI_IsActiveFlag ( const SPI_TypeDef * p_spix , uint32_t mask )

Indicate the status of a mask of flags.

Reference Manual to LL API cross reference (Register Field Functions)

SR SPI_SR_RXP LL_SPI_IsActiveFlag

SR SPI_SR_TXP LL_SPI_IsActiveFlag

SR SPI_SR_DXP LL_SPI_IsActiveFlag

SR SPI_SR_EOT LL_SPI_IsActiveFlag

SR SPI_SR_TXTF LL_SPI_IsActiveFlag

SR SPI_SR_UDR LL_SPI_IsActiveFlag

SR SPI_SR_CRCE LL_SPI_IsActiveFlag

SR SPI_SR_MODF LL_SPI_IsActiveFlag

SR SPI_SR_OVR LL_SPI_IsActiveFlag

SR SPI_SR_TIFRE LL_SPI_IsActiveFlag

SR SPI_SR_SUSP LL_SPI_IsActiveFlag

SR SPI_SR_TXC LL_SPI_IsActiveFlag

SR SPI_SR_RXWNE LL_SPI_IsActiveFlag

Parameters :
Return values :

State – of interrupts sources (1 or 0).

uint32_t LL_SPI_IsActiveFlag_RXP ( const SPI_TypeDef * p_spix )

Check if there is enough data in FIFO to read a full packet.

Reference Manual to LL API cross reference (Register Field Functions)

SR RXP LL_SPI_IsActiveFlag_RXP

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsActiveFlag_TXP ( const SPI_TypeDef * p_spix )

Check if there is enough space in FIFO to hold a full packet.

Reference Manual to LL API cross reference (Register Field Functions)

SR TXP LL_SPI_IsActiveFlag_TXP

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsActiveFlag_DXP ( const SPI_TypeDef * p_spix )

Check if there enough space in FIFO to hold a full packet, AND enough data to read a full packet.

Reference Manual to LL API cross reference (Register Field Functions)

SR DXP LL_SPI_IsActiveFlag_DXP

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsActiveFlag_EOT ( const SPI_TypeDef * p_spix )

Check that end of transfer event occurred.

Reference Manual to LL API cross reference (Register Field Functions)

SR EOT LL_SPI_IsActiveFlag_EOT

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_TXTF ( const SPI_TypeDef * p_spix )

Check that all required data has been filled in the fifo according to transfer size.

Reference Manual to LL API cross reference (Register Field Functions)

SR TXTF LL_SPI_IsActiveFlag_TXTF

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_UDR ( const SPI_TypeDef * p_spix )

Get Underrun error flag.

Reference Manual to LL API cross reference (Register Field Functions)

SR UDR LL_SPI_IsActiveFlag_UDR

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_CRCERR ( const SPI_TypeDef * p_spix )

Get CRC error flag.

Reference Manual to LL API cross reference (Register Field Functions)

SR CRCE LL_SPI_IsActiveFlag_CRCERR

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_MODF ( const SPI_TypeDef * p_spix )

Get Mode fault error flag.

Reference Manual to LL API cross reference (Register Field Functions)

SR MODF LL_SPI_IsActiveFlag_MODF

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_OVR ( const SPI_TypeDef * p_spix )

Get Overrun error flag.

Reference Manual to LL API cross reference (Register Field Functions)

SR OVR LL_SPI_IsActiveFlag_OVR

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_FRE ( const SPI_TypeDef * p_spix )

Get TI Frame format error flag.

Reference Manual to LL API cross reference (Register Field Functions)

SR TIFRE LL_SPI_IsActiveFlag_FRE

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_SUSP ( const SPI_TypeDef * p_spix )

Check if a suspend operation is done.

Reference Manual to LL API cross reference (Register Field Functions)

SR SUSP LL_SPI_IsActiveFlag_SUSP

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsActiveFlag_TXC ( const SPI_TypeDef * p_spix )

Check if last TxFIFO or CRC frame transmission is completed.

Reference Manual to LL API cross reference (Register Field Functions)

SR TXC LL_SPI_IsActiveFlag_TXC

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0).

uint32_t LL_SPI_IsActiveFlag_RXWNE ( const SPI_TypeDef * p_spix )

Check if at least one 32-bit data is available in RxFIFO.

Reference Manual to LL API cross reference (Register Field Functions)

SR RXWNE LL_SPI_IsActiveFlag_RXWNE

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_GetRemainingDataFrames ( const SPI_TypeDef * p_spix )

Get number of data framed remaining in current TSIZE.

Reference Manual to LL API cross reference (Register Field Functions)

SR CTSIZE LL_SPI_GetRemainingDataFrames

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFF

uint32_t LL_SPI_GetRxFIFOPackingLevel ( const SPI_TypeDef * p_spix )

Get RxFIFO packing Level.

Reference Manual to LL API cross reference (Register Field Functions)

SR RXPLVL LL_SPI_GetRxFIFOPackingLevel

Parameters :

p_spix – SPI Instance

Return values :

Returned – value can be one of the following values:

void LL_SPI_ClearFlag ( SPI_TypeDef * p_spix , uint32_t mask )

Clear the status of a mask of flags.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR SPI_IFCR_EOT LL_SPI_ClearFlag

IFCR SPI_IFCR_TXTF LL_SPI_ClearFlag

IFCR SPI_IFCR_UDR LL_SPI_ClearFlag

IFCR SPI_IFCR_CRCE LL_SPI_ClearFlag

IFCR SPI_IFCR_MODF LL_SPI_ClearFlag

IFCR SPI_IFCR_OVR LL_SPI_ClearFlag

IFCR SPI_IFCR_TIFRE LL_SPI_ClearFlag

IFCR SPI_IFCR_SUSP LL_SPI_ClearFlag

Parameters :
void LL_SPI_ClearFlag_EOT ( SPI_TypeDef * p_spix )

Clear End Of Transfer flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR EOTC LL_SPI_ClearFlag_EOT

Parameters :

p_spix – SPI Instance

void LL_SPI_ClearFlag_TXTF ( SPI_TypeDef * p_spix )

Clear TXTF flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR TXTFC LL_SPI_ClearFlag_TXTF

Parameters :

p_spix – SPI Instance

void LL_SPI_ClearFlag_UDR ( SPI_TypeDef * p_spix )

Clear Underrun error flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR UDRC LL_SPI_ClearFlag_UDR

Parameters :

p_spix – SPI Instance

void LL_SPI_ClearFlag_OVR ( SPI_TypeDef * p_spix )

Clear Overrun error flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR OVRC LL_SPI_ClearFlag_OVR

Parameters :

p_spix – SPI Instance

void LL_SPI_ClearFlag_CRCERR ( SPI_TypeDef * p_spix )

Clear CRC error flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR CRCEC LL_SPI_ClearFlag_CRCERR

Parameters :

p_spix – SPI Instance

void LL_SPI_ClearFlag_MODF ( SPI_TypeDef * p_spix )

Clear Mode fault error flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR MODFC LL_SPI_ClearFlag_MODF

Parameters :

p_spix – SPI Instance

void LL_SPI_ClearFlag_FRE ( SPI_TypeDef * p_spix )

Clear Frame format error flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR TIFREC LL_SPI_ClearFlag_FRE

Parameters :

p_spix – SPI Instance

void LL_SPI_ClearFlag_SUSP ( SPI_TypeDef * p_spix )

Clear SUSP flag.

Reference Manual to LL API cross reference (Register Field Functions)

IFCR SUSPC LL_SPI_ClearFlag_SUSP

Parameters :

p_spix – SPI Instance

IT_Management

group SPI_LL_EF_IT_Management

Functions

void LL_SPI_EnableIT ( SPI_TypeDef * p_spix , uint32_t mask )

Enable masked IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER SPI_IER_RXPIE LL_SPI_EnableIT

IER SPI_IER_TXPIE LL_SPI_EnableIT

IER SPI_IER_DXPIE LL_SPI_EnableIT

IER SPI_IER_EOTIE LL_SPI_EnableIT

IER SPI_IER_TXTFIE LL_SPI_EnableIT

IER SPI_IER_UDRIE LL_SPI_EnableIT

IER SPI_IER_CRCEIE LL_SPI_EnableIT

IER SPI_IER_MODFIE LL_SPI_EnableIT

IER SPI_IER_OVRIE LL_SPI_EnableIT

IER SPI_IER_TIFREIE LL_SPI_EnableIT

Parameters :
void LL_SPI_EnableIT_RXP ( SPI_TypeDef * p_spix )

Enable Rx Packet available IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER RXPIE LL_SPI_EnableIT_RXP

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_TXP ( SPI_TypeDef * p_spix )

Enable Tx Packet space available IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER TXPIE LL_SPI_EnableIT_TXP

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_DXP ( SPI_TypeDef * p_spix )

Enable Duplex Packet available IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER DXPIE LL_SPI_EnableIT_DXP

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_EOT ( SPI_TypeDef * p_spix )

Enable End Of Transfer IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOTIE LL_SPI_EnableIT_EOT

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_TXTF ( SPI_TypeDef * p_spix )

Enable Transmit IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER TXTFIE LL_SPI_EnableIT_TXTF

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_UDR ( SPI_TypeDef * p_spix )

Enable Underrun IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER UDRIE LL_SPI_EnableIT_UDR

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_OVR ( SPI_TypeDef * p_spix )

Enable Overrun IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER OVRIE LL_SPI_EnableIT_OVR

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_CRCERR ( SPI_TypeDef * p_spix )

Enable CRC Error IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER CRCEIE LL_SPI_EnableIT_CRCERR

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_FRE ( SPI_TypeDef * p_spix )

Enable TI Frame Format Error IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER TIFREIE LL_SPI_EnableIT_FRE

Parameters :

p_spix – SPI Instance

void LL_SPI_EnableIT_MODF ( SPI_TypeDef * p_spix )

Enable Mode Fault IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER MODFIE LL_SPI_EnableIT_MODF

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT ( SPI_TypeDef * p_spix , uint32_t mask )

Disable masked IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER SPI_IER_RXPIE LL_SPI_DisableIT

IER SPI_IER_TXPIE LL_SPI_DisableIT

IER SPI_IER_DXPIE LL_SPI_DisableIT

IER SPI_IER_EOTIE LL_SPI_DisableIT

IER SPI_IER_TXTFIE LL_SPI_DisableIT

IER SPI_IER_UDRIE LL_SPI_DisableIT

IER SPI_IER_CRCEIE LL_SPI_DisableIT

IER SPI_IER_MODFIE LL_SPI_DisableIT

IER SPI_IER_OVRIE LL_SPI_DisableIT

IER SPI_IER_TIFREIE LL_SPI_DisableIT

Parameters :
void LL_SPI_DisableIT_RXP ( SPI_TypeDef * p_spix )

Disable Rx Packet available IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER RXPIE LL_SPI_DisableIT_RXP

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_TXP ( SPI_TypeDef * p_spix )

Disable Tx Packet space available IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER TXPIE LL_SPI_DisableIT_TXP

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_DXP ( SPI_TypeDef * p_spix )

Disable Duplex Packet available IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER DXPIE LL_SPI_DisableIT_DXP

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_EOT ( SPI_TypeDef * p_spix )

Disable End Of Transfer IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOTIE LL_SPI_DisableIT_EOT

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_TXTF ( SPI_TypeDef * p_spix )

Disable TXTF IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER TXTFIE LL_SPI_DisableIT_TXTF

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_UDR ( SPI_TypeDef * p_spix )

Disable Underrun IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER UDRIE LL_SPI_DisableIT_UDR

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_OVR ( SPI_TypeDef * p_spix )

Disable Overrun IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER OVRIE LL_SPI_DisableIT_OVR

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_CRCERR ( SPI_TypeDef * p_spix )

Disable CRC Error IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER CRCEIE LL_SPI_DisableIT_CRCERR

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_FRE ( SPI_TypeDef * p_spix )

Disable TI Frame Format Error IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER TIFREIE LL_SPI_DisableIT_FRE

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableIT_MODF ( SPI_TypeDef * p_spix )

Disable MODF IT.

Reference Manual to LL API cross reference (Register Field Functions)

IER MODFIE LL_SPI_DisableIT_MODF

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledIT ( const SPI_TypeDef * p_spix , uint32_t mask )

Check if masked IT is Enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER SPI_IER_RXPIE LL_SPI_IsEnabledIT

IER SPI_IER_TXPIE LL_SPI_IsEnabledIT

IER SPI_IER_DXPIE LL_SPI_IsEnabledIT

IER SPI_IER_EOTIE LL_SPI_IsEnabledIT

IER SPI_IER_TXTFIE LL_SPI_IsEnabledIT

IER SPI_IER_UDRIE LL_SPI_IsEnabledIT

IER SPI_IER_CRCEIE LL_SPI_IsEnabledIT

IER SPI_IER_MODFIE LL_SPI_IsEnabledIT

IER SPI_IER_OVRIE LL_SPI_IsEnabledIT

IER SPI_IER_TIFREIE LL_SPI_IsEnabledIT

Parameters :
Return values :

State – of masked bits (1 or 0)

uint32_t LL_SPI_IsEnabledIT_RXP ( const SPI_TypeDef * p_spix )

Check if Rx Packet available IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER RXPIE LL_SPI_IsEnabledIT_RXP

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_TXP ( const SPI_TypeDef * p_spix )

Check if Tx Packet space available IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER TXPIE LL_SPI_IsEnabledIT_TXP

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_DXP ( const SPI_TypeDef * p_spix )

Check if Duplex Packet available IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER DXPIE LL_SPI_IsEnabledIT_DXP

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_EOT ( const SPI_TypeDef * p_spix )

Check if End Of Transfer IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER EOTIE LL_SPI_IsEnabledIT_EOT

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_TXTF ( const SPI_TypeDef * p_spix )

Check if TXTF IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER TXTFIE LL_SPI_IsEnabledIT_TXTF

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_UDR ( const SPI_TypeDef * p_spix )

Check if Underrun IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER UDRIE LL_SPI_IsEnabledIT_UDR

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_OVR ( const SPI_TypeDef * p_spix )

Check if Overrun IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER OVRIE LL_SPI_IsEnabledIT_OVR

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_CRCERR ( const SPI_TypeDef * p_spix )

Check if CRC Error IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER CRCEIE LL_SPI_IsEnabledIT_CRCERR

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_FRE ( const SPI_TypeDef * p_spix )

Check if TI Frame Format Error IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER TIFREIE LL_SPI_IsEnabledIT_FRE

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_IsEnabledIT_MODF ( const SPI_TypeDef * p_spix )

Check if MODF IT is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IER MODFIE LL_SPI_IsEnabledIT_MODF

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

DMA Management

group SPI_LL_EF_DMA_Management

Functions

void LL_SPI_EnableDMAReq_RX ( SPI_TypeDef * p_spix )

Enable DMA Rx.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 RXDMAEN LL_SPI_EnableDMAReq_RX

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableDMAReq_RX ( SPI_TypeDef * p_spix )

Disable DMA Rx.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 RXDMAEN LL_SPI_DisableDMAReq_RX

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledDMAReq_RX ( const SPI_TypeDef * p_spix )

Check if DMA Rx is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 RXDMAEN LL_SPI_IsEnabledDMAReq_RX

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

void LL_SPI_EnableDMAReq_TX ( SPI_TypeDef * p_spix )

Enable DMA Tx.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 TXDMAEN LL_SPI_EnableDMAReq_TX

Parameters :

p_spix – SPI Instance

void LL_SPI_DisableDMAReq_TX ( SPI_TypeDef * p_spix )

Disable DMA Tx.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 TXDMAEN LL_SPI_DisableDMAReq_TX

Parameters :

p_spix – SPI Instance

uint32_t LL_SPI_IsEnabledDMAReq_TX ( const SPI_TypeDef * p_spix )

Check if DMA Tx is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CFG1 TXDMAEN LL_SPI_IsEnabledDMAReq_TX

Parameters :

p_spix – SPI Instance

Return values :

State – of bit (1 or 0)

uint32_t LL_SPI_DMA_GetTxRegAddr ( const SPI_TypeDef * p_spix )

Get the data register address used for DMA transfer.

Reference Manual to LL API cross reference (Register Field Functions)

TXDR TXDR LL_SPI_DMA_GetTxRegAddr

Parameters :

p_spix – SPI Instance

Return values :

Address – of data register

uint32_t LL_SPI_DMA_GetRxRegAddr ( const SPI_TypeDef * p_spix )

Get the data register address used for DMA transfer.

Reference Manual to LL API cross reference (Register Field Functions)

RXDR RXDR LL_SPI_DMA_GetRxRegAddr

Parameters :

p_spix – SPI Instance

Return values :

Address – of data register

DATA_Management

group SPI_LL_EF_DATA_Management

Functions

uint8_t LL_SPI_ReceiveData8 ( SPI_TypeDef * p_spix )

Read Data Register.

Reference Manual to LL API cross reference (Register Field Functions)

RXDR . LL_SPI_ReceiveData8

Parameters :

p_spix – SPI Instance

Return values :

0..0xFF

uint16_t LL_SPI_ReceiveData16 ( SPI_TypeDef * p_spix )

Read Data Register.

Reference Manual to LL API cross reference (Register Field Functions)

RXDR . LL_SPI_ReceiveData16

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFF

uint32_t LL_SPI_ReceiveData32 ( SPI_TypeDef * p_spix )

Read Data Register.

Reference Manual to LL API cross reference (Register Field Functions)

RXDR . LL_SPI_ReceiveData32

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFFFFFF

void LL_SPI_TransmitData8 ( SPI_TypeDef * p_spix , uint8_t tx_data )

Write Data Register.

Reference Manual to LL API cross reference (Register Field Functions)

TXDR . LL_SPI_TransmitData8

Parameters :
  • p_spix – SPI Instance

  • tx_data – 0..0xFF

void LL_SPI_TransmitData16 ( SPI_TypeDef * p_spix , uint16_t tx_data )

Write Data Register.

Reference Manual to LL API cross reference (Register Field Functions)

TXDR . LL_SPI_TransmitData16

Parameters :
  • p_spix – SPI Instance

  • tx_data – 0..0xFFFF

void LL_SPI_TransmitData32 ( SPI_TypeDef * p_spix , uint32_t tx_data )

Write Data Register.

Reference Manual to LL API cross reference (Register Field Functions)

TXDR . LL_SPI_TransmitData32

Parameters :
  • p_spix – SPI Instance

  • tx_data – 0..0xFFFFFFFF

void LL_SPI_SetCRCPolynomial ( SPI_TypeDef * p_spix , uint32_t crc_poly )

Set polynomial for CRC calcul.

Reference Manual to LL API cross reference (Register Field Functions)

CRCPOLY CRCPOLY LL_SPI_SetCRCPolynomial

Parameters :
  • p_spix – SPI Instance

  • crc_poly – 0..0xFFFFFFFF

uint32_t LL_SPI_GetCRCPolynomial ( const SPI_TypeDef * p_spix )

Get polynomial for CRC calcul.

Reference Manual to LL API cross reference (Register Field Functions)

CRCPOLY CRCPOLY LL_SPI_GetCRCPolynomial

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFFFFFF

void LL_SPI_SetUDRPattern ( SPI_TypeDef * p_spix , uint32_t pattern )

Set the underrun pattern.

Reference Manual to LL API cross reference (Register Field Functions)

UDRDR UDRDR LL_SPI_SetUDRPattern

Parameters :
  • p_spix – SPI Instance

  • pattern – 0..0xFFFFFFFF

uint32_t LL_SPI_GetUDRPattern ( const SPI_TypeDef * p_spix )

Get the underrun pattern.

Reference Manual to LL API cross reference (Register Field Functions)

UDRDR UDRDR LL_SPI_GetUDRPattern

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFFFFFF

uint32_t LL_SPI_GetRxCRC ( const SPI_TypeDef * p_spix )

Get Rx CRC.

Reference Manual to LL API cross reference (Register Field Functions)

RXCRC RXCRC LL_SPI_GetRxCRC

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFFFFFF

uint32_t LL_SPI_GetTxCRC ( const SPI_TypeDef * p_spix )

Get Tx CRC.

Reference Manual to LL API cross reference (Register Field Functions)

TXCRC TXCRC LL_SPI_GetTxCRC

Parameters :

p_spix – SPI Instance

Return values :

0..0xFFFFFFFF