Connect FRDM-K66F and TWR-KV58 using SPI

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect FRDM-K66F and TWR-KV58 using SPI

391 Views
evgenyerlihman
Contributor IV

Hello,

I am trying to connect two evaluation boards, FRDM-K66F and TWR-KV58+elevation, using the SPI interface. Trying to use the FreeRTOS example for DSPI. When i connect two FRDM-K66F boards using SPI0 on both and the freertos example, i see the data going through correctly. But when i connect the FRDM-K66F that was the slave to a TWR-KV58 (with elevation boards) to serve as the master, i don not get any indication of incoming data on the K66F side.

This is how i connected the pins:

   KV58                        K66F

MOSI B45          MISO       J2 pin 8
MISO B44          MOSI       J2 pin 10
SCK   B48          SCK        J2 pin 12
PCS0 B46          PCS0      J2 pin 6

GND  B2            GND        J2 pin 14

The code is unmodified freertos_dspi example, with EXAMPLE_CONNECT_DSPI set to BOARD_TO_BOARD. 

Master is built with SPI_MASTER_SLAVE isMASTER and slave is built with SPI_MASTER_SLAVE isSLAVE.

Both using SPI0

Do i need to change any configurations to make this setup work?

Thanks,

Evgeny 

0 Kudos
2 Replies

127 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Evgeny

Maybe your connection is wrong,   it should be MOSI-MOSI,  MISO-MISO

Please check the four wire connection as below.

pastedImage_1.png

Regards

Daniel

0 Kudos

127 Views
evgenyerlihman
Contributor IV

Hi Daniel,

This is what i have in the readme.txt for frdmk66f_rtos_examples_freertos_dspi that can be found in MCUXpresso SDK for K66F:

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
MOSI J2 pin    10 MISO J6 pin 6
MISO J2 pin    8 MOSI J6 pin 7
SCK J2 pin     12 SCK J6 pin 5
PCS0 J2 pin    6 PCS0 J6 pin 4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So i guess it is a bit confusing....

Thanks,

Evgeny

0 Kudos