STM32H735xx HAL User Manual
Functions
Input and Output operation functions
OSPI Exported Functions

OSPI Transmit/Receive functions. More...

Functions

void HAL_OSPI_IRQHandler (OSPI_HandleTypeDef *hospi)
 Handle OSPI interrupt request.
HAL_StatusTypeDef HAL_OSPI_Command (OSPI_HandleTypeDef *hospi, OSPI_RegularCmdTypeDef *cmd, uint32_t Timeout)
 Set the command configuration.
HAL_StatusTypeDef HAL_OSPI_Command_IT (OSPI_HandleTypeDef *hospi, OSPI_RegularCmdTypeDef *cmd)
 Set the command configuration in interrupt mode.
HAL_StatusTypeDef HAL_OSPI_HyperbusCfg (OSPI_HandleTypeDef *hospi, OSPI_HyperbusCfgTypeDef *cfg, uint32_t Timeout)
 Configure the Hyperbus parameters.
HAL_StatusTypeDef HAL_OSPI_HyperbusCmd (OSPI_HandleTypeDef *hospi, OSPI_HyperbusCmdTypeDef *cmd, uint32_t Timeout)
 Set the Hyperbus command configuration.
HAL_StatusTypeDef HAL_OSPI_Transmit (OSPI_HandleTypeDef *hospi, uint8_t *pData, uint32_t Timeout)
 Transmit an amount of data in blocking mode.
HAL_StatusTypeDef HAL_OSPI_Receive (OSPI_HandleTypeDef *hospi, uint8_t *pData, uint32_t Timeout)
 Receive an amount of data in blocking mode.
HAL_StatusTypeDef HAL_OSPI_Transmit_IT (OSPI_HandleTypeDef *hospi, uint8_t *pData)
 Send an amount of data in non-blocking mode with interrupt.
HAL_StatusTypeDef HAL_OSPI_Receive_IT (OSPI_HandleTypeDef *hospi, uint8_t *pData)
 Receive an amount of data in non-blocking mode with interrupt.
HAL_StatusTypeDef HAL_OSPI_Transmit_DMA (OSPI_HandleTypeDef *hospi, uint8_t *pData)
 Send an amount of data in non-blocking mode with DMA.
HAL_StatusTypeDef HAL_OSPI_Receive_DMA (OSPI_HandleTypeDef *hospi, uint8_t *pData)
 Receive an amount of data in non-blocking mode with DMA.
HAL_StatusTypeDef HAL_OSPI_AutoPolling (OSPI_HandleTypeDef *hospi, OSPI_AutoPollingTypeDef *cfg, uint32_t Timeout)
 Configure the OSPI Automatic Polling Mode in blocking mode.
HAL_StatusTypeDef HAL_OSPI_AutoPolling_IT (OSPI_HandleTypeDef *hospi, OSPI_AutoPollingTypeDef *cfg)
 Configure the OSPI Automatic Polling Mode in non-blocking mode.
HAL_StatusTypeDef HAL_OSPI_MemoryMapped (OSPI_HandleTypeDef *hospi, OSPI_MemoryMappedTypeDef *cfg)
 Configure the Memory Mapped mode.
__weak void HAL_OSPI_ErrorCallback (OSPI_HandleTypeDef *hospi)
 Transfer Error callback.
__weak void HAL_OSPI_AbortCpltCallback (OSPI_HandleTypeDef *hospi)
 Abort completed callback.
__weak void HAL_OSPI_FifoThresholdCallback (OSPI_HandleTypeDef *hospi)
 FIFO Threshold callback.
__weak void HAL_OSPI_CmdCpltCallback (OSPI_HandleTypeDef *hospi)
 Command completed callback.
__weak void HAL_OSPI_RxCpltCallback (OSPI_HandleTypeDef *hospi)
 Rx Transfer completed callback.
__weak void HAL_OSPI_TxCpltCallback (OSPI_HandleTypeDef *hospi)
 Tx Transfer completed callback.
__weak void HAL_OSPI_RxHalfCpltCallback (OSPI_HandleTypeDef *hospi)
 Rx Half Transfer completed callback.
__weak void HAL_OSPI_TxHalfCpltCallback (OSPI_HandleTypeDef *hospi)
 Tx Half Transfer completed callback.
