How To Enable Boot From QSPI Flash: Application Notes
How To Enable Boot From QSPI Flash: Application Notes
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
2 NXP Semiconductors
MIMXRT1050 EVK board settings
Step 3:
• The firmware of OpenSDA needs to be replaced. The default firmware onboard is used to Hyper
Flash, so that the firmware should be replaced to QSPI Flash. Both Hyper Flash and QSPI
Flash’s firmware can be downloaded from NXP Website.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 3
MIMXRT1050 EVK board settings
The Table 2 shows the different effect on the built image with different combination of these macros:
Different effect on the built image with difference macros
XIP_BOOT_HEADER_DCD_ENA XIP_BOOT_HEADER_DCD_ENA
BLE=1 BLE=0
XIP_EXTERNAL_FLA
XIP_BOOT_HEA by IDE and can run after POR reset by IDE and can run after POR reset
DER_ENABLE=1 if Hyper Flash is the boot source. if Hyper Flash is the boot source.
SDRAM will be initialized. SDRAM will NOT be initialized.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
4 NXP Semiconductors
Examples
XIP_BOOT_HEA Can NOT run after POR reset if it is programed by IDE even if Hyper
DER_ENABLE=0 Flash is the boot source.
XIP_EXTERNAL_FLASH This image can NOT do XIP because when this macro is set to 1, it will
=0 exclude the code which will change the clock of flexspi.
3. Program tools
4. Examples
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 5
Examples
Step 2:
• Build the project and generate an image. You can find the hello_world.bin at following location
(Figure 5).
NOTE
Before an image generate, flash configure parameters need to be changed.
Please refer to “How to Enable Debugging for FLEXSPI NOR Flash”,
AN12183
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
6 NXP Semiconductors
Examples
Step 3:
• Configure the board to serial downloader mode and make sure the power supply is form the
Debug USB. To achieve these, SW7-4 should pull-up others pull-down Figure 6 and the J1-5, J1-
6 should be connected Figure 7.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 7
Examples
Step 4:
• Power up the board by connecting USB Debug Cable to J28 and open windows explorer and
confirm that a U-Disk appears as a drive like Figure 8.
NOTE
The first time you connect the MBED USB to Host Computer Windows
will ask to install the MBED serial driver.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
8 NXP Semiconductors
Examples
Step 5:
• Drag/Drop the hello_world.bin to RT1050-EVK. Then the RT1050-EVK
disappears and after few seconds it will appear again.
Step 6:
• Disconnect the USB Debug Cable, and configure the board to QSPI Flash Boot
Mode which means SW7-3 pull-up others pull-down Figure 9.
Step 7:
• Connect the USB Debug Cable again and configure the Terminal Window.
o Baud rate: 115200
o Data bits: 8
o Stop bit: 1
o Parity: None
o Flow control: None
Step 8:
• Press SW3 to reset the EVK Board and “hello world” will be printed to the terminal. Figure 10
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 9
Examples
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
10 NXP Semiconductors
Examples
Step 1:
• Open the Hello world demo in the SDK and select the project configuration as
flexspi_nor_debug Figure 11 and make sure the settings likes Figure 12.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 11
Examples
Step 2:
Change the default entry to Reset_Handler likes following Figure.
NOTE
Step 5 can be skipped if this step is set.
Step 3:
• Build the project and generate the image. You can find the hello_world.srec at following location
Figure 14.
Step 4:
• Copy hello_world.srec to the elftosb folder:
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 13
Examples
Step 5:
Open the imx-flexspinor-normal-unsigned.bd under path
Flashloader_i.MXRT1050_GA\Tools\bd_file\imx10xx. Open it and set the entryPointAddress to
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
14 NXP Semiconductors
Examples
NOTE
Step 2 can be skipped if this step is set.
Step 6:
• Now we can use command to generate the i.MX Bootable image using elftosb file. Open
cmd.exe and type following command:
elftosb.exe -f imx -V -c ../../bd_file/imx10xx/imx-flexspinor-normal-unsigned.bd -o
ivt_flexspi_nor_hello_world.bin hello_world.srec
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 15
Examples
Step 7:
Open cmd.exe and type following command:
elftosb.exe -f kinetis -V -c ../../bd_file/imx10xx/program_flexspinor_image_qspinor.bd -o boot_image.sb
ivt_flexspi_nor_hello_world_nopadding.bin
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
16 NXP Semiconductors
Examples
After performing above command, the boot_image.sb is generated under elftosb folder Figure 19.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 17
Examples
Step 8:
• Copy the boot_image.sb file to OS Firmware folder:
Now, make sure the “name” under “[List]” to “MXRT105x-DevBoot” in cfg.ini file under
<mfgtool_root_dir> folder.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
18 NXP Semiconductors
Examples
Switch the EVK-Board to Serial Downloader mode by setting SW7 to “1-OFF, 2-OFF, 3-OFF, 4-ON”.
Connect a UAB Cable to J9 and power on the EVK Board by inserting USB Cable to J28. Open
MfgTool, it will show the detected device like Figure 22.
NOTE
In some corner case, HID-compliant device is not recognized which is
because the PC only have USB root device and no USB hub device, and
this software limitation will be fixed in near future, the workaround at this
moment is to use external USB hub as extension.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 19
Examples
Click Start. Mfgtool initiates and prompts the success status as shown in Figure 23. Click Stop and
close the Mfgtool.
Step 9:
• Switch the RT1050-EVK board to Internal boot mode and select QSPI Flash as boot device by
setting SW7 to “1-OFF, 2-OFF, 3-ON, 4-OFF”. Connect the USB Cable to J28 and open a
terminal, then reset the Board. We can see that “hello world” will be printed to the terminal.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
20 NXP Semiconductors
QSPI Flash support list
4.3. MFG Boot from QSPI Flash with DCD for SDRAM
For steps, please refer to “How to Enable Boot from Octal SPIFlash and SD Card”, AN12107.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 21
Conclusion
FLASHVCC
DCDC_3V3
1V8LDO
R301 0
MAX 250 mA FLASH_VCC
DNP
U7 TP10 LDO_1V8
DCDC_3V3
R48 0 3 2 R49 0
VIN VOUT
CSI_1V8
GND
C67
L20
C65 C66 4.7uF C68
10uF 0.1UF UM1550S-18 0.1UF
1
120 Ohm
GND GND
GND
6. Conclusion
This application note mainly describes how to use Flashloader step by step. For more information, refer
to “i.MX MCU Manufacturing User's Guide” and “How to Enable Boot from Octal SPIFlash and SD
Card”.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
22 NXP Semiconductors
Revision history
7. Revision history
Revision history
Revision number Date Substantive changes
0 12/2017 Initial release
1 06/2018 Adapted SDK version 2.3.1 and Flashloader version
1.1. In Table 1. QSPI Flash support list, changed
MX25U6433F to MX25L6433F.
2 07/2018 • Added steps to change the entry address.
• Used srec file instead of .out file as the source file.
3 09/2018 Updated Table 3 QSPI Flash support list.
4 07//2019 Updated Table 3 QSPI Flash support list.
How to Enable Boot from QSPI Flash, Application Notes, Rev. 4, 07/2019
NXP Semiconductors 23
Information in this document is provided solely to enable system and software implementers
How to Reach Us:
to use NXP products. There are no express or implied copyright licenses granted hereunder to
Home Page: design or fabricate any integrated circuits based on the information in this document. NXP
nxp.com
reserves the right to make changes without further notice to any products herein.
Web Support:
nxp.com/support NXP makes no warranty, representation, or guarantee regarding the suitability of its products
for any particular purpose, nor does NXP assume any liability arising out of the application or
use of any product or circuit, and specifically disclaims any and all liability, including without
limitation consequential or incidental damages. “Typical” parameters that may be provided in
NXP data sheets and/or specifications can and do vary in different applications, and actual
. performance may vary over time. All operating parameters, including “typicals,” must be
validated for each customer application by customer's technical experts. NXP does not convey
any license under its patent rights nor the rights of others. NXP sells products pursuant to
standard terms and conditions of sale, which can be found at the following address:
nxp.com/SalesTermsandConditions.
While NXP has implemented advanced security features, all products may be subject to
unidentified vulnerabilities. Customers are responsible for the design and operation of their
applications and products to reduce the effect of these vulnerabilities on customer’s
applications and products, and NXP accepts no liability for any vulnerability that is discovered.
Customers should implement appropriate design and operating safeguards to minimize the
risks associated with their applications and products.
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD,
COOLFLUX, EMBRACE, GREENCHIP, HITAG, I2C BUS, ICODE, JCOP, LIFE VIBES,
MIFARE, MIFARE CLASSIC, MIFARE DESFire, MIFARE PLUS, MIFARE FLEX, MANTIS,
MIFARE ULTRALIGHT, MIFARE4MOBILE, MIGLO, NTAG, ROADLINK, SMARTLX,
SMARTMX, STARPLUG, TOPFET, TRENCHMOS, UCODE, Freescale, the Freescale logo,
AltiVec, C‑5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C‑Ware, the Energy Efficient
Solutions logo, Kinetis, Layerscape, MagniV, mobileGT, PEG, PowerQUICC, Processor
Expert, QorIQ, QorIQ Qonverge, Ready Play, SafeAssure, the SafeAssure logo, StarCore,
Symphony, VortiQa, Vybrid, Airfast, BeeKit, BeeStack, CoreNet, Flexis, MXC, Platform in a
Package, QUICC Engine, SMARTMOS, Tower, TurboLink, UMEMS, EdgeScale, EdgeLock,
eIQ, and Immersive3D are trademarks of NXP B.V. All other product or service names are the
property of their respective owners. AMBA, Arm, Arm7, Arm7TDMI, Arm9, Arm11, Artisan,
big.LITTLE, Cordio, CoreLink, CoreSight, Cortex, DesignStart, DynamIQ, Jazelle, Keil, Mali,
Mbed, Mbed Enabled, NEON, POP, RealView, SecurCore, Socrates, Thumb, TrustZone,
ULINK, ULINK2, ULINK-ME, ULINK-PLUS, ULINKpro, µVision, Versatile are trademarks or
registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere. The
related technology may be protected by any or all of patents, copyrights, designs and trade
secrets. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its
affiliates. The Power Architecture and Power.org word marks and the Power and Power.org
logos and related marks are trademarks and service marks licensed by Power.org.