Hi,
I have MIMXRT1060-EVK Rev.A2 board and onboard Hyperflash 6KS512SDP does not work.
I am using latest MCUXpresso IDE v10.3.0.
SDK_2.x_EVK-MIMXRT1060 v2.5.0.
I already removed resistors R153,R154,R155,R156,R157,R158 and mounted resistors R356,R361,R362,R363,R364,R365,R366.
SW7 is in position for hyperflash - OFF,ON,ON,OFF.
I am not sure if R169 should be mounted or not. I tried both options, with the same result.
I also regunfigured memory areas like this:
It shows me this error after start debug using link server:
I also try to reconfigure SW7 to serial downloader and then do Mass erase procedure:
I also try external debugger J-link with similar result. Where is the problem? Do anyone have onboard HyperFlash functional? I have also other board IMXRT1050-EVKB and there Hyperflash is working well by default.
Hi Peter,
1. Hardware
OPTION1: USE Hyperflash( DNP R153~R158, Mount R356,R361~R366)
OPTION2: USE QSPI FLASH(Mount R153~R158, DNP R356,R361~R366)
Please double check your solder, make sure it is correct.
2. Software
Your configuration is not enough, you need to modify the evkbimixrt1060_flexspi_nor_config.c ,
Comment these 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 = 8u * 1024u * 1024u,
.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, 0x04),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 256u * 1024u,
.isUniformBlockSize = false,
};
Add these code:
const flexspi_nor_config_t hyperflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClkSrc = kFlexSPIReadSampleClk_ExternalInputFromDqsPad,
.csHoldTime = 3u,
.csSetupTime = 3u,
.columnAddressWidth = 3u,
// Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
.controllerMiscOption =
(1u << kFlexSpiMiscOffset_DdrModeEnable) | (1u << kFlexSpiMiscOffset_WordAddressableEnable) |
(1u << kFlexSpiMiscOffset_SafeConfigFreqEnable) | (1u << kFlexSpiMiscOffset_DiffClkEnable),
.sflashPadType = kSerialFlash_8Pads,
.serialClkFreq = kFlexSpiSerialClk_133MHz,
.sflashA1Size = 64u * 1024u * 1024u,
.dataValidTime = {16u, 16u},
.lookupTable =
{
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_DDR, FLEXSPI_8PAD, 0xA0, RADDR_DDR, FLEXSPI_8PAD, 0x18),
FLEXSPI_LUT_SEQ(CADDR_DDR, FLEXSPI_8PAD, 0x10, DUMMY_DDR, FLEXSPI_8PAD, 0x06),
FLEXSPI_LUT_SEQ(READ_DDR, FLEXSPI_8PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0),
},
},
.pageSize = 512u,
.sectorSize = 256u * 1024u,
.blockSize = 256u * 1024u,
.isUniformBlockSize = true,
};
3. Before you download the code
Please note this point:
Then try to download the code to your chip, after you download it, you modify SW7_2 ON, SW7_3 ON, SW7_1 OFF, SW7_4 OFF, just run the code from the external hyper flash.
Please try it, actually this is the same as the RT1050-EVKB board.
More details, please refer to this application note:
https://www.nxp.com/docs/en/application-note/AN12107.pdf
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi, it is working with modified ".memConfig". But I still have the same error as in my printscreen while using serial downloader mode.
I figure out:
It is working well with driver "MIMXRT1050-EVK_S26KS512S.cfx" even on "1060" board.
Driver MIMXRT1060_SFDP_HYPERFLASH.cfx" does not work.
What is this driver doing?
Does this driver have any effect if I use SWD connection instead of serial downloader?
If I try to erase flash on "MIMXRT1062XXX6A" device using Jlink commander, it give me this error:
J-Link>exec EnableEraseAllFlashBanks
J-Link>erase
Erasing device...
J-Link: Flash download: Total time needed: 0.203s (Prepare: 0.154s, Compare: 0.000s, Erase: 0.048s, Program: 0.000s, Verify: 0.000s, Restore: 0.000s)
****** Error: Failed to erase sectors 0 @ address 0x60000000 (erase error)
ERROR: Erase returned with error code -5.
I tried to manually set device "MIMXRT1052XXX6A", even If I use "MIMXRT1062XXX6A". With this settings the "erase" procedure is working.
By the way, how can I add "exec EnableEraseAllFlashBanks
" while using "jlink/erase" button in MCUExpresso?
Regards,
Peter.
Hi Peter,
Thanks a lot for your updated information.
I have checked the RT1050 sdk code, RT1050 board is using the hype flash in default, I find the SDK code is also using MIMXRT1050-EVK_S26KS512S.cfx, not the MIMXRT1050-SFDP_HYPERFLASH.cfx.
So, you can use the MIMXRT1050-EVK_S26KS512S.cfx at first, when I have time, I will check the details about the MIMXRT1060-SFDP_HYPERFLASH.cfx,maybe it need to check the according source code.
About the erase all the external flash, I think, you can use the JLINK commander to erase it:
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Peter.
Did you modified XXXX_flexspi_nor_config.c in xip? There are some diffrerent code between QSPI Flash and HyperFlash.
Please Chechk xip foleder in your project (1050-EVKB and 1060-EVK).
Best Regards,
T.Kashiwagi
Hi, now it is working.
Thanks!
My customer reported the same...