MCUXpresso IDE
Tera Term (serial terminal)
Secure Provisioning Tool
This article describes the end-to-end procedure for booting a non-XIP application from SEMC parallel NAND flash on the MIMXRT1170-EVKB. Because NAND memory is block-oriented and cannot be executed in place, the application image must be linked to internal or external RAM (ITCM, DTCM, OCRAM, or SDRAM) and copied from NAND into RAM by the i.MX RT1170 BootROM prior to execution.
The guide covers the required board rework, hardware validation using the MCUXpresso SDK, project configuration for RAM-linked builds, bootable image generation using the MCUXpresso Secure Provisioning Tool (SEC), one-time fuse programming for ECC, image programming to NAND, and final boot verification. Readers are strongly encouraged to review Section 2 (Bootable Image Layout) of application note AN14069 before proceeding, as familiarity with the image layout is essential for understanding the steps that follow.
RT1170 Bootable image layout
The EVKB ships with the SEMC NAND data-line 0-ohm resistors depopulated (DNP) because those SoC pins are muxed with other functions on the board. You must solder them in before NAND is usable.
Solder R1872 through R1879 (eight 0-ohm resistors) on NAND data lines DATA0-DATA7. Before soldering, cross-check against your specific EVKB revision’s schematic. Open the board schematic PDF and search for the SEMC NAND section, the reference designators can shift by a digit or two between revisions. The relevant schematic is downloadable from the NXP product page.
After populating the resistors, validate the rework by running the SDK example mentioned below in the default QSPI NOR boot configuration (no changes to SW1/SW2 from factory settings yet). This isolates hardware issues from boot-configuration issues and gives clean signal before attempting SEC flashing.
Run the semc_nand component example.
If this passes, the hardware rework (R1872–R1879) is electrically correct and the NAND software layer that SEC depends on works. Please proceed to SEC flashing.
NAND is block-oriented; the CPU cannot execute directly from it. The application must be RAM-linked (non-XIP), and the ROM will copy it into RAM before jumping.
Right-click project → Properties → C/C++ Build → MCU settings:
Setting default RAM to ITCM:
Setting default RAM to OCRAM:
Note: There is no limitation when linking the image text section to ITCM, DTCM, or SDRAM for non-XIP boot. However, when linking the image text section to OCRAM (0x2020_0000 – 0x203F_FFFF), one limitation applies: the region 0x2024_0000 – 0x2024_BFFF must be reserved as this is the ROM RW region. If the image text section is linked into the ROM RW region, the ROM routine will be corrupted during image copying.
Setting default RAM to SDRAM:
Note: This option requires an XMCD (External Memory Configuration Data) block in the boot image.
Then C/C++ Build → Settings → MCU C Compiler → Preprocessor, add or change:
XIP_BOOT_HEADER_ENABLE=0
XIP_EXTERNAL_FLASH=0
In the project’s Settings tab (project root), check “Link application to RAM”.
Select Target → Boot Memory … to open Boot Memory Configurations
Based on MT29F2G08ABAGAH4 datasheet, its default ECC is off, so we need to do the below ECC settings:
Status of the command is shown in the log and the bottom of the screen:
Before SEC can write to NAND, the RT1176 ROM must be in SDP mode.
SW1 = OFF-OFF-OFF-ON (BOOT_MODE[1:0] = 01)
The boot mode is selected based on the binary value stored in the internal BOOT_MODE register, and switch SW1-3 and SW1-4 are used to select the boot mode on the MIMXRT1170 EVKB board.
|
SW1-1 |
SW1-2 |
SW1-3 |
SW1-4 |
BOOT_MODE |
Mode |
|
OFF |
OFF |
OFF |
ON |
01 |
Serial Downloader |
|
OFF |
OFF |
ON |
OFF |
10 |
Internal Boot |
This step is NAND-specific. Per RM Table 10-20 (Fuse definition for Parallel NAND over SEMC), for the RT117x ROM to load an image from this NAND with ECC protection and valid bad-block detection, one fuse must be burned for reliable NAND boot on the EVKB’s Micron NAND.
|
Attribute |
Value |
|
Register |
BOOT_CONFIG_MISC2[31:0] |
|
Offset |
0x0C80 |
|
Bit to burn |
Bit 24 |
|
Bit value |
1 |
|
Value to burn for EVKB |
1 (register = 0x01000000) |
Without this burn, the ROM reads pages without ECC correction. Because the Micron NAND writes ECC-protected data only when ECC is enabled, any data written via the SDK with ECC enabled would appear as uncorrected bytes + parity. With ECC off, even small bit-errors become uncorrectable read failures, and bad-block detection via ECC status is unreliable.
Click Test connection. The expected result is shown in the screenshot below.
Slide SW5 to OFF.
SW1 = OFF-OFF-ON-OFF (BOOT_MODE[1:0] = 10)
SW2 = OFF-OFF-OFF-OFF-ON-OFF-OFF-OFF
|
SW2 position |
BOOT_CFG1 bit |
Value |
|
SW2-1 |
BOOT_CFG[0] |
0 (OFF) |
|
SW2-2 |
BOOT_CFG[1] |
0 (OFF) |
|
SW2-3 |
BOOT_CFG[2] |
0 (OFF) |
|
SW2-4 |
BOOT_CFG[3] |
0 (OFF) |
|
SW2-5 |
BOOT_CFG[4] |
0 (OFF) |
|
SW2-6 |
BOOT_CFG[5] |
1 (ON) |
|
SW2-7 |
BOOT_CFG[6] |
0 (OFF) |
|
SW2-8 |
BOOT_CFG[7] |
0 (OFF) |
|
SW2-9 |
BOOT_CFG[8] |
0 (OFF) |
|
SW2-10 |
BOOT_CFG[9] |
0 (OFF) |
This is the EVKB-specific setting that selects SEMC Parallel NAND as the boot device.
This article describes the end-to-end procedure for booting a non-XIP application from SEMC parallel NAND flash on the MIMXRT1170-EVKB.