This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugging CAN, Sendinfo, how to send a standard message

Hello,
i am using the AT89C51CC01 controller with integrated can and the can driver supplied together with the Keil App Note 167
Problem:
Sending and receiving messages with extended IDs works ok, in simulated and real,
but i have to switch to standard identifiers with 11 bit message length and so I modified some parts of the can_drv.c
The simulator shows me, that my device is sending standard messages, but i have a problem with incoming messages and would like to simulate them using the SendInfo command in the debugger.ini
How do I tell the SendInfo command only to use standard identifiers? - because the Simulator shows me that SendInfo is using extended identifiers

/*
 * Send Information on any ID
 */
FUNC void SendInfo (unsigned long id,    // message ID
                    unsigned char len,   // message length
                    unsigned char val) { // 1. value byte
  CAN0ID = id;      // Set VTREG that keeps next ID
  CAN0L  = len;     // Set VTREG with message length
  CAN0B0 = val;     // Set the data registers
//  CAN0B1 = val+1;
//  CAN0B2 = val+2;
//  CAN0B3 = val+3;
//  CAN0B4 = val+4;
//  CAN0B5 = val+5;
//  CAN0B6 = val+6;
//  CAN0B7 = val+7;
  CAN0IN = 2;      // Send message to simulated controller
}

Furthermore, what is the common way of receiving can messages with different lengths and ids, if there are not enough messagebuffers free for each type? -
Configuring one messageobject with a weak filter and accept the canerror about the length?
Thank you
Axel Muehring

0