RT1170-EVK: Octal Flash not usable?

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

RT1170-EVK: Octal Flash not usable?

7,226 Views
michael_parthei
Contributor III

Dear all,

The application I'd like to evaluate the RT1176 for requires large amounts of flash (with execute-in-place capabilities) so I'd like to use the 512 Mbit OctalSPI Flash on the RT1170-EVK evaluation board to run my app from.

However, now that I've bought the board I found a note buried in the Board Hardware User's Guide (MIMXRT1170EVKHUG), section 2.6, that in order to use the HyperFlash (I guess that's the Octal Flash?) one has to (de)solder more than a dozen super-tiny 0201 resistors... which I'd deem impossible to do in such a densely populated area of the board without destroying it.

Can someone from NXP please comment how to resolve this situation? Is the Ocal Flash simply unusable? Why were the modifications mentioned in the User's Guide not already done at the factory? Is there any other work-around I could use in order to get the Octal Flash to work? Can I return my board to NXP and have them fix it? (well, "fix" meaning bringing it in the state as advertised).

Kind regards, Michael

Tags (1)
0 Kudos
19 Replies

7,206 Views
michael_parthei
Contributor III

Hi Kerry,

I was aware that the Flash chip is there and these modifications have to be done in order to use it. My point is that even with professional soldering equipment these modifications are next to IMPOSSIBLE to do without destroying the board (did you check the board?). I just talked to a local electronics engineering company and they confirmed that they are unable to perform these modifications without very high risk.

So the question remains: Why were the modifications mentioned not already done at the factory, or the board designed such that it works out of the box? Can I return my board to NXP and have them fix it?

Thanks, Michael

0 Kudos

7,202 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi michael_parthei,

   Thanks for your updated information.

  No, it's totally not very difficult, you just need to remove some resistor, and solder some resistor package.

  It's easy, it won't damage the board.

  As you know, our MIMXRT1060-EVK, MIMXRT1050-EVKB also design like that, and in the MIMXRT1050, MIMXRT1060 board, I have do it, it's totally works.

  Give you my solder example, but for MIMXRT1050-EVKB board, MIMXRT1170 is similar:

kerryzhou_0-1616482139365.png

So, don't be afraid, you didn't change the chip, you just need to change some resistor, it's Ok.

Please try it on your side.

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

Best Regards,

Kerry

 

 

0 Kudos

7,133 Views
AndyCapon
Contributor II

Hi Kerry,

How does one go about using the NAND flash, I don't seem to be able to find much info on this.

Thanks

Andy

0 Kudos

7,115 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi AndyCapon

   About the NandFlash, please help to create the new question post by yourself.

   Then we will help you to find it, and reply to you in your own question post.

 

Thanks,

Kerry

0 Kudos

7,184 Views
carstengroen
Senior Contributor II

@michael_parthei 

I have to say the same as @kerryzhou , modifying these resistors is a piece of cake. It can even be done with a small soldering iron and a magnifying glass if you don't have more sophisticated tools.

Removing the resistors is easy, add a little solder to both ends of each resistor and heat one of the ends. The resistor will pop right off. And as Kerry writes, on the pads that needs the "new" resistor, just place a small solderblob if you don't have spare 0201 resistors (as the ones you remove might get damaged in the process).

I used a Weller SMD tweezer (WXMT) to remove the resistors (on 106x EVKs), a small magnifier that I put "in my eye" and a small soldering iron (I did not even powerup my microscope for this). Very easy and no risk at all for the board.

If you asked a "electronic engineering house" to do this, I would think it was the wrong one you asked.

The need for the modification is because NXP includes that many different peripherals on the EVK boards, there is not enough peripherals (FlexSPI) available to connect each and every type of memory so they did the next best, include the devices/footprints which then can be enabled moving some resistors.

7,172 Views
kerryzhou
NXP TechSupport
NXP TechSupport

@carstengroen  Perfect explanation! Thanks for your reply!

 

Best Regards,

Kerry

 

0 Kudos

7,156 Views
michael_parthei
Contributor III

Hi Kerry, hi Carsten!

Thanks a lot for your detailed explanation and the encouraging words! I think I'll give it a go then!

Once I've modified the board and selected the OctalSPI Flash on the DIP-switch I should be able to take a binary that I previously used with the QuadSPI Flash, flash it on the board, and it should run unmodified as-is, correct?

Kind regards, and thanks again!

0 Kudos

7,140 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi michael_parthei,

   Glad to hear you'll try it by yourself! It's easy for soldering.

  About the modification, please note, code side, take SDK as an example, xip, you need to modify the code like this:

 

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,
            .deviceModeCfgEnable = 1,
            .deviceModeType = kDeviceConfigCmdType_Spi2Xpi,
            .waitTimeCfgCommands = 1,
            .deviceModeSeq =
                {
                    .seqNum = 1,
                    .seqId = 6, // See Lookup table for more details
                    .reserved = 0,
                },
            .deviceModeArg = 2, // Enable OPI DDR mode
            .controllerMiscOption =
                (1u << kFlexSpiMiscOffset_SafeConfigFreqEnable) | (1u << kFlexSpiMiscOffset_DdrModeEnable),
            .deviceType = kFlexSpiDeviceType_SerialNOR,
            .sflashPadType = kSerialFlash_8Pads,
            .serialClkFreq = kFlexSpiSerialClk_96MHz, // kFlexSpiSerialClk_133MHz,
            .sflashA1Size = 64ul * 1024u * 1024u,
            .dataValidTime =
                {
                        [0] = {.time_100ps = 16 },
                },
            .busyOffset = 0u,
            .busyBitPolarity = 0u,
            .lookupTable =
                {
                        // Read
                        [0] = FLEXSPI_LUT_SEQ(CMD_DDR, FLEXSPI_8PAD, 0xEE, CMD_DDR, FLEXSPI_8PAD, 0x11),
                        [1] = FLEXSPI_LUT_SEQ(RADDR_DDR, FLEXSPI_8PAD, 0x20, DUMMY_DDR, FLEXSPI_8PAD, 0x04),
                        [2] = FLEXSPI_LUT_SEQ(READ_DDR, FLEXSPI_8PAD, 0x04, STOP, FLEXSPI_1PAD, 0x00),

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

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

                        // Enable OPI DDR mode
                        [4 * 6 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x72, CMD_SDR, FLEXSPI_1PAD, 0x00),
                        [4 * 6 + 1] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, CMD_SDR, FLEXSPI_1PAD, 0x00),
                        [4 * 6 + 2] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, WRITE_SDR, FLEXSPI_1PAD, 0x01),
                },
        },
    .pageSize = 256u,
    .sectorSize = 4u * 1024u,
    .blockSize = 64u * 1024u,
    .flashStateCtx = 0x07008200u,
};

