program QSPI flash using MCUXPRESO

cancel
Showing results for 
Search instead for 
Did you mean: 

program QSPI flash using MCUXPRESO

235 Views
filip091
Contributor I

Hello,

I'm trying to load my program to 1V8 QSPI Flash (IS25WP064AJBLE) on MIMXRT1060-EVK with processor MIMXRT1062 DVL5A. Currently the program runs just from SDRAM. I have tried some SDK examples like led_blinky and hello_world, turns out they are programmed on this flash without any problems. But I can not find the parts of code responsible for the flash programming. I tried also flash_component_nor example to figure something out, but it crashes in fsl_flexspi.c in MCR2 configuration. Do you have an example how to program this flash or some major steps that I have to follow needed to program the flash? I know that there are more possible ways how to load the program to the flash but I need that exact way like is used in led_blinky example. Because later I need to crate a HEX file to load the program to Teensy 4.1.  

Labels (1)
Tags (1)
0 Kudos
7 Replies

213 Views
filip091
Contributor I

Hello, 

thanks for your response.

We are sending our mcu settings in attachment.

We've tried to use .cfx flashdriver and we defined symbols (-D) 

XIP_EXTERNAL_FLASH=1
XIP_BOOT_HEADER_ENABLE=1

but there was problem with programming the flash. The program crashed and xpreso outputed "Break at address "0x2173a6" with no debug information available, or outside of program code." It seems the flash is being erased but the program can't load. 

The error log message shows !MESSAGE The project 'DoorDemonstrator_devBoard' has no nature com.nxp.mcuxpresso.core.datamodels.sdkNature
!STACK 0
java.lang.Exception: org.eclipse.core.runtime.CoreException: The project 'DoorDemonstrator_devBoard' has no nature com.nxp.mcuxpresso.core.datamodels.sdkNature
at com.crt.utils.general.Reporter.log(Reporter.java:580)

etc...

Isn't it necessary to modify some clock settings or pins...?

Thank you for your response.

 

0 Kudos

203 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @filip091 

  Do you use the MIMXRT1060-EVK has issues? What's the code you are using? SDK project has issues or not? Seems it is related to your code. If the code has issues, it will meet the next time debugger connection issues. You need to erase the external memory at first, or enter the serial download mode, then download the SDK code at first.

Your .cfx and your settings are all OK:

XIP_EXTERNAL_FLASH=1
XIP_BOOT_HEADER_ENABLE=1

It's OK.

So, I suggest you use the SDK project and download it in the serial download mode, then back to the internal boot mode, the issue will disappear. If your issues just with your own customer project, you still need to check your own project details. The code should not correct.

 

Wish it helps you!

Best Regards,

kerry

0 Kudos

198 Views
filip091
Contributor I

Hi @kerryzhou

SDK projects I've tried have no issues, flashloader_nor has issues but different than our project. 

It's quite strange because it can run normally but when I change MCU settings, where I add flash with flash driver .cfx the problem appears.

Could there be problem with clock or initialization?

Thank for your time.

Best regards.

 

 

0 Kudos

191 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @filip091 

 Do you mean, you run this SDK code:

SDK_2.9.3_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\flexspi\nor\polling_transfer

in the flash, right?

 Please note, MIMXRT1060-EVK on board QSPI flash is not the RWW flash, so you can't execute the flash and also do the flash program, erase operation directly.

You need to copy the above flash in the internal RAM to do the external flash operation.

Wish it helps you!

Best Regards,

kerry

0 Kudos

187 Views
filip091
Contributor I

Hi @kerryzhou 

I meant evkmimxrt1060_flashloader_component_nor.

But thanks, I might know where to find bug.

When I will figure this out, I will let you know.

Best regards.

0 Kudos

169 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @filip091 ,

  Just one point, when you run the flash operation code in the external flash, it is not supported, as the external QSPI flash is not the RWW chip.

  So, you need to use your flash nor component code in the RAM, then it can do the external flash operation. Or you can use the ROM code to control the flash.

   About the ROM code, you can refer to the RM chapter 9.13 ROM APIs.

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos

222 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @filip091 

  Do you mean, you use the directly MIMXRT1060-EVK board, and that run the SDK code is OK, but your own code has issues with the flash, right?

  MIMXRT1060-EVK board in default is IS25WP064AJBLE, and that works OK with our SDK.

  About the flash programming, it is using the flashdriver with the IDE, so you can't find it in the app code.

If you are using the MCUXpresso IDE, the .cfx is the related flashdriver.

kerryzhou_0-1626151832216.png

 

  If you want to check the flash program and erase and read, you can download this code to the internal TCM:

\SDK_2.9.3_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\flexspi\nor

  Then, debug it, you will find the details.

  You also can enter the serial download mode, then use the MCUBootUtility tool to download it.

Tool link:

https://github.com/JayHeng/NXP-MCUBootUtility/archive/refs/tags/v3.3.0.zip
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

 

Wish it helps you!

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

Best Regards,

kerry

  

0 Kudos