1.4.4. Execute Command
- {list_of_arguments}: Optional argument that specifies arguments list. By default, list of arguments is an empty list.
- <device_index>: Optional argument that provides the specific device number. By default, the device index is set to 1.
The following examples show various usage of the execute command.
Executing GET_USERCODE Command
Executing the GET_USERCODE command (0x13) with empty list of arguments and the device index set to 2.
The command returns the response header along with the response returned from the SDM after executing the SDM command.
Reading Data from QSPI Flash
To read the data from the Quad SPI flash memory, you must execute a sequence of SDM commands:
- QSPI_OPEN
- QSPI_SET_CS 1
- QSPI_READ
- QSPI_CLOSE
To perform any additional QSPI operations such as write or erase, refer to the QSPI_WRITE and QSPI_ERASE commands described in the Mailbox Client Intel® FPGA IP User Guide.
SDM Command | Code (Hex) | Command Length Command Length Description |
Response Length |
---|---|---|---|
QSPI_OPEN | 0x32 | 0 | 0 |
QSOI_SET_CS | 0x34 | 1 | 0 |
QSPI_READ | 0x3A | 2 {QSPI flash address, number of words to read from QSPI flash} |
N |
QSPI_CLOSE | 0x33 | 0 | 0 |
- Executing the QSPI_OPEN command (0x32), command returns the response header value of 0x00000000 indicating the successful command execution.
- Executing the QSPI_SET_CS command (0x34), command returns the response header value of 0x00000000 indicating the successful command execution.
- Executing the QSPI_READ command (0x3A), requires two arguments:
- argument 1: Represents the QSPI flash address
- argument 2: Represents total number of words requested to read from QSPI flash, up to the maximum allowed number per read.
The command reads the SDM device #1 QSPI at location 0 for 5 words. The first word, 0x00005000 of the response is the response header. Bits[22:12] represent the response length and is set to 5. Bits [10:0] represent error code for the response and is 0. The subsequent five words are the data read out from the QSPI flash.
A single read operation can read up to 1024 words, or 4096 bytes. If you need to read more than the maximum allowed words per operation, you must execute another QSPI_READ command with the appropriate offset address.Note: If the argument list specifies more than one argument, you must specify all arguments within the curly brackets argument list. - Executing the QSPI_CLOSE command (0x33).