What CAN the differance be?

Hi All,

I’ve used pretty much the same code on the PandaII and the Cobra on the same CAN channel. On the PandaII pretty much never got an off buss error even without the terminating resistor, but having the same electronix behind the Cobra gives me a lot, not always, but the longer I wait the more they become, boss off errors even with terminating R. Using a simple 2551 transceiver with or without the terminator R120.

Any ideas, where I should be looking / watching out for ?

Cheers,

Peter.

What speed are the controllers configured to?

You do not need the terminating resistor below 500k.

Hallo BrightIdea,

bus is clocked @ 250K, so removed the resistor … perfectly receiving the CAN messages, but when I send one then everytime I hit send then a nice bus off error nicely appears. Strangely enough monitoring for CAN messages still do work … this all worked before, when I pressed the touch screen button the action was confirmed by a sound so I know it worked. The CAN message caused a sound to be heard … must be something with sending the message but can’t find any thing wrong with. if I send with my reference device it workes just as espected.


private static void Toet()
        {
            // To do : send CAN message 00 0C 0F 37 (6) 00 00 40 05 03 01
            // Create a message list of 1 message
            msgList = new CAN.Message[1];
            for (int i = 0; i < msgList.Length; i++)
                msgList[i] = new CAN.Message();

            msgList[0].ArbID = 0x000C0F37; // 
            msgList[0].Data[0] = 0x00; // ?
            msgList[0].Data[1] = 0x00; // ?
            msgList[0].Data[2] = 0x40; // MFX
            msgList[0].Data[3] = 0x05; // Loc #5
            msgList[0].Data[4] = 0x03; // Function
            msgList[0].Data[5] = 0x01; // On
            msgList[0].Data[6] = 0x00; // NA
            msgList[0].Data[7] = 0x00; // NA
            // Send the 6 bytes for example
            msgList[0].DLC = 6;
            msgList[0].IsEID = true; //Extended ID
            msgList[0].IsRTR = false;
            // Send one message
            int numberOfMessagesPosted = canOne.PostMessages(msgList, 0, 1);
            // We wait for 100 ms
            Thread.Sleep(100);
            // Set data byte 5 to 00 = Off
            msgList[0].Data[5] = 00;
            // And send the same message
            numberOfMessagesPosted = canOne.PostMessages(msgList, 0, 1);
        }

Some aditional debug output to show receving does work but sending kind of goes bananas, although I don’t see any … but as you can see it recovers from the bus errors and keeps on receiving …


Local time is set to: 06/01/2011 00:18:54
CAN instantiated ... for 250 Kbps, based upon 72 MHz clock.
CAN Events initiated ... waiting for data or error events to happen.
 
>>> Channel One Received Data <<<
  MSGID: ID = 00-36-0F-37 (0) 00-00-40-05-03-00-00-00 received at 06/01/2011 00:19:03
  MSGID: ID = 00-37-DB-B7 (8) 47-42-9C-F5-01-27-00-10 received at 06/01/2011 00:19:03
>>> Channel One Received Data <<<
  MSGID: ID = 00-36-0F-37 (5) 00-00-00-00-11-00-00-00 received at 06/01/2011 00:19:03
>>> Channel One Received Data <<<
  MSGID: ID = 00-30-0F-37 (0) 47-42-9C-F5-01-27-00-10 received at 06/01/2011 00:19:05
  MSGID: ID = 00-31-B7-5B (8) 47-42-9C-F5-01-27-00-10 received at 06/01/2011 00:19:05
>>> Channel One Received Data <<<
  MSGID: ID = 00-00-0F-37 (7) 00-00-00-00-09-00-03-10 received at 06/01/2011 00:19:12
  MSGID: ID = 00-01-B7-5B (7) 00-00-00-00-09-00-03-10 received at 06/01/2011 00:19:12
  MSGID: ID = 00-00-0F-37 (6) 00-00-00-00-08-07-03-10 received at 06/01/2011 00:19:12
  MSGID: ID = 00-01-B7-5B (6) 00-00-00-00-08-07-03-10 received at 06/01/2011 00:19:12
  MSGID: ID = 00-00-0F-37 (5) 00-00-00-00-01-07-03-10 received at 06/01/2011 00:19:12
  MSGID: ID = 00-01-B7-5B (5) 00-00-00-00-01-07-03-10 received at 06/01/2011 00:19:12
