Macros | Functions
Configuration functions
Peripheral Driver » LL Driver » QSPI | Peripheral Driver » LL Driver » SPI » Functions

## Macros
#define | ll_qspi_set_xfer_size ll_qspi_set_receive_size

## Functions
__STATIC_INLINE void | ll_qspi_enable_ss_toggle (qspi_regs_t *QSPIx)
| Enable slave select toggle. More...
__STATIC_INLINE void | ll_qspi_disable_ss_toggle (qspi_regs_t *QSPIx)
| Disable slave select toggle. More...
__STATIC_INLINE uint32_t | ll_qspi_is_enabled_ss_toggle (qspi_regs_t *QSPIx)
| Check if slave select toggle is enabled. More...
__STATIC_INLINE void | ll_qspi_set_frame_format (qspi_regs_t *QSPIx, uint32_t frf)
| Set data frame format for transmitting/receiving the data. More...
__STATIC_INLINE uint32_t | ll_qspi_get_frame_format (qspi_regs_t *QSPIx)
| Get data frame format for transmitting/receiving the data. More...
__STATIC_INLINE void | ll_qspi_set_data_size (qspi_regs_t *QSPIx, uint32_t size)
| Set frame data size. More...
__STATIC_INLINE uint32_t | ll_qspi_get_data_size (qspi_regs_t *QSPIx)
| Get frame data size. More...
__STATIC_INLINE void | ll_qspi_set_control_frame_size (qspi_regs_t *QSPIx, uint32_t size)
| Set the length of the control word for the Microwire frame format. More...
__STATIC_INLINE uint32_t | ll_qspi_get_control_frame_size (qspi_regs_t *QSPIx)
| Get the length of the control word for the Microwire frame format. More...
__STATIC_INLINE void | ll_qspi_enable_test_mode (qspi_regs_t *QSPIx)
| Enable SPI test mode. More...
__STATIC_INLINE void | ll_qspi_disable_test_mode (qspi_regs_t *QSPIx)
| Disable SPI test mode. More...
__STATIC_INLINE uint32_t | ll_qspi_is_enabled_test_mode (qspi_regs_t *QSPIx)
| Check if SPI test mode is enabled. More...
__STATIC_INLINE void | ll_qspi_enable_slave_out (qspi_regs_t *QSPIx)
| Enable slave output. More...
__STATIC_INLINE void | ll_qspi_disable_salve_out (qspi_regs_t *QSPIx)
| Disable slave output. More...
__STATIC_INLINE uint32_t | ll_qspi_is_enabled_slave_out (qspi_regs_t *QSPIx)
| Check if slave output is enabled. More...
__STATIC_INLINE void | ll_qspi_set_transfer_direction (qspi_regs_t *QSPIx, uint32_t transfer_direction)
| Set transfer direction mode. More...
__STATIC_INLINE uint32_t | ll_qspi_get_transfer_direction (qspi_regs_t *QSPIx)
| Get transfer direction mode. More...
__STATIC_INLINE void | ll_qspi_set_clock_polarity (qspi_regs_t *QSPIx, uint32_t clock_polarity)
| Set clock polarity. More...
__STATIC_INLINE uint32_t | ll_qspi_get_clock_polarity (qspi_regs_t *QSPIx)
| Get clock polarity. More...
__STATIC_INLINE void | ll_qspi_set_clock_phase (qspi_regs_t *QSPIx, uint32_t clock_phase)
| Set clock phase. More...
__STATIC_INLINE uint32_t | ll_qspi_get_clock_phase (qspi_regs_t *QSPIx)
| Get clock phase. More...
__STATIC_INLINE void | ll_qspi_set_standard (qspi_regs_t *QSPIx, uint32_t standard)
| Set serial protocol used. More...
__STATIC_INLINE uint32_t | ll_qspi_get_standard (qspi_regs_t *QSPIx)
| Get serial protocol used. More...
__STATIC_INLINE void | ll_qspi_set_receive_size (qspi_regs_t *QSPIx, uint32_t size)
| Set the number of data frames to be continuously received. More...
__STATIC_INLINE uint32_t | ll_qspi_get_receive_size (qspi_regs_t *QSPIx)
| Get the number of data frames to be continuously received. More...
__STATIC_INLINE void | ll_qspi_enable (qspi_regs_t *QSPIx)
| Enable SPI peripheral. More...
__STATIC_INLINE void | ll_qspi_disable (qspi_regs_t *QSPIx)
| Disable SPI peripheral. More...
__STATIC_INLINE uint32_t | ll_qspi_is_enabled (qspi_regs_t *QSPIx)
| Check if SPI peripheral is enabled. More...
__STATIC_INLINE void | ll_qspi_enable_micro_handshake (qspi_regs_t *QSPIx)
| Enable Handshake in Microwire mode. More...
__STATIC_INLINE void | ll_qspi_disable_micro_handshake (qspi_regs_t *QSPIx)
| Disable Handshake in Microwire mode. More...
__STATIC_INLINE uint32_t | ll_qspi_is_enabled_micro_handshake (qspi_regs_t *QSPIx)
| Check if Handshake in Microwire mode is enabled. More...
__STATIC_INLINE void | ll_qspi_set_micro_transfer_direction (qspi_regs_t *QSPIx, uint32_t transfer_direction)
| Set transfer direction mode in Microwire mode. More...
__STATIC_INLINE uint32_t | ll_qspi_get_micro_transfer_direction (qspi_regs_t *QSPIx)
| Get transfer direction mode in Microwire mode. More...
__STATIC_INLINE void | ll_qspi_set_micro_transfer_mode (qspi_regs_t *QSPIx, uint32_t transfer_mode)
| Set transfer mode in Microwire mode. More...
__STATIC_INLINE uint32_t | ll_qspi_get_micro_transfer_mode (qspi_regs_t *QSPIx)
| Get transfer mode in Microwire mode. More...
__STATIC_INLINE void | ll_qspi_enable_ss (qspi_regs_t *QSPIx, uint32_t ss)
| Enable slave select. More...
__STATIC_INLINE void | ll_qspi_disable_ss (qspi_regs_t *QSPIx, uint32_t ss)
| Disable slave select. More...
__STATIC_INLINE uint32_t | ll_qspi_is_enabled_ss (qspi_regs_t *QSPIx, uint32_t ss)
| Check if slave select is enabled. More...
__STATIC_INLINE void | ll_qspi_set_baud_rate_prescaler (qspi_regs_t *QSPIx, uint32_t baud_rate)
| Set baud rate prescaler. More...
__STATIC_INLINE uint32_t | ll_qspi_get_baud_rate_prescaler (qspi_regs_t *QSPIx)
| Get baud rate prescaler. More...
__STATIC_INLINE void | ll_qspi_set_tx_start_fifo_threshold (qspi_regs_t *QSPIx, uint32_t threshold)
| Set threshold of TX transfer start. More...
__STATIC_INLINE uint32_t | ll_qspi_get_tx_start_fifo_threshold (qspi_regs_t *QSPIx)
| Get threshold of TX transfer start. More...
__STATIC_INLINE void | ll_qspi_set_tx_fifo_threshold (qspi_regs_t *QSPIx, uint32_t threshold)
| Set threshold of TXFIFO that triggers an TXE event. More...
__STATIC_INLINE uint32_t | ll_qspi_get_tx_fifo_threshold (qspi_regs_t *QSPIx)
| Get threshold of TXFIFO that triggers an TXE event. More...
__STATIC_INLINE void | ll_qspi_set_rx_fifo_threshold (qspi_regs_t *QSPIx, uint32_t threshold)
| Set threshold of RXFIFO that triggers an RXNE event. More...
__STATIC_INLINE uint32_t | ll_qspi_get_rx_fifo_threshold (qspi_regs_t *QSPIx)
| Get threshold of RXFIFO that triggers an RXNE event. More...
__STATIC_INLINE uint32_t | ll_qspi_get_tx_fifo_level (qspi_regs_t *QSPIx)
| Get FIFO Transmission Level. More...
__STATIC_INLINE uint32_t | ll_qspi_get_rx_fifo_level (qspi_regs_t *QSPIx)
| Get FIFO reception Level. More...
__STATIC_INLINE uint32_t | ll_qspi_get_id_code (qspi_regs_t *QSPIx)
| Get ID code. More...
__STATIC_INLINE uint32_t | ll_qspi_get_version (qspi_regs_t *QSPIx)
| Get IP version. More...
__STATIC_INLINE void | ll_spi_enable_ss_toggle (spi_regs_t *SPIx)
| Enable slave select toggle. More...
__STATIC_INLINE void | ll_spi_disable_ss_toggle (spi_regs_t *SPIx)
| Disable slave select toggle. More...
__STATIC_INLINE uint32_t | ll_spi_is_enabled_ss_toggle (spi_regs_t *SPIx)
| Check if slave select toggle is enabled. More...
__STATIC_INLINE void | ll_spi_set_data_size (spi_regs_t *SPIx, uint32_t size)
| Set frame data size. More...
__STATIC_INLINE uint32_t | ll_spi_get_data_size (spi_regs_t *SPIx)
| Get frame data size. More...
__STATIC_INLINE void | ll_spi_set_control_frame_size (spi_regs_t *SPIx, uint32_t size)
| Set the length of the control word for the Microwire frame format. More...
__STATIC_INLINE uint32_t | ll_spi_get_control_frame_size (spi_regs_t *SPIx)
| Get the length of the control word for the Microwire frame format. More...
__STATIC_INLINE void | ll_spi_enable_test_mode (spi_regs_t *SPIx)
| Enable SPI test mode. More...
__STATIC_INLINE void | ll_spi_disable_test_mode (spi_regs_t *SPIx)
| Disable SPI test mode. More...
__STATIC_INLINE uint32_t | ll_spi_is_enabled_test_mode (spi_regs_t *SPIx)
| Check if SPI test mode is enabled. More...
__STATIC_INLINE void | ll_spi_enable_slave_out (spi_regs_t *SPIx)
| Enable slave output. More...
__STATIC_INLINE void | ll_spi_disable_salve_out (spi_regs_t *SPIx)
| Disable slave output. More...
__STATIC_INLINE uint32_t | ll_spi_is_enabled_slave_out (spi_regs_t *SPIx)
| Check if slave output is enabled. More...
__STATIC_INLINE void | ll_spi_set_transfer_direction (spi_regs_t *SPIx, uint32_t transfer_direction)
| Set transfer direction mode. More...
__STATIC_INLINE uint32_t | ll_spi_get_transfer_direction (spi_regs_t *SPIx)
| Get transfer direction mode. More...
__STATIC_INLINE void | ll_spi_set_clock_polarity (spi_regs_t *SPIx, uint32_t clock_polarity)
| Set clock polarity. More...
__STATIC_INLINE uint32_t | ll_spi_get_clock_polarity (spi_regs_t *SPIx)
| Get clock polarity. More...
__STATIC_INLINE void | ll_spi_set_clock_phase (spi_regs_t *SPIx, uint32_t clock_phase)
| Set clock phase. More...
__STATIC_INLINE uint32_t | ll_spi_get_clock_phase (spi_regs_t *SPIx)
| Get clock phase. More...
__STATIC_INLINE void | ll_spi_set_standard (spi_regs_t *SPIx, uint32_t standard)
| Set serial protocol used. More...
__STATIC_INLINE uint32_t | ll_spi_get_standard (spi_regs_t *SPIx)
| Get serial protocol used. More...
__STATIC_INLINE void | ll_spi_set_receive_size (spi_regs_t *SPIx, uint32_t size)
| Set the number of data frames to be continuously received. More...
__STATIC_INLINE uint32_t | ll_spi_get_receive_size (spi_regs_t *SPIx)
| Get the number of data frames to be continuously received. More...
__STATIC_INLINE void | ll_spi_enable (spi_regs_t *SPIx)
| Enable SPI peripheral. More...
__STATIC_INLINE void | ll_spi_disable (spi_regs_t *SPIx)
| Disable SPI peripheral. More...
__STATIC_INLINE uint32_t | ll_spi_is_enabled (spi_regs_t *SPIx)
| Check if SPI peripheral is enabled. More...
__STATIC_INLINE void | ll_spi_enable_micro_handshake (spi_regs_t *SPIx)
| Enable Handshake in Microwire mode. More...
__STATIC_INLINE void | ll_spi_disable_micro_handshake (spi_regs_t *SPIx)
| Disable Handshake in Microwire mode. More...
__STATIC_INLINE uint32_t | ll_spi_is_enabled_micro_handshake (spi_regs_t *SPIx)
| Check if Handshake in Microwire mode is enabled. More...
__STATIC_INLINE void | ll_spi_set_micro_transfer_direction (spi_regs_t *SPIx, uint32_t transfer_direction)
| Set transfer direction mode in Microwire mode. More...
__STATIC_INLINE uint32_t | ll_spi_get_micro_transfer_direction (spi_regs_t *SPIx)
| Get transfer direction mode in Microwire mode. More...
__STATIC_INLINE void | ll_spi_set_micro_transfer_mode (spi_regs_t *SPIx, uint32_t transfer_mode)
| Set transfer mode in Microwire mode. More...
__STATIC_INLINE uint32_t | ll_spi_get_micro_transfer_mode (spi_regs_t *SPIx)
| Get transfer mode in Microwire mode. More...
__STATIC_INLINE void | ll_spi_enable_ss (spi_regs_t *SPIx, uint32_t ss)
| Enable slave select. More...
__STATIC_INLINE void | ll_spi_disable_ss (spi_regs_t *SPIx, uint32_t ss)
| Disable slave select. More...
__STATIC_INLINE uint32_t | ll_spi_is_enabled_ss (spi_regs_t *SPIx, uint32_t ss)
| Check if slave select is enabled. More...
__STATIC_INLINE void | ll_spi_set_baud_rate_prescaler (spi_regs_t *SPIx, uint32_t baud_rate)
| Set baud rate prescaler. More...
__STATIC_INLINE uint32_t | ll_spi_get_baud_rate_prescaler (spi_regs_t *SPIx)
| Get baud rate prescaler. More...
__STATIC_INLINE void | ll_spi_set_tx_fifo_threshold (spi_regs_t *SPIx, uint32_t threshold)
| Set threshold of TXFIFO that triggers an TXE event. More...
__STATIC_INLINE uint32_t | ll_spi_get_tx_fifo_threshold (spi_regs_t *SPIx)
| Get threshold of TXFIFO that triggers an TXE event. More...
__STATIC_INLINE void | ll_spi_set_rx_fifo_threshold (spi_regs_t *SPIx, uint32_t threshold)
| Set threshold of RXFIFO that triggers an RXNE event. More...
__STATIC_INLINE uint32_t | ll_spi_get_rx_fifo_threshold (spi_regs_t *SPIx)
| Get threshold of RXFIFO that triggers an RXNE event. More...
__STATIC_INLINE uint32_t | ll_spi_get_tx_fifo_level (spi_regs_t *SPIx)
| Get FIFO Transmission Level. More...
__STATIC_INLINE uint32_t | ll_spi_get_rx_fifo_level (spi_regs_t *SPIx)
| Get FIFO reception Level. More...

