i.MX RT1064 built-in flash QE Setting

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

i.MX RT1064 built-in flash QE Setting

1,927 Views
george
Senior Contributor II

Hello all,

I want to know the on-chip flash QE bit factory setting.

w25q32jv datasheet:

george_1-1661869445931.png

Do we need to set the QE bit before using XIP in Quad SPI mode? Or is it already set?

BR,
George

Labels (1)
0 Kudos
6 Replies

1,913 Views
george
Senior Contributor II

Hello @kerryzhou 

Can you answer my question above?

BR,
George

0 Kudos

1,906 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @george ,

   RT1064, this chip is packaged with a flash memory Winbond W25Q32JV.

   This chip QE bit need to be enabled by the code, as it is default set to 0 out of factory.

     From your picture, you also can know, just "IQ","JQ" QE is default as 1.

    You don't need worry, when you download the code, you can check the flashdriver code, and enable the QE in the flashdriver, then during downloading, the flashdriver will help you to enable the QE bit.

    More details, my colleague @diego_charles  take your case, he will help you!

 

Best Regards,

kerry

0 Kudos

1,895 Views
george
Senior Contributor II

Hello @kerryzhou@diego_charles 

Thank you for your reply.

Is the flashdriver you say the flashdriver that the IDE has?

I looked for one that would be included in MCUXpresso, but couldn't find a FlashDriver for the RT1064.

george_0-1662013738494.png

george_2-1662014066079.png

Or should evkmimxrt1064_flexspi_nor_config.c be modified?

george_5-1662014360311.png

Please provide information for us to know how to fix.

BR,
George

0 Kudos

1,839 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @george 

Yes, Kerry was referring to the flashdriver that the IDE has.

As you mention, the path MCUXpressoIDE_xxx\ide\Examples\Flashdrivers\NXP\iMXRT  does not  contain original project that was used for generating the MIMXRT1064.cfx. Not all original flashdriver projects are published, reducing the amount of effort for SW release. We internally keep a generic project which is used a the base for several RT10xx cfx drivers, which is for internal NXP use, that's why I can not just attach it here.

Per my findings, the RT1064 flash driver read  flash configuration (during flash initialization)  from the memory itself, using the ROM APIs. Therefore, as you point, we may adapt the evkmimxrt1064_flexspi_nor_config.c, to indicate the flashdriver that we want to have the QE bit enabled. I am currently double checking this and I will get back to you asap.

I am very sorry for not getting back to you sooner.

Diego

0 Kudos

1,832 Views
george
Senior Contributor II

 

Hello @diego_charles,

Thanks for the reply.

 

We believe you understand our request, our goal is to clarify:

  1. Is the QE-bit already set when RT1064 built-in Flash is shipped from NXP?
  2. Is the QE-bit set when using MIMXRT1064.cfx with MCUXpressoIDE?
  3. If we want to set the QE-bit using the flash configuraion parameter, is the modification for "evkmimxrt1064_flexspi_nor_config.c" correct?

 

--- boards/evkmimxrt1064/xip/evkmimxrt1064_flexspi_nor_config.c
+++ boards/evkmimxrt1064/xip/evkmimxrt1064_flexspi_nor_config.c.new
@@ -32,6 +32,17 @@ const flexspi_nor_config_t qspiflash_con
.csSetupTime = 3u,
.controllerMiscOption = (1u << kFlexSpiMiscOffset_SafeConfigFreqEnable),
.deviceType = kFlexSpiDeviceType_SerialNOR,
+
+ .deviceModeCfgEnable = 1u,
+ .deviceModeType = kDeviceConfigCmdType_QuadEnable,
+ .waitTimeCfgCommands = 1u, // Wait for 100us temporarily
+ .deviceModeSeq =
+ {
+ .seqId = 12u,
+ .seqNum = 1u,
+ },
+ .deviceModeArg = 0x02,
+
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_120MHz,
.sflashA1Size = 4u * 1024u * 1024u,
@@ -59,6 +70,10 @@ const flexspi_nor_config_t qspiflash_con

// Erase Chip LUTs
[4 * 11 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60, STOP, FLEXSPI_1PAD, 0x0),
+
+ // Write SR2 LUTs
+ [4 * 12 + 0] = FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0X31, WRITE_SDR, FLEXSPI_1PAD, 0x01),
+
},
},
.pageSize = 256u,

 

george_1-1663251276608.png

george_0-1663251150617.png

 

BR,
George

0 Kudos

1,793 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @george 

Many thanks for your patience! 

Is the QE-bit already set when RT1064 built-in Flash is shipped from NXP? 

 -No, by default is not enabled

Is the QE-bit set when using MIMXRT1064.cfx with MCUXpressoIDE?

-No, it is not enabled.

If we want to set the QE-bit using the flash configuration parameter, is the modification for "evkmimxrt1064_flexspi_nor_config.c" correct?

-At least from my testing, all the settings you got are not bootable. but I get the main idea where you attempt to specify QE ( in the FlexSPI NOR configuration block)

The .cfx driver is actually initializing the NOR memory with settings like this:

diego_charles_0-1663911631257.png

I am actually checking if I could share a .cfx that enables the QE (please ignore other parameters at this moment)

diego_charles_1-1663911822088.png

 

Best regards,

Diego

0 Kudos