RT1051 Difficulties booting via QSPI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT1051 Difficulties booting via QSPI

4,248 次查看
TomMarki-1
Contributor I
Dear Sir or Ms Application Engineer,
 
I am having great difficulty utilizing a i.MX RT1051 QSPI External NOR flash,
 S25FL064LABNFV043. Any assistance you can provide would be greatly
 appreciated.
 
Pls read on Below,
TY & Best,
 
Tom
 
 
I've been using AN12108 and the RefManual.
 
When I try to debug a Segger progress pop-up with 4 bars pops up but only the
top "Compare" bar completes (Doesn't get to the 'Erase' bar) before the new
flash aborts and the previously flashed firmware reboots.  The J-LinkServer
log in MCUXpresso says unable to halt cpu.
 
my build includes the following QSPI build macros
    -DMIMXRT1052_EVKB_QSPI=1
    -DXIP_EXTERNAL_FLASH=1
    -DXIP_BOOT_HEADER_ENABLE=1
    -DXIP_BOOT_HEADER_DCD_ENABLE
 
 
From schematic
    BOOT_MODE_[1:0] == b10  internal boot
    BOOT_CFG_[0:11] == 0    Serial NOR boot via flexspi, 3B read by def,
                            500us hold time, inf loop disabled
 
 
Here is a copy of my NOR config struct:
const flexspi_nor_config_t qspiflash_config = {
    .memConfig =
        {
            .tag = FLEXSPI_CFG_BLK_TAG,
            .version = FLEXSPI_CFG_BLK_VERSION,
            .readSampleClksrc=kFlexSPIReadSampleClk_LoopbackInternally,
            .csHoldTime = 5u,
            .csSetupTime = 3u,
.columnAddressWidth = 0,
.deviceModeCfgEnable = 0,
.waitTimeCfgCommands = 0,
  // Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
.controllerMiscOption = 0u,
.deviceType = kFlexSpiDeviceType_SerialNOR,// Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
            .sflashPadType = kSerialFlash_4Pads,
// AN12108: if no DQS for .readSampleClkSrc then clk <= 60MHz
            .serialClkFreq = kFlexSpiSerialClk_50MHz,
.lutCustomSeqEnable = 0,
            .sflashA1Size = 8u * 1024u * 1024u,
.lutCustomSeqEnable = 0,
// omitted B1,3 sizes
.dataValidTime = {16u, 16u},
        .busyOffset = 0,
        .busyBitPolarity = 0,
        .deviceModeType = kDeviceConfigCmdType_QuadEnable,
            .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, 0x02), 
FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
FLEXSPI_LUT_SEQ(STOP, 0, 0, STOP, 0, 0),
                },
        },
    .pageSize = 256u,
    .sectorSize = 4u * 1024u,
    .blockSize = 32u * 1024u,
    .isUniformBlockSize = 0,
.ipcmdSerialClkFreq = 0,
.serialNorType = 0,
};

 

标签 (1)
0 项奖励
回复
12 回复数

3,931 次查看
TomMarki-1
Contributor I

Hi Kerry,

I'm working on porting my NXP flexspi init struct to the structs utilized by the flexspi_polling_transfer demo example.

current flexpi_polling_transfer serial output:
FLEXSPI example started!
Vendor ID: 0x1
Erasing whole chip over FlexSPI...
Erase finished !
Erasing Serial NOR over FlexSPI...
Erase data - read out data value incorrect !

Best,

Tom

 

0 项奖励
回复

3,911 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @TomMarki-1 ,  

   From your log, erase finished, you mentioned data is not correct, what's the data now, not the 0XFF?

  Do you work this issue for your company, it's better to use the company email to create the questions post instead of the 3rd part gmail. Then the case will have higher support priority, thanks.

   You also can try to use your QSPI flash to the NXP EVK board, whether use the EVK board can reproduce the issues or not.

Best Regards,

Kerry

0 项奖励
回复

4,158 次查看
TomMarki-1
Contributor I

As mentioned above, when running \flexspi\nor\polling_transfer in ram, the erase operation does at least partially erase the flash, but the subsequent erase verify operation does fail.  NXP Tech Support enabled the creation of an account utilizing my company email, thartai@markem-imaje.com. A Support case was created which contains the entirety of the project in question. TY Kerry.