## Detailed Description

## Macro Definition Documentation

## ◆ ll_qspi_set_xfer_size

#define ll_qspi_set_xfer_size ll_qspi_set_receive_size

Definition at line 1294 of file gr55xx_ll_qspi.h.

## Function Documentation

## ◆ ll_qspi_disable()

__STATIC_INLINE void ll_qspi_disable | ( | qspi_regs_t * | QSPIx | ) |

Disable SPI peripheral.

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

Register|BitsName --------|-------- QSPI_EN | EN

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1340 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_disable_micro_handshake()

__STATIC_INLINE void ll_qspi_disable_micro_handshake | ( | qspi_regs_t * | QSPIx | ) |

Disable Handshake in Microwire mode.

Register|BitsName --------|-------- MWC | MHS

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1385 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_disable_salve_out()

__STATIC_INLINE void ll_qspi_disable_salve_out | ( | qspi_regs_t * | QSPIx | ) |

Disable slave output.

Register|BitsName --------|-------- CTRL0 | SLVOE

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1104 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_disable_ss()

__STATIC_INLINE void ll_qspi_disable_ss | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | ss
| ) |  |

Disable slave select.

Register|BitsName --------|-------- SE | SLAVE1 SE | SLAVE0

Parameters

  QSPIx | QSPI instance
  ss | This parameter can be one of the following values: LL_QSPI_SLAVE1 LL_QSPI_SLAVE0

