IO operation functions

Data transfers functions. More...

Functions

hal_status_t hal_qspi_memorymapped (qspi_handle_t *p_qspi, qspi_memorymapped_t *mmap_cmd, qspi_memorymapped_write_t *mmap_wr_cmd)
 Configure the Memory Mapped mode. Called after hal_qspi_init(...) More...
 
hal_status_t hal_qspi_memorymapped_active (qspi_handle_t *p_qspi, uint32_t is_sioo_mode)
 Active the memory mapped mode from Ready state. users must make sure parameters of mmaped mode hava been set correctly. More...
 
hal_status_t hal_qspi_memorymapped_deactive (qspi_handle_t *p_qspi)
 Deactive the memory mapped mode to Ready state it's recommended to use with hal_qspi_memorymapped_active to switch mode quickly. More...
 
hal_memorymapped_status_t hal_qspi_memorymapped_is_actived (qspi_handle_t *p_qspi)
 Check whether the memory mapped mode is Actived. More...
 
hal_status_t hal_qspi_memorymapped_update (qspi_handle_t *p_qspi, qspi_memorymapped_set_t *mmap_set, uint32_t count)
 Used to update memorymapped any parameter quickly. More...
 
hal_status_t hal_qspi_command_transmit (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data, uint32_t timeout)
 Transmit an amount of data with the specified instruction and address in blocking mode. More...
 
hal_status_t hal_qspi_command_receive (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data, uint32_t timeout)
 Receive an amount of data with the specified instruction, address and dummy cycles in blocking mode. More...
 
hal_status_t hal_qspi_command (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint32_t timeout)
 Transmit only instruction in blocking mode. More...
 
hal_status_t hal_qspi_transmit (qspi_handle_t *p_qspi, uint32_t data_mode, uint32_t data_size, uint8_t *p_data, uint32_t data_length, uint32_t timeout)
 Transmit an amount of data in blocking mode with standard SPI. More...
 
hal_status_t hal_qspi_receive (qspi_handle_t *p_qspi, uint32_t data_mode, uint32_t data_size, uint8_t *p_data, uint32_t length, uint32_t timeout)
 Receive an amount of data in blocking mode with standard SPI. More...
 
hal_status_t hal_qspi_command_transmit_it (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data)
 Transmit an amount of data with the specified instruction and address in non-blocking mode with Interrupt. More...
 
hal_status_t hal_qspi_command_receive_it (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data)
 Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with Interrupt. More...
 
hal_status_t hal_qspi_command_it (qspi_handle_t *p_qspi, qspi_command_t *p_cmd)
 Transmit instruction in non-blocking mode with Interrupt. More...
 
hal_status_t hal_qspi_transmit_it (qspi_handle_t *p_qspi, uint32_t data_mode, uint32_t data_size, uint8_t *p_data, uint32_t data_length)
 Transmit an amount of data in non-blocking mode at standard SPI with Interrupt. More...
 
hal_status_t hal_qspi_receive_it (qspi_handle_t *p_qspi, uint32_t data_mode, uint32_t data_size, uint8_t *p_data, uint32_t length)
 Receive an amount of data in non-blocking mode at standard SPI with Interrupt. More...
 
hal_status_t hal_qspi_command_transmit_dma (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data)
 Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA . More...
 
hal_status_t hal_qspi_command_receive_dma (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data)
 Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with DMA . More...
 
hal_status_t hal_qspi_command_dma (qspi_handle_t *p_qspi, qspi_command_t *p_cmd)
 Transmit instruction in non-blocking mode with DMA. More...
 
hal_status_t hal_qspi_transmit_dma (qspi_handle_t *p_qspi, uint32_t data_mode, uint32_t data_size, uint8_t *p_data, uint32_t length)
 Transmit an amount of data in non-blocking mode at standard SPI with DMA. More...
 
