RT1170 support QSPI Flash (MX25L51245G ) Hi, Can RT1170 support MX25L51245G for QSPI flash? Do it need to modify the configuration file “evkmimxrt1170_flexspi_nor_config.c” to meet this chip? If so, how to modify it? Which parameters should be modified? Thanks for your support! Best regards, WJC Re: RT1170 support QSPI Flash (MX25L51245G ) Hello @jeremyzhou We are using the MX25L51245G external flash and RT1176 and have implemented the configuration shown below. It works flawlessly in XIP mode, but I would like to get a validation from you as well. However, when running a multicore application in "Link application mode", the system hits a hardfault. Specifically, it triggers an assert due to the value read from the FlexCAN MCR register. I am attaching some screenshots and my lookup table below for your reference. M7 flash init(RAM): M4 flash init(RAM): hardfault for multicore(RAM): Here is the lookup table configuration designed to support the software running seamlessly in both RAM and XIP (Execute-in-Place) modes: #define FLASH_DUMMY_CYCLES 0x08 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, .controllerMiscOption = 0x10, .deviceType = kFlexSpiDeviceType_SerialNOR, .sflashPadType = kSerialFlash_4Pads, .serialClkFreq = kFlexSpiSerialClk_133MHz, //okuma hatasi olursa kFlexSpiSerialClk_120MHz .sflashA1Size = 64u * 1024u * 1024u, //64MB //Her acilista QE = 1. ROM once WREN'i (seq 3) kendisi gonderir, sonra 4*12'yi 0x40 ile calistirir. //NXP RT1170 EVK'daki configCmd kalibinin aynisi .configCmdEnable = 1u, .configModeType[0] = kDeviceConfigCmdType_Generic, .configCmdSeqs[0] = {.seqNum = 1u, .seqId = 12u, .reserved = 0u}, //1 tane sequence calistir: 4*12 //asagiyi 0x20 yapinca calismadi dogrudan memory hatasinda patladi main'e gelmeden .configCmdArgs[0] = 0x40u, //WRITE_SDR'nin gonderecegi byte: SR = 0x40 .lookupTable = { [0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x6C, RADDR_SDR, FLEXSPI_1PAD, 0x20),//6Ch QREAD4B: komut ve 4 byte adres tek hattan (1-1-4) [1] = FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, FLASH_DUMMY_CYCLES, READ_SDR, FLEXSPI_4PAD, 0x04),//8 dummy bekle, data 4 hattan [4 * 1 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x04),//status regini 0x05'den okuyacam (WIP = bit0) [4 * 3 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, FLEXSPI_1PAD, 0x0),//write en ettim //asagidakini yoruma alinca gercekten silmedi [4 * 5 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x21, RADDR_SDR, FLEXSPI_1PAD, 0x20),//4 byte adress alarak 4 kb sector silecem [4 * 8 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xDC, RADDR_SDR, FLEXSPI_1PAD, 0x20),//64 kb block silecem(app'de kullanmiyoruz) [4 * 9 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x12, RADDR_SDR, FLEXSPI_1PAD, 0x20),//4 byte 1 page yazacam [4 * 9 + 1] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0),//datayi gonder ve bitir (WEL'i flash program bitince kendisi temizler) [4 * 11 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xC7, STOP, FLEXSPI_1PAD, 0x0),//tum flashi silecem(app'de kullanmiyoruz) [4 * 12 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x01, WRITE_SDR, FLEXSPI_1PAD, 0x01),//WRSR + tam 1 byte (configCmdArgs[0]): sadece SR yazilir, CR'ye dokunmaz //seq 6/7 bos: ROM API suspend/resume kullanmiyor }, }, .pageSize = 256u, .sectorSize = 4u * 1024u, .ipcmdSerialClkFreq = 0x1, .blockSize = 64u * 1024u, .isUniformBlockSize = true, }; Re: RT1170 support QSPI Flash (MX25L51245G ) Hi, Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you. 1) Can RT1170 support MX25L51245G for QSPI flash? -- Yes. 2) Do it need to modify the configuration file “evkmimxrt1170_flexspi_nor_config.c” to meet this chip? -- Yes, please refer to the below code.
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 = 64u * 1024u * 1024u,
.lookupTable =
{
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x20),
FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 256u * 1024u,
.isUniformBlockSize = false,
};
Have a great day, TIC
------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
View full article