Hi all,
The external flash of my board is MX25U12832FZNI02, how should I configure the SDK(may be need change flash_config.c/flash_config.h files) so that the firmware can be booted from the external flash.
MCU: RT595
External Flash: MX25U12832FZNI02
SDK Example: evkmimxrt595_fbdev_freertos of EVK_MIMXRT595(Note: I can flashing the FW into my board, but there is not any log output)
Looking forward to reply.
Hi,
Thanks for your reply.
1) What is this configuration tool?
-- MCUBootUtility
2) Would you mind sharing an example of flash_config.c with me
const flexspi_nor_config_t flash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3,
.csSetupTime = 3,
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 16ul * 1024u * 1024u,
.busyOffset = 0u,
.busyBitPolarity = 0u,
.lookupTable =
{
/* Read */
[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),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 64u * 1024u,
};
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.
-------------------------------------------------------------------------------
Hi @jeremyzhou
I did some changes follow you mentioned method, burn into the flash, the FW can't boot up. Attached is my project, please help to check whether there is a mistake.
Hi,
Thanks for your reply.
Please follow the steps to testing.
1) Using the MCUBootUtility to contact the QSPI.
2) Next, use the flash_config to replace the original one.
const flexspi_nor_config_t flash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3,
.csSetupTime = 3,
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 16ul * 1024u * 1024u,
.busyOffset = 0u,
.busyBitPolarity = 0u,
.lookupTable =
{
/* Read */
[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),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 64u * 1024u,
};
3) It needs to select the appropriate flash driver which depends on the debugger you use, we can talk the steps when the above steps are completed.
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.
-------------------------------------------------------------------------------
Hi @jeremyzhou
Step 1~2 completed.
1. Flash FW to my board success. FW cannot bootup, there is nothing of UART output.
2. Online debuging error, which shown as below PIC.
Pls help check it.
Thanks for your reply.
After completing step1 and 2, we can assure the board's hardware connection is good, meanwhile, the QE bit is set and flash_config is good too.
So it should be related flash drivers, I suppose you use the Jlink, the default flash driver is not suitable for your custom board, so please follow the post to update the flash driver.
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.
-------------------------------------------------------------------------------
Hi @jeremyzhou
Thanks for your quick reply
Onside board designed by my customer, which burned customer's FW, it can bootup. So I think there is no problem with the step 1 and step2.
However, I burn the demo of the SDK, it still cannot bootup.
Here is my nor_flash config parameters:
const flexspi_nor_config_t flash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_ExternalInputFromDqsPad,
.csHoldTime = 3,
.csSetupTime = 3,
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 16ul * 1024u * 1024u,
.busyOffset = 0u,
.busyBitPolarity = 0u,
.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 = 64u * 1024u,
.flashStateCtx = 0x07008200u,
};
Hi,
Thanks for your reply.
Whether you can share the customer's application code that can boot up.
Further, can the demo code boot up if using the MCUBootUtility tool to program the demos of the SDK library to the custom board?
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.
-------------------------------------------------------------------------------
Hi @jeremyzhou
Thank you for your reply.
Demo code can boot up on my customer's board when I configed flash as below.
Just changed this parameter to '.serialClkFreq = kFlexSpiSerialClk_30MHz'.
One more quesstion:
When the BOOT ROM loads the code stored in the external flash into the SRAM, which address of the SRAM will be linked, and how does the linking process work.
Hi,
Thanks for your reply.
1) According to your feedback, the code is only able to run in the QSPI with a low clock frequency, in my opinion, the issue is related to the hardware circuit.
2) When the BOOT ROM loads the code stored in the external flash into the SRAM, which address of the SRAM will be linked, and how does the linking process work.
-- It depends on the developer, you can learn how to generate an image that is executed in the RAM by referring to the post.
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.
-------------------------------------------------------------------------------
Hi @Dave_SU ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
First, it needs to verify the QSPI connection is correct, so I'd like to recommend you to use the tool to contact the QSPI, meanwhile, this tool can enable the QE bit of the QSPI.
Second, you should update the flash_config in the flash_config.c to fit for the MX25U12832FZNI02.
Lastly, I needs to know what debugger and IDE you used prior to sharing some advice.
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.
-------------------------------------------------------------------------------
Hi jeremyzhou
Thank you for your reply.
what is this configuration tool?
Debugger: Jlink or LPC_Link
IDE: MCUXpresso IDE v11.5.1_7266
Would you mind sharing an example of flash_config.c with me