hal_status_t hal_qspi_receive_dma (qspi_handle_t *p_qspi, uint32_t data_mode, uint32_t data_size, uint8_t *p_data, uint32_t length)
 Receive an amount of data in non-blocking mode at standard SPI with DMA. More...
 
hal_status_t hal_qspi_command_transmit_dma_llp (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, dma_llp_config_t *p_llp_config)
 Transmit Multi-Block of data with the specified instruction and address in non-blocking mode with DMA Linked List Block. More...
 
hal_status_t hal_qspi_transmit_dma_llp (qspi_handle_t *p_qspi, dma_llp_config_t *p_llp_config, uint32_t data_mode, uint32_t data_length, uint32_t clock_stretch_enable)
 Transmit Multi-Block of data without instruction and address in non-blocking mode with DMA Linked List Block. More...
 
hal_status_t hal_qspi_command_transmit_dma_gather (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, dma_gather_config_t *p_gather_config, uint8_t *p_data)
 Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA Gather. More...
 
hal_status_t hal_qspi_command_transmit_dma_llp_gather (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, dma_llp_config_t *p_llp_config, dma_gather_config_t *p_gather_config)
 Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA LLP. And In Each Block, xfered specified by gather, every data block has the same gather configuration. More...
 
hal_status_t hal_qspi_command_receive_dma_scatter (qspi_handle_t *p_qspi, qspi_command_t *p_cmd, uint8_t *p_data, uint32_t sct_interval, uint32_t sct_count)
 Receive an amount of data with the specified instruction and address in non-blocking mode with DMA Scatter. More...
 
hal_status_t hal_qspi_psram_transmit_dma_llp_limited (qspi_handle_t *p_qspi, qspi_psram_command_t *p_cmd, dma_llp_config_t *p_llp_config)
 : Used to write PSRAM in high speed mode with dma LLP More...
 
hal_status_t hal_qspi_abort (qspi_handle_t *p_qspi)
 Abort the current transmission. More...
 
hal_status_t hal_qspi_abort_it (qspi_handle_t *p_qspi)
 Abort the current transmission (non-blocking function) More...
 

Detailed Description

Data transfers functions.

  ==============================================================================
                      ##### IO operation functions #####
 ===============================================================================
 [..]
    This subsection provides a set of functions allowing to manage the QSPI
    data transfers.

    [..] The QSPI supports master and slave mode:

    (#) There are two modes of transfer:
       (++) Blocking mode: The communication is performed in polling mode.
            The HAL status of all data processing is returned by the same function
            after finishing transfer.
       (++) No-Blocking mode: The communication is performed using Interrupts.
            or DMA, These APIs return the HAL status.
            The end of the data processing will be indicated through the
            dedicated QSPI IRQ when using Interrupt mode or the DMA IRQ when
            using DMA mode.
            The hal_qspi_tx_cplt_callback(), hal_qspi_rx_cplt_callback() and hal_qspi_txrx_cplt_callback() user callbacks
            will be executed respectively at the end of the transmit or Receive process.
            The hal_qspi_error_callback() user callback will be executed when a communication error is detected

    (#) APIs provided for these 2 transfer modes (Blocking mode or Non blocking mode using either Interrupt or DMA)
        exist for 1 Line (simplex) and 2 Lines (full duplex) modes.

Function Documentation

◆ hal_qspi_abort()

hal_status_t hal_qspi_abort ( qspi_handle_t p_qspi)

Abort the current transmission.

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

hal_status_t hal_qspi_abort_it ( qspi_handle_t p_qspi)

Abort the current transmission (non-blocking function)

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

hal_status_t hal_qspi_command ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint32_t  timeout 
)

Transmit only instruction in blocking mode.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_dma()

hal_status_t hal_qspi_command_dma ( qspi_handle_t p_qspi,
qspi_command_t p_cmd 
)

Transmit instruction in non-blocking mode with DMA.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_it()

hal_status_t hal_qspi_command_it ( qspi_handle_t p_qspi,
qspi_command_t p_cmd 
)

Transmit instruction in non-blocking mode with Interrupt.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_receive()

hal_status_t hal_qspi_command_receive ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint8_t *  p_data,
uint32_t  timeout 
)

