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.

  • Resolved

TMS570LS0714: DCAN Determine Arbitration Loss (in polling mode)

Part Number: TMS570LS0714

TRM section 24.8.3 states that "When the transmission has been successfully completed, the NewDat bit is reset."

When using the DCAN transmitter in polling mode, how do I know when it has been long enough to consider the "NewDat" bit an arbitration loss?

I thought that using the transmit complete interrupt to tell when the transmission is complete, but the datasheet reads like the interrupt only comes on transmit complete.  Should I then catch some manner of error interrupt?

Please help with the correct stratedgy to determine if a message was sent or lost arbitration?

Note:  We would like to turn off automatic message retries because it behaves very poorly when the only node on a CAN bus (it transmits a single pulse repeatedly until something else is on the bus.)  Also we would like to limit the retries to '3'.

  • FJ Kime

    Part Number: TMS570LS0714

    When using the DCAN transmitter in polling mode, how do I know when it has been long enough to consider the "NewDat" bit an arbitration loss?

    Answer--> It is not possible to determine this without the knowledge of other higher priority messages competing for transmission. This is also dependent on error conditions on the bus. In short, difficult to determine this deterministically without a thorough knowledge of the system. This could be complicated further if the messages are purely event driven (and hence asynchronous). Note that a message not going out within a required time could be due to bus errors and not just because of arbitration loss.

    I thought that using the transmit complete interrupt to tell when the transmission is complete, but the datasheet reads like the interrupt only comes on transmit complete.  Should I then catch some manner of error interrupt?

    Answer--> It is true interrupt is asserted only upon a transmission complete. As stated in the previous answer, a delay in completion of transmission could either be due to bus errors or due to loss of arbitration. While the former could be "caught" with error interrupts, the latter is a benign occurrence and is part of normal protocol behavior. One option you could consider is setting up a timer to alert you if a message has not completed transmission within a predetermined amount of time.

    Please help with the correct stratedgy to determine if a message was sent or lost arbitration?

    Answer--> Message sent could be flagged with an interrupt. Arbitration loss, in itself, is not a problem unless there is an application requirement that a message must complete transmission within a specific time window. A timer could be used to flag such an occurrence and corrective action could be taken.

    Note:  We would like to turn off automatic message retries because it behaves very poorly when the only node on a CAN bus (it transmits a single pulse repeatedly until something else is on the bus.)  Also we would like to limit the retries to '3'.

    Answer--> If there is only one node on the bus and it attempts a transmission, it will keep retrying forever since it received no ACK. This is normal behavior. To answer your other question, there is no way to limit the number of retries. It is either "0" or "forever"

     

    Hareesh


    If the issue is resolved, please close the forum post.

  • In reply to Hareesh J:

    Thank you Hareesh for such a complete answer on a multi-pointed question.

    I thought from a CAN controller worked with in the past that it was a requirement for transmitters to self-ACK.  After checking the standard, it seems my recollection is incorrect.

  • In reply to FJ Kime:

    Many CAN controllers (including DCAN) have a self-test mode where they indeed do a self-ACK. Perhaps this is what you were thinking.

     

    Thank you for closing the post.

     

    Hareesh


    If the issue is resolved, please close the forum post.

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.