i.MX RT1050 EVK - HyperFlash to QSPI Modification - Photos & Boot Header

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

i.MX RT1050 EVK - HyperFlash to QSPI Modification - Photos & Boot Header

3,200 Views
Eli_H
NXP Pro Support
NXP Pro Support

This post is for reference purposes.      

To use the QSPI Flash on the i.MX RT1050 EVK, you must swap zero ohm resistors on the bottom side of the PCB.   The schematic indicates which resistors need changed, however this modification can be difficult because:

1.)   The silkscreen on the PCB is difficult to read.

2.) The RT1050 EVK manual schematic does not mention that the zero ohm resistors for HyperFlash/QPI share a common pads.   Combined with #1,  it makes it difficult to figure out the proper physical configuration.

Here is a photo of the modifications for correct QSPI operation.    

Eli_H_0-1677360415716.png

 

Eli_H_0-1677360766086.png

 

 

Also,  the bootheader will need to be modified to be able to XIP from QSPI.   Using the bootheader from the RT1020 EVK examples will work.    The code below can be used as a replacement for evkbimxrt1050_flexspi_nor_config.c

 

 

 

/*
 * Copyright 2017-2020 NXP
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include "evkbimxrt1050_flexspi_nor_config.h"

/* Component ID definition, used by tools. */
#ifndef FSL_COMPONENT_ID
#define FSL_COMPONENT_ID "platform.drivers.xip_board"
#endif

/*******************************************************************************
 * Code
 ******************************************************************************/
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1)
#if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__)
__attribute__((section(".boot_hdr.conf"), used))
#elif defined(__ICCARM__)
#pragma location = ".boot_hdr.conf"
#endif
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,
            .controllerMiscOption = (1u << kFlexSpiMiscOffset_SafeConfigFreqEnable),
            .deviceType           = kFlexSpiDeviceType_SerialNOR,
            .sflashPadType        = kSerialFlash_4Pads,
            .serialClkFreq        = kFlexSpiSerialClk_133MHz,
            .sflashA1Size         = 8u * 1024u * 1024u,
            .lookupTable =
                {
                    // Read LUTs
                    [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),

                    // Read Status LUTs
                    [4 * 1 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05, READ_SDR, FLEXSPI_1PAD, 0x04),

                    // Write Enable LUTs
                    [4 * 3 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06, STOP, FLEXSPI_1PAD, 0x0),

                    // Erase Sector LUTs
                    [4 * 5 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x20, RADDR_SDR, FLEXSPI_1PAD, 0x18),

                    // Erase Block LUTs
                    [4 * 8 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xD8, RADDR_SDR, FLEXSPI_1PAD, 0x18),

                    // Pape Program LUTs
                    [4 * 9 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x02, RADDR_SDR, FLEXSPI_1PAD, 0x18),
                    [4 * 9 + 1] = FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0),

                    // Erase Chip LUTs
                    [4 * 11 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60, STOP, FLEXSPI_1PAD, 0x0),
                },
        },
    .pageSize           = 256u,
    .sectorSize         = 4u * 1024u,
    .ipcmdSerialClkFreq = 1u,
    .blockSize          = 64u * 1024u,
    .isUniformBlockSize = false,
};
#endif /* XIP_BOOT_HEADER_ENABLE */

 

 

 

 

Labels (1)
3 Replies

1,760 Views
Sherlock987
Contributor I

I have done the hardware modification and changed the evkbimxrt1050_flexspi_nor_config.c. But when running code it seems it could not load from the flash. Are there more files to change?

0 Kudos
Reply

1,748 Views
Eli_H
NXP Pro Support
NXP Pro Support

@Sherlock987 

 

PLease double check the boot mode switces ont he RT1050 EVK

 

 

boot_switches.png

 

0 Kudos
Reply

1,733 Views
Sherlock987
Contributor I
yes, thanks for your reply. I have done the switch configuration with the same result. Should it work with simply replacing replacing with this source code? Are there some more configurations required like in MCUXpresso?
0 Kudos
Reply