Creating a CAN Bridge with MPC5606B

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

Creating a CAN Bridge with MPC5606B

Jump to solution
1,226 Views
fscheidl
Contributor II

So I am still experimenting with the MPC5606B StarterTRAK and I'm trying to create a CAN Bus bridge using the development board.

 

CAN Bus bridge is supposed to mean, I attach a second CAN transceiver to the board on another CAN port and want all incoming messages on the first port (RX), without any exception, to be forwarded to the second as output (TX) (In the right order!) and vice versa.

 

The first CAN transceiver I'm using is the one included in the system basis chip on the development board, the second one is a Microchip MCP2551. I do have a working setup for this using just a regular ATmega328 and the MCP2551, but I can't seem to get it to work with the MPC5606B.

 

The bitrate my system is using is set to 500kbit/s.

 

Now, the system kind of seems to slow or rather seems to lose some messages. I'm using the example code (CAN driver) included with the development board with the RX-mask set accordingly. Would it be better to use a FIFO CAN structure in this case? Are there any other things I have to consider?

 

Thank you very much in advance!

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
1,030 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I am not sure of the driver/example you are using, but still you need some CPU intervention to

- check there is new message in RX MB or RXFIFO

- read RX MB or RXFIFO and forward the data to other module’s TX MB. Message will be send on first opportunity window on the CAN bus.

 

The MB interrupt or RXFIFO interrupt is recommended here as fastest way to know a new message is received.

The RXFIFO can ensure the messages will be send in right order, I think.

BR, Petr

View solution in original post

0 Kudos
Reply
1 Reply
1,031 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I am not sure of the driver/example you are using, but still you need some CPU intervention to

- check there is new message in RX MB or RXFIFO

- read RX MB or RXFIFO and forward the data to other module’s TX MB. Message will be send on first opportunity window on the CAN bus.

 

The MB interrupt or RXFIFO interrupt is recommended here as fastest way to know a new message is received.

The RXFIFO can ensure the messages will be send in right order, I think.

BR, Petr

0 Kudos
Reply