SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
In order to send the correct READ and WRITE opcodes, software should initialize the OSPI_DEV_INSTR_RD_CONFIG_REG and the OSPI_DEV_INSTR_WR_CONFIG_REG registers. These registers include fields to setup the required instruction opcodes that is intended to be used to access the FLASH (default is basic READ and basic page program) as well as the instruction type, edge mode (DDR or SDR) and whether the instruction uses single, dual, quad or octal pins for address and data transfer. Providing this level of control to the user provides a future proofed generic solution. To ensure the controller can operate from a reset state, the registers will be reset to an opcode compatible with SIO devices what can be modified using BOOT feature.
Despite being applicable for both READs and WRITEs, the OSPI_DEV_INSTR_RD_CONFIG_REG[9-8] INSTR_TYPE_FLD field only appears once – it is not included in the OSPI_DEV_INSTR_WR_CONFIG_REG register. If software sets this to anything other than '0', then the address transfer type and the data transfer type bits of both OSPI_DEV_INSTR_RD_CONFIG_REG and OSPI_DEV_INSTR_WR_CONFIG_REG registers become don't care. It is made available to allow software to support the less common FLASH instructions where the opcode, address and data are sent on 2 or 4 lanes (the opcode from most instructions are sent serially to the FLASH device, even for dual/quad instructions).
There are devices capable to handling Read Operations in Dual Data Rate Mode (DDR) (it is also called Dual Transfer Rate Mode (DTR)). That means they can issue and capture the data on both rising and falling edges during working with dedicated command type. This enables the controller to maintain throughput at twice lower frequency of OSPI clock. The Device Read Instruction Register has DDR enable bit which informs Octal-SPI Flash Controller that opcode written into Read Opcode field is capable with DDR command type. The other field defined in OSPI_RD_DATA_CAPTURE_REG[19-16] DDR_READ_DELAY_FLD which enables the controller to shift the transmitted data in DDR mode. By default, data are shifted by 1 clock cycle to ensure hold timing greater than 0 during DDR transactions. It may not be sufficient for high reference clock frequency in accordance with the high dividers.
Table 12-3078 shows how software should configure the OSPI module for selected specific READ and WRITE instruction supported by the abovementioned device.
READ | |||||||
OPCODE | OPCODE sent over how many lanes / edge mode? | ADDRESS / DUMMY / MODE sent over how many lanes / edge mode? | DATA bytes sent over how many lanes / edge mode? | Instruction Type (OSPI_DEV_INSTR_RD_CONFIG_REG[9-8] INSTR_TYPE_FLD) | Address transfer type (OSPI_DEV_INSTR_RD_CONFIG_REG[13-12] ADDR_XFER_TYPE_STD_MODE_FLD) | Data transfer type (OSPI_DEV_INSTR_RD_CONFIG_REG[17-16] DATA_XFER_TYPE_EXT_MODE_FLD) | DDR bit enable (OSPI_DEV_INSTR_RD_CONFIG_REG[10] DDR_EN_FLD) |
READ | 1/SDR | 1/SDR | 1/SDR | 0 | 0 | 0 | 0 |
FAST_READ | 1/SDR | 1/SDR | 1/SDR | 0 | 0 | 0 | 0 |
DTR_FAST_ READ | 1/SDR | 1/DDR | 1/DDR | 0 | 0 | 0 | 1 |
DOFR (Dual O/p Fast Read) | 1/SDR | 1/SDR | 2/SDR | 0 | 0 | 1 | 0 |
DIOFR (Dual I/O Fast Read) | 1/SDR | 2/SDR | 2/SDR | 0 | 1 | 1 | 0 |
DDIOFR (DTR Dual I/ O Fast Read) | 1/SDR | 2/DDR | 2/DDR | 0 | 1 | 1 | 1 |
QOFR (Quad O/p Fast Read) | 1/SDR | 1/SDR | 4/SDR | 0 | 0 | 2 | 0 |
QIOFR (Quad I/O Fast Read) | 1/SDR | 4/SRD | 4/SDR | 0 | 2 | 2 | 0 |
DQIOFR (DTR Quad I/ O Fast Read) | 1/SDR | 4/DDR | 4/DDR | 0 | 2 | 2 | 1 |
OOFR (Octal O/p Fast Read) | 1/SDR | 1/SDR | 8/SDR | 0 | 0 | 3 | 0 |
OIOFR (Octal I/O Fast Read) | 1/SDR | 8/SDR | 8/SDR | 0 | 3 | 3 | 0 |
DOIOFR (DTR Octal O/p Fast Read) | 1/SDR | 1/DDR | 8/DDR | 0 | 0 | 3 | 1 |
4DOIOFR (4-byte DTR Octal I/O Fast Read) | 1/SDR | 8/DDR | 8/DDR | 0 | 3 | 3 | 1 |
DCFR (Dual Command Fast Read) | 2/SDR | 2/SDR | 2/SDR | 1 | Don't care | Don't care | 0 |
DDCFR (DTR Dual Command Fast Read) | 2/SDR | 2/DDR | 2/DDR | 1 | Don't care | Don't care | 1 |
QCFR (Quad Command Fast Read) | 4/SDR | 4/SRD | 4/SDR | 2 | Don't care | Don't care | 0 |
DQCFR (DTR Quad Command Fast Read) | 4/SDR | 4/DDR | 4/DDR | 2 | Don't care | Don't care | 1 |
OCFR (Octal Command Fast Read) | 8/SDR | 8/SDR | 8/SDR | 3 | Don't care | Don't care | 0 |
4DOCFR (4-byte DTR Octal Command Fast Read) | 8/SDR | 8/DDR | 8/DDR | 3 | Don't care | Don't care | 1 |
WRITE | |||||||
OPCODE | OPCODE sent over how many lanes? | ADDRESS / DUMMY / MODE sent over how many lanes? | DATA bytes sent over how many lanes? | Instruction Type (OSPI_DEV_INSTR_RD_CONFIG_REG[9-8] INSTR_TYPE_FLD) | Address transfer type (OSPI_DEV_INSTR_WR_CONFIG_REG[13-12] ADDR_XFER_TYPE_STD_MODE_FLD) | Data transfer type (OSPI_DEV_INSTR_WR_CONFIG_REG[17-16] DATA_XFER_TYPE_EXT_MODE_FLD) | |
PP | 1 | 1 | 1 | 0 | 0 | 0 | |
DIFP (Dual Input Fast Program) | 1 | 1 | 2 | 0 | 0 | 1 | |
DIEFP (Dual Input Extended Fast Program) | 1 | 2 | 2 | 0 | 1 | 1 | |
QIFP (Quad Input Fast Program) | 1 | 1 | 4 | 0 | 0 | 2 | |
QIEFP (Quad Input Extended Fast Program) | 1 | 4 | 4 | 0 | 2 | 2 | |
OIFP (Octal Input Fast Program) | 1 | 1 | 8 | 0 | 0 | 3 | |
OIEFP (Octal Input Extended Fast Program) | 1 | 8 | 8 | 0 | 3 | 3 | |
DCPP (Dual Command Fast Program) | 2 | 2 | 2 | 1 | Don't care | Don't care | |
QCPP (Quad Command Fast Program) | 4 | 4 | 4 | 2 | Don't care | Don't care | |
OCPP (Octal Command Fast Program) | 8 | 8 | 8 | 3 | Don't care | Don't care |
This data are applicable for both 3-byte or 4-byte address variants of the commands if did not indicate otherwise.
In DTR protocol all transfer phases (including opcode) take DDR edge mode independently on the command under execution. DTR protocol is to be enabled by OSPI_CONFIG_REG[24] ENABLE_DTR_PROTOCOL_FLD bit. It has higher priority than DDR Mode enable bit from OSPI_DEV_INSTR_RD_CONFIG_REG[10] DDR_EN_FLD.