What do I need make 2 TWR-K21F120MA boards talk to each other over multiple different interfaces?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What do I need make 2 TWR-K21F120MA boards talk to each other over multiple different interfaces?

Jump to solution
1,207 Views
brentgreenwald
Contributor III

I am trying to get two TWR-K21F120MA boards to talk to each other over multiple different interfaces and don't know what all I need to get to do that. The Interfaces are I2C, SPI, CAN, UART, and I believe the last one is called EMI. Can some one give me an idea of what I need to buy to do this? plz help!

0 Kudos
Reply
1 Solution
869 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Brent,

As you know that the CAN bus needs transceiver, if you want to connect two TWR-K21F120M  via CAN bus, you have to establish two tower system, each tower system consists of TWR-K21F120, TWR-SER,primary elevator board and secondary elevator board, there is CAN connector on the TWR-SER board, you just need to two wires to connect them.

Hope it can help you

BR

Xiangjun rong

View solution in original post

4 Replies
869 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Brent,

From theory, you can have two  K21 processors communicate via any interfaces:I2C, SPI, CAN, UART, but from hardware simplicity, I suggest you use SPI, UART,I2C modules, the CAN needs transceiver, if you use RS232 protocol between two boards, the UART transceiver is required.

If you use SPI modules, you can connect the follwoing signals:

master SPI                           Slave SPI

PCS                                    /SS

MOSI                                   MOSI

MISO                                   MISO

SCLK                                  SCLK

GND                                    GND

If you use UART without RS232

UART of K21                           UART of another K21

Tx                                              Rx

Rx                                             Tx

If you use I2C, connect the SCL and SDA with pull-up resistors, and connect the SCL and SDA respectively.

In SDK2.0, we provide the example between master SPI and slave SPI, I think you can refer to the example.

C:\DriverE\Freescale\SDK2.0_K64F\boards\frdmk64f\driver_examples\dspi

Hope it can help you.

BR

Xiangjun Rong

0 Kudos
Reply
869 Views
brentgreenwald
Contributor III

So in the case that I also need to connect with CAN should I get a TWR-SER​ board, or is their a better way to go about it?

B.G.

0 Kudos
Reply
870 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Brent,

As you know that the CAN bus needs transceiver, if you want to connect two TWR-K21F120M  via CAN bus, you have to establish two tower system, each tower system consists of TWR-K21F120, TWR-SER,primary elevator board and secondary elevator board, there is CAN connector on the TWR-SER board, you just need to two wires to connect them.

Hope it can help you

BR

Xiangjun rong

869 Views
egoodii
Senior Contributor III

Two wires with a net 60 ohms across them, and 'at least indirectly' a ground-reference between the systems.