About the hardware, please check the schematic:

kerryzhou_0-1616573899169.png

Please note, after you modify it,  your on board QSPI flash can't work at the same time, it has been disconnected.

 

Wish it helps you!

Best Regards,

Kerry

 

7,129 Views
michael_parthei
Contributor III

Thanks again, Kerry, that's indeed very helpful! I just tried to compile this but got a few errors, do you have any idea how to fix these? I tried with the latest SDK 2.9.1 for the RT1170.

 

 error: 'flexspi_mem_config_t' {aka 'struct _FlexSPIConfig'} has no member named 'readSampleClksrc'; did you mean 'readSampleClkSrc'?
   30 |             .readSampleClksrc=kFlexSPIReadSampleClk_ExternalInputFromDqsPad,
      |              ^~~~~~~~~~~~~~~~
      |              readSampleClkSrc

 

Ok I think I can just fix this one

 

error: 'kFlexSpiSerialClk_96MHz' undeclared here (not in a function); did you mean 'kFlexSpiSerialClk_166MHz'?
   47 |             .serialClkFreq = kFlexSpiSerialClk_96MHz, // kFlexSpiSerialClk_133MHz,
      |                              ^~~~~~~~~~~~~~~~~~~~~~~
      |                              kFlexSpiSerialClk_166MHz

 

Looks like valid values are 30, 50, 60, 80, 100, 120, 133, 166, and 200MHz (from flexspi_serial_clk_freq_t). What is the recommended one?

 

error: field name not in record or union initializer
   51 |                         [0] = {.time_100ps = 16 },
      |                                ^

 

The field dataValidTime that is being initialized here is an uint16_t[2], not an array of structures.

 

error: 'flexspi_nor_config_t' {aka 'const struct _flexspi_nor_config'} has no member named 'flashStateCtx'
   77 |     .flashStateCtx = 0x07008200u,
      |      ^~~~~~~~~~~~~

 

This field does not exist at all, and I cannot find any similar sounding field in the flexspi_nor_config_t struct. Could you please advise?

Thanks again for your valuable time!

Michael

0 Kudos

7,116 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi michael_parthei,

  Try this one:

 

 

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,
            .deviceModeCfgEnable = 1,
            .deviceModeType = kDeviceConfigCmdType_Spi2Xpi,
            .waitTimeCfgCommands = 1,
            .deviceModeSeq =
                {
                    .seqNum = 1,
                    .seqId = 6, // See Lookup table for more details
                    .reserved = 0,
                },
            .deviceModeArg = 2, // Enable OPI DDR mode
            .controllerMiscOption =
                (1u << kFlexSpiMiscOffset_SafeConfigFreqEnable) | (1u << kFlexSpiMiscOffset_DdrModeEnable),
            .deviceType = kFlexSpiDeviceType_SerialNOR,
            .sflashPadType = kSerialFlash_8Pads,
            .serialClkFreq =  kFlexSpiSerialClk_133MHz,
            .sflashA1Size = 64ul * 1024u * 1024u,
            .dataValidTime =
                {
                        [0] = 16,
                },
            .busyOffset = 0u,
            .busyBitPolarity = 0u,
            .lookupTable =
                {
                        // Read
                        [0] = FLEXSPI_LUT_SEQ(CMD_DDR, FLEXSPI_8PAD, 0xEE, CMD_DDR, FLEXSPI_8PAD, 0x11),
                        [1] = FLEXSPI_LUT_SEQ(RADDR_DDR, FLEXSPI_8PAD, 0x20, DUMMY_DDR, FLEXSPI_8PAD, 0x04),
                        [2] = FLEXSPI_LUT_SEQ(READ_DDR, FLEXSPI_8PAD, 0x04, STOP, FLEXSPI_1PAD, 0x00),

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

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

                        // Enable OPI DDR mode
                        [4 * 6 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x72, CMD_SDR, FLEXSPI_1PAD, 0x00),
                        [4 * 6 + 1] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, CMD_SDR, FLEXSPI_1PAD, 0x00),
                        [4 * 6 + 2] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, WRITE_SDR, FLEXSPI_1PAD, 0x01),
                },
        },
    .pageSize = 256u,
    .sectorSize = 4u * 1024u,
    .blockSize = 64u * 1024u,
    //.flashStateCtx = 0x07008200u,
};

 

And this one, also can try:

