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

Parents
  • Hi Michael,
    I am experiencing problem getting CAN controllers of LPC2119 to transmit or receive messages at all. At least you manage to send out a CAN message successfully.

    My LPC2119 controller fails to send any message with the Keil example BlinkyCAN, which works perfectly on my LPC2129 controller though. Acc. to datasheet and manual, both LPC2129 and LPC2119 shares exactly the same archtecture except for its flash memory size.

    Can you send me your code; I like to see how you manage to get your LPC2119 to send out CAN messages.

    Regards,
    Allan

Reply
  • Hi Michael,
    I am experiencing problem getting CAN controllers of LPC2119 to transmit or receive messages at all. At least you manage to send out a CAN message successfully.

    My LPC2119 controller fails to send any message with the Keil example BlinkyCAN, which works perfectly on my LPC2129 controller though. Acc. to datasheet and manual, both LPC2129 and LPC2119 shares exactly the same archtecture except for its flash memory size.

    Can you send me your code; I like to see how you manage to get your LPC2119 to send out CAN messages.

    Regards,
    Allan

Children
No data