Return values

  None |

Definition at line 1512 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_disable_ss_toggle()

__STATIC_INLINE void ll_qspi_disable_ss_toggle | ( | qspi_regs_t * | QSPIx | ) |

Disable slave select toggle.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- CTRL0 | SSTEN

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 820 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_disable_test_mode()

__STATIC_INLINE void ll_qspi_disable_test_mode | ( | qspi_regs_t * | QSPIx | ) |

Disable SPI test mode.

Register|BitsName --------|-------- CTRL0 | SRL

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1059 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_enable()

__STATIC_INLINE void ll_qspi_enable | ( | qspi_regs_t * | QSPIx | ) |

Enable SPI peripheral.

Register|BitsName --------|-------- QSPI_EN | EN

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1324 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_enable_micro_handshake()

__STATIC_INLINE void ll_qspi_enable_micro_handshake | ( | qspi_regs_t * | QSPIx | ) |

Enable Handshake in Microwire mode.

Register|BitsName --------|-------- MWC | MHS

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1370 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_enable_slave_out()

__STATIC_INLINE void ll_qspi_enable_slave_out | ( | qspi_regs_t * | QSPIx | ) |

Enable slave output.

Register|BitsName --------|-------- CTRL0 | SLVOE

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1089 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_enable_ss()

__STATIC_INLINE void ll_qspi_enable_ss | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | ss
| ) |  |

Enable slave select.

Register|BitsName --------|-------- SE | SLAVE1 SE | SLAVE0

Parameters

  QSPIx | QSPI instance
  ss | This parameter can be one of the following values: LL_QSPI_SLAVE1 LL_QSPI_SLAVE0

Return values

  None |

Definition at line 1493 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_enable_ss_toggle()

__STATIC_INLINE void ll_qspi_enable_ss_toggle | ( | qspi_regs_t * | QSPIx | ) |

Enable slave select toggle.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- CTRL0 | SSTEN

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 804 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_enable_test_mode()

__STATIC_INLINE void ll_qspi_enable_test_mode | ( | qspi_regs_t * | QSPIx | ) |

Enable SPI test mode.

Register|BitsName --------|-------- CTRL0 | SRL

Parameters

  QSPIx | QSPI instance

Return values

  None |

Definition at line 1044 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_baud_rate_prescaler()

__STATIC_INLINE uint32_t ll_qspi_get_baud_rate_prescaler | ( | qspi_regs_t * | QSPIx | ) |

Get baud rate prescaler.

Register|BitsName --------|-------- BAUD | SCKDIV

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one even value between 2 and 65534.

Definition at line 1563 of file gr55xx_ll_qspi.h.

Referenced by ll_qspi_get_cs_release_delay(), ll_qspi_get_cs_setup_delay(), ll_qspi_set_cs_release_delay(), and ll_qspi_set_cs_setup_delay().

## ◆ ll_qspi_get_clock_phase()

__STATIC_INLINE uint32_t ll_qspi_get_clock_phase | ( | qspi_regs_t * | QSPIx | ) |

Get clock phase.

Register|BitsName --------|-------- CTRL0 | SCPHA

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_SCPHA_1EDGE LL_QSPI_SCPHA_2EDGE

Definition at line 1232 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_clock_polarity()

__STATIC_INLINE uint32_t ll_qspi_get_clock_polarity | ( | qspi_regs_t * | QSPIx | ) |

Get clock polarity.

Register|BitsName --------|-------- CTRL0 | SCPOL

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_SCPOL_LOW LL_QSPI_SCPOL_HIGH

Definition at line 1195 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_control_frame_size()

__STATIC_INLINE uint32_t ll_qspi_get_control_frame_size | ( | qspi_regs_t * | QSPIx | ) |

Get the length of the control word for the Microwire frame format.

