Troubleshooting
Back to Top-
Why do I receive a transmit buffer overrun when I try to test the CAN interface with nothing else connected?
CAN requires a minimum of two active CAN nodes to have successful CAN communication. When one node transmits on the CAN bus, the other node must be present to provide the ACK frame to let the transmitter know the frame was placed on the CAN bus correctly. If there is no other CAN node, the CAN interface will continuously try to transmit the first CAN frame from your first canWrite call while your subsequent calls to canWrite fill the transmit buffer until the buffer is full.
-
Will messages transmitted using the object buffers (canObjBuf***()) show up in my receive buffer if I have TX_ACK turned on?
No. The only way to receive messages transmitted using the object buffers is to have another physical channel on the CAN bus.
-
Why do I receive copies of my canWrite messages in the receive buffer of my other handle to the channel?
Multiple handles to the same channel work like a virtual bus extension. When a message is successfully placed on the CAN bus through the
canWrite
call, a copy of the message is placed in every handle’s receive buffer associated with the same channel. This is the default behavior. You can change this behavior for a handle using thecanIoCtl
function with a func parameter value ofcanIOCTL_SET_LOCAL_TXECHO
. See the API documentation for more detail.