Dear Sir or Ms Application Engineer,
I am having great difficulty utilizing a i.MX RT1051 QSPI External NOR flash,
S25FL064LABNFV043. Any assistance you can provide would be greatly
appreciated.
Pls read on Below,
TY & Best,
Tom
I've been using AN12108 and the RefManual.
When I try to debug a Segger progress pop-up with 4 bars pops up but only the
top "Compare" bar completes (Doesn't get to the 'Erase' bar) before the new
flash aborts and the previously flashed firmware reboots. The J-LinkServer
log in MCUXpresso says unable to halt cpu.
my build includes the following QSPI build macros
-DMIMXRT1052_EVKB_QSPI=1
-DXIP_EXTERNAL_FLASH=1
-DXIP_BOOT_HEADER_ENABLE=1
-DXIP_BOOT_HEADER_DCD_ENABLE
From schematic
BOOT_MODE_[1:0] == b10 internal boot
BOOT_CFG_[0:11] == 0 Serial NOR boot via flexspi, 3B read by def,
500us hold time, inf loop disabled
Here is a copy of my NOR config struct:
const flexspi_nor_config_t qspiflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackInternally,
.csHoldTime = 5u,
.csSetupTime = 3u,
.columnAddressWidth = 0,
.deviceModeCfgEnable = 0,
.waitTimeCfgCommands = 0,
// Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
.controllerMiscOption = 0u,
.deviceType = kFlexSpiDeviceType_SerialNOR,// Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
.sflashPadType = kSerialFlash_4Pads,
// AN12108: if no DQS for .readSampleClkSrc then clk <= 60MHz
.serialClkFreq = kFlexSpiSerialClk_50MHz,
.lutCustomSeqEnable = 0,
.sflashA1Size = 8u * 1024u * 1024u,
.lutCustomSeqEnable = 0,
// omitted B1,3 sizes
.dataValidTime = {16u, 16u},
.busyOffset = 0,
.busyBitPolarity = 0,
.deviceModeType = kDeviceConfigCmdType_QuadEnable,
.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, 0x02),
FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 32u * 1024u,
.isUniformBlockSize = 0,
.ipcmdSerialClkFreq = 0,
.serialNorType = 0,
};