__weak void HAL_OSPI_StatusMatchCallback (OSPI_HandleTypeDef *hospi)
 Status Match callback.
__weak void HAL_OSPI_TimeOutCallback (OSPI_HandleTypeDef *hospi)
 Timeout callback.
HAL_StatusTypeDef HAL_OSPI_RegisterCallback (OSPI_HandleTypeDef *hospi, HAL_OSPI_CallbackIDTypeDef CallbackID, pOSPI_CallbackTypeDef pCallback)
 Register a User OSPI Callback To be used instead of the weak (surcharged) predefined callback.
HAL_StatusTypeDef HAL_OSPI_UnRegisterCallback (OSPI_HandleTypeDef *hospi, HAL_OSPI_CallbackIDTypeDef CallbackID)
 Unregister a User OSPI Callback OSPI Callback is redirected to the weak (surcharged) predefined callback.

Detailed Description

OSPI Transmit/Receive functions.

 ===============================================================================
                      ##### IO operation functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to :
      (+) Handle the interrupts.
      (+) Handle the command sequence (regular and Hyperbus).
      (+) Handle the Hyperbus configuration.
      (+) Transmit data in blocking, interrupt or DMA mode.
      (+) Receive data in blocking, interrupt or DMA mode.
      (+) Manage the auto-polling functional mode.
      (+) Manage the memory-mapped functional mode.


Function Documentation

Abort completed callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1860 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Abort_IT(), HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

HAL_StatusTypeDef HAL_OSPI_AutoPolling ( OSPI_HandleTypeDef hospi,
OSPI_AutoPollingTypeDef cfg,
uint32_t  Timeout 
)
HAL_StatusTypeDef HAL_OSPI_AutoPolling_IT ( OSPI_HandleTypeDef hospi,
OSPI_AutoPollingTypeDef cfg 
)

Command completed callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1890 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

HAL_StatusTypeDef HAL_OSPI_Command ( OSPI_HandleTypeDef hospi,
OSPI_RegularCmdTypeDef cmd,
uint32_t  Timeout 
)

Set the command configuration.

Parameters:
hospi: OSPI handle
cmd: structure that contains the command configuration information
Timeout: Timeout duration
Return values:
HALstatus

Definition at line 802 of file stm32h7xx_hal_ospi.c.

References __HAL_OSPI_CLEAR_FLAG, OSPI_RegularCmdTypeDef::AddressDtrMode, OSPI_RegularCmdTypeDef::AddressMode, OSPI_RegularCmdTypeDef::AddressSize, OSPI_RegularCmdTypeDef::AlternateBytesDtrMode, OSPI_RegularCmdTypeDef::AlternateBytesMode, OSPI_RegularCmdTypeDef::AlternateBytesSize, assert_param, OSPI_RegularCmdTypeDef::DataDtrMode, OSPI_RegularCmdTypeDef::DataMode, OSPI_RegularCmdTypeDef::DQSMode, OSPI_InitTypeDef::DualQuad, OSPI_RegularCmdTypeDef::DummyCycles, __OSPI_HandleTypeDef::ErrorCode, OSPI_RegularCmdTypeDef::FlashId, HAL_GetTick(), HAL_OSPI_ADDRESS_NONE, HAL_OSPI_ALTERNATE_BYTES_NONE, HAL_OSPI_DATA_NONE, HAL_OSPI_DUALQUAD_DISABLE, HAL_OSPI_ERROR_INVALID_SEQUENCE, HAL_OSPI_ERROR_NONE, HAL_OSPI_FLAG_BUSY, HAL_OSPI_FLAG_TC, HAL_OSPI_INSTRUCTION_NONE, HAL_OSPI_MEMTYPE_HYPERBUS, HAL_OSPI_OPTYPE_COMMON_CFG, HAL_OSPI_OPTYPE_READ_CFG, HAL_OSPI_OPTYPE_WRAP_CFG, HAL_OSPI_OPTYPE_WRITE_CFG, HAL_OSPI_STATE_CMD_CFG, HAL_OSPI_STATE_READ_CMD_CFG, HAL_OSPI_STATE_READY, HAL_OSPI_STATE_WRITE_CMD_CFG, __OSPI_HandleTypeDef::Init, OSPI_RegularCmdTypeDef::InstructionDtrMode, OSPI_RegularCmdTypeDef::InstructionMode, OSPI_RegularCmdTypeDef::InstructionSize, OSPI_InitTypeDef::MemoryType, OSPI_RegularCmdTypeDef::NbData, OSPI_RegularCmdTypeDef::OperationType, OSPI_RegularCmdTypeDef::SIOOMode, and __OSPI_HandleTypeDef::State.