Receive an amount of data with the specified instruction, address and dummy cycles in blocking mode.

Note
This function is used only in Indirect Read Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[out]p_dataPointer to data buffer
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_receive_dma()

hal_status_t hal_qspi_command_receive_dma ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint8_t *  p_data 
)

Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with DMA .

Note
This function is used only in Indirect Read Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[out]p_dataPointer to data buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_receive_dma_scatter()

hal_status_t hal_qspi_command_receive_dma_scatter ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint8_t *  p_data,
uint32_t  sct_interval,
uint32_t  sct_count 
)

Receive an amount of data with the specified instruction and address in non-blocking mode with DMA Scatter.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer to be sent
[in]sct_intervalSpecifies the destination address increment/decrement in multiples of data_size in qspi_command_t on a scatter boundary
[in]sct_countSpecifies the number of contiguous destination transfers of data_size in qspi_command_t between successive scatter intervals
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_receive_it()

hal_status_t hal_qspi_command_receive_it ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint8_t *  p_data 
)

Receive an amount of data with the specified instruction, address and dummy cycles in non-blocking mode with Interrupt.

Note
This function is used only in Indirect Read Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[out]p_dataPointer to data buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_transmit()

hal_status_t hal_qspi_command_transmit ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint8_t *  p_data,
uint32_t  timeout 
)

Transmit an amount of data with the specified instruction and address in blocking mode.

Note
This function is used only in Indirect Write Mode. Dummy cycles in command will be ignored.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_transmit_dma()

hal_status_t hal_qspi_command_transmit_dma ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint8_t *  p_data 
)

Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA .

Note
This function is used only in Indirect Write Mode. Dummy cycles in command will be ignored.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_transmit_dma_gather()

hal_status_t hal_qspi_command_transmit_dma_gather ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
dma_gather_config_t p_gather_config,
uint8_t *  p_data 
)

Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA Gather.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]p_gather_configPointer to DMA Gather Configure
[in]p_dataPointer to data buffer to be sent
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_transmit_dma_llp()

hal_status_t hal_qspi_command_transmit_dma_llp ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
dma_llp_config_t p_llp_config 
)

Transmit Multi-Block of data with the specified instruction and address in non-blocking mode with DMA Linked List Block.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]p_llp_configPointer to Linked List Block
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_transmit_dma_llp_gather()

hal_status_t hal_qspi_command_transmit_dma_llp_gather ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
dma_llp_config_t p_llp_config,
dma_gather_config_t p_gather_config 
)

Transmit an amount of data with the specified instruction and address in non-blocking mode with DMA LLP. And In Each Block, xfered specified by gather, every data block has the same gather configuration.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]p_llp_configPointer to DMA LLP Configure
[in]p_gather_configPointer to DMA Gather Configure
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_command_transmit_it()

hal_status_t hal_qspi_command_transmit_it ( qspi_handle_t p_qspi,
qspi_command_t p_cmd,
uint8_t *  p_data 
)

Transmit an amount of data with the specified instruction and address in non-blocking mode with Interrupt.

Note
This function is used only in Indirect Write Mode. Dummy cycles in command will be ignored.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmdPointer to a qspi_command_t structure that contains the instruction and address for data transfer.
[in]p_dataPointer to data buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_memorymapped()

hal_status_t hal_qspi_memorymapped ( qspi_handle_t p_qspi,
qspi_memorymapped_t mmap_cmd,
qspi_memorymapped_write_t mmap_wr_cmd 
)

Configure the Memory Mapped mode. Called after hal_qspi_init(...)