Note
  This bit should be written only when SPI is disabled (QSPI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | CFS

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_MW_CMDSIZE_1BIT LL_QSPI_MW_CMDSIZE_2BIT LL_QSPI_MW_CMDSIZE_3BIT LL_QSPI_MW_CMDSIZE_4BIT LL_QSPI_MW_CMDSIZE_5BIT LL_QSPI_MW_CMDSIZE_6BIT LL_QSPI_MW_CMDSIZE_7BIT LL_QSPI_MW_CMDSIZE_8BIT LL_QSPI_MW_CMDSIZE_9BIT LL_QSPI_MW_CMDSIZE_10BIT LL_QSPI_MW_CMDSIZE_11BIT LL_QSPI_MW_CMDSIZE_12BIT LL_QSPI_MW_CMDSIZE_13BIT LL_QSPI_MW_CMDSIZE_14BIT LL_QSPI_MW_CMDSIZE_15BIT LL_QSPI_MW_CMDSIZE_16BIT

Definition at line 1029 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_data_size()

__STATIC_INLINE uint32_t ll_qspi_get_data_size | ( | qspi_regs_t * | QSPIx | ) |

Get frame data size.

Register|BitsName --------|-------- CTRL0 | DFS32

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_DATASIZE_4BIT LL_QSPI_DATASIZE_5BIT LL_QSPI_DATASIZE_6BIT LL_QSPI_DATASIZE_7BIT LL_QSPI_DATASIZE_8BIT LL_QSPI_DATASIZE_9BIT LL_QSPI_DATASIZE_10BIT LL_QSPI_DATASIZE_11BIT LL_QSPI_DATASIZE_12BIT LL_QSPI_DATASIZE_13BIT LL_QSPI_DATASIZE_14BIT LL_QSPI_DATASIZE_15BIT LL_QSPI_DATASIZE_16BIT LL_QSPI_DATASIZE_17BIT LL_QSPI_DATASIZE_18BIT LL_QSPI_DATASIZE_19BIT LL_QSPI_DATASIZE_20BIT LL_QSPI_DATASIZE_21BIT LL_QSPI_DATASIZE_22BIT LL_QSPI_DATASIZE_23BIT LL_QSPI_DATASIZE_24BIT LL_QSPI_DATASIZE_25BIT LL_QSPI_DATASIZE_26BIT LL_QSPI_DATASIZE_27BIT LL_QSPI_DATASIZE_28BIT LL_QSPI_DATASIZE_29BIT LL_QSPI_DATASIZE_30BIT LL_QSPI_DATASIZE_31BIT LL_QSPI_DATASIZE_32BIT

Definition at line 964 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_frame_format()

__STATIC_INLINE uint32_t ll_qspi_get_frame_format | ( | qspi_regs_t * | QSPIx | ) |

Get data frame format for transmitting/receiving the data.

Note
  This bit should be written only when SPI is disabled (QSPI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | SPIFRF

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_FRF_SPI LL_QSPI_FRF_DUALSPI LL_QSPI_FRF_QUADSPI

Definition at line 875 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_id_code()

__STATIC_INLINE uint32_t ll_qspi_get_id_code | ( | qspi_regs_t * | QSPIx | ) |

Get ID code.

Register|BitsName --------|-------- IDCODE | ID

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value is const.

Definition at line 1701 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_micro_transfer_direction()

__STATIC_INLINE uint32_t ll_qspi_get_micro_transfer_direction | ( | qspi_regs_t * | QSPIx | ) |

Get transfer direction mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MDD

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_MICROWIRE_RX LL_QSPI_MICROWIRE_TX

Definition at line 1437 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_micro_transfer_mode()

__STATIC_INLINE uint32_t ll_qspi_get_micro_transfer_mode | ( | qspi_regs_t * | QSPIx | ) |

Get transfer mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MWMOD

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_MICROWIRE_NON_SEQUENTIAL LL_QSPI_MICROWIRE_SEQUENTIAL

Definition at line 1474 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_receive_size()

__STATIC_INLINE uint32_t ll_qspi_get_receive_size | ( | qspi_regs_t * | QSPIx | ) |

Get the number of data frames to be continuously received.

Note
  These bits should not be changed when communication is ongoing. This bits are effect when TMOD = 2b10 or 2b11. This bits are not effect in SPIS.

Register|BitsName --------|-------- CTRL1 | NDF

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: 0 ~ 65535

Definition at line 1309 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_rx_fifo_level()

__STATIC_INLINE uint32_t ll_qspi_get_rx_fifo_level | ( | qspi_regs_t * | QSPIx | ) |

Get FIFO reception Level.

Register|BitsName --------|-------- RXFL | RXTFL

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: 0 ~ FIFO_DEPTH

Definition at line 1686 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_rx_fifo_threshold()

__STATIC_INLINE uint32_t ll_qspi_get_rx_fifo_threshold | ( | qspi_regs_t * | QSPIx | ) |

Get threshold of RXFIFO that triggers an RXNE event.

Register|BitsName --------|-------- RXFTL | RFT

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: 0 ~ (FIFO_DEPTH - 1)

Definition at line 1656 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_standard()

__STATIC_INLINE uint32_t ll_qspi_get_standard | ( | qspi_regs_t * | QSPIx | ) |

Get serial protocol used.

Register|BitsName --------|-------- CTRL0 | FRF

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_PROTOCOL_MOTOROLA LL_QSPI_PROTOCOL_TI LL_QSPI_PROTOCOL_MICROWIRE

Definition at line 1270 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_transfer_direction()

__STATIC_INLINE uint32_t ll_qspi_get_transfer_direction | ( | qspi_regs_t * | QSPIx | ) |

Get transfer direction mode.

Register|BitsName --------|-------- CTRL0 | TMOD

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: LL_QSPI_FULL_DUPLEX LL_QSPI_SIMPLEX_TX LL_QSPI_SIMPLEX_RX LL_QSPI_READ_EEPROM

Definition at line 1158 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_tx_fifo_level()

__STATIC_INLINE uint32_t ll_qspi_get_tx_fifo_level | ( | qspi_regs_t * | QSPIx | ) |

Get FIFO Transmission Level.

Register|BitsName --------|-------- TXFL | TXTFL

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: 0 ~ FIFO_DEPTH

Definition at line 1671 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_tx_fifo_threshold()

__STATIC_INLINE uint32_t ll_qspi_get_tx_fifo_threshold | ( | qspi_regs_t * | QSPIx | ) |

Get threshold of TXFIFO that triggers an TXE event.

Register|BitsName --------|-------- TXFTL | TFT

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: 0 ~ (FIFO_DEPTH - 1)

Definition at line 1625 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_tx_start_fifo_threshold()

__STATIC_INLINE uint32_t ll_qspi_get_tx_start_fifo_threshold | ( | qspi_regs_t * | QSPIx | ) |

Get threshold of TX transfer start.

Register|BitsName --------|-------- TXFTL | TXFTHR

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value can be one of the following values: 0 ~ (FIFO_DEPTH - 1)

Definition at line 1594 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_get_version()

__STATIC_INLINE uint32_t ll_qspi_get_version | ( | qspi_regs_t * | QSPIx | ) |

Get IP version.

Register|BitsName --------|-------- COMP | VERSION

Parameters

  QSPIx | QSPI instance

Return values

  Returned | value is const.

Definition at line 1716 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_is_enabled()

__STATIC_INLINE uint32_t ll_qspi_is_enabled | ( | qspi_regs_t * | QSPIx | ) |

Check if SPI peripheral is enabled.

Register|BitsName --------|-------- QSPI_EN | EN

Parameters

  QSPIx | QSPI instance

Return values

  State | of bit (1 or 0).

Definition at line 1355 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_is_enabled_micro_handshake()

__STATIC_INLINE uint32_t ll_qspi_is_enabled_micro_handshake | ( | qspi_regs_t * | QSPIx | ) |

Check if Handshake in Microwire mode is enabled.

Register|BitsName --------|-------- MWC | MHS

Parameters

  QSPIx | QSPI instance

Return values

  State | of bit (1 or 0).

Definition at line 1400 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_is_enabled_slave_out()

__STATIC_INLINE uint32_t ll_qspi_is_enabled_slave_out | ( | qspi_regs_t * | QSPIx | ) |

Check if slave output is enabled.

Register|BitsName --------|-------- CTRL0 | SLVOE

Parameters

  QSPIx | QSPI instance

Return values

  State | of bit (1 or 0).

Definition at line 1119 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_is_enabled_ss()

__STATIC_INLINE uint32_t ll_qspi_is_enabled_ss | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | ss
| ) |  |

Check if slave select is enabled.

Register|BitsName --------|-------- SE | SLAVE1 SE | SLAVE0

Parameters

  QSPIx | QSPI instance
  ss | This parameter can be one of the following values: LL_QSPI_SLAVE1 LL_QSPI_SLAVE0

Return values

  State | of bit (1 or 0).

Definition at line 1531 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_is_enabled_ss_toggle()

__STATIC_INLINE uint32_t ll_qspi_is_enabled_ss_toggle | ( | qspi_regs_t * | QSPIx | ) |

Check if slave select toggle is enabled.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- CTRL0 | SSTEN

Parameters

  QSPIx | QSPI instance

Return values

  State | of bit (1 or 0).

Definition at line 836 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_is_enabled_test_mode()

__STATIC_INLINE uint32_t ll_qspi_is_enabled_test_mode | ( | qspi_regs_t * | QSPIx | ) |

Check if SPI test mode is enabled.

Register|BitsName --------|-------- CTRL0 | SRL

Parameters

  QSPIx | QSPI instance

Return values

  State | of bit (1 or 0).

Definition at line 1074 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_baud_rate_prescaler()

__STATIC_INLINE void ll_qspi_set_baud_rate_prescaler | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | baud_rate
| ) |  |

Set baud rate prescaler.

Note
  These bits should not be changed when communication is ongoing. SPI BaudRate = fPCLK/Prescaler.

Register|BitsName --------|-------- BAUD | SCKDIV

Parameters

  QSPIx | QSPI instance
  baud_rate | This parameter can be one even value between 2 and 65534, if the value is 0, the SCLK is disable.

Return values

  None |

Definition at line 1548 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_clock_phase()

__STATIC_INLINE void ll_qspi_set_clock_phase | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | clock_phase
| ) |  |

Set clock phase.

Note
  This bit should not be changed when communication is ongoing. This bit is not used in SPI TI mode.

