I have a custom board with a MIMXRT1011 MCU and AT25SF128A Flash that I am ready to move to production. During development I have been using the flexspi_nor_polling_transfer project to do the initial configuration of the flash, as recommended in multiple threads on this forum. I believe this project sets the QE bit in the flash to enable quad mode as required for flash XIP; without this step I can program the flash but the program is unable to run. It is able to set this bit in flash because the flexspi_nor_polling_transfer project is linked to RAM.
For production programming, first loading and running the flexspi_nor_polling_transfer project is not a workable solution. I will be using a JLink for programming and I am hoping to find a way to set the QE bit in the flash target through some JLink command. I have been unable to find a way to do this.
I have scoured this forum but haven't seen any way around the QE-bit issue other than running the RAM-linked example project. Any help would be appreciated!
Solved! Go to Solution.
While this still seems like an awkward solution, I was able to make a simple 'one-click' programmer for the RT1010 using a batch file and JLink script file.
The JLink script first loads and runs the nor_polling_transfer project, then loads the application image:
connect
halt
loadfile evkmimxrt1010_flexspi_nor_polling_transfer.hex
setpc 0x200001d0
go
sleep 250
reset
loadfile application_program.hex
reset
go
exit
I run this script in the JLink Commander with a batch file:
@echo off
JLink.exe -device MIMXRT1011XXX4A -if SWD -speed 4000 -autoconnect 1 -commandfile rt1010_program.jlink
I still think there must be a more elegant way to accomplish the initial flash configuration, but at least this method works.
Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you to refer to the tool, the tool will set the QE bit during building a connection with the QSPI flash.
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.
-------------------------------------------------------------------------------
Hi @jeremyzhou -
Thank you for the suggestion but this will not work for my application, as I cannot use the UART or USB-HID downloader modes.
What I am looking for is a way to set the QE bit in the flash (connected via FlexSPI) using the SWD interface with a JLink command. I figure this must be possible as I believe the JLink writes the program image directly to the flash via some SWD-to-FlexSPI bridge. I do not know the specifics of how this connection is made, though.
Hi,
Thanks for your reply.
In my experience, the default Jlink command doesn't support setting the QE bit, maybe you can consider the Jlink command to load the flexspi_nor_polling_transfer project to RAM to run to set the QE bit.
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.
-------------------------------------------------------------------------------
While this still seems like an awkward solution, I was able to make a simple 'one-click' programmer for the RT1010 using a batch file and JLink script file.
The JLink script first loads and runs the nor_polling_transfer project, then loads the application image:
connect
halt
loadfile evkmimxrt1010_flexspi_nor_polling_transfer.hex
setpc 0x200001d0
go
sleep 250
reset
loadfile application_program.hex
reset
go
exit
I run this script in the JLink Commander with a batch file:
@echo off
JLink.exe -device MIMXRT1011XXX4A -if SWD -speed 4000 -autoconnect 1 -commandfile rt1010_program.jlink
I still think there must be a more elegant way to accomplish the initial flash configuration, but at least this method works.