Update 'MehFET USB protocol'
parent
6fcb513901
commit
b12b7a87eb
|
@ -2,6 +2,8 @@
|
|||
|
||||
MehFET is a USB-based protocol meant for debugging MSP430 MCUs. It has been created because all existing ones either operated at a high level (eg. commands to insert breakpoints, which would require a lot of reimplementing existing code), or at a low level (bit-banging GPIO lines, which would be very slow over USB). Instead, the basic commands MehFET operates with, are reads and writes to the IR and DR registers. This is mostly the same abstraction level as used in CMSIS-DAP.
|
||||
|
||||
This document specifies version `0x0001` of the protocol.
|
||||
|
||||
### USB descriptors
|
||||
|
||||
A USB device should be treated as a MehFET-capable device if one of its vendor interfaces has a "MehFET" substring in its iInterface string, and has '4' and '3' as subclass and protocol, respectively. It should have one bulk in endpoint, and one bulk out endpoint. No requirements on e.g. USB device VID and PID exist.
|
||||
|
@ -36,3 +38,61 @@ Similarly, the response status is `0x7F`, and has two response bytes: `0x6E 0x6F
|
|||
```
|
||||
|
||||
Here the host sends command `8`, with length `0x200`, and data bytes `0xFB 0x01 0x00 0x00 0xFF 0xAA 0xAA ...`. Note that the device sends a response with a length byte, but the length is zero so no response data follows.
|
||||
|
||||
### Commands
|
||||
|
||||
```
|
||||
0x01: Info
|
||||
0x02: Status
|
||||
0x03: Connect
|
||||
0x04: Disconnect
|
||||
0x05: Delay
|
||||
0x06: SetClkSpeed
|
||||
0x07: GetOldLines
|
||||
0x08: TdioSequence
|
||||
0x09: TmsSequence
|
||||
0x0a: TclkEdge
|
||||
0x0b: TclkStrobe
|
||||
0x0c: ResetTAP
|
||||
0x0d: IRshift
|
||||
0x0e: DRshift
|
||||
```
|
||||
|
||||
#### Info
|
||||
|
||||
#### Status
|
||||
|
||||
#### Disconnect
|
||||
|
||||
#### Delay
|
||||
|
||||
#### SetClkSpeed
|
||||
|
||||
#### GetOldLines
|
||||
|
||||
#### TdioSequence
|
||||
|
||||
#### TmsSequence
|
||||
|
||||
#### TclkEdge
|
||||
|
||||
#### TclkStrobe
|
||||
|
||||
#### ResetTAP
|
||||
|
||||
#### IRshift
|
||||
|
||||
#### DRshift
|
||||
|
||||
### Statuses
|
||||
|
||||
```
|
||||
0x00: OK
|
||||
....: Reserved
|
||||
0x7C: Cannot perform specified command, as the device has indicated in its capabilities listing.
|
||||
0x7D: Bad state (e.g. calling Disconnect when unconnected)
|
||||
0x7E: Invalid/unknown command
|
||||
0x7F: Unspecified error
|
||||
```
|
||||
|
||||
With a non-`OK` response status, the response data is an optional error string (also null-terminated).
|
Loading…
Reference in New Issue