User Tools

Site Tools


projects:crazyflie:crtp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
projects:crazyflie:crtp [2013-02-22 07:24]
macke
projects:crazyflie:crtp [2013-04-02 15:41]
arnaud [Layers]
Line 22: Line 22:
 CRTP is implemented in 3 layers: CRTP is implemented in 3 layers:
  
-<code>+<ditaa>
  +-----------------------+  +-----------------------+
    Application/ports   |    Application/ports   |
Line 30: Line 30:
        CRTP Link       |        CRTP Link       |
  +-----------------------+  +-----------------------+
-</code>+</ditaa>
  
   * **CRTP Link** is responsible for transferring the packets between the Crazyflie and the host. It will typically handles packet size and error detection.   * **CRTP Link** is responsible for transferring the packets between the Crazyflie and the host. It will typically handles packet size and error detection.
Line 56: Line 56:
  
 ===== Serial port ===== ===== Serial port =====
-This is mostly for legacy support but has been used during development to log data at higher speedsThe support for using the serial port might be broken currently though.+The serial port is configured in 115200 8N1CRTP packets are sent and received asynchronously using the following packet format:
  
 <code> <code>
 +  7               0
 ++---+---+---+---+---+---+---+---+
 +|             0xAA              |
 ++---+---+---+---+---+---+---+---+
 +|             0xAA              |
 ++---+---+---+---+---+---+---+---+
 +|      Port      Res  | Chan. |
 ++---+---+---+---+---+---+---+---+
 +|         Packet length         |
 ++---+---+---+---+---+---+---+---+
 +|            DATA 0             |
 ++---+---+---+---+---+---+---+---+
 +:   :   :   :   :   :   :   :   :
 ++---+---+---+---+---+---+---+---+
 +|            Cksum              |
 ++---+---+---+---+---+---+---+---+
 +
 +--------+--------+--------+--------+--------+--....--+--------+ +--------+--------+--------+--------+--------+--....--+--------+
-|  0xAA  |  0xAA  | Header | Length | Data0  | Packet | CRC32  |+|  0xAA  |  0xAA  | Header | Length | Data0  | Packet | Cksum  |
 +--------+--------+--------+--------+--------+--....--+--------+ +--------+--------+--------+--------+--------+--....--+--------+
 +
 </code> </code>
-^ **Field** ^ **Byte** ^     **Description**     ^ +^ **Field** ^ **Byte** ^ **Bit** ^     **Description**     ^ 
-|   Start      0-1   | Start token for synchronization (0xAAAA) +|   Start      0-1   |   0-2   | Start token for synchronization (0xAAAA) 
-|   Header  |        | The destination channel +|   Header  |        |   0-1   | The destination channel  | 
-|    Size          | The size of the packet +|    :::    |        |   2-3   | Reserved for the link layer | 
-|    Data      4-34  | The data in the packet | +|    :::    |        |   4-7   | The destination port  | 
-|    CRC    |   35-36  The CRC16 of the packet |+|    Size          |         | Number of data byte 
 +|    Data      4-..  |         | The data in the packet | 
 +|   Cksum    4+size          | Checksum. Sum of all the bytes, excluding //Start//, modulo 256. |
projects/crazyflie/crtp.txt · Last modified: 2021-06-24 16:48 by kimberly