I am sending data between 2 dsp board via CAN bus.
Its running and even I am receiving correct data on CAN analyzer as well.
What is the minimum delay is required between sending.
I am sending data at 1000 kbps and sending from 33 micro second loop and loosing data, if I increase the delay I got some data.
I observed that minimum 120-140 micro second delay is required to send data over the CAN bus.
I calculated following
Can bus, MCU clock speed is 200 MHz.
Max bitrate is 1,000,000 // 1000Kbps.
Each frame has total 131 (approx. )bits including 64 bits of data.
So 1,000,000/131 = 7633 frames can be sent through CAN in 1 seconds
So 1 frame takes 1sec/7633 = 131 micro seconds to send.
-------------------------------------------------------------------------------------------------
if I send 10 times at every 30 micro seconds then I hardly received 2 or 3 data packets on other board.
Is there any way I can send data at every 30 micro seconds through the CAN bus ?
Sample code:
for (;;)
{
Can_send(,,,);
delay (30); // I am sending data in every 30 micro seconds.
}