Difference between revisions of "CanServo/Protocol/T-Message"
Jump to navigation
Jump to search
(→CAN-FD) |
|||
| (36 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== | == Up == | ||
* | * Up page: [[CanServo/Protocol/0]] | ||
== T-Message == | |||
* "T-Message" defines how to transmit messages that cannot be sent in a single packet. | |||
** Of course, 1 packet is also possible. | |||
* This content refers to the message format of UAVCAN. | * This content refers to the message format of UAVCAN. | ||
| Line 12: | Line 17: | ||
** [[Code/CRC16]] | ** [[Code/CRC16]] | ||
* Transmission method | |||
** Check the length of the message to be sent, and if it cannot be sent in one packet, calculate CRC16 and add it to the end of the message. | |||
*** The starting value for CRC16 calculation is 0xFFFF (-1). | |||
** Repeat the process of cutting from the front, attaching the Tail Byte, and sending it as one packet. | |||
*** At this time, if the length (including Tail Byte) exceeds 8 bytes, the exact length is placed in the first byte. | |||
** NOTE: If it is not an FD, the maximum is 8 bytes, so it can be up to 7 bytes. | |||
*** In the case of FD, the maximum is 64 bytes, so excluding the first byte of length, it can be up to 62 bytes. | |||
* | * 주의 사항 | ||
** | ** Host가 발신하는 경우는, 연결된 메시지를 연속으로 전송하면 됩니다. | ||
** 여러 서보가 동시에 보내면서 수신 측에서는 섞일 수 있습니다. | |||
** 같은 CAN ID 로 동시에 여러 T-Message가 전송 될 때에는, Tail Byte 의 변화와 CRC16 등으로 분석합니다. | |||
** 소스는 CAN-AIO-UI 의 cTMsg (구 소스: cLongMsg) 참조 | |||
=== CAN 2.0 === | |||
=== CAN-FD === | === CAN-FD === | ||
* CAN-FD data | * CAN-FD data is expanded up to 64 bytes. | ||
** 0~8, 12, 16, 20, 24, 32, 48, 64 | ** 0~8, 12, 16, 20, 24, 32, 48, 64 | ||
== | * [[CanServo/Protocol/CAN-FD]] | ||
=== Tail Byte === | |||
* | * Tail Byte | ||
* | ** bit 7 = first packet | ||
* | ** bit 6 = last packet | ||
** | ** bit 5 = 1 if first packet, toggle bit on each packet | ||
** bit 4:0 = Seq, 0 ~ 31, inc 1 on each message | |||
Latest revision as of 08:54, 16 March 2026
Up
- Up page: CanServo/Protocol/0
T-Message
- "T-Message" defines how to transmit messages that cannot be sent in a single packet.
- Of course, 1 packet is also possible.
- This content refers to the message format of UAVCAN.
- Thanks to UAVCAN
- Note:
- CRC16 : byte order : low byte first, little endian
- Reference:
- Transmission method
- Check the length of the message to be sent, and if it cannot be sent in one packet, calculate CRC16 and add it to the end of the message.
- The starting value for CRC16 calculation is 0xFFFF (-1).
- Repeat the process of cutting from the front, attaching the Tail Byte, and sending it as one packet.
- At this time, if the length (including Tail Byte) exceeds 8 bytes, the exact length is placed in the first byte.
- NOTE: If it is not an FD, the maximum is 8 bytes, so it can be up to 7 bytes.
- In the case of FD, the maximum is 64 bytes, so excluding the first byte of length, it can be up to 62 bytes.
- Check the length of the message to be sent, and if it cannot be sent in one packet, calculate CRC16 and add it to the end of the message.
- 주의 사항
- Host가 발신하는 경우는, 연결된 메시지를 연속으로 전송하면 됩니다.
- 여러 서보가 동시에 보내면서 수신 측에서는 섞일 수 있습니다.
- 같은 CAN ID 로 동시에 여러 T-Message가 전송 될 때에는, Tail Byte 의 변화와 CRC16 등으로 분석합니다.
- 소스는 CAN-AIO-UI 의 cTMsg (구 소스: cLongMsg) 참조
CAN 2.0
CAN-FD
- CAN-FD data is expanded up to 64 bytes.
- 0~8, 12, 16, 20, 24, 32, 48, 64
Tail Byte
- Tail Byte
- bit 7 = first packet
- bit 6 = last packet
- bit 5 = 1 if first packet, toggle bit on each packet
- bit 4:0 = Seq, 0 ~ 31, inc 1 on each message