>>> Channel One Error Received <<<
CAN Bus Off condition. Note that the controller is disabled in this case. Calling CAN.Reset() to re-enable it.!
>>> Channel One Received Data <<<
  MSGID: ID = 00-30-0F-37 (0) 00-00-00-00-01-07-03-10 received at 06/01/2011 00:19:35
  MSGID: ID = 00-31-B7-5B (8) 47-42-9C-F5-01-27-00-10 received at 06/01/2011 00:19:35
>>> Channel One Received Data <<<
  MSGID: ID = 00-0C-0F-37 (6) 00-00-40-05-03-01-03-10 received at 06/01/2011 00:19:38
  MSGID: ID = 00-0D-B7-5B (6) 00-00-40-05-03-01-00-10 received at 06/01/2011 00:19:38
  MSGID: ID = 00-04-0F-37 (6) FF-ED-DB-5D-00-05-03-10 received at 06/01/2011 00:19:38
>>> Channel One Received Data <<<
  MSGID: ID = 00-05-B7-5B (6) FF-ED-DB-5D-00-05-00-10 received at 06/01/2011 00:19:38
  MSGID: ID = 00-06-0F-37 (6) FF-ED-DB-5D-00-05-03-10 received at 06/01/2011 00:19:38
>>> Channel One Received Data <<<
  MSGID: ID = 00-07-B7-5B (7) FF-ED-DB-5D-00-05-FF-10 received at 06/01/2011 00:19:38
  MSGID: ID = 00-0C-0F-37 (6) 00-00-40-05-03-00-03-10 received at 06/01/2011 00:19:38
  MSGID: ID = 00-0D-B7-5B (6) 00-00-40-05-03-00-FF-10 received at 06/01/2011 00:19:38
>>> Channel One Received Data <<<
  MSGID: ID = 00-0C-0F-37 (6) 00-00-40-05-03-01-03-10 received at 06/01/2011 00:19:42
  MSGID: ID = 00-0D-B7-5B (6) 00-00-40-05-03-01-FF-10 received at 06/01/2011 00:19:42
>>> Channel One Received Data <<<
  MSGID: ID = 00-0C-0F-37 (6) 00-00-40-05-03-00-03-10 received at 06/01/2011 00:19:43
  MSGID: ID = 00-0D-B7-5B (6) 00-00-40-05-03-00-FF-10 received at 06/01/2011 00:19:43
>>> Channel One Error Received <<<
CAN Bus Off condition. Note that the controller is disabled in this case. Calling CAN.Reset() to re-enable it.!
>>> Channel One Received Data <<<
  MSGID: ID = 00-30-0F-37 (0) 00-00-40-05-03-00-03-10 received at 06/01/2011 00:20:05
  MSGID: ID = 00-31-B7-5B (8) 47-42-9C-F5-01-27-00-10 received at 06/01/2011 00:20:05
>>> Channel One Error Received <<<
CAN Bus Off condition. Note that the controller is disabled in this case. Calling CAN.Reset() to re-enable it.!
>>> Channel One Error Received <<<
CAN Bus Off condition. Note that the controller is disabled in this case. Calling CAN.Reset() to re-enable it.!
>>> Channel One Received Data <<<
  MSGID: ID = 00-30-0F-37 (0) 00-00-40-05-03-00-03-10 received at 06/01/2011 00:20:35
  MSGID: ID = 00-31-B7-5B (8) 47-42-9C-F5-01-27-00-10 received at 06/01/2011 00:20:35
>>> Channel One Received Data <<<
  MSGID: ID = 00-30-0F-37 (0) 00-00-40-05-03-00-03-10 received at 06/01/2011 00:21:05
  MSGID: ID = 00-31-B7-5B (8) 47-42-9C-F5-01-27-00-10 received at 06/01/2011 00:21:05

Both Panda and Cobra has processor from the same family. This si very strange.

Hi Gus,

The PandaII is running 4.1 and the Cobra/EMX board is 4.2 is there a difference to be expected ?

I guess 4.2 won’t be possible on the PandaII ?

Cheers,

Peter.

I think code didn’t change

Good Morning Gus,

to not to revert back to 4.1 I took the 2551 from the Panda circuit and exchanged it with the one from the Cobra circuit, added some passive component to take care of maybe some disturbing noise and changed the slope (pin 8 on 2551) from beying directly wired to ground to have a 47k resistor. Don’t know if that was the root cause but I think I’ve got a malfunctioning 2551 since it runs now already for some 15 mins and no bus off error detected not a single one and the command with sending the single message does cause a sound.

Cheers,

Peter.