0 项奖励
回复

4,112 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @TomMarki-1 ,

  If you already use your company email create the new question post, please let me know that question linker. I will help you in that linker.

   About your question in this post, just simply reply you again.

   So, even the RAM code running in the RT1051, still have issues, then it means your hardware may have issues, must make sure the erase, program, read  are all works, then you can try download to the flash.

 

Best Regards,

Kerry

0 项奖励
回复

4,092 次查看
TomMarki-1
Contributor I

how can one provide QSPI flash configuration information in the
example application \flexspi\nor\polling_transfer

I am not using the EVK. My board has an application flashed on its QSPI flash that it boots from.  I just can not make another image that can be flashed or that will boot properly if I force it in with another tool.  Trying to say that the hardware seems fine.

0 项奖励
回复

4,066 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @TomMarki-1 ,

    Check your board, if it can enter the serial download mode, use the MCUBootutility, whether it can be connected and download app or not:

kerryzhou_0-1686622554944.png

https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v5.1.0
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

About your question:

how can one provide QSPI flash configuration information in the
example application \flexspi\nor\polling_transfer

=>Answer: normally, check the LUT commander, whether it is the same as your QSPI flash, eg, read command, erase commander, which is defined in this code:

const uint32_t customLUT[CUSTOM_LUT_LENGTH]

 

Best Regards,

kerry

 

0 项奖励
回复

3,994 次查看
TomMarki-1
Contributor I

Hi Kerry,

TY again for your expertise, I apologize for the hurdles our system poses with respect to Serial Download Mode.

Re the flexspi_nor_polling_transfer app, and its flash init struct customLUT[], can this be initialized with the evkbimxrt1050_flexspi_nor_config.c flexspi_nor_config_t qspiflash_config.memConfig.lookupTable from my project ?

Best Regards,

Tom

0 项奖励
回复

3,965 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @TomMarki-1 ,

  Yes, to your app, you just need to configure:

evkbimxrt1050_flexspi_nor_config.c

The LUT use your own QSPI flash is OK, normally, the QSPI flash is similar, you need to use the correct fast read commander, write status, write, erase, etc. 

   Just refer to the SDK code is OK.

 

Wish it helps you!

Best Regards,

Kerry

0 项奖励
回复

3,996 次查看
TomMarki-1
Contributor I

When I set my board's boot_config[] pins for Serial Download mode my board doesn't connect via USB (appear in DeviceMgr), and the Secure Provisioning Tool can't establish communications with it via USB or UART.

 

0 项奖励
回复

4,203 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @TomMarki-1 ,

   When you use the new QSPI flash, please use this sdk code to test the external flash at first:

\SDK_2_13_0_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\flexspi\nor\polling_transfer

  Make sure the read, write, erase related function works Ok, it will make sure your hardware works.

  Then you can download the code to the app.

  When you test the polling_transfer, please download it to the RAM to test, as you can't make sure your external flash works.

  Take the mcuxpresso IDE as an example:

kerryzhou_0-1686022035281.png

  If you still have issues, please use your company email to create the question post in stead of the 3rd part email, it will have higher support priority, thanks.

 

Best Regards,

kerry

 

0 项奖励
回复

4,173 次查看
TomMarki-1
Contributor I
Good idea, TY,
In flexspi_nor_polling_transfer how can I specify my own 'flexspi_nor_config_t' ?

When I run it I see a failure at line 219:
"Program data - read out data value incorrect !\r\n "
I am trying to update my email address as well.
0 项奖励
回复

4,203 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @TomMarki-1 ,

   When you use the new QSPI flash, please use this sdk code to test the external flash at first:

\SDK_2_13_0_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\flexspi\nor\polling_transfer

  Make sure the read, write, erase related function works Ok, it will make sure your hardware works.

  Then you can download the code to the app.

  When you test the polling_transfer, please download it to the RAM to test, as you can't make sure your external flash works.

  Take the mcuxpresso IDE as an example:

kerryzhou_0-1686022035281.png

  If you still have issues, please use your company email to create the question post in stead of the 3rd part email, it will have higher support priority, thanks.

 

Best Regards,

kerry

 

0 项奖励
回复