HAL_StatusTypeDef HAL_OSPI_Command_IT ( OSPI_HandleTypeDef hospi,
OSPI_RegularCmdTypeDef cmd 
)

Set the command configuration in interrupt mode.

Parameters:
hospi: OSPI handle
cmd: structure that contains the command configuration information
Note:
This function is used only in Indirect Read or Write Modes
Return values:
HALstatus

Definition at line 934 of file stm32h7xx_hal_ospi.c.

References __HAL_OSPI_CLEAR_FLAG, __HAL_OSPI_ENABLE_IT, OSPI_RegularCmdTypeDef::AddressDtrMode, OSPI_RegularCmdTypeDef::AddressMode, OSPI_RegularCmdTypeDef::AddressSize, OSPI_RegularCmdTypeDef::AlternateBytesDtrMode, OSPI_RegularCmdTypeDef::AlternateBytesMode, OSPI_RegularCmdTypeDef::AlternateBytesSize, assert_param, OSPI_RegularCmdTypeDef::DataDtrMode, OSPI_RegularCmdTypeDef::DataMode, OSPI_RegularCmdTypeDef::DQSMode, OSPI_InitTypeDef::DualQuad, OSPI_RegularCmdTypeDef::DummyCycles, __OSPI_HandleTypeDef::ErrorCode, OSPI_RegularCmdTypeDef::FlashId, HAL_GetTick(), HAL_OSPI_ADDRESS_NONE, HAL_OSPI_ALTERNATE_BYTES_NONE, HAL_OSPI_DATA_NONE, HAL_OSPI_DUALQUAD_DISABLE, HAL_OSPI_ERROR_INVALID_SEQUENCE, HAL_OSPI_ERROR_NONE, HAL_OSPI_FLAG_BUSY, HAL_OSPI_FLAG_TC, HAL_OSPI_FLAG_TE, HAL_OSPI_INSTRUCTION_NONE, HAL_OSPI_IT_TC, HAL_OSPI_IT_TE, HAL_OSPI_MEMTYPE_HYPERBUS, HAL_OSPI_OPTYPE_COMMON_CFG, HAL_OSPI_STATE_BUSY_CMD, HAL_OSPI_STATE_READY, __OSPI_HandleTypeDef::Init, OSPI_RegularCmdTypeDef::InstructionDtrMode, OSPI_RegularCmdTypeDef::InstructionMode, OSPI_RegularCmdTypeDef::InstructionSize, OSPI_InitTypeDef::MemoryType, OSPI_RegularCmdTypeDef::NbData, OSPI_RegularCmdTypeDef::OperationType, OSPI_RegularCmdTypeDef::SIOOMode, __OSPI_HandleTypeDef::State, and __OSPI_HandleTypeDef::Timeout.

Transfer Error callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1845 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

FIFO Threshold callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1875 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

HAL_StatusTypeDef HAL_OSPI_HyperbusCfg ( OSPI_HandleTypeDef hospi,
OSPI_HyperbusCfgTypeDef cfg,
uint32_t  Timeout 
)
HAL_StatusTypeDef HAL_OSPI_HyperbusCmd ( OSPI_HandleTypeDef hospi,
OSPI_HyperbusCmdTypeDef cmd,
uint32_t  Timeout 
)
HAL_StatusTypeDef HAL_OSPI_MemoryMapped ( OSPI_HandleTypeDef hospi,
OSPI_MemoryMappedTypeDef cfg 
)
HAL_StatusTypeDef HAL_OSPI_Receive ( OSPI_HandleTypeDef hospi,
uint8_t *  pData,
uint32_t  Timeout 
)
HAL_StatusTypeDef HAL_OSPI_Receive_DMA ( OSPI_HandleTypeDef hospi,
uint8_t *  pData 
)
HAL_StatusTypeDef HAL_OSPI_Receive_IT ( OSPI_HandleTypeDef hospi,
uint8_t *  pData 
)
HAL_StatusTypeDef HAL_OSPI_RegisterCallback ( OSPI_HandleTypeDef hospi,
HAL_OSPI_CallbackIDTypeDef  CallbackID,
pOSPI_CallbackTypeDef  pCallback 
)

