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.

TCAN332: Communication issues

Part Number: TCAN332

Hi team,

TCAN332D will lose data when transmitting and receiving at the same time.

If Party A sends and Party B receives, the data will not be lost. If Party A and Party B send and receive at the same time, the data will be lost.

Is it because TCAN332D can't communicate in full duplex? Or something else?

  • Hi Amy,

    The CAN protocol is technically a half-duplex communication method since a node will either be sending or receiving a given CAN frame from the bus. However, this term isn't the best description for how the system works because there are some points in time where multiple nodes can be driving the bus simultaneously. The time period that seems important here is the arbitration phase of the CAN frame.

    During arbitration, each node that needs to send data on the CAN bus will send its message ID. At the same time, these nodes will monitor the bus to see if any other node transmits an ID with a higher priority than its own. If a node recognizes that it does not have the highest priority ID, it will surrender the bus to allow the priority message to be sent on the bus. Note that these message IDs are sent at the same time so that each bit overlaps. This allows any arbitrary number of nodes (limited by electrical characteristics) can be used without needing to know how many other nodes exist or any primary/secondary hierarchy. 

    For the issue you're seeing with data loss occurring when two nodes are trying to transmit at the same time, there are two likely causes. 1. Arbitration is not being properly handled by the CAN controller and it is not correctly monitoring the bus during this phase or 2. The CAN transceiver is not able to accurately convey or drive the state of the bus during the arbitration phase. Because communication works properly when only one node attempts to send messages, I believe the first case is more likely.

    • Do both modes use a CAN controller that follows the data layer specifications of the ISO 11898-1 standard?
    • How is the data loss recognized? Are the controllers throwing any particular errors? Does the data appear corrupt? Or does it simply not come through?
    • You state communication from Party A to Party B works fine. Has a similar unidirectional test been done for Party B to Party A?
    • If none of these point to an issue, it may be helpful to gather scope shots of the CAN bus during the data loss. Seeing CANH, CANL, TXD, and RXD from the node experiencing the data loss would help us see if the problem lies in the analog CAN signal. 

    Let me know what you find out or if you have any other questions in the meantime.

    Regards,
    Eric Schott

  • Hi Eric,

    Thank you very much for your detailed reply. I learned a lot from it.

    The following pictures are the waveforms measured by the customer. Could you help analyze them. Thank you in advance.

  • Hi Amy,

    All of these waveforms look good to me. The CAN bus shows valid CAN data and the transceiver appears to be able to accurately interpret the state of the bus. I don't suspect that the loss of data is occurring at the transceiver level here. 

    I would check to make sure the CAN controllers in this system are configured correctly and are using unique IDs when transmitting their messages. This is important to ensure that every node can distinguish which individual node has won arbitration for a certain frame. 
    I would also check the code logic to ensure that every message is being handled and interrupts are recognized, even when the node is configured to send data as well. The way this is implemented can vary greater by system, so I'm afraid I can't give much more specific advice than this. 

    If you are having trouble checking these things, I can also recommend some analog debug methods to identify what might be wrong. Capturing the transmit signals of both node A and node B (TXD1, TXD2) and the CAN bus (CANH, CANL) on the same scope can help determine which dominant states (viewed on the CAN bus) are being driven by which node (lows on TXDn will correspond with dominants on the CAN bus). If both TXD lines are exactly the same during arbitration (first several bits) and both continue after this phase (for remainder of the CAN frame), arbitration has failed and both nodes are transmitting at the same time. In the correct case, one TXDn line will stop attempting to transmit after arbitration and will wait for the next frame to attempt to send data again. 

    Feel free to ask more questions on this thread if you think we can be of any more help.

    Regards,
    Eric Schott