flash_component_nor_flexspi#
Overview#
nor flash demo shows the use of nor flash component to erase, program, and read an external nor flash device.
Supported Boards#
EVKB-IMXRT1050
Hardware requirements
Mini/micro USB cable
EVKB-IMXRT1050 board
Personal Computer
Board settings
The board enables hyper flash (U19) by default. To enable QSPI flash (U33), some hardware rework is needed: Mount R153,R154,R155,R156,R157,R158 and DNP R356,R361,R362,R363,R364,R365,R366.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
.....
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
MIMXRT1060-EVKB
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKB board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
.....
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
Known issue
The MCUX release target and armgcc flexspi_nor_release run fail.
MIMXRT1060-EVKC
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKC board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
.....
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
EVK-MIMXRT1010
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1010 board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the flash component demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
.....
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##### Known issue
The MCUX release target and armgcc flexspi_nor_release run fail.
EVK-MIMXRT1015
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1015 board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the flash component demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
.....
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
Known issue
The MCUX release target and armgcc flexspi_nor_release run fail.
EVK-MIMXRT1020
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1020 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
.....
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
Note: To download binary into qspiflash and boot from qspiflash directly, following steps are needed:
Compile flash target of the project, and get the binaray file “hello_world.bin”.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.
Drop the binaray into disk “RT1020-EVK” on PC.
Wait for the disk disappear and appear again which will take couple of seconds.
Reset the board by pressing SW3 or power off and on the board.
Note: To debug in qspiflash, following steps are needed:
Select the flash target and compile.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.
Start debugging in IDE.
Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.
MIMXRT1024-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1024-EVK board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
.....
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
Note: To download binary into qspiflash and boot from qspiflash directly, following steps are needed:
Compile flash target of the project, and get the binaray file “hello_world.bin”.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.
Drop the binaray into disk “RT1024-EVK” on PC.
Wait for the disk disappear and appear again which will take couple of seconds.
Reset the board by pressing SW3 or power off and on the board.
Note: To debug in qspiflash, following steps are needed:
Select the flash target and compile.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.
Start debugging in IDE.
Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.
MIMXRT1040-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1040-EVK board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
.....
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
Known issue
The MCUX release target and armgcc flexspi_nor_release run fail.
EVK-MIMXRT1064
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1064 board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
.....
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
Note: For MIMXRT1064 (packaged with Winbond W25Q32JV flash memory), some parts do not support the SFDP command. This example may fail on those parts.
MIMXRT1180-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1180-EVK board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the MCU-LINK USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
.....
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
FRDM-RW612
Hardware requirements
Micro USB cable
FRDM-RW612 board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the MCU-Link USB port (J10) on the board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
***NOR Flash Page 4 Read/Write Success!***
***NOR Flash Page 5 Read/Write Success!***
***NOR Flash Page 6 Read/Write Success!***
***NOR Flash Page 7 Read/Write Success!***
***NOR Flash Page 8 Read/Write Success!***
***NOR Flash Page 9 Read/Write Success!***
***NOR Flash Page 10 Read/Write Success!***
***NOR Flash Page 11 Read/Write Success!***
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RD-RW612-BGA
Hardware requirements
Micro USB cable
RD-RW612-BGA board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the MCU-Link USB port (J7) on the board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
***NOR Flash Page 4 Read/Write Success!***
***NOR Flash Page 5 Read/Write Success!***
***NOR Flash Page 6 Read/Write Success!***
***NOR Flash Page 7 Read/Write Success!***
***NOR Flash Page 8 Read/Write Success!***
***NOR Flash Page 9 Read/Write Success!***
***NOR Flash Page 10 Read/Write Success!***
***NOR Flash Page 11 Read/Write Success!***
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FRDM-IMXRT1186
Hardware requirements
Type-C USB cable
FRDM-IMXRT1186 board
Personal Computer
Board settings
Prepare the Demo
Connect a USB cable between the host PC and the MCU-LINK USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
***NOR Flash Component Demo Start!***
***NOR Flash Page 0 Read/Write Success!***
***NOR Flash Page 1 Read/Write Success!***
***NOR Flash Page 2 Read/Write Success!***
***NOR Flash Page 3 Read/Write Success!***
.....
***NOR Flash Page 12 Read/Write Success!***
***NOR Flash Page 13 Read/Write Success!***
***NOR Flash Page 14 Read/Write Success!***
***NOR Flash Page 15 Read/Write Success!***
***NOR Flash All Pages Read/Write Success!***