static const FlexSPINorConfig __attribute__((section(".boot_hdr.conf"), used)) g_flash_config =
{
.memConfig = {
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3u,
.csSetupTime = 3u,
.columnAddressWidth = 0u,
.configCmdEnable = 0u,
.controllerMiscOption = (1 << kFlexSpiMiscOffset_SafeConfigFreqEnable),
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_133MHz,
.lutCustomSeqEnable = 0u,
.sflashA1Size = 0x00800000u, /* 8MB/64Mbit */
.lookupTable =
{
// 0 Fast read sequence
[0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD,0x18),
[1] = FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
[2] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[3] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 1 Read Status sequence
[4] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x04),
[5] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[6] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[7] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 2 Reserved
[8] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[9] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[10] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[11] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 3 Write Enable sequence
[12] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, 0, 0),
[13] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[14] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[15] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 4 Reserved
[16] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[17] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[18] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[19] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 5 erase sector sequence
[20] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x20, RADDR_SDR, FLEXSPI_1PAD, 0x18),
[21] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[22] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[23] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 6 Reserved
[24] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[25] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[26] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[27] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 7 Reserved
[28] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[29] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[30] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[31] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 8 Reserved
[32] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xD8, RADDR_SDR, FLEXSPI_1PAD, 0x18),
[33] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[34] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[35] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 9 page program sequence
[36] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x02, RADDR_SDR, FLEXSPI_1PAD, 0x18),
[37] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, 0, 0),
[38] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[39] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 10 Reserved
[40] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[41] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[42] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[43] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 11 chip erase sequence
[44] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60, STOP, 0, 0),
[45] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[46] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[47] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 12 Reserved
[48] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[49] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[50] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[51] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 13 Reserved
[52] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[53] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[54] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[55] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 14 Reserved
[56] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[57] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[58] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[59] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
// 15 Reserved
[60] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[61] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[62] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
[63] = FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
},
},
.pageSize = 256,
.sectorSize = 4096,
.ipcmdSerialClkFreq = kFlexSpiSerialClk_30MHz,
.isUniformBlockSize = 0,
.serialNorType = 0,
.needExitNoCmdMode = 0,
.halfClkForNonReadCmd = 0,
.needRestoreNoCmdMode = 0,
.blockSize = 0x10000,
};