RT1020: how to enable Flash Access Mode to Quad on FlexSPI with NOR Flash

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

RT1020: how to enable Flash Access Mode to Quad on FlexSPI with NOR Flash

2,142 Views
JamesNgo
Contributor III

I couldn't seem to find any text in NXP docs for RT1020 EVK that has the info in question below:

1. Normal/standard (as is from the MCUExpresso examples) XIP booting from boot-ROM to NOR Flash @0x6000-0000: Flexspi is already configured on Single Access Mode by default? Is this flexspi defaulted mode already configured in boot-ROM firmware so it can then transition to NOR Flash@0x6000-0000?

2. If (1) is true, how do we enable  or change the Flexspi nor flash access to be in Quad mode?

thanks.

 

0 Kudos
Reply
5 Replies

2,117 Views
JamesNgo
Contributor III

Thanks.

I tried using the sdphost to load flashloader firmware to RAM:

>sdphost.exe -u 0x1fc9,0x0145 -V -- write-file 0x20205800 ".\ivt_flashloader.bin"
>sdphost.exe -u 0x1fc9,0x0145 -V -- jump-address 0x20205800

Then blhost to configure NOR flash:

>blhost.exe -u 0x15a2,0x0073 -- fill-memory 0x2000 4 0xC0000007
>blhost.exe -u 0x15a2,0x0073 -- configure-memory 9 0x2000

Does the "configure-memory 9" operation  from RAM flashloader firmware above configure the NOR flash to Quad mode (ISSI external Flash IS45S16160J) and this  needs to happen ONLY one-time during manufacturing if the same operation is used (set Quad Enable SerialNorQuadMode_StatusReg1_Bit6)? (i,e:The programmed/running/booting firmware in the the external flash@0x6000-0000 does or does not need to configure this on every boot?) Thanks

0 Kudos
Reply

2,115 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Yes, application firmware doesn't need to configure it every time. 

When you make application code, you should enable 3 macros: XIP_EXTERNAL_FLASH, XIP_BOOT_HEADER_ENABLE, and XIP_BOOT_HEADER_DCD_ENABLE. In source code XIP folder, there is a evkbimxrt1020_flexspi_nor_config.c. It has a structure flexspi_nor_config_t. ROM boot will read this structure and configure the external flash.

About the QE bit. It can be written by FCB. But this bit is nonvolatile in flash. If you use FCB to write this bit, ROM boot will write it every bootup. when mass production, you can write it in other way, like running a small RAM code to write it before downloading application.

 

Regards,

Jing 

2,104 Views
JamesNgo
Contributor III

Thanks @jingpan

So ROM Boot always configures FlexSPI NOR Flash in XIP mode but NOT in Quad Mode by default. Quad mode enablement requires an explicit, additional and specific operation. This is what we're interested in knowing as you suggested that "running a small RAM code to write it before downloading application" to write the QE bit. I appreciate it if you could you provide with the details and steps...etc to accomplish this manufacturing process to enable Quad access and I'm sure other users would benefit from it too. Thanks.

2,101 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

ROM code read FCB and configure flash base on FCB data. The FCB is at the top of your application image. In the FCB, you can guide ROM code to write QE bit and then enable QUAD mode. Or if the QE bit has been set, you can let ROM code enable QUAD mode directly. Both XIP and non-XIP can enable QUAD mode.

I haven't project which is used to set QE bit. But I think this is not a hard work. Maybe customer even program the flash before soldering it on the board.

 

Regards,

Jing

0 Kudos
Reply

2,128 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @JamesNgo ,

Please refer to AN12238, AN12107 and AN12018.

 

Regards,

Jing

0 Kudos
Reply