Hi,
For FLEXSPI, there are these pad options to select:-
kSerialFlash_1Pad = 1,
kSerialFlash_2Pads = 2,
kSerialFlash_4Pads = 4,
kSerialFlash_8Pads = 8,
How do I know when to select 1Pad/2Pads/4Pads/8Pads.
What are the meanings/definitions for each of the pad options?
For example, const flexspi_nor_config_t qspiflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3u,
.csSetupTime = 3u,
// Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 8u * 1024u * 1024u,
.lookupTable =
{
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 256u * 1024u,
//.isUniformBlockSize = false
};
What is the impact of setting sflashPadType to kSerialFlash_4Pads?
.sflashPadType = kSerialFlash_4Pads,
If I change the line to
.sflashPadType = kSerialFlash_2Pads,
What will happen?
Please explain.Thank you!
Best Regards,
Cindy
已解决! 转到解答。
Hi @Cindy ,
My PPT page will help you:
In fact, it is related to your used flash, check my above picture.
You will find your code related command, fast read:
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
0XEB -> fast read command, 1 wire, so use FLEXSPI_1PAD
0X18 ->3 Byte address, 3*8=24bit=0x18, but you can see 3 bytes address is 4 wire, so, it use FLEXSPI_4PAD.
0X06 -> DUMMY cycle, 4 pad, so use FLEXSPI_4PAD.
0X04->4 bytes read out, with 4 pad, so use FLEXSPI_4PAD.
Wish my picture and description helps your understanding.
Best Regards,
kerry
Hi @Cindy ,
My PPT page will help you:
In fact, it is related to your used flash, check my above picture.
You will find your code related command, fast read:
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
0XEB -> fast read command, 1 wire, so use FLEXSPI_1PAD
0X18 ->3 Byte address, 3*8=24bit=0x18, but you can see 3 bytes address is 4 wire, so, it use FLEXSPI_4PAD.
0X06 -> DUMMY cycle, 4 pad, so use FLEXSPI_4PAD.
0X04->4 bytes read out, with 4 pad, so use FLEXSPI_4PAD.
Wish my picture and description helps your understanding.
Best Regards,
kerry