Register a User OSPI Callback To be used instead of the weak (surcharged) predefined callback.

Parameters:
hospi: OSPI handle
CallbackID: ID of the callback to be registered This parameter can be one of the following values:
pCallback: pointer to the Callback function
Return values:
status

Definition at line 2012 of file stm32h7xx_hal_ospi.c.

References __OSPI_HandleTypeDef::AbortCpltCallback, __OSPI_HandleTypeDef::CmdCpltCallback, __OSPI_HandleTypeDef::ErrorCallback, __OSPI_HandleTypeDef::ErrorCode, __OSPI_HandleTypeDef::FifoThresholdCallback, HAL_OSPI_ABORT_CB_ID, HAL_OSPI_CMD_CPLT_CB_ID, HAL_OSPI_ERROR_CB_ID, HAL_OSPI_ERROR_INVALID_CALLBACK, HAL_OSPI_FIFO_THRESHOLD_CB_ID, HAL_OSPI_MSP_DEINIT_CB_ID, HAL_OSPI_MSP_INIT_CB_ID, HAL_OSPI_RX_CPLT_CB_ID, HAL_OSPI_RX_HALF_CPLT_CB_ID, HAL_OSPI_STATE_READY, HAL_OSPI_STATE_RESET, HAL_OSPI_STATUS_MATCH_CB_ID, HAL_OSPI_TIMEOUT_CB_ID, HAL_OSPI_TX_CPLT_CB_ID, HAL_OSPI_TX_HALF_CPLT_CB_ID, __OSPI_HandleTypeDef::MspDeInitCallback, __OSPI_HandleTypeDef::MspInitCallback, __OSPI_HandleTypeDef::RxCpltCallback, __OSPI_HandleTypeDef::RxHalfCpltCallback, __OSPI_HandleTypeDef::State, __OSPI_HandleTypeDef::StatusMatchCallback, __OSPI_HandleTypeDef::TimeOutCallback, __OSPI_HandleTypeDef::TxCpltCallback, and __OSPI_HandleTypeDef::TxHalfCpltCallback.

Rx Transfer completed callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1905 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

Rx Half Transfer completed callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1935 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), and HAL_OSPI_UnRegisterCallback().

Status Match callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1965 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

Timeout callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1980 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

HAL_StatusTypeDef HAL_OSPI_Transmit ( OSPI_HandleTypeDef hospi,
uint8_t *  pData,
uint32_t  Timeout 
)

Transmit an amount of data in blocking mode.

Parameters:
hospi: OSPI handle
pData: pointer to data buffer
Timeout: Timeout duration
Note:
This function is used only in Indirect Write Mode
Return values:
HALstatus

Definition at line 1133 of file stm32h7xx_hal_ospi.c.

References __HAL_OSPI_CLEAR_FLAG, __OSPI_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_OSPI_ERROR_INVALID_PARAM, HAL_OSPI_ERROR_INVALID_SEQUENCE, HAL_OSPI_FLAG_FT, HAL_OSPI_FLAG_TC, HAL_OSPI_STATE_CMD_CFG, HAL_OSPI_STATE_READY, __OSPI_HandleTypeDef::Instance, __OSPI_HandleTypeDef::pBuffPtr, __OSPI_HandleTypeDef::State, __OSPI_HandleTypeDef::XferCount, and __OSPI_HandleTypeDef::XferSize.

HAL_StatusTypeDef HAL_OSPI_Transmit_DMA ( OSPI_HandleTypeDef hospi,
uint8_t *  pData 
)
HAL_StatusTypeDef HAL_OSPI_Transmit_IT ( OSPI_HandleTypeDef hospi,
uint8_t *  pData 
)

Send an amount of data in non-blocking mode with interrupt.

Parameters:
hospi: OSPI handle
pData: pointer to data buffer
Note:
This function is used only in Indirect Write Mode
Return values:
HALstatus

