flexio_spi_edma_lpspi_transfer_master#
Overview#
The flexio_spi_master_edma_lpspi_slave example shows how to use flexio spi master driver in edma way:
In this example, a flexio simulated master connect to a lpspi slave .
Running the demo#
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXIO Master edma - LPSPI Slave interrupt example start. This example use one flexio spi as master and one lpspi instance as slave on one board. Master uses edma and slave uses interrupt way. Please make sure you make the correct line connection. Basically, the connection is: FLEXI_SPI_master – LPSPI_slave CLK – CLK PCS – PCS SOUT – SIN SIN – SOUT This is LPSPI slave call back. FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Supported Boards#
EVK9-MIMX8ULP
Hardware requirements
Micro USB cable
MIMX8ULP-EVK/EVK9 board
J-Link Debug Probe
5V power supply
Personal Computer
Board settings
1.The example requires connecting the FLEXIO0 pins with the LPSPI1 pins; Please use four dupont lines to connect pins on MIMX8ULP-EVK base board as following:
ARDU_D3/PTB0_FXIO0_D16/PCS(J21,4), ARDU_A0/PTA15_LPSPI1_PCS0(J23,1) connected
ARDU_D2/PTB1_FXIO0_D17/SOUT(J21,3), ARDU_A1/PTA16_LPSPI1_SIN(J23,2) connected
ARDU_D1/PTB2_FXIO0_D18/SIN(J21,2), ARDU_A2/PTA17_LPSPI1_SOUT(J23,3) connected
ARDU_D0/PTB3_FXIO0_D19/SCK(J21,1), ARDU_A3/PTA18_LPSPI1_SCK(J23,4) connected
2.Remove the resistors R139,R159 and add the resistors R140,R158 on base board;
Please note this application can’t support running with Linux BSP!
Please note this application can only run well with RAM link file! If run it in QSPI flash, there’s high latency when instruction cache miss. Although the LPSPI has 4 words FIFO it still cannot adapt to the cache miss latency in slave side. To run LPSPI slave in QSPI flash, either use DMA driver or do synchronization for data exchange.
Prepare the Demo
Connect 5V power supply and J-Link Debug Probe to the board, switch SW10 to power on the board.
Connect a micro USB cable between the host PC and the J17 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 example.
Running the demo
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
SCK -- SCK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
EVKB-IMXRT1050
Hardware requirements
Mini/micro USB cable
EVKB-IMXRT1050 board
Personal Computer
Board settings
Remove the resistor R334 and weld 0Ω resistor to R278,R279,R280,R281.
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J24-4 SIN SW5-3
SIN J24-5 SOUT SW5-2
SCK J24-6 SCK SW5-1
PCS0 J24-3 PCS0 SW5-4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
MIMXRT1060-EVKB
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKB board
Personal Computer
Board settings
Remove the resistor R305 and weld 0Ω resistor to R346,R350,R356,R362.
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J17-4 SIN SW2-3
SIN J17-5 SOUT SW2-2
SCK J17-6 SCK SW2-1
PCS0 J17-3 PCS0 SW2-4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 150k.
MIMXRT1170-EVKB
Hardware requirements
Mini/micro USB cable
MIMXRT1170-EVKB board
Personal Computer
Board settings
Remove 0Ω resistor to R200,R406.
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SIN J10-10 SOUT J26-6
SOUT J10-8 SIN J26-4
SCK J10-12 SCK J26-2
PCS0 J10-6 PCS0 J26-8
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 400k.
MIMXRT1060-EVKC
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKC board
Personal Computer
Board settings
Remove the resistor R305 and weld 0Ω resistor to R346,R350,R356,R362.
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J17-4 SIN SW2-3
SIN J17-5 SOUT SW2-2
SCK J17-6 SCK SW2-1
PCS0 J17-3 PCS0 SW2-4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 150k.
FRDM-IMXRT1152
Hardware requirements
Type-C USB cable
FRDM-IMXRT1152 board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SIN J11-10 SOUT J44-1
SOUT J11-8 SIN J44-3
SCK J11-12 SCK J44-5
PCS0 J11-6 PCS0 J44-7
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 400k.
EVK-MCIMX7ULP
Hardware requirements
Micro USB cable
MCIMX7ULP-EVK board
J-Link Debug Probe
5V power supply
Personal Computer
Board settings
1.The example requires connecting the FLEXIO pins with the LPSPI pins;
2.Remove the resistors R101, R19 on base board; Note: Remove R101,R19 to avoid some other signals may have interference on LPSPI, if users just run this application to demonstrate LPSPI function and no other applicaions are running at the same time, then R101 & R19 do not need to be removed.
please connect between LPSPI1 pins and LPSPI0 pins The connection should be set as following:
J8-3(R191 should be short-circuited), R101 pad1(On base board) connected
J8-4(R190 should be short-circuited), R22(On base board) connected
J8-5(R188 should be short-circuited), TP25(On base board) connected
J8-6(R189 should be short-circuited), TP27(On base board) connected
Please note this application can’t support running with Linux BSP!
Please note this application can only run well with RAM link file! If run it in QSPI flash, there’s high latency when instruction cache miss. Although the LPSPI has 4 words FIFO it still cannot adapt to the cache miss latency in slave side. To run LPSPI slave in QSPI flash, either use DMA driver or do synchronization for data exchange.
Note
Because of the LPSPI signal pin allocating issue, you can not restart this demo/example by press the ResetButton(SW3):
The LPSPI1_SIN, LPSPI1_SOUT, LPSPI1_SCK and LPSPI0_SOUT pins is connected to PTA12, PTA13, PTA14 and PTA15 pins.
These pins is also used as BOO_CFG12, BOO_CFG13, BOO_CFG14 and BOO_CFG15 when the i.MX SoC reboot. These signals is
driven by LPSPI0 pins(PTA18, PTA19, PTA20 and PTA23), when user press ResetButton. This may cause M4 Core enter enter
incorrect boot modes and only re-powerup the board can let the M4 core exit such modes.
##### Prepare the Demo
1. Connect 5V power supply and J-Link Debug Probe to the board, switch SW1 to power on the board.
2. Connect a micro USB cable between the host PC and the J6 USB port on the target board.
3. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Download the program to the target board.
5. Either press the reset button on 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.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master – LPSPI_slave
CLK – CLK
PCS – PCS
SOUT – SIN
SIN – SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
EVK-MIMX8ULP
Hardware requirements
Micro USB cable
MIMX8ULP-EVK/EVK9 board
J-Link Debug Probe
5V power supply
Personal Computer
Board settings
1.The example requires connecting the FLEXIO0 pins with the LPSPI1 pins; Please use four dupont lines to connect pins on MIMX8ULP-EVK base board as following:
ARDU_D3/PTB0_FXIO0_D16/PCS(J21,4), ARDU_A0/PTA15_LPSPI1_PCS0(J23,1) connected
ARDU_D2/PTB1_FXIO0_D17/SOUT(J21,3), ARDU_A1/PTA16_LPSPI1_SIN(J23,2) connected
ARDU_D1/PTB2_FXIO0_D18/SIN(J21,2), ARDU_A2/PTA17_LPSPI1_SOUT(J23,3) connected
ARDU_D0/PTB3_FXIO0_D19/SCK(J21,1), ARDU_A3/PTA18_LPSPI1_SCK(J23,4) connected
2.Remove the resistors R139,R159 and add the resistors R140,R158 on base board;
Please note this application can’t support running with Linux BSP!
Please note this application can only run well with RAM link file! If run it in QSPI flash, there’s high latency when instruction cache miss. Although the LPSPI has 4 words FIFO it still cannot adapt to the cache miss latency in slave side. To run LPSPI slave in QSPI flash, either use DMA driver or do synchronization for data exchange.
Prepare the Demo
Connect 5V power supply and J-Link Debug Probe to the board, switch SW10 to power on the board.
Connect a micro USB cable between the host PC and the J17 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 example.
Running the demo
When the example runs successfully, you can see the similar information from the terminal as below.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
SCK -- SCK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
EVK-MIMXRT1010
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1010 board
Personal Computer
Board settings
Remove the resistor R90 and weld 0Ω resistor to R800. To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J57-8 SIN J26-6
SIN J57-10 SOUT J26-4
SCK J57-12 SCK J26-8
PCS0 J57-6 PCS0 J56-10
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note:
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case, don’t set baudrate of transmission more than 300k (keil flexspi_nor_debug and armgcc flexspi_nor_debug do not more than 150k).
================================
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 J41.
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.
EVK-MIMXRT1015
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1015 board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J19-4 SIN J18-5
SIN J19-5 SOUT J18-6
SCK J19-6 SCK J18-3
PCS0 J19-3 PCS0 J18-1
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note:
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case, don’t set baudrate of transmission more than 300k (keil flexspi_nor_debug and armgcc flexspi_nor_debug do not more than 150k).
================================
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 J41.
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.
EVK-MIMXRT1020
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1020 board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J19-4 SIN J18-5
SIN J19-5 SOUT J18-6
SCK J19-6 SCK J18-3
PCS0 J19-3 PCS0 J18-4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note:
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case, don’t set baudrate of transmission more than 300k (keil flexspi_nor_debug and armgcc flexspi_nor_debug do not more than 150k).
================================
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
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J19-8 SIN J18-10
SIN J19-10 SOUT J18-12
SCK J19-12 SCK J18-6
PCS0 J19-6 PCS0 J18-8
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note:
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case, don’t set baudrate of transmission more than 300k (keil flexspi_nor_debug and armgcc flexspi_nor_debug do not more than 150k).
================================
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
Weld 0Ω resistor to R346,R350,R356,R362.
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J17-4 SIN SW2-3
SIN J17-5 SOUT SW2-2
SCK J17-6 SCK SW2-1
PCS0 J17-3 PCS0 SW2-4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 150k.
EVK-MIMXRT1064
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1064 board
Personal Computer
Board settings
Remove the resistor R334 and weld 0Ω resistor to R278,R279,R280,R281.
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J24-4 SIN SW5-3
SIN J24-5 SOUT SW5-2
SCK J24-6 SCK SW5-1
PCS0 J24-3 PCS0 SW5-4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 150k.
MIMXRT1160-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1160-EVK board
Personal Computer
Board settings
Remove 0Ω resistor to R200,R406,R408,R404.
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SIN J10-10 SOUT J26-6
SOUT J10-8 SIN J26-4
SCK J10-12 SCK J26-2
PCS0 J10-6 PCS0 J26-8
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 150k.
MIMXRT1180-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1180-EVK board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SCK J44-12 SCK J41-2
SIN J44-10 SOUT J41-6
SOUT J44-8 SIN J41-4
PCS0 J44-6 PCS0 J41-8
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 150k.
FRDM-K32L2A4S
Hardware requirements
Mini USB cable
FRDM-K32L2A4S board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SOUT J2 pin 8 SIN J20 pin 7
SIN J2 pin 10 SOUT J20 pin 6
SCK J2 pin 12 SCK J20 pin 5
PCS0 J2 pin 6 PCS0 J20 pin 4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-K32L3A6
Hardware requirements
Mini USB cable
FRDM-K32L3A6 board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT(PTE19) J1 pin 7 SIN (PTC11) J4 pin 2
SIN (PTE13) J1 pin 1 SOUT(PTC9) J2 pin 18
SCK (PTB15) J3 pin 15 SCK (PTC30) J2 pin 13
PCS0(PTE21) J1 pin 11 PCS0(PTC12) J4 pin 4
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-KE15Z
Hardware requirements
Micro USB cable
FRDM-KE15Z board
Personal Computer
Board settings
The example requires connecting the FLEXIO pins with the LPSPI pins The connection should be set as following: SLAVE connect to MASTER Pin Name Board Location Pin Name Board Location SOUT J2 pin 8 SIN J21 pin 8 SIN J2 pin 10 SOUT J21 pin 7 SCK J2 pin 12 SCK J21 pin 6 PCS3 J2 pin 6 PCS3 J21 pin 5
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, the following message is displayed in the terminal:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXI_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-KE17Z
Hardware requirements
Micro USB cable
FRDM-KE17Z board
Personal Computer
Board settings
The example requires connecting the FLEXIO pins with the LPSPI pins The connection should be set as following: MASTER connect to SLAVE Pin Name Board Location Pin Name Board Location SOUT J2 pin 15 SIN J2 pin 10 SIN J1 pin 7 SOUT J2 pin 8 SCK J2 pin 17 SCK J2 pin 12 PCS J1 pin 5 PCS1 J2 pin 6
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, the following message is displayed in the terminal:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXI_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-KE17Z512
Hardware requirements
Micro USB cable
FRDM-KE17Z512 board
Personal Computer
Board settings
The example requires connecting the FLEXIO pins with the LPSPI pins The connection should be set as following: MASTER connect to SLAVE Pin Name Board Location Pin Name Board Location SOUT J2 pin 15 SIN J2 pin 10 SIN J2 pin 2 SOUT J2 pin 8 SCK J2 pin 17 SCK J2 pin 12 PCS J1 pin 5 PCS2 J2 pin 6
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
When the example runs successfully, the following message is displayed in the terminal:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXI_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXA156
Hardware requirements
Type-C USB cable
FRDM-MCXA156 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 14 SIN J6 pin 5
SIN J8 pin 13 SOUT J6 pin 6
SCK J8 pin 15 SCK J6 pin 4
PCS0 J8 pin 16 PCS0 J6 pin 3
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J21.
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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXE247
Hardware requirements
USB-C cable
FRDM-MCXE247 board
Personal Computer
Board settings
The example requires connecting the FLEXIO pins with the LPSPI pins The connection should be set as following:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI) Pin Name Board Location Pin Name Board Location SOUT J2-4 SIN J6-5 SIN J2-8 SOUT J6-6 SCK J2-9 SCK J6-4 PCS J1-13 PCS2 J6-3
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
When the example runs successfully, the following message is displayed in the terminal:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXI_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXN236
Hardware requirements
Type-C USB cable
FRDM-MCXN236 board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI3)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 26 SIN J2 pin 10
SIN J8 pin 25 SOUT J2 pin 8
SCK J8 pin 27 SCK J2 pin 12
PCS0 J8 pin 28 PCS0 J2 pin 6
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J10.
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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXN947
Hardware requirements
Type-C USB cable
FRDM-MCXN947 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI1)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 26 SIN J2 pin 10
SIN J8 pin 25 SOUT J2 pin 8
SCK J8 pin 27 SCK J2 pin 12
PCS0 J8 pin 28 PCS0 J2 pin 6
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J17.
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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXN947T
Hardware requirements
Type-C USB cable
FRDM-MCXN947T Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI1)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 26 SIN J2 pin 10
SIN J8 pin 25 SOUT J2 pin 8
SCK J8 pin 27 SCK J2 pin 12
PCS0 J8 pin 28 PCS0 J2 pin 6
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J17.
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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXW71
Hardware requirements
Type-C USB cable
FRDM-MCXW71 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J1 pin 3 SIN J1 pin 2
SIN J1 pin 8 SOUT J2 pin 9
SCK J1 pin 4 SCK J1 pin 5
PCS0 J1 pin 7 PCS0 J1 pin 1
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
MCX-W71-EVK
Hardware requirements
Type-C USB cable
MCX-W71-EVK Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J1 pin 7 SOUT J2 pin 13
SIN J1 pin 13 SIN J2 pin 11
SCK J1 pin 15 SCK J2 pin 9
PCS0 J1 pin 5 PCS0 J2 pin 15
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
KW45B41Z-EVK
Hardware requirements
Mini/micro USB cable
KW45B41Z-EVK Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J1 pin 7 SIN J1 pin 2
SIN J1 pin 4 SOUT J2 pin 2
SCK J1 pin 8 SCK J1 pin 5
PCS0 J1 pin 3 PCS0 J1 pin 1
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
KW47-EVK
Hardware requirements
Type-C USB cable
KW47-EVK Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J1 pin 7 SOUT J2 pin 13
SIN J1 pin 13 SIN J2 pin 11
SCK J1 pin 15 SCK J2 pin 9
PCS0 J1 pin 5 PCS0 J2 pin 15
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
MCX-N5XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N5XX-EVK Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI1)
Pin Name Board Location Pin Name Board Location
SOUT J20 pin 26 SIN J2 pin 10
SIN J20 pin 25 SOUT J2 pin 8
SCK J20 pin 27 SCK J2 pin 12
PCS0 J20 pin 28 PCS0 J2 pin 6
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J5.
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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
MCX-N9XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N9XX-EVK Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI1)
Pin Name Board Location Pin Name Board Location
SOUT J20 pin 26 SIN J2 pin 10
SIN J20 pin 25 SOUT J2 pin 8
SCK J20 pin 27 SCK J2 pin 12
PCS0 J20 pin 28 PCS0 J2 pin 6
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J5.
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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
MCX-W72-EVK
Hardware requirements
Type-C USB cable
MCX-W72-EVK Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J1 pin 7 SOUT J2 pin 13
SIN J1 pin 13 SIN J2 pin 11
SCK J1 pin 15 SCK J2 pin 9
PCS0 J1 pin 5 PCS0 J2 pin 15
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J14.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
MIMXRT700-EVK
Hardware requirements
Micro USB cable
MIMXRT700-EVK Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
Slave(LPSPI16) connect to MASTER(FlexIO0)
Pin Name Board Location Pin Name Board Location
SOUT J22 pin 6 SIN J5 pin 3
SIN J22 pin 5 SOUT J5 Pin 6
SCK J22 pin 4 SCK J5 pin 4
PCS0 J22 pin 3 PCS J5 pin 5
GND J22 pin 8 GND J6 pin 7
Prepare the Demo
Connect a USB cable between the host PC and the MCU-LINK USB port 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.
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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
KW47-LOC
Hardware requirements
Type-C USB cable
KW47-LOC Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J2 pin 6 SIN J1 pin 5
SIN J2 pin 5 SOUT J1 pin 6
SCK J2 pin 4 SCK J1 pin 4
PCS0 J2 pin 3 PCS0 J1 pin 3
Short the JP24-2 and JP24-3 with the jumper, other jumpers keep default configuration.
Prepare the Demo
Connect a USB cable between the host PC and the LOC board J3.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
MCXW72-LOC
Hardware requirements
Type-C USB cable
MCXW72-LOC Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J2 pin 6 SIN J1 pin 5
SIN J2 pin 5 SOUT J1 pin 6
SCK J2 pin 4 SCK J1 pin 4
PCS0 J2 pin 3 PCS0 J1 pin 3
Short the JP24-2 and JP24-3 with the jumper, other jumpers keep default configuration.
Prepare the Demo
Connect a USB cable between the host PC and the LOC board J3.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-IMXRT1186
Hardware requirements
Type-C USB cable
FRDM-IMXRT1186 board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
SLAVE connect to MASTER
Pin Name Board Location Pin Name Board Location
SCK J3-18 SCK J1-6
SIN J3-14 SOUT J1-10
SOUT J3-16 SIN J1-8
PCS0 J3-12 PCS0 J1-12
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these 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
You can see the similar message shows following in the terminal if the example runs successfully.
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
Note
When the code is executed in external flash (flexspi_nor targets), the code execution speed is slow. If the baudrate is fast, software can’t handle the data in time. So in this case don’t set baudrate of transmission more than 150k.
FRDM-MCXA266
Hardware requirements
Type-C USB cable
FRDM-MCXA266 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 14 SIN J6 pin 5
SIN J8 pin 13 SOUT J6 pin 6
SCK J8 pin 15 SCK J6 pin 4
PCS0 J8 pin 16 PCS0 J6 pin 3
Prepare the Demo
Connect a USB cable between the host PC and the EVK 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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXA366
Hardware requirements
Type-C USB cable
FRDM-MCXA366 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 14 SIN J6 pin 5
SIN J8 pin 13 SOUT J6 pin 6
SCK J8 pin 15 SCK J6 pin 4
PCS0 J8 pin 16 PCS0 J6 pin 3
Prepare the Demo
Connect a USB cable between the host PC and the EVK 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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXW72
Hardware requirements
Type-C USB cable
FRDM-MCXW72 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI0)
Pin Name Board Location Pin Name Board Location
SOUT J5 pin 6 SIN J6 pin 5
SIN J5 pin 5 SOUT J6 pin 6
SCK J5 pin 4 SCK J6 pin 4
PCS0 J5 pin 3 PCS0 J6 pin 3
Other jumpers keep default configuration.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
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 demo in the terminal window:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXA577
Hardware requirements
Type-C USB cable
FRDM-MCXA577 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI2)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 14 SIN J6 pin 5
SIN J8 pin 13 SOUT J6 pin 6
SCK J8 pin 15 SCK J6 pin 4
PCS0 J8 pin 16 PCS0 J6 pin 3
Prepare the Demo
Connect a USB cable between the host PC and the EVK 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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.
FRDM-MCXA287
Hardware requirements
Type-C USB cable
FRDM-MCXA287 Board
Personal Computer
Board settings
To make the example work, connections needed to be as follows:
MASTER(FlexIO SPI) connect to SLAVE(LPSPI2)
Pin Name Board Location Pin Name Board Location
SOUT J8 pin 14 SIN J6 pin 5
SIN J8 pin 13 SOUT J6 pin 6
SCK J8 pin 15 SCK J6 pin 4
PCS0 J8 pin 16 PCS0 J6 pin 3
Prepare the Demo
Connect a USB cable between the host PC and the EVK 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:
FLEXIO Master edma - LPSPI Slave interrupt example start.
This example use one flexio spi as master and one lpspi instance as slave on one board.
Master uses edma and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
FLEXIO_SPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
This is LPSPI slave call back.
FLEXIO SPI master <-> LPSPI slave transfer all data matched!
End of example.