![]() In MSPDebug, the transfers are reassembled into a continuous byte stream from which packets are then extracted.Īn example of a reply sent via multiple transfers from the device is shown below: ![]() However, I’ve never seen this from the eZ430-RF2500. It is in principle possible for a single transfer to contain fragments of multiple reply packets. Thus, reply packets are split into fragments and received over multiple transfers (possibly with padding). All USB transfers from the device are of exactly 64 bytes, but reply packets may be of almost any size. The device transfers replies from endpoint 0x81. For more details, consult the source code for MSPDebug (in fet.c). The first byte of a command payload indicate the command type (which is matched in the reply). Since they are delimeted by 0x7e bytes either side, certain quoting rules must be used for some payloads: An example command packet is shown and described below:Ġ0000000: 0c 7e 12 02 01 00 01 00 00 00 4f fc 7e Byte 0x00: The length of this transfer, minus 1.īyte 0x01: Command delimeter (always 0x7e).īytes 0x0a-0x0b: Checksum (0xfc4f) calculated over command payload.īyte 0x0c: Command delimeter (always 0x7e).Ĭommand payloads are variable length (but are usually multiples of 4 bytes). PipeHandle = 80e56994 Ġ0000000: 20 83 3b 00 0f 00 00 00 00 00 00 00 00 00 33 0fĠ0000010: 1f 0f ff ff 05 00 00 00 00 02 00 01 00 01 00 d7īyte 0x00: The length of this transfer, minus 1.īyte 0x01: Always 0x83, to indicate a buffer fill.īytes 0x02-0x03: Destination offset in buffer, little endian (0x003b).īytes 0x05-0x13: Data bytes (always N bytes starting at 0x05).īytes 0x14-0x20: Garbage to satisfy padding rules.Ĭommand packets are sent to endpoint 0x01 on the device to instruct it to perform some action, or to retrieve information. This buffer can be filled by multiple USB transfers, each of which contain part of the data block.Īn example of this type of packet is shown and described below: The size of this buffer is unknown, but appears to be not much larger than 256 bytes. These transfers are sent to endpoint 0x01 on the device to put data into an internal buffer. The first byte of all USB transfers is the length of the transfer, minus 1. Transfers whose length is not larger than 48, but larger than 16, must be padded to a multiple of 16 bytes, plus 1.įailure to pad transfers in this way seems to result in the device crashing, after which it must be replugged. Transfers whose length is larger than 48 must be padded to a multiple of 64 bytes. ![]() Note that certain padding rules must be observed for transfers to the device. For details of the checksum calculation, see the source code. The format of each of these three types of packet are described in detail in the following sections.īoth command packets and reply packets include a checksum. Reply packets A reply packet is sent from the device in response to a command packet (no reply is sent in response to a buffer fill). There are (at a more abstract level than USB bus transfers) three types of packets that are used to communicate with the device: Buffer fills These packets are used to send a data payload to the device (for example, a block of data to be written to flash, or a set of register values).Ĭommand packets These are used to instruct the device to perform some action. IProduct 2 Texas Instruments MSP-FET430UIFīInterfaceProtocol 1 AT-commands (v.25ter) This interface is highlighted in the output from lsusb below:īus 004 Device 002: ID 0451:f432 Texas Instruments, Inc.īDeviceClass 0 (Defined at Interface level) It presents itself as an HID class interface and has two interrupt endpoints (0x01 for output, 0x81 for input). The other interface is the debug interface. This interface is supported by Linux 2.6.31.1, and appears as /dev/ttyACMxx. One is a CDC-ACM class device (this is the interface to the application UART). This device has a product:vendor code of 0451:f432 and provides two USB interfaces.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |