External Flash for Custom Board based on iMX RT 1021

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

External Flash for Custom Board based on iMX RT 1021

13,848 Views
Dipak01
Contributor II

Hi, We are designing a custom board using iMX RT 1021 MCU. As this MCU does not have internal flash, we are using external flash of Microchip (SST26VF032BA-104I/MF) over same SPI interface which is used by MiMX RT1020 EVK for external flash interface.

Is there something we need to consider for programming or booting from this particular external flash?

Do we need LinkServer Flash driver specific to Microchip Flash?

What modification we might need to do regarding flash? How can we program external flash?

are there any utilities available that we can use?

We do have provisioned for JTAG interface and LPUART1.

Regards,

Dipak Sharma

Labels (1)
0 Kudos
Reply
39 Replies

5,604 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply and I think the qspiflash_config's configuration so right.
It seems a bit weird and whether you can send me some samples of the SST26VF032BA if it's okay, then I can give a test on my board.
If yes, I can give you my address information later.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply

5,478 Views
Dipak01
Contributor II

Hey,

Any update on the last mentioned information?

Regards,
Dipak Sharma

0 Kudos
Reply

4,659 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Sorry for the reply late.
Yesterday, I received two samples of SST26VF032BA and I run the flash_component_nor from the SDK library to contact it, however, it fails to erase the chip.
Now I'm still working on it, and you can also run the demo for testing and check whether can replicate my phenomenon.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

4,621 Views
Dipak01
Contributor II

Hi,

Thanks for the reply.

I tried flash_component_nor example from the SDK library. I like to mention that I have enabled "Link Application to RAM" option.

In my case, I am getting following output.

 

"***NOR Flash Component Demo Start!***
 
***Address - 0x14000 !***

***NOR Flash Page 0 Read/Write Failed!***
 
Error Occured. Please check the configurations."
 
So, according to the code execution, APIs is retuning success but read buffer and write buffer are mismatching.
 
Regards,
Dipak Sharma
0 Kudos
Reply

4,616 Views
jeremyzhou
NXP Employee
NXP Employee

Thanks for your reply.
I've contacted the AE team, they haven't tested the SST26 series with the RT MCU before, as the SST26 series is not a mainstream product.
And they'd like to suggest you contact the SST26VF032BA-104I/MF via the below way.
1) Open NXP-MCUBootUtility.exe
2) Follow up the below figure.

2021-04-22_17-42-45.png
3) After that, please share the log.

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

4,610 Views
Dipak01
Contributor II

Hi,

Thanks for the update.

I am not able to locate "cfg_fdcb.bin". Just wanted to know from where I can get "cfg_fdcb.bin" file?

Regards,
Dipak Sharma

0 Kudos
Reply

4,596 Views
jeremyzhou
NXP Employee
NXP Employee

Hi
Thanks for your reply.
Please select the cfg_fdcb_RTxxx_1bit_sdr_flashA.bin which resides in ~\NXP-MCUBootUtility-xxx\src\targets\fdcb_model.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

4,588 Views
Dipak01
Contributor II

Hello Team,

Attached is the logs from the MCUBoot Utility with "cfg_fdcb_RTxxx_1bit_sdr_flashA.bin" selected for complete FDCB configuration.

Attachment contains:

1. log_file.txt - Logs from Utility

2. MCUBootUtility_error_screenshot - contains screenshot of error message

Do let me know if any other information require to debug and resolve this further.

Regards,

Dipak

0 Kudos
Reply

4,580 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thanks for your reply.
I'd like to suggest you share the log that is illustrated in the CMD command window (like below) instead of the log_file.txt.

jeremyzhou_1-1619171138684.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

4,522 Views
Dipak01
Contributor II

Hello Team,

Any update on the issue based on the provided logs?

Regards,

Dhaval

0 Kudos
Reply

4,577 Views
Dipak01
Contributor II

Hello,

 

Please find attached logs as suggested.

Regards,

Dipak

0 Kudos
Reply

4,543 Views
Dipak01
Contributor II

Hello Team,

Any update on the this case?

Regards,

Dipak

0 Kudos
Reply

4,504 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Sorry for the reply late.
We were wondering if you can capture the signals of the SPI interface during the process of MCUBootUtility contact with the QSPI.
In further, you can contact the Microchip, they may provide an insight into the issue.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

 

0 Kudos
Reply

4,603 Views
jeremyzhou
NXP Employee
NXP Employee

Hi
Thanks for your reply.
After installing the MCUBootUtility, you can find the cfg_fdcb.bin in the ~\NXP-MCUBootUtility_xxx\gen\fdcb_file directory.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

4,598 Views
Dipak01
Contributor II

Hi,

Thanks for the reply.

I looked into directory you mentioned and there is only _temp.txt file in that directory. I can't locate bin file.

0 Kudos
Reply

4,750 Views
Dipak01
Contributor II

Hi,

Thanks for the reply.

I am sorry but I can not send SST26VF032BA module at your location. Currently, I am studying each parameter of flexspi_nor_config_t struct and looking whether we are missing something or not.

Can you suggest parameter that might affecting our case?

Regards,
Dipak Sharma

0 Kudos
Reply

4,637 Views
Dipak01
Contributor II

Hello,

As earlier mentioned, we are running SST26VF032B-BA external QSPI NOR on MiMX RT1020 EVK.

