Unable to get canbus communication. ?

i have to setup Renesas Ra2L1 MCU to run on 40Kz frequency/data rate, i have setup the MCU using project perspective. but i am unable to communicate with master device. as per data sheet of master device i will get broadcast message (8 byte) at can id 0x00000001, 0x00000002, 0x00000003. i have configured my hardware with same can ID and baudrate, for verification i have attached configuration xml file, 

my problem is i am not receiving anything on my can receive handle, i  Also have 120E resistor on CAN bus. Also my code doesn't hang anywhere in runtime. to emulate master device i setup another hardware with RA2L1 MCU to mimic it, i was able to receive message from my hardware. but that doesn't solve my problem as i have to connect with master device to achieve full working.

is there any other thing that need to be setup for can bus? is there a way i can receive message irrespective of can id match? how do check for error like if it is baud rate error?

  • Is there any data being transmitted on the CANL and CANH lines? Do you have them swapped over at one end?

    If data is being transmitted, is it being transmitted continuously, or just once every time the master sends?

    If it is being transmitted continuously, look at the CANTX line between the RECEIVING transceiver and the micro. There should be a SINGLE negative-going pulse for every message.

  • Is there any data being transmitted on the CANL and CANH lines? Do you have them swapped over at one end?

    yes i have tried swapping CAN H and L nothing worked

    If data is being transmitted, is it being transmitted continuously, or just once every time the master sends?

    Master device sends broadcast periodically, at 100ms rate

  • That suggests that the hardware is working. If the receiving end is not configured correctly, the transmitter repeats the transmission indefinitely

    As a reality check, you should see the transmitted waveform on the CAN RX pin of the receiving MCU.RA

    If you set the associated mask register to all zeroes, and the Mask Invalid bit to zero, then it will receive all messages.

    Are you sending from a RA2L1 to another RA2L1 , or receiving from a different device, or sending to a different device?

  • to emulate master device i setup another hardware with RA2L1 MCU to mimic it, i was able to receive message from my hardware. but that doesn't solve my problem as i have to connect with master device to achieve full working.

    If the above statement is true, then the transmitting RA2L1 is performing as expected. The issue seems to be in the receiving side, taking into consideration that the other RA2L1 can also receive without a problem.

    Regards

  • Hello,

    I would suggest to you to take a look on CAN example given from Renesas github for EK-RA2L1.

    can.zip

    Best Regards,

    IK