lpspi_interrupt#
Overview#
The lpspi_functional_interrupt example shows how to use LPSPI driver in interrupt way:
In this example , one lpspi instance used as LPSPI master and another lpspi instance used as LPSPI slave .
LPSPI master send/received data to/from LPSPI slave in interrupt . (LPSPI Slave using interrupt to receive/send the data)
Running the demo#
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start. This example use one lpspi instance as master and another as slave on one board. Master uses interrupt way and slave uses interrupt way. Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly Please make sure you make the correct line connection. Basically, the connection is: LPSPI_master – LPSPI_slave CLK – CLK PCS – PCS SOUT – SIN SIN – SOUT
LPSPI transfer all data matched!
End of example.
Supported Boards#
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.
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J24-4 SIN J24-2
SIN J24-5 SOUT J24-9
SCK J24-6 SCK J24-10
PCS0 J24-3 PCS0 J24-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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
EVK-MIMXRT1020
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1020 board
Personal Computer
Board settings
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J18-6 SIN J19-5
SIN J18-5 SOUT J19-4
SCK J18-3 SCK J19-6
PCS0 J18-4 PCS0 J19-3
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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
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
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J18-12 SIN J19-10
SIN J18-10 SOUT J19-8
SCK J18-6 SCK J19-12
PCS0 J18-8 PCS0 J19-6
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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
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.
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:
MASTER connect to SLAVE
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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI 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(SPI0) connect to SLAVE(SPI3)
Pin Name Board Location Pin Name Board Location
SOUT J2 pin 8 SIN J1 pin 6
SIN J2 pin 10 SOUT J1 pin 2
SCK J2 pin 12 SCK J3 pin 5
PCS2 J2 pin 6 PCS1 J3 pin 9
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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI 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 between LPSPI0 pins and LPSPI1 pins The connection should be set as following: MASTER connect to SLAVE Pin Name Board Location Pin Name Board Location SOUT J3 pin 7 SIN J2 pin 10 SIN J3 pin 9 SOUT J2 pin 8 SCK J3 pin 11 SCK J2 pin 12 PCS3 J3 pin 5 PCS3 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:
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA153
Hardware requirements
Type-C USB cable
FRDM-MCXA153 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI0) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J6-6 SIN J2-10
SIN J6-5 SOUT J2-8
SCK J6-4 SCK J2-12
PCS0 J6-3 PCS1 J2-6
Prepare the Demo
Connect a Type-C USB cable between the host PC and the MCU-Link port(J15) on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA156
Hardware requirements
Type-C USB cable
FRDM-MCXA156 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI0) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J6-6 SIN J3-9
SIN J6-5 SOUT J3-11
SCK J6-4 SCK J3-7
PCS0 J6-3 PCS1 J3-5
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA346
Hardware requirements
Type-C USB cable
FRDM-MCXA346 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI0) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J6-6 SIN J2-10
SIN J6-5 SOUT J2-8
SCK J6-4 SCK J2-12
PCS0 J6-3 PCS1 J2-6
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI 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 between LPSPI0 pins and LPSPI2 pins The connection should be set as following: MASTER connect to SLAVE Pin Name Board Location Pin Name Board Location SOUT J6 pin 6 SIN J7 pin 5 SIN J6 pin 5 SOUT J7 pin 3 SCK J6 pin 4 SCK J7 pin 7 PCS2 J6 pin 3 PCS1 J7 pin 1
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:
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXN236
Hardware requirements
Type-C USB cable
FRDM-MCXN236 board
Personal Computer
Board settings
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J5-6 SIN J2-10
SIN J1-4 SOUT J2-8
SCK J5-5 SCK J2-12
PCS0 J1-2 PCS0 J2-6
Prepare the Demo
Connect a mini USB cable between the PC host and the MCU-Link USB port on the board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXN947
Hardware requirements
Type-C USB cable
FRDM-MCXN947 board
Personal Computer
Board settings
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J2-18 SIN J2-10
SIN J1-4 SOUT J2-8
SCK J2-20 SCK J2-12
PCS0 J1-2 PCS0 J2-6
Prepare the Demo
Connect a mini USB cable between the PC host and the MCU-Link USB port on the board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXN947T
Hardware requirements
Type-C USB cable
FRDM-MCXN947T board
Personal Computer
Board settings
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J2-18 SIN J2-10
SIN J1-4 SOUT J2-8
SCK J2-20 SCK J2-12
PCS0 J1-2 PCS0 J2-6
Prepare the Demo
Connect a mini USB cable between the PC host and the MCU-Link USB port on the board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
MCX-N5XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N5XX-EVK board
Personal Computer
Board settings
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J2-18 SIN J2-10
SIN J1-4 SOUT J2-8
SCK J2-20 SCK J2-12
PCS0 J1-2 PCS0 J2-6
Prepare the Demo
Connect a mini USB cable between the PC host and the MCU-Link USB port on the board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
MCX-N9XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N9XX-EVK board
Personal Computer
Board settings
LPSPI:
MASTER connect to SLAVE
Pin Name Board Location Pin Name Board Location
SOUT J2-18 SIN J2-10
SIN J1-4 SOUT J2-8
SCK J2-20 SCK J2-12
PCS0 J1-2 PCS0 J2-6
Prepare the Demo
Connect a mini USB cable between the PC host and the MCU-Link USB port on the board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXL255
Hardware requirements
Type-C USB cable
FRDM-MCXL255 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI1) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J2-8 SIN J2-10
SIN J2-10 SOUT J2-8
SCK J2-12 SCK J2-12
PCS0 J2-6 PCS1 J2-6
GND J2-14 GND J2-14
Make sure you have solder bridges SJ1 and SJ2 set to
2-1 for the main core (cm33)
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port (J16) 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 following lines are printed to the serial terminal when the demo program is executed.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA174
Hardware requirements
Type-C USB cable
FRDM-MCXA174 board
Personal Computer
Board settings
Short JP7
LPSPI:
MASTER(SPI0) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J6-6 SIN J2-10
SIN J6-5 SOUT J2-8
SCK J6-4 SCK J2-12
PCS0 J6-3 PCS1 J2-6
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA344
Hardware requirements
Type-C USB cable
FRDM-MCXA344 board
Personal Computer
Board settings
Short JP7
LPSPI:
MASTER(SPI0) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J6-6 SIN J2-10
SIN J6-5 SOUT J2-8
SCK J6-4 SCK J2-12
PCS0 J6-3 PCS1 J2-6
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA266
Hardware requirements
Type-C USB cable
FRDM-MCXA266 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI0) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J6-6 SIN J2-10
SIN J6-5 SOUT J2-8
SCK J6-4 SCK J2-12
PCS0 J6-3 PCS1 J2-6
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA366
Hardware requirements
Type-C USB cable
FRDM-MCXA366 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI0) connect to SLAVE(SPI1)
Pin Name Board Location Pin Name Board Location
SOUT J6-6 SIN J2-10
SIN J6-5 SOUT J2-8
SCK J6-4 SCK J2-12
PCS0 J6-3 PCS1 J2-6
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA577
Hardware requirements
Type-C USB cable
FRDM-MCXA577 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI1) connect to SLAVE(SPI2)
Pin Name Board Location Pin Name Board Location
SOUT J2-10 SIN J6-6
SIN J2-8 SOUT J6-5
SCK J2-12 SCK J6-4
PCS0 J2-6 PCS1 J6-3
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
FRDM-MCXA287
Hardware requirements
Type-C USB cable
FRDM-MCXA287 board
Personal Computer
Board settings
LPSPI:
MASTER(SPI1) connect to SLAVE(SPI2)
Pin Name Board Location Pin Name Board Location
SOUT J2-10 SIN J6-6
SIN J2-8 SOUT J6-5
SCK J2-12 SCK J6-4
PCS0 J2-6 PCS1 J6-3
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal on PC for MCU-Link 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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Note that some LPSPI instances interrupt is in INTMUX ,you should set the intmux when you porting this example accordingly
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.
IMX943-EVK
Hardware requirements
Mini/micro USB cable
IMX943-EVK board
Personal Computer
Board settings
LPSPI:
MASTER(LPSPI3) connect to SLAVE(LPSPI8)
Pin Name Board Location Pin Name Board Location
SOUT J47-8 SIN J43-10
SIN J47-10 SOUT J43-8
SCK J47-12 SCK J43-12
PCS0 J47-6 PCS0 J43-6
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
When the example runs successfully, you can see the similar information from the terminal as below.
LPSPI functional interrupt example start.
This example use one lpspi instance as master and another as slave on one board.
Master uses interrupt way and slave uses interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
LPSPI_master -- LPSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
LPSPI transfer all data matched!
End of example.