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

QSPI control functions. More...

## Functions
hal_qspi_state_t | hal_qspi_get_state (qspi_handle_t *p_qspi)
| Return the QSPI handle state. More...
uint32_t | hal_qspi_get_error (qspi_handle_t *p_qspi)
| Return the QSPI error code. More...
void | hal_qspi_set_tcsu (qspi_handle_t *p_qspi, uint32_t delay)
| Set the QSPI cs setup & release time value. More...
void | hal_qspi_set_timeout (qspi_handle_t *p_qspi, uint32_t timeout)
| Set the QSPI internal process timeout value. More...
hal_status_t | hal_qspi_suspend_reg (qspi_handle_t *p_qspi)
| Suspend some registers related to QSPI configuration before sleep. More...
hal_status_t | hal_qspi_resume_reg (qspi_handle_t *p_qspi)
| Restore some registers related to QSPI configuration after sleep. This function must be used in conjunction with the hal_qspi_suspend_reg(). More...

## Detailed Description

QSPI control functions.

     ===============================================================================
                          ##### Peripheral State and Errors functions #####
     ===============================================================================
        [..]
        This subsection provides a set of functions allowing to control the QSPI.
         (+) hal_qspi_get_state() API can be helpful to check in run-time the state of the QSPI peripheral.
         (+) hal_qspi_get_error() check in run-time Errors occurring during communication.
         (+) hal_qspi_set_timeout() set the timeout during internal process.

## Function Documentation

## ◆ hal_qspi_get_error()

uint32_t hal_qspi_get_error | ( | qspi_handle_t * | p_qspi | ) |

Return the QSPI error code.

Parameters

  [in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module.

Returns
  QSPI error code in bitmap format

## ◆ hal_qspi_get_state()

hal_qspi_state_t hal_qspi_get_state | ( | qspi_handle_t * | p_qspi | ) |

Return the QSPI handle state.

Parameters

  [in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module.

Return values

  HAL_QSPI_STATE_RESET | Peripheral not initialized.
  HAL_QSPI_STATE_READY | Peripheral initialized and ready for use.
  HAL_QSPI_STATE_BUSY | Peripheral in indirect mode and busy.
  HAL_QSPI_STATE_BUSY_INDIRECT_TX | Peripheral in indirect mode with transmission ongoing.
  HAL_QSPI_STATE_BUSY_INDIRECT_RX | Peripheral in indirect mode with reception ongoing.
  HAL_QSPI_STATE_ABORT | Peripheral with abort request ongoing.
  HAL_QSPI_STATE_ERROR | Peripheral in error.

## ◆ hal_qspi_resume_reg()

hal_status_t hal_qspi_resume_reg | ( | qspi_handle_t * | p_qspi | ) |

Restore some registers related to QSPI configuration after sleep. This function must be used in conjunction with the hal_qspi_suspend_reg().

Parameters

  [in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module.

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_qspi_set_tcsu()

void hal_qspi_set_tcsu | ( | qspi_handle_t * | p_qspi,
|  | uint32_t | delay
| ) |  |

Set the QSPI cs setup & release time value.

Parameters

  [in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module.
  [in] | delay | delay clocks for cs setup & release, [0, 0x7]

Return values

  : | None.

## ◆ hal_qspi_set_timeout()

void hal_qspi_set_timeout | ( | qspi_handle_t * | p_qspi,
|  | uint32_t | timeout
| ) |  |

Set the QSPI internal process timeout value.

Parameters

  [in] | p_qspi | Pointer to a QSPI handle which contains the configuration information for the specified QSPI module.
  [in] | timeout | Internal process timeout value.

Return values

  : | None.

## ◆ hal_qspi_suspend_reg()

hal_status_t hal_qspi_suspend_reg | ( | qspi_handle_t * | p_qspi | ) |

Suspend some registers related to QSPI configuration before sleep.

Parameters

  [in] | p_qspi | Pointer to a QSPIhandle which contains the configuration information for the specified QSPI module.

Return values

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