https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=11743

--- Comment #17 from Tomasz Mon <deso...@gmail.com> ---
(In reply to Joel Holdsworth from comment #16)
> Is this expected behavior? Or should it be able to decode this data?

Currently yes, that's why it's prefixed with [WIP] that stands for Work In
Progress. Eventually it should be able to decode this data.

To speed up the process, it would be great if someone did take a look at
undocumented MPSSE behaviour. MPSSE is serial, byte oriented protocool. There
aren't any designated start/end bytes, so maintaining synchronization is quite
important. AN_108 Version 1.5 suggests to explicitly send BadCommand byte and
expect the 0xFA followed by the BadCommand byte. While it is quite simple for
application, for a third party observer like Wireshark, it is a bit more
problematic. The most important part, is to determine how many bytes such
commands consume.

AN_108 mentions that the BadCommand will trigger only when bit 7 of rogue
command is high. Based on this information, I expect all non-documented
commands with bit 7 high to trigger BadCommand response. What the documentation
doesn't mention is how MPSSE handles commands that are not defined in AN_108
that have bit 7 low.

Looking at the data shifting commands (bit 7 clear), I have observed that there
can be different command lengths:
  a) when bit mode (bit 1 high) is selected, the command is followed by "one
byte length"
  b) when byte mode (bit 1 clear) is selected, the command is followed by "two
byte length"
  c) in bit mode, if either "Do write TDI" (bit 4) or "Do write TMS" (bit 6) is
high, there will be "one byte payload" (thus command + parameters will consume
3 bytes)
  d) in byte mode, if "Do write TDI" (bit 4) is high, there will be "Length
byte payload" where Length is the "two byte length" (Little-Endian) value + 1
(thus command + parameters will consume 1 + 2 + Length).

Now the questions are:
 * do the above rules apply to all commands with bit 7 clear or does MPSSE
simply skip the undocumented data shifting commands? (ie. can these rules be
used to determine how many bytes will "command + parameters" consume for all
commands with bit 7 clear)
 * what happens if both bit 4 and bit 6 is high in bit mode? (none of the
listed commands have that property)
 * what happens if "Do write TMS" is active in byte mode?

Besides the data shifting commands, it would be nice to know what happens when
chip-specific command (e.g. 0x9E which is FT232H only) is executed on different
chip. Does it trigger BadCommand?

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to