Hello,
We are currently using XIP from external flash in OPI mode, and need to write to the configuration register of the external flash controller before XIP starts.
I'm looking at the flexspi_mem_config_t struct on how to perform device configuration. Currently we are using deviceModeSeq to configure the flash controller in OPI mode, so I cannot use that field to configure the configuration register.
However, I noticed that you can seemingly configure additional configuration sequences under the configCmdSeqs field. Am I correct in that? The documentation is lacking on this specific field, however, I've set it to the following:
.configCmdEnable = 1,
.configModeType = {
[0] = kDeviceConfigCmdType_Generic,
},
.configCmdSeqs = {
[0] = {
.seqNum = 1,
.seqId = 10, // See Lookup table for more details
.reserved = 0,
},
},
.configCmdArgs = {
[0] = (0x00 << 0) | (0x2 << 8),
},
and the LUT table is populated with the following command at index 10:
.lookupTable = {
// Other commands omitted
[4 * 10 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x01, WRITE_SDR, FLEXSPI_1PAD, 0x02),
},
But it seems like this doesn't work.
Do I need to execute a write enable command in the sequence table before executing the config command sequence?