Even the dead-simple iled_blinky demo app built with the EVK SDK won't load and run on an EVKB. Why?
And most importantly, how can I re-target apps build with the EVK SDK to the EVKB SDK.
Thanks very much.
Solved! Go to Solution.
Hi @Littell ,
Thanks you for your updated information.
If you want to use the SPT or other tools, you neet to use these steps:
1. Board enter the serial download mode
SW1:1-OFF,2-OFF,3-OFF,4-ON
SW2:0000000000
2. Find another USB cable to connect the J20, then you can use the mcubootutility to connect it
https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v6.2.0
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility
This is the connection result:
You can find it is connected, please also try it on your side.
Then mass erase use this one:
Please try it on your side.
If yu still have issues, you may need to check, whether your board have issues or not, or you modify the fuse bit or not.
Best Regards,
kerry
The SPT was unable to pass even the "Test Connection".
Hi @Littell ,
Thanks you for your updated information.
If you want to use the SPT or other tools, you neet to use these steps:
1. Board enter the serial download mode
SW1:1-OFF,2-OFF,3-OFF,4-ON
SW2:0000000000
2. Find another USB cable to connect the J20, then you can use the mcubootutility to connect it
https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v6.2.0
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility
This is the connection result:
You can find it is connected, please also try it on your side.
Then mass erase use this one:
Please try it on your side.
If yu still have issues, you may need to check, whether your board have issues or not, or you modify the fuse bit or not.
Best Regards,
kerry
Hi, Kerry! Thank you for the quick reply. Unfortunately the IDE Mass Erase resulted in the following error:
Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
chip initialization failed - Ef(34): Timed-out initializing flash.
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
( 65) Chip Setup Complete
(100) Target Operation Failed
Unable to perform operation!
Command failed with exit code 1
I guess I should try the SPT Mass Erase now...
Thanks,
Dave
Hi @Littell ,
Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.
1. please use the following link to do the mass erase at first:
2. To the MIMXRT1170-EVKB, please download the EVKB related SDK, and import the code from the EVKB SDK:
https://mcuxpresso.nxp.com/en/builder?hw=MIMXRT1170-EVKB
3. About the EVK and EVKB, the used QSPI flash is different, so the XIP FCB have difference.
This is the EVK flexspi_nor_config.c
#define FLASH_DUMMY_CYCLES 0x09
#define FLASH_DUMMY_VALUE 0x09
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
.controllerMiscOption = 0x10,
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_133MHz,
.sflashA1Size = 16u * 1024u * 1024u,
/* Enable flash configuration feature */
.configCmdEnable = 1u,
.configModeType[0] = kDeviceConfigCmdType_Generic,
/* Set configuration command sequences */
.configCmdSeqs[0] =
{
.seqNum = 1,
.seqId = 12,
.reserved = 0,
},
/* Prepare setting value for Read Register in flash */
.configCmdArgs[0] = (FLASH_DUMMY_VALUE << 3),
.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, FLASH_DUMMY_CYCLES, READ_SDR, FLEXSPI_4PAD, 0x04),
// Read Status LUTs
[4 * 1 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x04),
// Write Enable LUTs
[4 * 3 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, FLEXSPI_1PAD, 0x0),
// Erase Sector LUTs
[4 * 5 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x20, RADDR_SDR, FLEXSPI_1PAD, 0x18),
// Erase Block LUTs
[4 * 8 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xD8, RADDR_SDR, FLEXSPI_1PAD, 0x18),
// Pape Program LUTs
[4 * 9 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x02, RADDR_SDR, FLEXSPI_1PAD, 0x18),
[4 * 9 + 1] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0),
// Erase Chip LUTs
[4 * 11 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60, STOP, FLEXSPI_1PAD, 0x0),
// Set Read Register LUTs
[4 * 12 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xC0, WRITE_SDR, FLEXSPI_1PAD, 0x01),
[4 * 12 + 1] = FLEXSPI_LUT_SEQ(STOP, FLEXSPI_1PAD, 0x00, 0, 0, 0),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.ipcmdSerialClkFreq = 0x1,
.blockSize = 64u * 1024u,
.isUniformBlockSize = false,
};
This is the EVKB flexspi_nor_config.c
#define FLASH_DUMMY_CYCLES 0x08
#define FLASH_DUMMY_VALUE 0x03
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
.controllerMiscOption = 0x10,
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_133MHz,
.sflashA1Size = 64u * 1024u * 1024u,
/* Enable flash configuration feature */
.configCmdEnable = 1u,
.configModeType[0] = kDeviceConfigCmdType_Generic,
/* Set configuration command sequences */
.configCmdSeqs[0] =
{
.seqNum = 1,
.seqId = 12,
.reserved = 0,
},
/* Prepare setting value for Read Register in flash */
.configCmdArgs[0] = (FLASH_DUMMY_VALUE << 4),
.lookupTable =
{
// Read LUTs
[0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEC, RADDR_SDR, FLEXSPI_4PAD, 0x20),
[1] = FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, FLASH_DUMMY_CYCLES, READ_SDR, FLEXSPI_4PAD, 0x04),
// Read Status LUTs
[4 * 1 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x04),
// Write Enable LUTs
[4 * 3 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, FLEXSPI_1PAD, 0x0),
// Erase Sector LUTs
[4 * 5 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x21, RADDR_SDR, FLEXSPI_1PAD, 0x20),
// Erase Block LUTs
[4 * 8 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xD8, RADDR_SDR, FLEXSPI_1PAD, 0x18),
// Pape Program LUTs
[4 * 9 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x12, RADDR_SDR, FLEXSPI_1PAD, 0x20),
[4 * 9 + 1] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0),
// Erase Chip LUTs
[4 * 11 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60, STOP, FLEXSPI_1PAD, 0x0),
// Set Read Register LUTs
[4 * 12 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xC0, WRITE_SDR, FLEXSPI_1PAD, 0x01),
[4 * 12 + 1] = FLEXSPI_LUT_SEQ(STOP, FLEXSPI_1PAD, 0x00, 0, 0, 0),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.ipcmdSerialClkFreq = 0x1,
.blockSize = 64u * 1024u,
.isUniformBlockSize = false,
};
You can see, the LUT, the dummy cycle have difference.
So, if you want to use the EVK demo to download to the EVKB, you need to modify the flexspi_nor_config.c code to the EVKB code.
In fact, I suggest you use the EVKB SDK directly, that will be more easy to you.
Wish it helps you!
If you still have quesiton about it, please kindly let me know.
If your question is solved, please help me to mark the correct answer to this case, just to close it.
Any new issues, welcome to create the new case, thanks.
Best Regards,
Kerry