const flexspi_nor_config_t flexspi_config = {
    .memConfig =
        {
            .tag                 = FLEXSPI_CFG_BLK_TAG,
            .version             = FLEXSPI_CFG_BLK_VERSION,
            .csHoldTime          = 3,
            .csSetupTime         = 3,
            .deviceModeCfgEnable = 1,
            .deviceModeType      = kDeviceConfigCmdType_Generic,
            .waitTimeCfgCommands = 1,
            .deviceModeSeq =
                {
                    .seqNum   = 1,
                    .seqId    = 6, /* See Lookup table for more details */
                    .reserved = 0,
                },
            .deviceModeArg   = 0,
            .configCmdEnable = 1,
            .configModeType  = {kDeviceConfigCmdType_Generic, kDeviceConfigCmdType_Spi2Xpi,
                               kDeviceConfigCmdType_Generic},
            .configCmdSeqs   = {{
                                  .seqNum   = 1,
                                  .seqId    = 7,
                                  .reserved = 0,
                              },
                              {
                                  .seqNum   = 1,
                                  .seqId    = 10,
                                  .reserved = 0,
                              }},
            .configCmdArgs   = {0x2, 0x1},
            .controllerMiscOption =
                (1u << kFlexSpiMiscOffset_SafeConfigFreqEnable) | (1u << kFlexSpiMiscOffset_DdrModeEnable),
            .deviceType    = 0x1,
            .sflashPadType = kSerialFlash_8Pads,
            .serialClkFreq = kFlexSpiSerialClk_133MHz,
			.sflashA1Size = 64ul * 1024u * 1024u,
            .lookupTable =
                {
                    /* Read */
                    [0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_8PAD, 0xEC, CMD_SDR, FLEXSPI_8PAD, 0x13),
                    [1] = FLEXSPI_LUT_SEQ(RADDR_SDR, FLEXSPI_8PAD, 0x20, DUMMY_SDR, FLEXSPI_8PAD, 0x14),
                    [2] = FLEXSPI_LUT_SEQ(READ_SDR, FLEXSPI_8PAD, 0x04, STOP, FLEXSPI_1PAD, 0x00),

                    /* Read Status */
                    [4 * 1 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_8PAD, 0x05, CMD_SDR, FLEXSPI_8PAD, 0xFA),
                    [4 * 1 + 1] = FLEXSPI_LUT_SEQ(RADDR_SDR, FLEXSPI_8PAD, 0x20, DUMMY_SDR, FLEXSPI_8PAD, 0x14),
                    [4 * 1 + 2] = FLEXSPI_LUT_SEQ(READ_SDR, FLEXSPI_8PAD, 0x04, STOP, FLEXSPI_1PAD, 0x00),

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

                    /* Configure dummy cycles */
                    [4 * 6 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x72, CMD_SDR, FLEXSPI_1PAD, 0x00),
                    [4 * 6 + 1] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, CMD_SDR, FLEXSPI_1PAD, 0x03),
                    [4 * 6 + 2] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, WRITE_SDR, FLEXSPI_1PAD, 0x01),

                    /* Configure Register */
                    [4 * 7 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x72, CMD_SDR, FLEXSPI_1PAD, 0x00),
                    [4 * 7 + 1] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, CMD_SDR, FLEXSPI_1PAD, 0x02),
                    [4 * 7 + 2] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, WRITE_SDR, FLEXSPI_1PAD, 0x01),

                    /* Enable OPI STR mode */
                    [4 * 10 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x72, CMD_SDR, FLEXSPI_1PAD, 0x00),
                    [4 * 10 + 1] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, CMD_SDR, FLEXSPI_1PAD, 0x00),
                    [4 * 10 + 2] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x00, WRITE_SDR, FLEXSPI_1PAD, 0x01),
                },
        },
    .pageSize           = 0x100,
    .sectorSize         = 0x1000,
    .ipcmdSerialClkFreq = 1,
    .blockSize          = 0x10000,
};

7,100 Views
michael_parthei
Contributor III

Hi Kerry! Those two versions do at least compile! I'll try them out once I've modified my board and report back here.

Thanks again, have a nice day!

Michael

0 Kudos

7,096 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi michael_parthei,

  Yes, the complie works, as I have tested it.

  You can try it on your side, any updated information(no matter works or not), kindly let me know. 

 

Best Regards,

Kerry

0 Kudos

6,865 Views
michael_parthei
Contributor III

I now finally got around to modifying the board (thanks again for the encouragement @kerryzhou and @carstengroen !) and triple-checked that everything is fine hardware-wise. However, flashing a simple blinky app fails and the board does not work anymore.

The only changes I made in addition to the hardware modifications are that I turned switch SW1-3 and SW2-3 ON according to the EVK board user guide Table 3 and modified evkmimxrt1170_flexspi_nor_config.c in the SDK as suggested above. (I also tried various other combinations with SW1-1 and SW2-1 turned on, no difference in behavior)

I tried flashing via JTAG (using a Segger J-Link). This worked fine before with the QuadSPI flash. Now I do get some errors in the output and even after power-cycling the MCU the new blinky app seems to not run:

 

