Difference between revisions of "CanServo/Protocol/LongMessage"

From HITEC_HELP
Jump to navigation Jump to search
(Created page with "== Multi packets for Long Message == * Note: ** ID2, CRC16 : byte order : low byte first, little endian * Reference: ** Code/CRC16 === CAN 2.0 === * The first step is...")
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Multi packets for Long Message ==
== Long Message ==
 
* This content refers to the message format of UAVCAN.
** Thanks to UAVCAN


* Note:
* Note:
** ID2, CRC16 : byte order : low byte first, little endian
** CRC16 : byte order : low byte first, little endian


* Reference:
* Reference:
Line 9: Line 12:
=== CAN 2.0 ===
=== CAN 2.0 ===


* The first step is to calculate the CRC16 of the message and add it to the end to create the content to be sent.
* Packaging the message to be sent.
* Send (maximum) 7 bytes extracted from the content to be sent and a Check Byte.
** If the message to be sent is 8 bytes or more, CRC16 is added.


* Multi Packet's Data Format
* Multi Packet's Data Format
** < Data : max 7 byte, cut from 'Message + CRC16' >, <Check Byte>
** < Data : max 7 byte, cut from packed Message >, <Check Byte>
** Check Byte
** Check Byte
*** bit 7 = 1, if first packet
*** bit 7 = 1, if first packet
Line 19: Line 22:
*** bit 5 = Toggle, first packet = 1, toggle bit on each packet
*** bit 5 = Toggle, first packet = 1, toggle bit on each packet
*** bit 4:0 = Seq, 0 ~ 31, inc 1 on each message
*** bit 4:0 = Seq, 0 ~ 31, inc 1 on each message
* Messages less than 8 bytes long are transmitted as one packet.


=== FD-CAN ===
=== FD-CAN ===


* Under construction !
* Under construction !

Latest revision as of 02:12, 25 November 2024

Long Message

  • This content refers to the message format of UAVCAN.
    • Thanks to UAVCAN
  • Note:
    • CRC16 : byte order : low byte first, little endian

CAN 2.0

  • Packaging the message to be sent.
    • If the message to be sent is 8 bytes or more, CRC16 is added.
  • Multi Packet's Data Format
    • < Data : max 7 byte, cut from packed Message >, <Check Byte>
    • Check Byte
      • bit 7 = 1, if first packet
      • bit 6 = 1, if last packet
      • bit 5 = Toggle, first packet = 1, toggle bit on each packet
      • bit 4:0 = Seq, 0 ~ 31, inc 1 on each message
  • Messages less than 8 bytes long are transmitted as one packet.

FD-CAN

  • Under construction !