SST26VF032B-BA  Datasheet : (http://ww1.microchip.com/downloads/en/devicedoc/20005218e.pdf)

I am running iblinky led example and have made following changes in qspi nor configuration structure.

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_1Pad, //Updated to 1Pad

      .serialClkFreq = kFlexSpiSerialClk_100MHz,

      .sflashA1Size = 4u * 1024u * 1024u,

      .deviceType = kFlexSpiDeviceType_SerialNOR,

      .lutCustomSeqEnable = 0,

      .lookupTable =

      {

// Read LUTs

      FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x0B, RADDR_SDR,       FLEXSPI_1PAD, 0x18),//Updated to 1Pad

      FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_1PAD, 0x08, READ_SDR,       FLEXSPI_1PAD, 0x04),//Updated to 1Pad

   },

},

   .pageSize = 256u,

   .sectorSize = 4u * 1024u,

   .blockSize = 64u * 1024u,

   .isUniformBlockSize = false,

};

With above changes highlighted, I have tried to program the flash using Segger J-Link Probes(Only available JTAG for now). I got success and program is running. See attached screenshot 1. Also, I can see the led blinking.

But, when I power cycle/reboot the device, board is not booting up. led is not blinking.

Now I am confused, why board is not booting after power cycle?

Questions:

Why is the board not booting after power cycle?
With Link server(SWD), the flashing is not working and the logs for failure is provided in previous post.
With MCUBoot utility device is detected but the flashing over UART gives the error as per attached screenshot. (Screenshot 2 - MCUBootUtility)

Goal:
Our goal is to use i.MXRT1021 in our custom board with external QSPI flash (SST26VF032B-BA).
We will use MCUBoot Utility over UART for factor programming in production. JTAG or SWD is for development and debug purpose. ​


Regards,
Dipak Sharma

0 Kudos
Reply

4,637 Views
Dipak01
Contributor II

Hello,

As earlier mentioned, we are running SST26VF032B-BA external QSPI NOR on MiMX RT1020 EVK.

SST26VF032B-BA  Datasheet : (http://ww1.microchip.com/downloads/en/devicedoc/20005218e.pdf)

I am running iblinky led example and have made following changes in qspi nor configuration structure.

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_1Pad, //Updated to 1Pad

      .serialClkFreq = kFlexSpiSerialClk_100MHz,

      .sflashA1Size = 4u * 1024u * 1024u,

      .deviceType = kFlexSpiDeviceType_SerialNOR,

      .lutCustomSeqEnable = 0,

      .lookupTable =

      {

// Read LUTs

      FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x0B, RADDR_SDR,       FLEXSPI_1PAD, 0x18),//Updated to 1Pad

      FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_1PAD, 0x08, READ_SDR,       FLEXSPI_1PAD, 0x04),//Updated to 1Pad

   },

},

   .pageSize = 256u,

   .sectorSize = 4u * 1024u,

   .blockSize = 64u * 1024u,

   .isUniformBlockSize = false,

};

With above changes highlighted, I have tried to program the flash using Segger J-Link Probes(Only available JTAG for now). I got success and program is running. See attached screenshot 1. Also, I can see the led blinking.

But, when I power cycle/reboot the device, board is not booting up. led is not blinking.

Now I am confused, why board is not booting after power cycle?

Questions:

  1. Why is the board not booting after power cycle?
  2. With Link server(SWD), the flashing is not working and the logs for failure is provided in previous post.
  3. With MCUBoot utility device is detected but the flashing over UART gives the error as per attached screenshot. (Screenshot 2 - MCUBootUtility)

Goal:

  1. Our goal is to use i.MXRT1021 in our custom board with external QSPI flash (SST26VF032B-BA).
  2. We will use MCUBoot Utility over UART for factor programming in production. JTAG or SWD is for development and debug purpose. 

Regards,
Dipak Sharma

0 Kudos
Reply

4,635 Views
Dipak01
Contributor II

Hello,

As earlier mentioned, we are running SST26VF032B-BA external QSPI NOR on MiMX RT1020 EVK.

SST26VF032B-BA  Datasheet : (http://ww1.microchip.com/downloads/en/devicedoc/20005218e.pdf)

I am running iblinky led example and have made following changes in qspi nor configuration structure.

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_1Pad, //Updated to 1Pad

      .serialClkFreq = kFlexSpiSerialClk_100MHz,

      .sflashA1Size = 4u * 1024u * 1024u,

      .deviceType = kFlexSpiDeviceType_SerialNOR,

      .lutCustomSeqEnable = 0,

      .lookupTable =

      {

// Read LUTs

      FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x0B, RADDR_SDR,       FLEXSPI_1PAD, 0x18),//Updated to 1Pad

      FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_1PAD, 0x08, READ_SDR,       FLEXSPI_1PAD, 0x04),//Updated to 1Pad

   },

},

   .pageSize = 256u,

   .sectorSize = 4u * 1024u,

   .blockSize = 64u * 1024u,

   .isUniformBlockSize = false,

};

With above changes highlighted, I have tried to program the flash using Segger J-Link Probes(Only available JTAG for now). I got success and program is running. See attached screenshot 1. Also, I can see the led blinking.

But, when I power cycle/reboot the device, board is not booting up. led is not blinking.

Now I am confused, why board is not booting after power cycle?

Questions:

  1. Why is the board not booting after power cycle?
  2. With Link server(SWD), the flashing is not working and the logs for failure is provided in previous post.
  3. With MCUBoot utility device is detected but the flashing over UART gives the error as per attached screenshot. (Screenshot 2 - MCUBootUtility)

Goal:

  1. Our goal is to use i.MXRT1021 in our custom board with external QSPI flash (SST26VF032B-BA).
  2. We will use MCUBoot Utility over UART for factor programming in production. JTAG or SWD is for development and debug purpose. 

Regards,
Dipak Sharma

0 Kudos
Reply