Functions
Peripheral State and Errors functions
Peripheral Driver » HAL Driver » XQSPI » Functions

XQSPI control functions. More...

Collaboration diagram for Peripheral State and Errors functions:

## Functions
hal_xqspi_state_t | hal_xqspi_get_state (xqspi_handle_t *p_xqspi)
| Return the XQSPI handle state. More...
uint32_t | hal_xqspi_get_error (xqspi_handle_t *p_xqspi)
| Return the XQSPI error code. More...
void | hal_xqspi_set_retry (xqspi_handle_t *p_xqspi, uint32_t retry)
| Set the XQSPI internal process repeat times value. More...
hal_status_t | hal_xqspi_set_tx_fifo_threshold (xqspi_handle_t *p_xqspi, uint32_t threshold)
| Set the TXFIFO threshold. More...
hal_status_t | hal_xqspi_set_rx_fifo_threshold (xqspi_handle_t *p_xqspi, uint32_t threshold)
| Set the RXFIFO threshold. More...
uint32_t | hal_xqspi_get_tx_fifo_threshold (xqspi_handle_t *p_xqspi)
| Get the TXFIFO threshold. More...
uint32_t | hal_xqspi_get_rx_fifo_threshold (xqspi_handle_t *p_xqspi)
| Get the RXFIFO threshold. More...
void | hal_xqspi_set_xip_present_status (xqspi_handle_t *p_xqspi, uint32_t status)
| Turn on/off present module, only in XIP mode. More...

## Detailed Description

XQSPI control functions.

     ===============================================================================
                          ##### Peripheral State and Errors functions #####
     ===============================================================================
        [..]
        This subsection provides a set of functions allowing to control the XQSPI.
         (+) hal_xqspi_get_state()API can be helpful to check in run-time the state of the XQSPI peripheral.
         (+) hal_xqspi_get_error() check in run-time Errors occurring during communication.
         (+) hal_xqspi_set_retry() set the repeat times during internal process.
         (+) hal_xqspi_set_tx_fifo_threshold() set the TX FIFO Threshold.
         (+) hal_xqspi_set_rx_fifo_threshold() set the RX FIFO Threshold.
         (+) hal_xqspi_get_tx_fifo_threshold() get the TX FIFO Threshold.
         (+) hal_xqspi_get_rx_fifo_threshold() get the RX FIFO Threshold.

## Function Documentation

## ◆ hal_xqspi_get_error()

uint32_t hal_xqspi_get_error | ( | xqspi_handle_t * | p_xqspi | ) |

Return the XQSPI error code.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.

Returns
  XQSPI error code in bitmap format

## ◆ hal_xqspi_get_rx_fifo_threshold()

uint32_t hal_xqspi_get_rx_fifo_threshold | ( | xqspi_handle_t * | p_xqspi | ) |

Get the RXFIFO threshold.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.

Returns
  RX FIFO threshold

## ◆ hal_xqspi_get_state()

hal_xqspi_state_t hal_xqspi_get_state | ( | xqspi_handle_t * | p_xqspi | ) |

Return the XQSPI handle state.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.

Return values

  HAL_XQSPI_STATE_RESET | Peripheral not initialized.
  HAL_XQSPI_STATE_READY | Peripheral initialized and ready for use.
  HAL_XQSPI_STATE_BUSY | Peripheral in indirect mode and busy.
  HAL_XQSPI_STATE_BUSY_INDIRECT_TX | Peripheral in indirect mode with transmission ongoing.
  HAL_XQSPI_STATE_BUSY_INDIRECT_RX | Peripheral in indirect mode with reception ongoing.
  HAL_XQSPI_STATE_ABORT | Peripheral with abort request ongoing.
  HAL_XQSPI_STATE_ERROR | Peripheral in error.

## ◆ hal_xqspi_get_tx_fifo_threshold()

uint32_t hal_xqspi_get_tx_fifo_threshold | ( | xqspi_handle_t * | p_xqspi | ) |

Get the TXFIFO threshold.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.

Returns
  TX FIFO threshold

## ◆ hal_xqspi_set_retry()

void hal_xqspi_set_retry | ( | xqspi_handle_t * | p_xqspi,
|  | uint32_t | retry
| ) |  |

Set the XQSPI internal process repeat times value.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.
  [in] | retry | Internal process repeat times value.

## ◆ hal_xqspi_set_rx_fifo_threshold()

hal_status_t hal_xqspi_set_rx_fifo_threshold | ( | xqspi_handle_t * | p_xqspi,
|  | uint32_t | threshold
| ) |  |

Set the RXFIFO threshold.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.
  [in] | threshold | RX FIFO threshold can be one of the following values: XQSPI_FIFO_THRESHOLD_1_8 threshold is 8 bytes XQSPI_FIFO_THRESHOLD_1_4 threshold is 16 bytes XQSPI_FIFO_THRESHOLD_1_2 threshold is 32 bytes XQSPI_FIFO_THRESHOLD_3_4 threshold is 48 bytes

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_xqspi_set_tx_fifo_threshold()

hal_status_t hal_xqspi_set_tx_fifo_threshold | ( | xqspi_handle_t * | p_xqspi,
|  | uint32_t | threshold
| ) |  |

Set the TXFIFO threshold.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.
  [in] | threshold | TX FIFO threshold can be one of the following values: XQSPI_FIFO_THRESHOLD_1_8 threshold is 8 bytes XQSPI_FIFO_THRESHOLD_1_4 threshold is 16 bytes XQSPI_FIFO_THRESHOLD_1_2 threshold is 32 bytes XQSPI_FIFO_THRESHOLD_3_4 threshold is 48 bytes

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_xqspi_set_xip_present_status()

void hal_xqspi_set_xip_present_status | ( | xqspi_handle_t * | p_xqspi,
|  | uint32_t | status
| ) |  |

Turn on/off present module, only in XIP mode.

Parameters

  [in] | p_xqspi | Pointer to an XQSPI handle which contains the configuration information for the specified XQSPI module.
  [in] | status | Presen status can be one of the following values: XQSPI_DISABLE_PRESENT Disable Present XQSPI_ENABLE_PRESENT Enable Present