Register|BitsName --------|-------- CTRL0 | SCPHA

Parameters

  QSPIx | QSPI instance
  clock_phase | This parameter can be one of the following values: LL_QSPI_SCPHA_1EDGE LL_QSPI_SCPHA_2EDGE

Return values

  None |

Definition at line 1215 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_clock_polarity()

__STATIC_INLINE void ll_qspi_set_clock_polarity | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | clock_polarity
| ) |  |

Set clock polarity.

Note
  This bit should not be changed when communication is ongoing. This bit is not used in SPI TI mode.

Register|BitsName --------|-------- CTRL0 | SCPOL

Parameters

  QSPIx | QSPI instance
  clock_polarity | This parameter can be one of the following values: LL_QSPI_SCPOL_LOW LL_QSPI_SCPOL_HIGH

Return values

  None |

Definition at line 1178 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_control_frame_size()

__STATIC_INLINE void ll_qspi_set_control_frame_size | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | size
| ) |  |

Set the length of the control word for the Microwire frame format.

Note
  This bit should be written only when SPI is disabled (QSPI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | CFS

Parameters

  QSPIx | QSPI instance
  size | This parameter can be one of the following values: LL_QSPI_MW_CMDSIZE_1BIT LL_QSPI_MW_CMDSIZE_2BIT LL_QSPI_MW_CMDSIZE_3BIT LL_QSPI_MW_CMDSIZE_4BIT LL_QSPI_MW_CMDSIZE_5BIT LL_QSPI_MW_CMDSIZE_6BIT LL_QSPI_MW_CMDSIZE_7BIT LL_QSPI_MW_CMDSIZE_8BIT LL_QSPI_MW_CMDSIZE_9BIT LL_QSPI_MW_CMDSIZE_10BIT LL_QSPI_MW_CMDSIZE_11BIT LL_QSPI_MW_CMDSIZE_12BIT LL_QSPI_MW_CMDSIZE_13BIT LL_QSPI_MW_CMDSIZE_14BIT LL_QSPI_MW_CMDSIZE_15BIT LL_QSPI_MW_CMDSIZE_16BIT

Return values

  None |

Definition at line 997 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_data_size()

__STATIC_INLINE void ll_qspi_set_data_size | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | size
| ) |  |

Set frame data size.

Register|BitsName --------|-------- CTRL0 | DFS32

Parameters

  QSPIx | QSPI instance
  size | This parameter can be one of the following values: LL_QSPI_DATASIZE_4BIT LL_QSPI_DATASIZE_5BIT LL_QSPI_DATASIZE_6BIT LL_QSPI_DATASIZE_7BIT LL_QSPI_DATASIZE_8BIT LL_QSPI_DATASIZE_9BIT LL_QSPI_DATASIZE_10BIT LL_QSPI_DATASIZE_11BIT LL_QSPI_DATASIZE_12BIT LL_QSPI_DATASIZE_13BIT LL_QSPI_DATASIZE_14BIT LL_QSPI_DATASIZE_15BIT LL_QSPI_DATASIZE_16BIT LL_QSPI_DATASIZE_17BIT LL_QSPI_DATASIZE_18BIT LL_QSPI_DATASIZE_19BIT LL_QSPI_DATASIZE_20BIT LL_QSPI_DATASIZE_21BIT LL_QSPI_DATASIZE_22BIT LL_QSPI_DATASIZE_23BIT LL_QSPI_DATASIZE_24BIT LL_QSPI_DATASIZE_25BIT LL_QSPI_DATASIZE_26BIT LL_QSPI_DATASIZE_27BIT LL_QSPI_DATASIZE_28BIT LL_QSPI_DATASIZE_29BIT LL_QSPI_DATASIZE_30BIT LL_QSPI_DATASIZE_31BIT LL_QSPI_DATASIZE_32BIT

Return values

  None |

Definition at line 920 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_frame_format()

__STATIC_INLINE void ll_qspi_set_frame_format | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | frf
| ) |  |

Set data frame format for transmitting/receiving the data.

Note
  This bit should be written only when QSPI is disabled (QSPI_SSI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | SPIFRF

Parameters

  QSPIx | QSPI instance
  frf | This parameter can be one of the following values: LL_QSPI_FRF_SPI LL_QSPI_FRF_DUALSPI LL_QSPI_FRF_QUADSPI

Return values

  None |

Definition at line 856 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_micro_transfer_direction()

__STATIC_INLINE void ll_qspi_set_micro_transfer_direction | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | transfer_direction
| ) |  |

Set transfer direction mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MDD

Parameters

  QSPIx | QSPI instance
  transfer_direction | This parameter can be one of the following values: LL_QSPI_MICROWIRE_RX LL_QSPI_MICROWIRE_TX

Return values

  None |

Definition at line 1419 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_micro_transfer_mode()

__STATIC_INLINE void ll_qspi_set_micro_transfer_mode | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | transfer_mode
| ) |  |

Set transfer mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MWMOD

Parameters

  QSPIx | QSPI instance
  transfer_mode | This parameter can be one of the following values: LL_QSPI_MICROWIRE_NON_SEQUENTIAL LL_QSPI_MICROWIRE_SEQUENTIAL

Return values

  None |

Definition at line 1456 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_receive_size()

__STATIC_INLINE void ll_qspi_set_receive_size | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | size
| ) |  |

Set the number of data frames to be continuously received.

Note
  These bits should not be changed when communication is ongoing. This bits are effect when TMOD = 2b10 or 2b11. This bits are not effect in SPIS.

Register|BitsName --------|-------- CTRL1 | NDF

Parameters

  QSPIx | QSPI instance
  size | This parameter can be one of the following values: 0 ~ 65535

Return values

  None |

Definition at line 1289 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_rx_fifo_threshold()

__STATIC_INLINE void ll_qspi_set_rx_fifo_threshold | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | threshold
| ) |  |

Set threshold of RXFIFO that triggers an RXNE event.

Register|BitsName --------|-------- RXFTL | RFT

Parameters

  QSPIx | QSPI instance
  threshold | This parameter can be one of the following values: 0 ~ (FIFO_DEPTH - 1)

Return values

  None |

Definition at line 1641 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_standard()

__STATIC_INLINE void ll_qspi_set_standard | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | standard
| ) |  |

Set serial protocol used.

Note
  This bit should be written only when SPI is disabled (QSPI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | FRF

Parameters

  QSPIx | QSPI instance
  standard | This parameter can be one of the following values: LL_QSPI_PROTOCOL_MOTOROLA LL_QSPI_PROTOCOL_TI LL_QSPI_PROTOCOL_MICROWIRE

Return values

  None |

Definition at line 1252 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_transfer_direction()

__STATIC_INLINE void ll_qspi_set_transfer_direction | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | transfer_direction
| ) |  |

Set transfer direction mode.

Register|BitsName --------|-------- CTRL0 | TMOD

Parameters

  QSPIx | QSPI instance
  transfer_direction | This parameter can be one of the following values: LL_QSPI_FULL_DUPLEX LL_QSPI_SIMPLEX_TX LL_QSPI_SIMPLEX_RX LL_QSPI_READ_EEPROM

Return values

  None |

Definition at line 1139 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_tx_fifo_threshold()

__STATIC_INLINE void ll_qspi_set_tx_fifo_threshold | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | threshold
| ) |  |

Set threshold of TXFIFO that triggers an TXE event.

Register|BitsName --------|-------- TXFTL | TFT

Parameters

  QSPIx | QSPI instance
  threshold | This parameter can be one of the following values: 0 ~ (FIFO_DEPTH - 1)

Return values

  None |

Definition at line 1610 of file gr55xx_ll_qspi.h.

## ◆ ll_qspi_set_tx_start_fifo_threshold()

