Hardware requirements
Mini/micro USB cable
FRDM-K22F board
Personal Computer
Board settings
SPI one board: Transfer data from instance0 to instance 1 of SPI interface. SPI0 pins are connected with SPI1 pins of board
INSTANCE0(SPI0) CONNECTS TO INSTANCE1(SPI1)
Pin Name Board Location Pin Name Board Location
MISO J1 pin 11 MISO J2 pin 8
MOSI J1 pin 16 MOSI J2 pin 10
SCK J1 pin 15 SCK J2 pin 12
PCS0 J24 pin 9 PCS0 J2 pin 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.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the log would be seen on the OpenSDA terminal like:
dspi_functional_interrupt example start.
This example use one dspi instance as master and another as slave on one board.
Master and slave are both use interrupt way.
Please make sure you make the correct line connection. Basically, the connection is:
DSPI_master -- DSPI_slave
CLK -- CLK
PCS -- PCS
SOUT -- SIN
SIN -- SOUT
DSPI transfer all data matched!