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.

About CAN arbitration

Hi all,

This is a sample of CAN protocol, want to ask about the Data Frame.

I think the very left low signal is "SOF".

I learned Arbitration field is 12 bit (Message Identifier 11 bit + RTR 1bit), but the total CAN ID field on the photo is 16bit.

Also, I learned that Control field is 6 bit, the Control field on the picture is only 4 bit. 

I want to know why they are different.

Aslo, when there are Standard ID and Extended ID together, standard ID has a priority in the arbitration?

On the picture, the sum of Standard ID is over than sum of Extended ID, but standard ID has a priority. 

There is NAK(Non-Ack) at the end of Standard ID, what is this meaning on the system?

Thank you

  • Hi Garam,

    Our team is currently out of the office due to the US holiday, but we will get back to you later this week.

    Regards,
    Max

  • Garam,

    Above is the classic CAN and CAN FD frame structure. In the image you shared, the identifier is indeed 11 bits, followed by the RTR, IDE, and r0 bits. The x's in the identifier are for bit stuffing (the result of 5 consecutive bits of the same polarity) and not meant to be counted as part of the identifier. Considering this, the identifier is then 11 bits, followed by RTR, IDE, and r0, then 4 bits for the data length code, then data.

    The standard ID will always win arbitration over an extended ID, and this is handled by the IDE bit. If the IDE bit is dominant, this refers to a standard ID, and an extended ID shows a recessive bit. By this the standard ID will always win arbitration since the dominant is higher priority than recessive.

    I'm not sure what you are referring to about the NACK. Can you explain?

    Regards,

  • Thank Eric,

    Let's set blue circle is NODE A and left side of red circle is NODE B.

    I zoomed in, and the picture is below.

    NODE A has "1" and NODE B has "0" at the red line, this is meaning that NODE A is bigger than NODE B, and NODE B has a priority.

    However, NODE A has a priority, because NODE A signal is left side of NODE B signal on the first picture. 

    This is my question that why NODE B did not get the priority?

    Thank you

  • Garam,

    You are correct, in this case the extended ID should win arbitration since the 11-bit base identifier is different between the two nodes.

    Standard ID

    Extended ID

    As shown by the images, extended and standard ID frames have the same base structure. If the 11-bit base identifier is identical between the extended and standard IDs on the bus, the standard ID will always win arbitration because of the IDE bit being dominant in the standard ID and recessive in the extended ID.

    In your example it looks like the 11-bit base IDs between the standard and extended IDs are different, as you've pointed out. Are you certain both of these frames were competing for arbitration? It may be the case that the standard ID was transmitted and then the extended ID was transmitted, but neither at the same time so there was no arbitration involved.

    Regards,