2017년 9월 27일 수요일

CAN Messages, Part I

참조: Link

The CAN bus is a broadcast type of bus. This means that all nodes can “hear” all transmissions. There is no way to send a message to just a specific node; all nodes will invariably pick up all traffic. The CAN hardware, however, provides local filtering so that each node may react only on the interesting messages.
CAN bus는 broadcast 타입의 bus 입니다. 이 말은 모든 node들은 모든 통신내용을 들을 수 있다는 걸 의미합니다. 특정 node만이 들을 수 있도록 message를 보내는 것은 가능하지 않습니다.

The CAN messages

CAN uses short messages – the maximum utility load is 94 bits. There is no explicit address in the messages; instead, the messages can be said to be contents-addressed, that is, their contents implicitly determines their address.
CAN은 짧은 message를 사용합니다. – 가능한 최대 길이는 94bit(11byte + 6bit) 입니다. message에는 특정 주소가 있는 것은 아니지만; 대신, message는 내용에 주소가 있다고 이야기 할 수 있습니다. 그 이야기는 내용 자체에 암암리에 주소가 있기 때문 입니다.

Message Types

There are four different message types (or “frames”) on a CAN bus:
CAN bus에는 message의 타입(혹은 frame이라고 불림)이 4가지 있습니다.
  1. the Data Frame,
  2. the Remote Frame,
  3. the Error Frame, and
  4. the Overload Frame.

1. The Data Frame

Summary: “Hello everyone, here’s some data labeled X, hope you like it!”
요약: "안녕 모두들, 여기 라벨이 X라고 붙은 data가 있어, 좋아했으면 해!"
The Data Frame is the most common message type. It comprises the following major parts (a few details are omitted for the sake of brevity):
Data frame은 가장 일반적인 message 타입입니다. 몇가지 중요한 부분으로 구성되어 있습니다.(몇몇 세부내용은 간결함을 위하여 생략되었습니다.)
  • the Arbitration Field, which determines the priority of the message when two or more nodes are contending for the bus. The Arbitration Field contains:
  • Arbitration Field 라고 하는 부분은 message 간의 우선순위를 결정해 줍니다. bus에 있는 내용들이 2개 이상일 때 구별해 줍니다. Arbitration Field 는 아래 내용을 포함합니다:
    • For CAN 2.0A, an 11-bit Identifier and one bit, the RTR bit, which is dominant for data frames.
    • CAN 2.0A 에서는 11bit의 구별자와 1bit, RTR bit로서 data frame에서 dominant(0)인,
    • For CAN 2.0B, a 29-bit Identifier (which also contains two recessive bits: SRR and IDE) and the RTR bit.
    • CAN 2.0B 에서는 29bit의 구별자(두 개의 recessive bit(1)를 가진, SRR, IDE))와 RTR bit
  • the Data Field, which contains zero to eight bytes of data.
  • Data Field 는 0~8byte 의 길이를 가진다. 
  • the CRC Field, which contains a 15-bit checksum calculated on most parts of the message. This checksum is used for error detection.
  • CRC field 는 15bit로 계산 된 checksum 값을 error detection 을 위해서 사용한다. 
  • an Acknowledgement Slot; any CAN controller that has been able to correctly receive the message sends an Acknowledgement bit at the end of each message. The transmitter checks for the presence of the Acknowledge bit and retransmits the message if no acknowledge was detected.
  • Acknowledgement Slot는 각 message의 마지막에 붙은 bit로서 transmitter가 마지막에 보냈는지 체크해서 보내지 않았으면 다시 보낸다.? 방향이 헷갈림
Note 1: It is worth noting that the presence of an Acknowledgement Bit on the bus does not mean that any of the intended addressees has received the message. The only thing we know is that one or more nodes on the bus has received it correctly.
Note 1: Acknowledgement bit는 내가 원했던 node에서 message를 받았다는 것을 나타내지는 않는다 하지만 누군가는 받았다는것을 확인할 수 있으므로 있는것이 좋다.
Note 2: The Identifier in the Arbitration Field is not, despite of its name, necessarily identifying the contents of the message.
Note 2: Identifier의 Arbitration Field(중재 필드)는 그 이름에도 불구하고 충분히 message를 구분하지 못한다.
 A CAN 2.0A (“standard CAN”) Data Frame.
 A CAN 2.0B (“extended CAN”) Data Frame.





RTR: Remote transmission request
SRR: Substitute remote request
IDE: Identifier extension bit

댓글 없음:

댓글 쓰기