Hello all.
I have designed my own board with an RT1051 microcontroller. I am using an external XIP memory through Quad SPI.
The part number of the memory is MX25L6433FMI-08G.
When I try to flash and debug through SWD bus (I'm using a Universal Multilink PEMicro), something is going wrong.
It looks like it was programmed, but when I start debugging, the contents of the memory addresses do not match what should be programmed. You could check it in the picture below.
After the flash, the program is stopping on the main. However, when I click on start button to start the debug process, the program break on a specific address like picture below.
Important information about the parameters that I am using:
BOOT_MODE = 00
My eFuses are configurated like picture below (I am not using BOOT CFG by pins):
The memory areas are like that:
And finally, the XIP configuration is the code below:
const flexspi_nor_config_t hyperflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.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_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 8u * 1024u * 1024u,
// .dataValidTime = {16u, 16u},
.lookupTable =
{
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_DDR, 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,
};
#endif /* XIP_BOOT_HEADER_ENABLE */
So, guys, could I be missing some important step?
It's my first project using MCUExpress and RT1051 with external memory, so I'm a little lost.
Thanks in advance.
已解决! 转到解答。
Hello Marcos,
Hope you are doing well.
While checking the information you have provided, the first thing that pops out at me is the driver chosen for the memory. Since you are using a different one than the one on our evaluation boards. You can modify this to use the generic driver.
If you click on it, three dots will appear that will open a drop down menu. If its through QuadSPI, please choose the generic option.
Try this and let me know if this results differently for you.
Best Regards,
Sabina
Hi @marcos_chiele !
How do you generate your code? You used some SDK example or you generated you project from zero with MCU Config Tools inside MCUXpresso? You used XIP folder and files? I tried to repeat your way, but was unsuccessfull.
Basically:
- Add flash in MCU Settings
- Add and configure files of XIP folder according my Winbond memory, and preprocessor tags (MCU Config Tools do not add XIP folder automatically)
- Adjust BOOT_CFG (I use res for pull up or down) and BOOT_MODE
- Adjust JLinkDevices.xml (https://mcuoneclipse.com/2019/10/27/using-segger-j-link-with-qspi-flash-on-nxp-i-mx-boards/)
The example pooling flash nor works fine. I think that is no hardware soldering or similar problem.
Any idea?
Thanks in advance.
Hello Sabrina.
Actually, I had the same issue with the evaluation board (when I was using the specific driver).
However, yesterday I changed the driver to the generic driver (exactly the model that you suggested).
So, now it's working on demo board and on muy custom board too!
Thank you very much.
Hello Marcos,
Hope you are doing well.
While checking the information you have provided, the first thing that pops out at me is the driver chosen for the memory. Since you are using a different one than the one on our evaluation boards. You can modify this to use the generic driver.
If you click on it, three dots will appear that will open a drop down menu. If its through QuadSPI, please choose the generic option.
Try this and let me know if this results differently for you.
Best Regards,
Sabina