Note
This function is used only in Memory mapped Mode
Parameters
[in]p_qspiPointer to a QSPI handle
[in]mmap_cmdStructure that contains the memorymapped read command configuration information.
[in]mmap_wr_cmdStructure that contains the memorymapped write command configuration information.
Return values
halstatus

◆ hal_qspi_memorymapped_active()

hal_status_t hal_qspi_memorymapped_active ( qspi_handle_t p_qspi,
uint32_t  is_sioo_mode 
)

Active the memory mapped mode from Ready state. users must make sure parameters of mmaped mode hava been set correctly.

Parameters
p_qspiQSPI handle
is_sioo_mode(TRUE/FALSE)- specifies SIOO Mode, must match to Slave device's inst
Note
1) This function is used only in Memory mapped Mode 2) User must config the registers correcly firstly 3) It requires that slave device's inst supports the SIOO Mode
Return values
halstatus

◆ hal_qspi_memorymapped_deactive()

hal_status_t hal_qspi_memorymapped_deactive ( qspi_handle_t p_qspi)

Deactive the memory mapped mode to Ready state it's recommended to use with hal_qspi_memorymapped_active to switch mode quickly.

Parameters
p_qspiQSPI handle
Note
This function is used only in Memory mapped Mode
Return values
halstatus

◆ hal_qspi_memorymapped_is_actived()

hal_memorymapped_status_t hal_qspi_memorymapped_is_actived ( qspi_handle_t p_qspi)

Check whether the memory mapped mode is Actived.

Parameters
p_qspiQSPI handle
Note
This function is used only in Memory mapped Mode
Return values
1- actived; 0 - not actived

◆ hal_qspi_memorymapped_update()

hal_status_t hal_qspi_memorymapped_update ( qspi_handle_t p_qspi,
qspi_memorymapped_set_t mmap_set,
uint32_t  count 
)

Used to update memorymapped any parameter quickly.

Parameters
p_qspiQSPI handle
mmap_setPointer to k:v pair of qspi_memorymapped_set_t
countAmount of mmap_set's element
Note
This function is used only in Memory mapped Mode
Return values
halstatus

◆ hal_qspi_psram_transmit_dma_llp_limited()

hal_status_t hal_qspi_psram_transmit_dma_llp_limited ( qspi_handle_t p_qspi,
qspi_psram_command_t p_cmd,
dma_llp_config_t p_llp_config 
)

: Used to write PSRAM in high speed mode with dma LLP

Note
: THIS IS A RESTRICTED OR LIMITED USED FUNCTION !

It requires the following usage Conditions :

1. Just USED to WRITE PSRAM, And The Length Of Block MUST be under the control of tCEM of PSRAM 2. This Function can be USED Just When QSPI Clock Frequency is half Of System Frequency. And MUST config the prescaler firstly before calling this 3. This Function Just Supports QUAD WRITE Command Of PSRAM in Quad Mode, such as the 0x02/0x38 QPI WRITE CMD in IPUS or AP-MEMORY 4. Following the third point, The instruction size must be 8-bits, The address size must be 24-bits 5. This Function Just Supports Rectangular data block, Data length in each data block are the same 6. This Function Supports TWO DATA Block Mode : QSPI_PSRAM_LINKED_BLOCK_DATA_MODE_0 (Loop Mode); QSPI_PSRAM_LINKED_BLOCK_DATA_MODE_1 (Crossed Mode) 7. When in QSPI_PSRAM_LINKED_BLOCK_DATA_MODE_0 Mode, it supports the DATA_SIZE as 8/16/32bits; When in QSPI_PSRAM_LINKED_BLOCK_DATA_MODE_1 Mode, it just supports the DATA_SIZE as 8/16bits, not Support 32bits 8. It Just support Single BURST for SRC&DST when configuring the DMA xfer 9. Attention The Data Order. When Data_Size is 8 Bits : INST -> ADDR-High -> ADDR-Middle -> ADDR-Low -> Byte 0 -> Byte 1 -> Byte 2 -> ... When Data_Size is 16 Bits : ADDR-High -> INST -> ADDR-Low -> ADDR-Middle -> Short0.1 -> Short0.0 -> Short1.1 -> Short1.0 -> ... When Data_Size is 32 Bits : ADDR-Low -> ADDR-Middle -> ADDR-High -> INST -> Word 0.3 -> Word 0.2 -> Word 0.1 -> Word 0.0 -> ...

Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_cmd: Pointer to a psram command configuration.
[in]p_llp_configPointer to Linked List Block
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_receive()

