03-29-2013 12:55 PM
What is the break-down of arbitration ID for extended message?
Is it:
| x | x | 1 | 11-bits standard | 18-bits extended |
^ ^ ^ ^
msb lsb msb lsb
or
| x | x | 1 | 18-bits extended | 11-bits standard |
^ ^ ^ ^
msb lsb msb lsb
I couldn't find this information. I need to map CAN message structure in Freescale implementation which is as follows (32-bit):
| 11-bits standard | SRR | IDE | 18-bits extended | RTR |
^ ^ ^ ^
msb lsb msb lsb
where SRR => Substitute Remote Request bit (remote request for standard ID)
IDE => Extended ID bit. 1 => extended id, 0 => standard id
RTR => Remote Request for extended ID
Please advice.
Solved! Go to Solution.
04-03-2013 12:13 PM
The question itself was incorrect. I figured it out. There is nothing like:
| x | x | 1 | 11-bits standard | 18-bits extended |
^ ^ ^ ^
msb lsb msb lsb
or
| x | x | 1 | 18-bits extended | 11-bits standard |
^ ^ ^ ^
msb lsb msb lsb
it is just as follows:
for extended:
| x | x | 1 | 29-bits extended |
^ ^
msb lsb
for standard:
| x | x | 0 | <18-bits padded with zeroes> | 11-bits standard |
^ ^
msb lsb
The confusion came out from tx/rx buffer description in freescale MSCAN.
04-03-2013 12:26 PM
The CAN bus doesn't send 18 0-byte padded bytes for a standard ID.
Most hardware has a 32-bit register for the ID.
For a 29-bit ID, you fill up 28:0. For an 11-bit ID, you fill up 28:18 with the ID.
One of the upper bits 31, 30, or 29 indicates whether the ID is standard or extended for the sake of the transmission.
04-03-2013 12:51 PM
Thanks a lot. In our project, we use 29-bits (extended ID).
So, I guessed, the upper 18 bits would be padded to keep bit numbering to start from bit 0 for both standard and extended.