I.MX RT 1052, Low power and firmware running from QSPI Flash.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.MX RT 1052, Low power and firmware running from QSPI Flash.

Jump to solution
967 Views
YodaC
Contributor III

 

Hi,

Is there an example or annotation explanning how to run from QSPI flash and entering in LowPowerIdle ?

Best regards,

Christian.

0 Kudos
1 Solution
944 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @YodaC ,

   Please use my attached code to replace your old specific.c, this is used for the QSPI flash, and the sdk original code is used for the hypeflash, a little difference.

   Please check it on your side.

  If you still have questions about it, please kindly let me know.

Best Regards,

kerry

View solution in original post

0 Kudos
6 Replies
960 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @YodaC ,

   The RT1050 SDK already contains the low power code which can run in the QSPI flash, please check it this SDK path:

SDK_2_11_1_EVKB-IMXRT1050\boards\evkbimxrt1050\demo_apps\power_mode_switch

SDK download link:

https://mcuxpresso.nxp.com/en/builder?hw=EVKB-IMXRT1050

As the MIMXRT1050-EVKB board default is the hyperflash, when you want to use the QSPI flash, just change the FCB in the XIP folder:

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,
            .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          = 64u * 1024u,
    .isUniformBlockSize = false,
};

 

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
957 Views
YodaC
Contributor III

Thank you for your answer.

I tried this SDK example but it crash when exiting from SwitchSystemClocks because it can't read anymore the qspi flash.

 

0 Kudos
953 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @YodaC ,

   Which board you are testing? NXP official board or your customer board?

  When you test the code, which detail points you modified with the SDK low power demo?

  BTW, if you don't test the low power, just the simple project, led_blinky, whether that works or not?

 

Best Regards,

kerry

0 Kudos
950 Views
YodaC
Contributor III

Hi Kerry,

The board is IMXRT1050-EVKB.
The SDK version is 2.10.0
MCUXpresso version is 11.6.0_8187

I only modify the evkbimxrt1050_flexspi_nor_config.c with your code.
In this code I replace .readSampleClksrc by .readSampleClkSrc to compile.

I Programme and debug the Flash with PEMICRO Multilink Universal revC and alternative algorithm issi_is25wp064_1x32x2meg_imxrt1052.arp

evkbimxrt1050_iled_blinky work fine after doing modifying.

Best regards,

Christian

0 Kudos
945 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @YodaC ,

   Please use my attached code to replace your old specific.c, this is used for the QSPI flash, and the sdk original code is used for the hypeflash, a little difference.

   Please check it on your side.

  If you still have questions about it, please kindly let me know.

Best Regards,

kerry

0 Kudos
941 Views
YodaC
Contributor III

Thank you Kerry,


It's working fine.
I just have to add the functions SetLowPowerClockGate and PowerDownUSBPHY to compile.

Best Regards,


Christian