__STATIC_INLINE void ll_qspi_set_tx_start_fifo_threshold | ( | qspi_regs_t * | QSPIx,
|  | uint32_t | threshold
| ) |  |

Set threshold of TX transfer start.

Register|BitsName --------|-------- TXFTL | TXFTHR

Parameters

  QSPIx | QSPI instance
  threshold | This parameter can be one of the following values: 0 ~ (FIFO_DEPTH - 1)

Return values

  None |

Definition at line 1579 of file gr55xx_ll_qspi.h.

## ◆ ll_spi_disable()

__STATIC_INLINE void ll_spi_disable | ( | spi_regs_t * | SPIx | ) |

Disable SPI peripheral.

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

Register|BitsName --------|-------- SSI_EN | EN

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 896 of file gr55xx_ll_spi.h.

## ◆ ll_spi_disable_micro_handshake()

__STATIC_INLINE void ll_spi_disable_micro_handshake | ( | spi_regs_t * | SPIx | ) |

Disable Handshake in Microwire mode.

Register|BitsName --------|-------- MWC | MHS

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 941 of file gr55xx_ll_spi.h.

## ◆ ll_spi_disable_salve_out()

__STATIC_INLINE void ll_spi_disable_salve_out | ( | spi_regs_t * | SPIx | ) |

Disable slave output.

Register|BitsName --------|-------- CTRL0 | SLVOE

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 662 of file gr55xx_ll_spi.h.

## ◆ ll_spi_disable_ss()

__STATIC_INLINE void ll_spi_disable_ss | ( | spi_regs_t * | SPIx,
|  | uint32_t | ss
| ) |  |

Disable slave select.

Register|BitsName --------|-------- SE | SLAVE1 SE | SLAVE0

Parameters

  SPIx | SPI instance
  ss | This parameter can be one of the following values: LL_SPI_SLAVE1 LL_SPI_SLAVE0

Return values

  None |

Definition at line 1068 of file gr55xx_ll_spi.h.

## ◆ ll_spi_disable_ss_toggle()

__STATIC_INLINE void ll_spi_disable_ss_toggle | ( | spi_regs_t * | SPIx | ) |

Disable slave select toggle.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- CTRL0 | SSTEN

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 417 of file gr55xx_ll_spi.h.

## ◆ ll_spi_disable_test_mode()

__STATIC_INLINE void ll_spi_disable_test_mode | ( | spi_regs_t * | SPIx | ) |

Disable SPI test mode.

Register|BitsName --------|-------- CTRL0 | SRL

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 617 of file gr55xx_ll_spi.h.

## ◆ ll_spi_enable()

__STATIC_INLINE void ll_spi_enable | ( | spi_regs_t * | SPIx | ) |

Enable SPI peripheral.

Register|BitsName --------|-------- SSI_EN | EN

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 880 of file gr55xx_ll_spi.h.

## ◆ ll_spi_enable_micro_handshake()

__STATIC_INLINE void ll_spi_enable_micro_handshake | ( | spi_regs_t * | SPIx | ) |

Enable Handshake in Microwire mode.

Register|BitsName --------|-------- MWC | MHS

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 926 of file gr55xx_ll_spi.h.

## ◆ ll_spi_enable_slave_out()

__STATIC_INLINE void ll_spi_enable_slave_out | ( | spi_regs_t * | SPIx | ) |

Enable slave output.

Register|BitsName --------|-------- CTRL0 | SLVOE

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 647 of file gr55xx_ll_spi.h.

## ◆ ll_spi_enable_ss()

__STATIC_INLINE void ll_spi_enable_ss | ( | spi_regs_t * | SPIx,
|  | uint32_t | ss
| ) |  |

Enable slave select.

Register|BitsName --------|-------- SE | SLAVE1 SE | SLAVE0

Parameters

  SPIx | SPI instance
  ss | This parameter can be one of the following values: LL_SPI_SLAVE1 LL_SPI_SLAVE0

Return values

  None |

Definition at line 1049 of file gr55xx_ll_spi.h.

## ◆ ll_spi_enable_ss_toggle()

__STATIC_INLINE void ll_spi_enable_ss_toggle | ( | spi_regs_t * | SPIx | ) |

Enable slave select toggle.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- CTRL0 | SSTEN

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 401 of file gr55xx_ll_spi.h.

## ◆ ll_spi_enable_test_mode()

__STATIC_INLINE void ll_spi_enable_test_mode | ( | spi_regs_t * | SPIx | ) |

Enable SPI test mode.

Register|BitsName --------|-------- CTRL0 | SRL

Parameters

  SPIx | SPI instance

Return values

  None |

Definition at line 602 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_baud_rate_prescaler()

__STATIC_INLINE uint32_t ll_spi_get_baud_rate_prescaler | ( | spi_regs_t * | SPIx | ) |

Get baud rate prescaler.

Register|BitsName --------|-------- BAUD | SCKDIV

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one even value between 2 and 65534.

Definition at line 1119 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_clock_phase()

__STATIC_INLINE uint32_t ll_spi_get_clock_phase | ( | spi_regs_t * | SPIx | ) |

Get clock phase.

Register|BitsName --------|-------- CTRL0 | SCPHA

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_SCPHA_1EDGE LL_SPI_SCPHA_2EDGE

Definition at line 790 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_clock_polarity()

__STATIC_INLINE uint32_t ll_spi_get_clock_polarity | ( | spi_regs_t * | SPIx | ) |

Get clock polarity.

Register|BitsName --------|-------- CTRL0 | SCPOL

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_SCPOL_LOW LL_SPI_SCPOL_HIGH

Definition at line 753 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_control_frame_size()

__STATIC_INLINE uint32_t ll_spi_get_control_frame_size | ( | spi_regs_t * | SPIx | ) |

Get the length of the control word for the Microwire frame format.

