142
Atmel ATmega16/32/64/M1/C1 [DATASHEET]
7647K–AVR–12/13
16.2.2.1 Can Standard Frame
Figure 16-1. CAN Standard Frames
A message in the CAN standard frame format begins with the “Start Of Frame (SOF)”, this is followed by the “Arbitration field”
which consist of the identifier and the “Remote Transmission Request (RTR)” bit used to distinguish between the data frame
and the data request frame called remote frame. The following “Control field” contains the “IDentifier Extension (IDE)” bit and
the “Data Length Code (DLC)” used to indicate the number of following data bytes in the “Data field”. In a remote frame, the
DLC contains the number of requested data bytes. The “Data field” that follows can hold up to 8 data bytes. The frame integrity
is guaranteed by the following “Cyclic Redundant Check (CRC)” sum. The “ACKnowledge (ACK) field” compromises the ACK
slot and the ACK delimiter. The bit in the ACK slot is sent as a recessive bit and is overwritten as a dominant bit by the receivers
which have at this time received the data correctly. Correct messages are acknowledged by the receivers regardless of the
result of the acceptance test. The end of the message is indicated by “End Of Frame (EOF)”. The “Intermission Frame Space
(IFS)” is the minimum number of bits separating consecutive messages. If there is no following bus access by any node, the bus
remains idle.
16.2.2.2 CAN Extended Frame
Figure 16-2. CAN Extended Frames
A message in the CAN extended frame format is likely the same as a message in CAN standard frame format. The difference is
the length of the identifier used. The identifier is made up of the existing 11-bit identifier (base identifier) and an 18-bit extension
(identifier extension). The distinction between CAN standard frame format and CAN extended frame format is made by using
the IDE bit which is transmitted as dominant in case of a frame in CAN standard frame format, and transmitted as recessive in
the other case.
16.2.2.3 Format Co-existence
As the two formats have to co-exist on one bus, it is laid down which message has higher priority on the bus in the case of bus
access collision with different formats and the same identifier / base identifier: The message in CAN standard frame format
always has priority over the message in extended format.
There are three different types of CAN modules available:
●
2.0A - considers 29 bit ID as an error
●
2.0B passive - ignores 29 bit ID messages
●
2.0B active - handles both 11 and 29 bit ID messages
SOF
Bus Idle
Data Frame
Remote Frame
Bus Idle
RTR IDE
r0
0 - 8 bytes
15-bit CRC
ACK
7 bits
11-bit identifier
ID10..0
Interframe
Space
Arbitration
Field
Control
Field
Data
Field
CRC
Field
ACK
Field
End of
Frame
4-bit DLC
DLC4..0
CRC
del.
ACK
del.
Intermission
3 bits
Bus Idle
(Indefinite)
Interframe
Space
SOF
RTR IDE
r0
15-bit CRC
ACK
7 bits
11-bit identifier
ID10..0
Interframe
Space
Arbitration
Field
Control
Field
CRC
Field
ACK
Field
End of
Frame
Interframe
Space
4-bit DLC
DLC4..0
CRC
del.
ACK
del.
Intermission
3 bits
Bus Idle
(Indefinite)
Interframe
Space
CRC
Field
ACK
Field
End of
Frame
Interframe
Space
Arbitration
Field
Control
Field
Data
Field
CRC
Field
ACK
Field
End of
Frame
Interframe
Space
SOF
Bus Idle
Data Frame
SRR IDE
RTR r1
r0
0 - 8 bytes
15-bit CRC
ACK
7 bits
11-bit base identifier
IDT28..18
4-bit DLC
DLC4..0
CRC
del.
ACK
del.
Intermission
3 bits
Bus Idle
(Indefinite)
18-bit identifier extension
ID17..0
15-bit CRC
Interframe
Space
Arbitration
Field
Control
Field
SOF
Bus Idle
Remote Frame
SRR IDE
RTR r1
r0
11-bit base identifier
IDT28..18
4-bit DLC
DLC4..0
18-bit identifier extension
ID17..0
ACK
7 bits
CRC
del.
ACK
del.
Intermission
3 bits
Bus Idle
(Indefinite)