This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sending and receiving CAN frames with LPC21x9 and RL-ARM

Hello

Can somebody answer me question?

I want to build one simple program using two can bus controller incorporated in LPC2119 mcu.
It is simple "can gateway".
On one channel speed 125 kbit and second 500kbit.
Basic idea is to send all frames from CAN1 to CAN2 and viceversa.
I tried to use RL-CAN library like this:
I make bypass filtering of can messages by using
ptrcan_af->AFMR = 0x00000003;
1. rx frame from CAN1
CAN_receive(2, &msg_in, 20)
2. tx frame on CAN2
3. rx frame from CAN2
4. rx frame on CAN1

The problem is when I receive message on can1 and send on can2 I receive the same message on can2. When another message come to can2 I have problem with synchronization and sometimes are strange data when messages arrives to fast.

Is possible to not recive on same CAN messages that was previously sended?

Anybody has idea how to make it simple?
Maybe without RL-can? in fact it is simple program...

Regards