Bidirectional communication between 4 CAN modules (Arduino Mega + CAN-BUS Shield)

I have a problem to establish a stable communication between the 4 modules, when using the atachinterrupt function only 3 modules are able to communicate. And with other interruptions like delay(), millis() or even a timer the communication is generated but with instability in the sending times and arbitration.
Can someone help me ? I can provide information.


with the atachinterrupt function, the 4 module transmits information in a different time period

May be you are experiencing issues with the timing and synchronization of your interrupts. When using interrupts, it’s important to ensure that they don’t overlap or interfere with each other.

Interrupt routines should be as short and efficient as possible. Avoid using delays or other time-consuming functions inside your interrupt routines.

If you have multiple interrupts that need to work together, consider using flags to synchronize them. Set a flag inside one interrupt routine, and check for that flag in another interrupt routine to ensure that the timing is synchronized.

please someone help me on how to properly configure the interrupt so that the 4 nodes communicate with each other in a synchronized way and with the same message transmission rate.