Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/25/08 12:10
Read: times


 
#149945 - CAN bus: losing Messages on Silabs F040
I ran into a strange phenomen. Apparently Receive objects are lost in a boot loader CAN application using no interrupts and very simple handshakes. About 2..5 out of a hundred messages are lost..

Has anybody experienced such a behaviour? maybe found a cure?

The communication is set to 250kBit..

I already spent a whole day trying to find what happens. What I don't do handle the BUSY flag after copying CAN RAM to IF-registers, since it did not appear in any example either.

This routine is called:
// Receive Data from the IF2 buffer
bit receive_data (char MsgNum)
{
  SFRPAGE  = CAN0_PAGE; // IF2 already set up for RX

  CAN0ADR  = IF2CMDRQST;// Point to Command Request Reg.
  CAN0DATL = MsgNum;    // Move new data for RX from Msg Obj "MsgNum"
                        // Move new data to a
  CAN0ADR  = IF2MSGC;
  if(!(CAN0DATH & 0x80)) {
    SFRPAGE  = LEGACY_PAGE;
    return(0);
  }
  CAN0DATH=0;
  
  read Data, then return(1)
}


thanks for any hints. Timing registers are set correctly..

Werner

List of 4 messages in thread
TopicAuthorDate
CAN bus: losing Messages on Silabs F040            01/01/70 00:00      
   Problem solved            01/01/70 00:00      
      Question - Why does the example code work?            01/01/70 00:00      
         Why does it work            01/01/70 00:00      

Back to Subject List