Peripheral State and Errors 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_timeout (qspi_handle_t *p_qspi, uint32_t timeout)
 Set the QSPI internal process timeout value. More...
 
hal_status_t hal_qspi_set_tx_fifo_threshold (qspi_handle_t *p_qspi, uint32_t threshold)
 Set the TX FIFO threshold. More...
 
hal_status_t hal_qspi_set_rx_fifo_threshold (qspi_handle_t *p_qspi, uint32_t threshold)
 Set the RX FIFO threshold. More...
 
uint32_t hal_qspi_get_tx_fifo_threshold (qspi_handle_t *p_qspi)
 Get the TX FIFO threshold. More...
 
uint32_t hal_qspi_get_rx_fifo_threshold (qspi_handle_t *p_qspi)
 Get the RX FIFO threshold. 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.
     (+) hal_qspi_set_tx_fifo_threshold() set the TX FIFO Threshold.
     (+) hal_qspi_set_rx_fifo_threshold() set the RX FIFO Threshold.
     (+) hal_qspi_get_tx_fifo_threshold() get the TX FIFO Threshold.
     (+) hal_qspi_get_rx_fifo_threshold() get the RX FIFO Threshold.

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_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
Returns
QSPI error code in bitmap format

◆ hal_qspi_get_rx_fifo_threshold()

uint32_t hal_qspi_get_rx_fifo_threshold ( qspi_handle_t p_qspi)

Get the RX FIFO threshold.

Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
Returns
RX FIFO threshold

◆ 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_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
Return values
HAL_QSPI_STATE_RESETPeripheral not initialized.
HAL_QSPI_STATE_READYPeripheral initialized and ready for use.
HAL_QSPI_STATE_BUSYPeripheral in indirect mode and busy.
HAL_QSPI_STATE_BUSY_INDIRECT_TXPeripheral in indirect mode with transmission ongoing.
HAL_QSPI_STATE_BUSY_INDIRECT_RXPeripheral in indirect mode with reception ongoing.
HAL_QSPI_STATE_ABORTPeripheral with abort request ongoing.
HAL_QSPI_STATE_ERRORPeripheral in error.

◆ hal_qspi_get_tx_fifo_threshold()

uint32_t hal_qspi_get_tx_fifo_threshold ( qspi_handle_t p_qspi)

Get the TX FIFO threshold.

Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
Returns
TX FIFO threshold

◆ 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_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_set_rx_fifo_threshold()

hal_status_t hal_qspi_set_rx_fifo_threshold ( qspi_handle_t p_qspi,
uint32_t  threshold 
)

Set the RX FIFO threshold.

Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]thresholdRX FIFO threshold value ranging between 0x0U and 0x7U.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ 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_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]timeoutInternal process timeout value.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_set_tx_fifo_threshold()

hal_status_t hal_qspi_set_tx_fifo_threshold ( qspi_handle_t p_qspi,
uint32_t  threshold 
)

Set the TX FIFO threshold.

Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]thresholdTX FIFO threshold value ranging between 0x0U and 0x7U.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ 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_qspiPointer to a QSPIhandle which contains the configuration information for the specified QSPI module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.