Hello,
For production programming of the RT1061 I want to use the Segger flasher.
In order for the program to run from the external QSPI flash (IS25LP080D), the QE bit in the flash must be set.
Unfortunately, the QE bit cannot be set with the flasher.
Segger suggests a boot header (see file) for setting the QE bit, but the application no longer starts with it.
What needs to be changed?
Regards
Thomas
Solved! Go to Solution.
Hi @ThomasSC ,
Sorry for my later reply, I already finished your mentioned testing.
It works on my MIMXRT1060-EVK board, I disable the QE, and run the FCB with the QE enable.
Please use my attached code:
evkmimxrt1060_flexspi_nor_polling_transfer.zip used to disable the QE
evkmimxrt1060_iled_blinky.zip: FCB is enable QE.
Test step:
1. Download the evkmimxrt1060_iled_blinky.zip.
2. run evkmimxrt1060_flexspi_nor_polling_transfer.zip in RAM, used to disable the QE.
You can see QE is disabled.
Then, I run the led_blinky in the flash again. the QE is enabled again.
and the LED is blinking.
So, please try my code.
Best Regards,
Kerry
Hi @ThomasSC ,
Please refer to this post:
https://community.nxp.com/t5/i-MX-RT/i-MX-RT1050-QSPI-NOR-boot-initially-fails/m-p/1056368
In your app add the QE enable related code.
const flexspi_nor_config_t nor_spi_config = {
.memConfig = {
// ...
.deviceModeCfgEnable = 1u,
.deviceModeType = kDeviceConfigCmdType_QuadEnable,
.deviceModeSeq = {
.seqId = NOR_CMD_LUT_SEQ_IDX_WRITE_STATUS,
.seqNum = 1u,
},
.deviceModeArg = 0x40, // set Bit6 (=QE, quad enable)
// ...
.lookupTable = {
// ...
/* 4 - WriteStatus */
[NOR_CMD_LUT_SEQ_IDX_WRITE_STATUS*4+0] =
FLEXSPI_LUT_SEQ(CMD_SDR , FLEXSPI_1PAD, 0x01, // WRSR
WRITE_SDR , FLEXSPI_1PAD, 0x01),
// ...
},
},
};
Wish it helps you!
Best Regards,
Kerry
Hello,
with the expansion of the boot header to set the QE bit, the application no longer starts.
The application only starts with deviceModeCfgEnable = 0.
#define NUM_CUSTOM_LUT_SEQ 2
#define NOR_CMD_LUT_SEQ_IDX_CUSTOM_WE 7
#define NOR_CMD_LUT_SEQ_IDX_CUSTOM_QE_EN 8
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 = (1u << kFlexSpiMiscOffset_SafeConfigFreqEnable),
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 1u * 1024u * 1024u,
.deviceModeCfgEnable = 1,
.deviceModeType = kDeviceConfigCmdType_QuadEnable,
.waitTimeCfgCommands = 10,
.deviceModeSeq = {
NUM_CUSTOM_LUT_SEQ,
NOR_CMD_LUT_SEQ_IDX_CUSTOM_WE,
},
.deviceModeArg = 0x40, // set Bit6 (=QE, quad enable)
.lookupTable = {
// Read LUTs
[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),
[4 * NOR_CMD_LUT_SEQ_IDX_CUSTOM_WE] = FLEXSPI_LUT_SEQ(
CMD_SDR, FLEXSPI_1PAD, 0x06,
STOP, FLEXSPI_1PAD, 0x00), // Perform WE
[4 * NOR_CMD_LUT_SEQ_IDX_CUSTOM_QE_EN] = FLEXSPI_LUT_SEQ(
CMD_SDR, FLEXSPI_1PAD, 0x01,
WRITE_SDR, FLEXSPI_1PAD, 0x01), // WRSR
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.ipcmdSerialClkFreq = 1u,
.blockSize = 64u * 1024u,
.isUniformBlockSize = false,
};
Regards,
Thomas
Hi @ThomasSC ,
Thanks for your information.
Do you also have the MIMXRT1060-EVK board or not? Can you also reproduce it?
I will find time to double check it on my side.
Best Regards,
Kerry
Hi Kerry,
Yes, I can reproduce this behavior using the MIMXRT1060-EVK board.
Regards,
Thomas
Hi @ThomasSC ,
Sorry for my later reply, I already finished your mentioned testing.
It works on my MIMXRT1060-EVK board, I disable the QE, and run the FCB with the QE enable.
Please use my attached code:
evkmimxrt1060_flexspi_nor_polling_transfer.zip used to disable the QE
evkmimxrt1060_iled_blinky.zip: FCB is enable QE.
Test step:
1. Download the evkmimxrt1060_iled_blinky.zip.
2. run evkmimxrt1060_flexspi_nor_polling_transfer.zip in RAM, used to disable the QE.
You can see QE is disabled.
Then, I run the led_blinky in the flash again. the QE is enabled again.
and the LED is blinking.
So, please try my code.
Best Regards,
Kerry
Hello Kerry,
with the boot header from your blinky demo, the QE bit is also set in my application and is now running properly!
Many thanks for your support!
Regards,
Thomas