[...]
ERROR: Failed to prepare RAMCode using RAM
Error while determining flash info (Bank @ 0x30000000)
[...]
ERROR: Could not start CPU core. (ErrorCode: -1)
[...]

 

(see attached file for full log output)

I also tried flashing with the onboard DAPLink programmer using J11 USB port but after dropping the bin file on the virtual usb drive a Fail.txt appears: "error: The interface firmware FAILED to initialize the target MCU type: target". Again, after resetting the MCU the app is not run.

Am I missing something? Any tipps on how to proceed here? Has this actually ever been tested by anybody?

Kind regards,

Michael 

0 Kudos

7,213 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi michael_parthei,

  Of course, you can use the octal Flash in the MIMXRT1170-EVK board, please check the schematic:

kerryzhou_0-1616473790685.png

Note:

OPTION2: USE Octal Flash( Mount R381/R378/R382/R389/R402/R377/R388/R391, DNP R380/R399/R386/R390/R392/R385)

Your mentioned document MIMXRT1170EVKHUG chapter 2.6 Hyper Flash also have it.

2.6 Hyper Flash
On the IMXRT1170 EVK board, there is one 512 Mbit Hyper Flash device. If the developer wants to boot from the Hyper Flash,
the boot device switch settings should be set correctly as shown in Table 3.
By default, the Hyper Flash is not used. To enable the onboard OCT Flash, the settings must be changed.
1. Remove resistors: R380/R399/R386/R390/R392/R385.
2. Weld 0 Ω resistors: R381/R378/R382/R389/R402/R377/R388/R391.

 

Please try to modify the board, in fact, even you remove the related resistor and can't find it, you just need to short the package is OK.

Wish it helps you!

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

Best Regards,

Kerry

 

0 Kudos

6,797 Views
samrg123
Contributor I

It's not listed in "Option 2", but should we also mount R1887 (POR_B)?

I've noticed that after enabling octal spi mode for the octal flash it doesn't reset to default SPI mode unless the board is switched off and and back on again. This causes a problem when using Jlink for debugging because it relies on default spi commands instead of octal spi commands to flash.

I think that connecting R1887 will fix this problem because the octal flash will reset to a compatible mode when the Jlink debugger signals for a reset before attempting to flash.   

0 Kudos

6,772 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @samrg123 

   I think you can solder R1887, but it is not the must item. As Flash_RST also can reset the octal flash, R378 is in the list. That's why the schematic didn't list R1887.

   If you use the octal flash and the JLINK, I think you JLINK script also need to select the related driver instead of the default QSPI flash.

 

Wish it helps you!

Kerry

   

0 Kudos

6,765 Views
michael_parthei
Contributor III

Hi @kerryzhou ! Thanks for the tip!

Indeed, it looks like one has to modify the device configuration for JLink in order to use the octal flash. I found some info about how to do this for an RT1052 based board but am unable to do the same for the RT1170. It seems like JLink does not yet support the octal flash on the RT1170 eval board out of the box (https://wiki.segger.com/i.MXRT117x ).

I hope NXP has at least once tested the octal flash on the board - @kerryzhou can you share how you programmed the octal flash and help us do the same? I'd prefer to continue using the JLink but if that's not possible I can also use a different debug probe. As I already noted above, the USB flasher integrated on the eval board also does not work with the octal flash.

Is there any work under way to officially support the octal flash in JLink, similarly to what is possible with the other iMX RT eval boards?

0 Kudos

6,751 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @michael_parthei 

Could you please create a new question post about it?

 Now, after your modification, still can't work even with the on board CMSIS-DAP? Or just JLINK can't works?

 You can create a new question post and let me know, then I will find time to test it, as I know, it mainly related to the XIP header and the IDE flashloader, and different debugger use the different flashloader, so you need to give me your debugger, IDE information.

Best Regards,

kerry

0 Kudos

6,739 Views
michael_parthei
Contributor III

Thank you @kerryzhou , your help and expertise is really appreciated! I created a new forum post !

0 Kudos