Note
  This bit should be written only when SPI is disabled (SSI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | CFS

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_MW_CMDSIZE_1BIT LL_SPI_MW_CMDSIZE_2BIT LL_SPI_MW_CMDSIZE_3BIT LL_SPI_MW_CMDSIZE_4BIT LL_SPI_MW_CMDSIZE_5BIT LL_SPI_MW_CMDSIZE_6BIT LL_SPI_MW_CMDSIZE_7BIT LL_SPI_MW_CMDSIZE_8BIT LL_SPI_MW_CMDSIZE_9BIT LL_SPI_MW_CMDSIZE_10BIT LL_SPI_MW_CMDSIZE_11BIT LL_SPI_MW_CMDSIZE_12BIT LL_SPI_MW_CMDSIZE_13BIT LL_SPI_MW_CMDSIZE_14BIT LL_SPI_MW_CMDSIZE_15BIT LL_SPI_MW_CMDSIZE_16BIT

Definition at line 587 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_data_size()

__STATIC_INLINE uint32_t ll_spi_get_data_size | ( | spi_regs_t * | SPIx | ) |

Get frame data size.

Register|BitsName --------|-------- CTRL0 | DFS32

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_DATASIZE_4BIT LL_SPI_DATASIZE_5BIT LL_SPI_DATASIZE_6BIT LL_SPI_DATASIZE_7BIT LL_SPI_DATASIZE_8BIT LL_SPI_DATASIZE_9BIT LL_SPI_DATASIZE_10BIT LL_SPI_DATASIZE_11BIT LL_SPI_DATASIZE_12BIT LL_SPI_DATASIZE_13BIT LL_SPI_DATASIZE_14BIT LL_SPI_DATASIZE_15BIT LL_SPI_DATASIZE_16BIT LL_SPI_DATASIZE_17BIT LL_SPI_DATASIZE_18BIT LL_SPI_DATASIZE_19BIT LL_SPI_DATASIZE_20BIT LL_SPI_DATASIZE_21BIT LL_SPI_DATASIZE_22BIT LL_SPI_DATASIZE_23BIT LL_SPI_DATASIZE_24BIT LL_SPI_DATASIZE_25BIT LL_SPI_DATASIZE_26BIT LL_SPI_DATASIZE_27BIT LL_SPI_DATASIZE_28BIT LL_SPI_DATASIZE_29BIT LL_SPI_DATASIZE_30BIT LL_SPI_DATASIZE_31BIT LL_SPI_DATASIZE_32BIT

Definition at line 522 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_micro_transfer_direction()

__STATIC_INLINE uint32_t ll_spi_get_micro_transfer_direction | ( | spi_regs_t * | SPIx | ) |

Get transfer direction mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MDD

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_MICROWIRE_RX LL_SPI_MICROWIRE_TX

Definition at line 993 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_micro_transfer_mode()

__STATIC_INLINE uint32_t ll_spi_get_micro_transfer_mode | ( | spi_regs_t * | SPIx | ) |

Get transfer mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MWMOD

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_MICROWIRE_NON_SEQUENTIAL LL_SPI_MICROWIRE_SEQUENTIAL

Definition at line 1030 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_receive_size()

__STATIC_INLINE uint32_t ll_spi_get_receive_size | ( | spi_regs_t * | SPIx | ) |

Get the number of data frames to be continuously received.

Note
  These bits should not be changed when communication is ongoing. This bits are effect when TMOD = 2b10 or 2b11. This bits are not effect in SPIS.

Register|BitsName --------|-------- CTRL1 | NDF

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: 0 ~ 65535

Definition at line 865 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_rx_fifo_level()

__STATIC_INLINE uint32_t ll_spi_get_rx_fifo_level | ( | spi_regs_t * | SPIx | ) |

Get FIFO reception Level.

Register|BitsName --------|-------- RXFL | RXTFL

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: 0 ~ LL_SPI_x_FIFO_DEPTH

Definition at line 1211 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_rx_fifo_threshold()

__STATIC_INLINE uint32_t ll_spi_get_rx_fifo_threshold | ( | spi_regs_t * | SPIx | ) |

Get threshold of RXFIFO that triggers an RXNE event.

Register|BitsName --------|-------- RXFTL | RFT

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: 0 ~ (LL_SPI_x_FIFO_DEPTH - 1)

Definition at line 1181 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_standard()

__STATIC_INLINE uint32_t ll_spi_get_standard | ( | spi_regs_t * | SPIx | ) |

Get serial protocol used.

Register|BitsName --------|-------- CTRL0 | FRF

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_PROTOCOL_MOTOROLA LL_SPI_PROTOCOL_TI LL_SPI_PROTOCOL_MICROWIRE

Definition at line 828 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_transfer_direction()

__STATIC_INLINE uint32_t ll_spi_get_transfer_direction | ( | spi_regs_t * | SPIx | ) |

Get transfer direction mode.

Register|BitsName --------|-------- CTRL0 | TMOD

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: LL_SPI_FULL_DUPLEX LL_SPI_SIMPLEX_TX LL_SPI_SIMPLEX_RX LL_SPI_READ_EEPROM

Definition at line 716 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_tx_fifo_level()

__STATIC_INLINE uint32_t ll_spi_get_tx_fifo_level | ( | spi_regs_t * | SPIx | ) |

Get FIFO Transmission Level.

Register|BitsName --------|-------- TXFL | TXTFL

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: 0 ~ LL_SPI_x_FIFO_DEPTH

Definition at line 1196 of file gr55xx_ll_spi.h.

## ◆ ll_spi_get_tx_fifo_threshold()

__STATIC_INLINE uint32_t ll_spi_get_tx_fifo_threshold | ( | spi_regs_t * | SPIx | ) |

Get threshold of TXFIFO that triggers an TXE event.

Register|BitsName --------|-------- TXFTL | TFT

Parameters

  SPIx | SPI instance

Return values

  Returned | value can be one of the following values: 0 ~ (LL_SPI_x_FIFO_DEPTH - 1)

Definition at line 1150 of file gr55xx_ll_spi.h.

## ◆ ll_spi_is_enabled()

__STATIC_INLINE uint32_t ll_spi_is_enabled | ( | spi_regs_t * | SPIx | ) |

Check if SPI peripheral is enabled.

Register|BitsName --------|-------- SSI_EN | EN

Parameters

  SPIx | SPI instance

Return values

  State | of bit (1 or 0).

Definition at line 911 of file gr55xx_ll_spi.h.

## ◆ ll_spi_is_enabled_micro_handshake()

__STATIC_INLINE uint32_t ll_spi_is_enabled_micro_handshake | ( | spi_regs_t * | SPIx | ) |

Check if Handshake in Microwire mode is enabled.

Register|BitsName --------|-------- MWC | MHS

Parameters

  SPIx | SPI instance

Return values

  State | of bit (1 or 0).

Definition at line 956 of file gr55xx_ll_spi.h.

## ◆ ll_spi_is_enabled_slave_out()

__STATIC_INLINE uint32_t ll_spi_is_enabled_slave_out | ( | spi_regs_t * | SPIx | ) |

Check if slave output is enabled.

Register|BitsName --------|-------- CTRL0 | SLVOE

Parameters

  SPIx | SPI instance

Return values

  State | of bit (1 or 0).

Definition at line 677 of file gr55xx_ll_spi.h.

## ◆ ll_spi_is_enabled_ss()

__STATIC_INLINE uint32_t ll_spi_is_enabled_ss | ( | spi_regs_t * | SPIx,
|  | uint32_t | ss
| ) |  |

Check if slave select is enabled.

Register|BitsName --------|-------- SE | SLAVE1 SE | SLAVE0

Parameters

  SPIx | SPI instance
  ss | This parameter can be one of the following values: LL_SPI_SLAVE1 LL_SPI_SLAVE0

Return values

  State | of bit (1 or 0).

Definition at line 1087 of file gr55xx_ll_spi.h.

## ◆ ll_spi_is_enabled_ss_toggle()

__STATIC_INLINE uint32_t ll_spi_is_enabled_ss_toggle | ( | spi_regs_t * | SPIx | ) |

Check if slave select toggle is enabled.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- CTRL0 | SSTEN

Parameters

  SPIx | SPI instance

Return values

  State | of bit (1 or 0).

Definition at line 433 of file gr55xx_ll_spi.h.

## ◆ ll_spi_is_enabled_test_mode()

__STATIC_INLINE uint32_t ll_spi_is_enabled_test_mode | ( | spi_regs_t * | SPIx | ) |

Check if SPI test mode is enabled.

Register|BitsName --------|-------- CTRL0 | SRL

Parameters

  SPIx | SPI instance

Return values

  State | of bit (1 or 0).

Definition at line 632 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_baud_rate_prescaler()

__STATIC_INLINE void ll_spi_set_baud_rate_prescaler | ( | spi_regs_t * | SPIx,
|  | uint32_t | baud_rate
| ) |  |

Set baud rate prescaler.

Note
  These bits should not be changed when communication is ongoing. SPI BaudRate = fPCLK/Prescaler.

Register|BitsName --------|-------- BAUD | SCKDIV

Parameters

  SPIx | SPI instance
  baud_rate | This parameter can be one even value between 2 and 65534, if the value is 0, the SCLK is disable.

Return values

  None |

Definition at line 1104 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_clock_phase()

__STATIC_INLINE void ll_spi_set_clock_phase | ( | spi_regs_t * | SPIx,
|  | uint32_t | clock_phase
| ) |  |

Set clock phase.

Note
  This bit should not be changed when communication is ongoing. This bit is not used in SPI TI mode.

Register|BitsName --------|-------- CTRL0 | SCPHA

Parameters

  SPIx | SPI instance
  clock_phase | This parameter can be one of the following values: LL_SPI_SCPHA_1EDGE LL_SPI_SCPHA_2EDGE

Return values

  None |

Definition at line 773 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_clock_polarity()

__STATIC_INLINE void ll_spi_set_clock_polarity | ( | spi_regs_t * | SPIx,
|  | uint32_t | clock_polarity
| ) |  |

Set clock polarity.

Note
  This bit should not be changed when communication is ongoing. This bit is not used in SPI TI mode.

Register|BitsName --------|-------- CTRL0 | SCPOL

Parameters

  SPIx | SPI instance
  clock_polarity | This parameter can be one of the following values: LL_SPI_SCPOL_LOW LL_SPI_SCPOL_HIGH

Return values

  None |

Definition at line 736 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_control_frame_size()

__STATIC_INLINE void ll_spi_set_control_frame_size | ( | spi_regs_t * | SPIx,
|  | uint32_t | size
| ) |  |

Set the length of the control word for the Microwire frame format.

Note
  This bit should be written only when SPI is disabled (SSI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | CFS

Parameters

  SPIx | SPI instance
  size | This parameter can be one of the following values: LL_SPI_MW_CMDSIZE_1BIT LL_SPI_MW_CMDSIZE_2BIT LL_SPI_MW_CMDSIZE_3BIT LL_SPI_MW_CMDSIZE_4BIT LL_SPI_MW_CMDSIZE_5BIT LL_SPI_MW_CMDSIZE_6BIT LL_SPI_MW_CMDSIZE_7BIT LL_SPI_MW_CMDSIZE_8BIT LL_SPI_MW_CMDSIZE_9BIT LL_SPI_MW_CMDSIZE_10BIT LL_SPI_MW_CMDSIZE_11BIT LL_SPI_MW_CMDSIZE_12BIT LL_SPI_MW_CMDSIZE_13BIT LL_SPI_MW_CMDSIZE_14BIT LL_SPI_MW_CMDSIZE_15BIT LL_SPI_MW_CMDSIZE_16BIT

Return values

  None |

Definition at line 555 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_data_size()

__STATIC_INLINE void ll_spi_set_data_size | ( | spi_regs_t * | SPIx,
|  | uint32_t | size
| ) |  |

Set frame data size.

Register|BitsName --------|-------- CTRL0 | DFS32

Parameters

  SPIx | SPI instance
  size | This parameter can be one of the following values: LL_SPI_DATASIZE_4BIT LL_SPI_DATASIZE_5BIT LL_SPI_DATASIZE_6BIT LL_SPI_DATASIZE_7BIT LL_SPI_DATASIZE_8BIT LL_SPI_DATASIZE_9BIT LL_SPI_DATASIZE_10BIT LL_SPI_DATASIZE_11BIT LL_SPI_DATASIZE_12BIT LL_SPI_DATASIZE_13BIT LL_SPI_DATASIZE_14BIT LL_SPI_DATASIZE_15BIT LL_SPI_DATASIZE_16BIT LL_SPI_DATASIZE_17BIT LL_SPI_DATASIZE_18BIT LL_SPI_DATASIZE_19BIT LL_SPI_DATASIZE_20BIT LL_SPI_DATASIZE_21BIT LL_SPI_DATASIZE_22BIT LL_SPI_DATASIZE_23BIT LL_SPI_DATASIZE_24BIT LL_SPI_DATASIZE_25BIT LL_SPI_DATASIZE_26BIT LL_SPI_DATASIZE_27BIT LL_SPI_DATASIZE_28BIT LL_SPI_DATASIZE_29BIT LL_SPI_DATASIZE_30BIT LL_SPI_DATASIZE_31BIT LL_SPI_DATASIZE_32BIT

Return values

  None |

Definition at line 478 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_micro_transfer_direction()

__STATIC_INLINE void ll_spi_set_micro_transfer_direction | ( | spi_regs_t * | SPIx,
|  | uint32_t | transfer_direction
| ) |  |

Set transfer direction mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MDD

Parameters

  SPIx | SPI instance
  transfer_direction | This parameter can be one of the following values: LL_SPI_MICROWIRE_RX LL_SPI_MICROWIRE_TX

Return values

  None |

Definition at line 975 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_micro_transfer_mode()

__STATIC_INLINE void ll_spi_set_micro_transfer_mode | ( | spi_regs_t * | SPIx,
|  | uint32_t | transfer_mode
| ) |  |

Set transfer mode in Microwire mode.

Note
  This bit should not be changed when communication is ongoing.

Register|BitsName --------|-------- MWC | MWMOD

Parameters

  SPIx | SPI instance
  transfer_mode | This parameter can be one of the following values: LL_SPI_MICROWIRE_NON_SEQUENTIAL LL_SPI_MICROWIRE_SEQUENTIAL

Return values

  None |

Definition at line 1012 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_receive_size()

__STATIC_INLINE void ll_spi_set_receive_size | ( | spi_regs_t * | SPIx,
|  | uint32_t | size
| ) |  |

Set the number of data frames to be continuously received.

Note
  These bits should not be changed when communication is ongoing. This bits are effect when TMOD = 2b10 or 2b11. This bits are not effect in SPIS.

Register|BitsName --------|-------- CTRL1 | NDF

Parameters

  SPIx | SPI instance
  size | This parameter can be one of the following values: 0 ~ 65535

Return values

  None |

Definition at line 847 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_rx_fifo_threshold()

__STATIC_INLINE void ll_spi_set_rx_fifo_threshold | ( | spi_regs_t * | SPIx,
|  | uint32_t | threshold
| ) |  |

Set threshold of RXFIFO that triggers an RXNE event.

Register|BitsName --------|-------- RXFTL | RFT

Parameters

  SPIx | SPI instance
  threshold | This parameter can be one of the following values: 0 ~ (LL_SPI_x_FIFO_DEPTH - 1)

Return values

  None |

Definition at line 1166 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_standard()

__STATIC_INLINE void ll_spi_set_standard | ( | spi_regs_t * | SPIx,
|  | uint32_t | standard
| ) |  |

Set serial protocol used.

Note
  This bit should be written only when SPI is disabled (SSI_EN = 0) for correct operation.

Register|BitsName --------|-------- CTRL0 | FRF

Parameters

  SPIx | SPI instance
  standard | This parameter can be one of the following values: LL_SPI_PROTOCOL_MOTOROLA LL_SPI_PROTOCOL_TI LL_SPI_PROTOCOL_MICROWIRE

Return values

  None |

Definition at line 810 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_transfer_direction()

__STATIC_INLINE void ll_spi_set_transfer_direction | ( | spi_regs_t * | SPIx,
|  | uint32_t | transfer_direction
| ) |  |

Set transfer direction mode.

Register|BitsName --------|-------- CTRL0 | TMOD

Parameters

  SPIx | SPI instance
  transfer_direction | This parameter can be one of the following values: LL_SPI_FULL_DUPLEX LL_SPI_SIMPLEX_TX LL_SPI_SIMPLEX_RX LL_SPI_READ_EEPROM

Return values

  None |

Definition at line 697 of file gr55xx_ll_spi.h.

## ◆ ll_spi_set_tx_fifo_threshold()

__STATIC_INLINE void ll_spi_set_tx_fifo_threshold | ( | spi_regs_t * | SPIx,
|  | uint32_t | threshold
| ) |  |

Set threshold of TXFIFO that triggers an TXE event.

Register|BitsName --------|-------- TXFTL | TFT

Parameters

  SPIx | SPI instance
  threshold | This parameter can be one of the following values: 0 ~ (LL_SPI_x_FIFO_DEPTH - 1)

Return values

  None |

Definition at line 1135 of file gr55xx_ll_spi.h.