I am currently working on a project that involves multiple boards communicating with each other via the CAN BUS. However, I have noticed that there are often communication conflicts between the modules and the central unit that manages communication.
More specifically, I have noticed that some modules are unable to send their messages to the central unit, which can cause problems in the overall system operation. I have carried out several checks on the wiring and transmission rates, but I have not been able to find the source of the problem.
I am convinced that this problem is related to the CAN BUS protocol, but I don't know how to solve it. If you have encountered a similar problem or have skills in the area of CAN BUS, I would be grateful for your advice and recommendations.
I am also open to any suggestions regarding debugging or troubleshooting practices in this field. I believe that together we can solve this problem and improve the operation of our system.
Thank you .
Thanks for reaching out to Renesas Engineering Community.
Which RL78 device are you using ? Is the RL78 the 'central unit' or a peripheral module?
I hope you understand that we can provide support only for the RL78 part of the application and not for devices from other vendors, but of course anyone can contribute.
Thank you for responding and letting us know that you are using cards based on the R7FA2L1A92DFL MCU to communicate with each other via the CAN bus.
So you are using RA2L1 devices and not RL78, is that correct ?
yes I use RA2L1 devices
In RA2L1 the CANMCLK is generated by the main clock oscillator, so you need to connect it externally.
Have you connected CAN transceivers to enable the CAN communication ?
Please also check the example on:
CANbus is designed to resolve conflicts, so it is highly unlikely that is the cause of various modules being unable to send.
How busy is the bus? How many are being sent every second, and what is the baud rate? Each message is about 50 bits, so you can calculate what percentage of the time the bus is in use.
Look at the bus waveform on a scope, and it it is constantly I use when it shouldn’t be, then none of the connected modules is sending an acknowledge pulse.
Our frame consists of 128 bits, and the data rate is 250 kbaud. According to the oscilloscope, the frame will take 525 microseconds to transmit.
baude rate prescaler 7
time segement 1 6 tq
time segment 2 3 tq
Synchron jump width 1tq
Oscilloscope captures to view electrical levels.
I have cards that can communicate with each other, but if I connect 5 cards, it works fine. However, as soon as I try to connect 7 cards, communication doesn't work anymore. My goal is to connect 24 cards together.
Do each of these cards have terminating resistors? If they do, perhaps there is too much termination. There should be only two terminating resistors (120 ohm) on the bus.
Indeed, I have added two termination resistors with a value of 120 ohms to the bus