This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem in the CanBus

Hi ,

I'm facing problem with CanBus , the problem is that in some cases I can't see the message in canbus – it looks the message lost during transmission – I have two questions

1)      Why is that happening ?

2)      How can I make sure that message transmitted even though TA bit is set . because what I see that the TA bit is set and I can't see the message and again it's not happening all the time , just in some cases when there is lots messages in the canbus .

Here is the code I'm using

 

  ECanaMboxes.MBOX25.MDL.byte.BYTE0 = BOOT_COMMAND_VRSION;

   ECanaMboxes.MBOX25.MDL.byte.BYTE1 = 0;

   ECanaMboxes.MBOX25.MDL.byte.BYTE2 = 0xC0;

   ECanaMboxes.MBOX25.MDL.byte.BYTE3 = Processor;

  

   ECanaMboxes.MBOX25.MDH.byte.BYTE4 = BOOT_VERSION_FIRST_DIGIT;

   ECanaMboxes.MBOX25.MDH.byte.BYTE5 = BOOT_VERSION_SECOND_DIGIT;

   ECanaMboxes.MBOX25.MDH.byte.BYTE6 = BOOT_VERSION;

   ECanaMboxes.MBOX25.MDH.byte.BYTE7 = BOOT_VERSION_BUILD;

       ECanaShadow.CANTRS.all = 0;

       ECanaShadow.CANTRS.bit.TRS25 = 1;     // Set TRS for mailbox under test

       ECanaRegs.CANTRS.all = ECanaShadow.CANTRS.all;

 

       do

         {

             ECanaShadow.CANTA.all = ECanaRegs.CANTA.all;

       } while(ECanaShadow.CANTA.bit.TA25 == 0 );

 

       ECanaShadow.CANTA.all = 0;

       ECanaShadow.CANTA.bit.TA25 = 1;           // Clear TA25

       ECanaRegs.CANTA.all = ECanaShadow.CANTA.all;