flexspi_octal_polling_transfer#
Overview#
The flexspi_octal_polling_transfer example shows how to use flexspi driver with polling:
In this example, flexspi will send data and operate the external octal flash connected with FLEXSPI. Some simple flash command will be executed, such as Write Enable, Erase sector, Program page. Example will first erase the sector and program a page into the flash, at last check if the data in flash is correct.
Supported Boards#
MIMXRT1180-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1180-EVK board
Personal Computer
Board settings
In order to interface the on-board octal FLASH it is necessary to populate with 0R or short circuit following positions: R293, R296, R297, R298 and set jumper J75 to position 1-2. Jumper J59 should remain in the default 2-3 position.
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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0x2c
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
EVK-MIMXRT595
Hardware requirements
Micro USB cable
EVK-MIMXRT595 board
Personal Computer
Board settings
Prepare the Demo
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J40) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xc2
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
EVK-MIMXRT685
Hardware requirements
Micro USB cable
EVK-MIMXRT685 board
Personal Computer
Board settings
Prepare the Demo
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xc2
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
FRDM-MCXN947
Hardware requirements
Type-C USB cable
FRDM-MCXN947 board
Personal Computer
Board settings
Prepare the Demo
Connect a type-c USB cable between the PC host and the MCU-Link USB port (J17) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xef
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
Note: This example support two flash type: Winbond W25Q64 and MT MT35XU512
Define EXAMPLE_FLASH_TYPE=FLASH_W25Q64 for flash type W25Q64
Define EXAMPLE_FLASH_TYPE=FLASH_MT35XU512 for flash type MT35XU512
FRDM-MCXN947T
Hardware requirements
Type-C USB cable
FRDM-MCXN947T board
Personal Computer
Board settings
Prepare the Demo
Connect a type-c USB cable between the PC host and the MCU-Link USB port (J17) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xef
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
Note: This example support two flash type: Winbond W25Q64 and MT MT35XU512
Define EXAMPLE_FLASH_TYPE=FLASH_W25Q64 for flash type W25Q64
Define EXAMPLE_FLASH_TYPE=FLASH_MT35XU512 for flash type MT35XU512
IMX95LPD5EVK-19
Hardware requirements
Micro USB cable
IMX95LPD5-EVK board
J-Link Debug Probe
12V~20V power supply
Personal Computer
Board settings
Note
The Micron Serial Nor flash memory model is MT35XU01GBBA.
Prepare the Demo
Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW4 to power on the board.
Connect a micro USB cable between the host PC and the J31 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 re-power up your board or launch the debugger in your IDE to begin running the example.
Running the demo
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0x2c
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
LPCXpresso55S36
Hardware requirements
Micro USB cable
LPCXpresso55S36 board
Personal Computer
Board settings
Connect pin 1-2 of JP41,JP42,JP43,JP44,JP45,JP62,JP64 and JP65. Close JP63,JP66,JP67,JP68 and JP69.
Prepare the Demo
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xc2
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
Note: This example doesn’t need to connect external octal flash with FLEXSPI.
MCX-N5XX-EVK
Hardware requirements
Micro USB cable
MCX-N5XX-EVK board
Personal Computer
Board settings
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J5) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xef
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
Note: This example support two flash type: Winbond W25Q64 and MT MT35XU512
Define EXAMPLE_FLASH_TYPE=FLASH_W25Q64 for flash type W25Q64
Define EXAMPLE_FLASH_TYPE=FLASH_MT35XU512 for flash type MT35XU512
MCX-N9XX-EVK
Hardware requirements
Micro USB cable
MCX-N9XX-EVK board
Personal Computer
Board settings
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J5) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xef
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
Note: This example support two flash type: Winbond W25Q64 and MT MT35XU512
Define EXAMPLE_FLASH_TYPE=FLASH_W25Q64 for flash type W25Q64
Define EXAMPLE_FLASH_TYPE=FLASH_MT35XU512 for flash type MT35XU512
FRDM-MCXA577
Hardware requirements
Type-C USB cable
FRDM-MCXA577 board
Personal Computer
Board settings
For EVB BGA169:
install Jumper J140
rework SJ80,SJ81,SJ72,SJ73,SJ74,SJ75, short pin 1-2
Prepare the Demo
Connect a type-c USB cable between the PC host and the MCU-Link USB port (J17) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xef
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
Note: This example support two flash type: Winbond W25Q64 and MT MT35XU512
Define EXAMPLE_FLASH_TYPE=FLASH_W25Q64 for flash type W25Q64
Define EXAMPLE_FLASH_TYPE=FLASH_MT35XU512 for flash type MT35XU512
FRDM-MCXA287
Hardware requirements
Type-C USB cable
FRDM-MCXA287 board
Personal Computer
Board settings
For EVB BGA169:
install Jumper J140
rework SJ80,SJ81,SJ72,SJ73,SJ74,SJ75, short pin 1-2
Prepare the Demo
Connect a type-c USB cable between the PC host and the MCU-Link USB port (J17) 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
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXSPI example started!
Vendor ID: 0xef
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
Note: This example support two flash type: Winbond W25Q64 and MT MT35XU512
Define EXAMPLE_FLASH_TYPE=FLASH_W25Q64 for flash type W25Q64
Define EXAMPLE_FLASH_TYPE=FLASH_MT35XU512 for flash type MT35XU512