hal_status_t hal_qspi_receive ( qspi_handle_t p_qspi,
uint32_t  data_mode,
uint32_t  data_size,
uint8_t *  p_data,
uint32_t  length,
uint32_t  timeout 
)

Receive an amount of data in blocking mode with standard SPI.

Note
This function is used only in Indirect Read Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]data_mode: QSPI_DATA_MODE_SPI QSPI_DATA_MODE_DUALSPI QSPI_DATA_MODE_QUADSPI
[in]data_size: QSPI_DATASIZE_08_BITS QSPI_DATASIZE_16_BITS QSPI_DATASIZE_32_BITS
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes 1. if data_mode equals QSPI_DATA_MODE_SPI : length must >= 2 bytes 2. if data_mode equals QSPI_DATA_MODE_DUALSPI : length must >= 4 bytes and be multiple of HALFWORD 3. if data_mode equals QSPI_DATA_MODE_QUADSPI : length must >= 8 bytes and be multiple of WORD
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_receive_dma()

hal_status_t hal_qspi_receive_dma ( qspi_handle_t p_qspi,
uint32_t  data_mode,
uint32_t  data_size,
uint8_t *  p_data,
uint32_t  length 
)

Receive an amount of data in non-blocking mode at standard SPI with DMA.

Note
This function is used only in Indirect Read Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]data_mode: QSPI_DATA_MODE_SPI QSPI_DATA_MODE_DUALSPI QSPI_DATA_MODE_QUADSPI
[in]data_size: QSPI_DATASIZE_08_BITS QSPI_DATASIZE_16_BITS QSPI_DATASIZE_32_BITS
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes 1. if data_mode equals QSPI_DATA_MODE_SPI : length must >= 2 bytes 2. if data_mode equals QSPI_DATA_MODE_DUALSPI : length must >= 4 bytes and be multiple of HALFWORD 3. if data_mode equals QSPI_DATA_MODE_QUADSPI : length must >= 8 bytes and be multiple of WORD
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_receive_it()

hal_status_t hal_qspi_receive_it ( qspi_handle_t p_qspi,
uint32_t  data_mode,
uint32_t  data_size,
uint8_t *  p_data,
uint32_t  length 
)

Receive an amount of data in non-blocking mode at standard SPI with Interrupt.

Note
This function is used only in Indirect Read Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]data_mode: QSPI_DATA_MODE_SPI QSPI_DATA_MODE_DUALSPI QSPI_DATA_MODE_QUADSPI
[in]data_size: QSPI_DATASIZE_08_BITS QSPI_DATASIZE_16_BITS QSPI_DATASIZE_32_BITS
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes 1. if data_mode equals QSPI_DATA_MODE_SPI : length must >= 2 bytes 2. if data_mode equals QSPI_DATA_MODE_DUALSPI : length must >= 4 bytes and be multiple of HALFWORD 3. if data_mode equals QSPI_DATA_MODE_QUADSPI : length must >= 8 bytes and be multiple of WORD
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_transmit()

hal_status_t hal_qspi_transmit ( qspi_handle_t p_qspi,
uint32_t  data_mode,
uint32_t  data_size,
uint8_t *  p_data,
uint32_t  data_length,
uint32_t  timeout 
)

