Configuring IMXRT1052 to boot from QSPI NOR Flash via eFuses

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

Configuring IMXRT1052 to boot from QSPI NOR Flash via eFuses

2,620 Views
kphani1989
Contributor I

Hi 

We have a custom board with IMXRT1052 processor. We need to configure the System to boot from QSPI NOR Flash by configuring the boot information and eFuses.

I prepared the configuration data and derived the values of eFuses from user manual. But dont know how to write this information into MicroController(SoC) 

Can someone give me the example code to blow eFuses or write configuration data to MC

Labels (1)
0 Kudos
Reply
6 Replies

2,604 Views
kphani1989
Contributor I

Hi @kerryzhou 

Thanks for your quick response. I have gone through the tool MCUBootUtility looks great.

But my customer is asking to do the same with JFlash and Jlink from segger. Is this a feasible request technically?

If so please guide me.

Awaiting for your comments

Regards

 

0 Kudos
Reply

2,597 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @kphani1989 ,

   I know, you want to use the debugger to modify the fuse, right?

  If yes, you need to run the ocotp code to modify it, and you must learn the otp module in the RT1050 reference manual.

SDK_2_11_1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\ocotp

This project will help you to modify the fuse.

  But, normally, I'd like to use the MCUBootUtility tool, as that GUI method is very easy to find the correct position.

Best Regards,

Kerry

0 Kudos
Reply

2,590 Views
kphani1989
Contributor I

Hi @kerryzhou 

Super, the example looks great for writing the eFuse value.

I understand from the user manual that we also need to provide 512Bytes of FlexSPI NOR Flash Configuration data along with eFuse values.

This configurations helps system to boot from NOR Flash, please correct me if I am wrong.

Kindly tell me how to write this(512Bytes) configuration 

Thank you

0 Kudos
Reply

2,582 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @kphani1989 ,

   Good.

   Fuse is used for the boot type selection, as you know, before you modify fuse, you need to use the external BOOT_CFG pin to configure the boot type, but if you write the related fuse, then you can boot from fuse directly with the fuse bit.

  About the 512B FCB, you must provide it.

  About the QSPI for RT1052, the code you can refer to the SDK for RT1060, as you know, the MIMXRT1052-EVKB is default using the hyperflash, but the RT1060 is using the QSPI flash, the code is in the xip folder:

\SDK_2_11_1_EVK-MIMXRT1060\boards\evkmimxrt1060\xip\evkmimxrt1060_flexspi_nor_config.c

 

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

2,340 Views
brufecon
Contributor II

Hi Mr. @kerryzhou !

Thanks for information.
In my aplication, i have a custom board and i have generated the base project from MCUXpresso Config Tools. XIP folder was not included by this way. What i have made wrong? What i need to do to include that from Config Tools project generation?
And the code that you showed will be inserted in flexspi_nor_config.c inside XIP folder?

Best regards,

brufecon.

0 Kudos
Reply

2,612 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @kphani1989 ,

  You don't know how to write the fuse bit to RT1052, right?

  If yes, you can use our MCUBootUtility tool to write the fuse in the serial download mode:

You can find the tool from this link:
https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v3.5.0
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

kerryzhou_0-1652241645757.png

 

Please note, fuse bit just can modify from 0 to 1, and can't modify back, so please operate it very carefully.

I highly recommend you do it after you finish the design.

Best Regards,

Kerry

 

0 Kudos
Reply