Definition at line 1299 of file stm32h7xx_hal_ospi.c.

References __HAL_OSPI_CLEAR_FLAG, __HAL_OSPI_ENABLE_IT, __OSPI_HandleTypeDef::ErrorCode, HAL_OSPI_ERROR_INVALID_PARAM, HAL_OSPI_ERROR_INVALID_SEQUENCE, HAL_OSPI_FLAG_TC, HAL_OSPI_FLAG_TE, HAL_OSPI_IT_FT, HAL_OSPI_IT_TC, HAL_OSPI_IT_TE, HAL_OSPI_STATE_BUSY_TX, HAL_OSPI_STATE_CMD_CFG, __OSPI_HandleTypeDef::Instance, __OSPI_HandleTypeDef::pBuffPtr, __OSPI_HandleTypeDef::State, __OSPI_HandleTypeDef::XferCount, and __OSPI_HandleTypeDef::XferSize.

Tx Transfer completed callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1920 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), HAL_OSPI_IRQHandler(), and HAL_OSPI_UnRegisterCallback().

Tx Half Transfer completed callback.

Parameters:
hospi: OSPI handle
Return values:
None

Definition at line 1950 of file stm32h7xx_hal_ospi.c.

Referenced by HAL_OSPI_Init(), and HAL_OSPI_UnRegisterCallback().

HAL_StatusTypeDef HAL_OSPI_UnRegisterCallback ( OSPI_HandleTypeDef hospi,
HAL_OSPI_CallbackIDTypeDef  CallbackID 
)

Unregister a User OSPI Callback OSPI Callback is redirected to the weak (surcharged) predefined callback.

Parameters:
hospi: OSPI handle
CallbackID: ID of the callback to be unregistered This parameter can be one of the following values:
Return values:
status

Definition at line 2121 of file stm32h7xx_hal_ospi.c.

References __OSPI_HandleTypeDef::AbortCpltCallback, __OSPI_HandleTypeDef::CmdCpltCallback, __OSPI_HandleTypeDef::ErrorCallback, __OSPI_HandleTypeDef::ErrorCode, __OSPI_HandleTypeDef::FifoThresholdCallback, HAL_OSPI_ABORT_CB_ID, HAL_OSPI_AbortCpltCallback(), HAL_OSPI_CMD_CPLT_CB_ID, HAL_OSPI_CmdCpltCallback(), HAL_OSPI_ERROR_CB_ID, HAL_OSPI_ERROR_INVALID_CALLBACK, HAL_OSPI_ErrorCallback(), HAL_OSPI_FIFO_THRESHOLD_CB_ID, HAL_OSPI_FifoThresholdCallback(), HAL_OSPI_MSP_DEINIT_CB_ID, HAL_OSPI_MSP_INIT_CB_ID, HAL_OSPI_MspDeInit(), HAL_OSPI_MspInit(), HAL_OSPI_RX_CPLT_CB_ID, HAL_OSPI_RX_HALF_CPLT_CB_ID, HAL_OSPI_RxCpltCallback(), HAL_OSPI_RxHalfCpltCallback(), HAL_OSPI_STATE_READY, HAL_OSPI_STATE_RESET, HAL_OSPI_STATUS_MATCH_CB_ID, HAL_OSPI_StatusMatchCallback(), HAL_OSPI_TIMEOUT_CB_ID, HAL_OSPI_TimeOutCallback(), HAL_OSPI_TX_CPLT_CB_ID, HAL_OSPI_TX_HALF_CPLT_CB_ID, HAL_OSPI_TxCpltCallback(), HAL_OSPI_TxHalfCpltCallback(), __OSPI_HandleTypeDef::MspDeInitCallback, __OSPI_HandleTypeDef::MspInitCallback, __OSPI_HandleTypeDef::RxCpltCallback, __OSPI_HandleTypeDef::RxHalfCpltCallback, __OSPI_HandleTypeDef::State, __OSPI_HandleTypeDef::StatusMatchCallback, __OSPI_HandleTypeDef::TimeOutCallback, __OSPI_HandleTypeDef::TxCpltCallback, and __OSPI_HandleTypeDef::TxHalfCpltCallback.