Transmit an amount of data in blocking mode with standard SPI.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]data_mode: QSPI_DATA_MODE_SPI QSPI_DATA_MODE_DUALSPI QSPI_DATA_MODE_QUADSPI
[in]data_size: QSPI_DATASIZE_08_BITS QSPI_DATASIZE_16_BITS QSPI_DATASIZE_32_BITS
[in]p_dataPointer to data buffer
[in]data_lengthAmount of data to be sent in bytes 1. if data_mode equals QSPI_DATA_MODE_SPI : length must >= 2 bytes 2. if data_mode equals QSPI_DATA_MODE_DUALSPI : length must >= 4 bytes and be multiple of HALFWORD 3. if data_mode equals QSPI_DATA_MODE_QUADSPI : length must >= 8 bytes and be multiple of WORD
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_transmit_dma()

hal_status_t hal_qspi_transmit_dma ( qspi_handle_t p_qspi,
uint32_t  data_mode,
uint32_t  data_size,
uint8_t *  p_data,
uint32_t  length 
)

Transmit an amount of data in non-blocking mode at standard SPI with DMA.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]data_mode: QSPI_DATA_MODE_SPI QSPI_DATA_MODE_DUALSPI QSPI_DATA_MODE_QUADSPI
[in]data_size: QSPI_DATASIZE_08_BITS QSPI_DATASIZE_16_BITS QSPI_DATASIZE_32_BITS
[in]p_dataPointer to data buffer
[in]lengthAmount of data to be sent in bytes 1. if data_mode equals QSPI_DATA_MODE_SPI : length must >= 2 bytes 2. if data_mode equals QSPI_DATA_MODE_DUALSPI : length must >= 4 bytes and be multiple of HALFWORD 3. if data_mode equals QSPI_DATA_MODE_QUADSPI : length must >= 8 bytes and be multiple of WORD
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_transmit_dma_llp()

hal_status_t hal_qspi_transmit_dma_llp ( qspi_handle_t p_qspi,
dma_llp_config_t p_llp_config,
uint32_t  data_mode,
uint32_t  data_length,
uint32_t  clock_stretch_enable 
)

Transmit Multi-Block of data without instruction and address in non-blocking mode with DMA Linked List Block.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]p_llp_configPointer to Linked List Block
[in]data_mode: QSPI Data Mode
[in]data_lengthTotal data length of all blocks, in terms of bytes. 1. if data_mode equals QSPI_DATA_MODE_SPI : data_length must >= 2 bytes 2. if data_mode equals QSPI_DATA_MODE_DUALSPI : data_length must >= 4 bytes and be multiple of HALFWORD 3. if data_mode equals QSPI_DATA_MODE_QUADSPI : data_length must >= 8 bytes and be multiple of WORD
[in]clock_stretch_enableWhether enable the clock stretch feature
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_qspi_transmit_it()

hal_status_t hal_qspi_transmit_it ( qspi_handle_t p_qspi,
uint32_t  data_mode,
uint32_t  data_size,
uint8_t *  p_data,
uint32_t  data_length 
)

Transmit an amount of data in non-blocking mode at standard SPI with Interrupt.

Note
This function is used only in Indirect Write Mode.
Parameters
[in]p_qspiPointer to a QSPI handle which contains the configuration information for the specified QSPI module.
[in]data_mode: QSPI_DATA_MODE_SPI QSPI_DATA_MODE_DUALSPI QSPI_DATA_MODE_QUADSPI
[in]data_size: QSPI_DATASIZE_08_BITS QSPI_DATASIZE_16_BITS QSPI_DATASIZE_32_BITS
[in]p_dataPointer to data buffer
[in]data_lengthAmount of data to be sent in bytes 1. if data_mode equals QSPI_DATA_MODE_SPI : length must >= 2 bytes 2. if data_mode equals QSPI_DATA_MODE_DUALSPI : length must >= 4 bytes and be multiple of HALFWORD 3. if data_mode equals QSPI_DATA_MODE_QUADSPI : length must >= 8 bytes and be multiple of WORD
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.