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_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_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_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_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_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_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]delaydelay 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_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]timeoutInternal 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_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.