Difference between revisions of "Braintechnology USB-LPS/Info"

From sigrok
Jump to navigation Jump to search
m (Reverted edits by Ybucavamyva (Talk) to last revision by Uwe Hermann)
m
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
This is the lsusb ouput on Linux, '''before''' any FX2 firmware is uploaded:
This is the lsusb ouput on Linux, '''before''' any FX2 firmware is uploaded:


  $ '''lsusb -vvv'''
<small>
  Bus 001 Device 117: ID '''16d0:0498'''
  $ '''lsusb -v'''
  Bus 001 Device 117: ID '''16d0:0498 GrauTec'''
  Device Descriptor:
  Device Descriptor:
   bLength                18
   bLength                18
Line 13: Line 14:
   bDeviceProtocol      255 Vendor Specific Protocol
   bDeviceProtocol      255 Vendor Specific Protocol
   bMaxPacketSize0        64
   bMaxPacketSize0        64
   idVendor          0x16d0  
   idVendor          0x16d0 '''GrauTec'''
   idProduct          0x0498  
   idProduct          0x0498  
   bcdDevice            0.00
   bcdDevice            0.00
Line 261: Line 262:
  Device Status:    0x0000
  Device Status:    0x0000
   (Bus Powered)
   (Bus Powered)
</small>


== lsusb after firmware upload ==
== lsusb after firmware upload ==


No changes, the '''lsusb -vvv''' output is exactly identical.
No changes, the '''lsusb -v''' output is exactly identical.
 
== Vendor USB protocol ==
 
=== Firmware upload ===
 
The FX2 firmware (3072 bytes in size) is uploaded before every sampling run. Certain bytes in the firmware differ depending on the selected sampling rate.
 
=== Starting a sampling run ===
 
The host seems to send: 0x00 0x01 0x00 0x00 0x00.
 
=== Stopping a sampling run ===
 
The host seems to send: 0x00 0x00 0x00 0x00 0x00.
 
=== Sample rates ===
 
<table><tr valign="top"><td>
 
'''Sampling with 8 probes:'''
 
{| border="0" style="font-size: smaller"
|- bgcolor="#6699ff"
!Samplerate
!Divider
!Other byte
|- bgcolor="#eeeeee"
| 24 MHz
| 0x01
| 0xee
|- bgcolor="#dddddd"
| 16 MHz
| 0x02
| 0xee
|- bgcolor="#eeeeee"
| 15 MHz
| 0x01
| 0xae
|- bgcolor="#dddddd"
| 12 MHz
| 0x03
| 0xee
|- bgcolor="#eeeeee"
| 10 MHz
| 0x02
| 0xae
|- bgcolor="#dddddd"
| 8 MHz
| 0x05
| 0xee
|- bgcolor="#eeeeee"
| 6 MHz
| 0x07
| 0xee
|- bgcolor="#dddddd"
| 5 MHz
| 0x05
| 0xae
|- bgcolor="#eeeeee"
| 4 MHz
| 0x0b
| 0xee
|- bgcolor="#dddddd"
| 3 MHz
| 0x0f
| 0xee
|- bgcolor="#eeeeee"
| 2.5 MHz
| 0x0b
| 0xae
|- bgcolor="#dddddd"
| 2 MHz
| 0x17
| 0xee
|- bgcolor="#eeeeee"
| 1.5 MHz
| 0x1f
| 0xee
|- bgcolor="#dddddd"
| 1 MHz
| 0x2f
| 0xee
|- bgcolor="#eeeeee"
| 800 kHz
| 0x3b
| 0xee
|- bgcolor="#dddddd"
| 750 kHz
| 0x3f
| 0xee
|- bgcolor="#eeeeee"
| 600 kHz
| 0x4f
| 0xee
|- bgcolor="#dddddd"
| 500 kHz
| 0x5f
| 0xee
|- bgcolor="#eeeeee"
| 400 kHz
| 0x77
| 0xee
|- bgcolor="#dddddd"
| 300 kHz
| 0x9f
| 0xee
|- bgcolor="#eeeeee"
| 250 kHz
| 0xbf
| 0xee
|- bgcolor="#dddddd"
| 200 kHz
| 0xef
| 0xee
|- bgcolor="#eeeeee"
| 150 kHz
| 0xc7
| 0xae
|- bgcolor="#dddddd"
| 120 kHz
| 0xf9
| 0xae
|}
 
</td><td>
 
'''Sampling with 16 probes:'''
 
{| border="0" style="font-size: smaller"
|- bgcolor="#6699ff"
!Samplerate
!Divider
!Other byte
|- bgcolor="#eeeeee"
| &nbsp;
|
|
|- bgcolor="#dddddd"
| &nbsp;
|
|
|- bgcolor="#eeeeee"
| &nbsp;
|
|
|- bgcolor="#dddddd"
| 12 MHz
| 0x03
| 0xee
|- bgcolor="#eeeeee"
| 10 MHz
| 0x02
| 0xae
|- bgcolor="#dddddd"
| 8 MHz
| 0x05
| 0xee
|- bgcolor="#eeeeee"
| 6 MHz
| 0x07
| 0xee
|- bgcolor="#dddddd"
| 5 MHz
| 0x05
| 0xae
|- bgcolor="#eeeeee"
| 4 MHz
| 0x0b
| 0xee
|- bgcolor="#dddddd"
| 3 MHz
| 0x0f
| 0xee
|- bgcolor="#eeeeee"
| 2.5 MHz
| 0x0b
| 0xae
|- bgcolor="#dddddd"
| 2 MHz
| 0x17
| 0xee
|- bgcolor="#eeeeee"
| 1.5 MHz
| 0x1f
| 0xee
|- bgcolor="#dddddd"
| 1 MHz
| 0x2f
| 0xee
|- bgcolor="#eeeeee"
| 800 kHz
| 0x3b
| 0xee
|- bgcolor="#dddddd"
| 750 kHz
| 0x3f
| 0xee
|- bgcolor="#eeeeee"
| 600 kHz
| 0x4f
| 0xee
|- bgcolor="#dddddd"
| 500 kHz
| 0x5f
| 0xee
|- bgcolor="#eeeeee"
| 400 kHz
| 0x77
| 0xee
|- bgcolor="#dddddd"
| 300 kHz
| 0x9f
| 0xee
|- bgcolor="#eeeeee"
| 250 kHz
| 0xbf
| 0xee
|- bgcolor="#dddddd"
| 200 kHz
| 0xef
| 0xee
|- bgcolor="#eeeeee"
| 150 kHz
| 0xc7
| 0xae
|- bgcolor="#dddddd"
| 120 kHz
| 0xf9
| 0xae
|}
 
</td></tr></table>
 
The byte values for sampling with 8 or 16 probes are thus identical, the only difference is that the sampling rates 24/16/15MHz are not available when 16 probes are used.
 
=== Sample format ===
 
* 8 bit sampling: Every sample is a byte, bit 0 is the value of probe 0, bit 7 is the value of probe 7.
* 16 bit sampling: Every sample consists of two bytes.
** First byte: Bit 0 is the value of probe 0, bit 7 is the value of probe 7.
** Second byte: Bit 0 is the value of probe 8, bit 7 is the value of probe 15.
 
=== Buffer size ===
 
Not relevant to the protocol, happens purely in software, on the PC side (by sending the "stop acquisition" command at the correct point in time).
 
The original software allows setting a buffer size to 1-2433 MB, in 1MB steps. This is simply the amount of data streamed from the device to the PC (there is no device-internal buffer/memory).
 
=== Pre-Trigger value ===
 
Not relevant to the protocol, happens purely in software, on the PC side.
 
The original software has a pretrigger setting (a scrollbar); it's unclear whether this is an absolute value or a percentage or something else.
 
=== Trigger settings ===
 
Not relevant to the protocol, happens purely in software, on the PC side.
 
The original software allows setting per-probe triggers (4 levels deep). At each level the trigger for that probe can be low, high, or dont-care.


__FORCETOC__
__FORCETOC__

Latest revision as of 18:07, 28 May 2017

lsusb before firmware upload

This is the lsusb ouput on Linux, before any FX2 firmware is uploaded:

$ lsusb -v
Bus 001 Device 117: ID 16d0:0498 GrauTec
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol       255 Vendor Specific Protocol
  bMaxPacketSize0        64
  idVendor           0x16d0 GrauTec
  idProduct          0x0498 
  bcdDevice            0.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          171
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           6
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       2
      bNumEndpoints           6
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       3
      bNumEndpoints           6
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol       255 Vendor Specific Protocol
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

lsusb after firmware upload

No changes, the lsusb -v output is exactly identical.

Vendor USB protocol

Firmware upload

The FX2 firmware (3072 bytes in size) is uploaded before every sampling run. Certain bytes in the firmware differ depending on the selected sampling rate.

Starting a sampling run

The host seems to send: 0x00 0x01 0x00 0x00 0x00.

Stopping a sampling run

The host seems to send: 0x00 0x00 0x00 0x00 0x00.

Sample rates

Sampling with 8 probes:

Samplerate Divider Other byte
24 MHz 0x01 0xee
16 MHz 0x02 0xee
15 MHz 0x01 0xae
12 MHz 0x03 0xee
10 MHz 0x02 0xae
8 MHz 0x05 0xee
6 MHz 0x07 0xee
5 MHz 0x05 0xae
4 MHz 0x0b 0xee
3 MHz 0x0f 0xee
2.5 MHz 0x0b 0xae
2 MHz 0x17 0xee
1.5 MHz 0x1f 0xee
1 MHz 0x2f 0xee
800 kHz 0x3b 0xee
750 kHz 0x3f 0xee
600 kHz 0x4f 0xee
500 kHz 0x5f 0xee
400 kHz 0x77 0xee
300 kHz 0x9f 0xee
250 kHz 0xbf 0xee
200 kHz 0xef 0xee
150 kHz 0xc7 0xae
120 kHz 0xf9 0xae

Sampling with 16 probes:

Samplerate Divider Other byte
 
 
 
12 MHz 0x03 0xee
10 MHz 0x02 0xae
8 MHz 0x05 0xee
6 MHz 0x07 0xee
5 MHz 0x05 0xae
4 MHz 0x0b 0xee
3 MHz 0x0f 0xee
2.5 MHz 0x0b 0xae
2 MHz 0x17 0xee
1.5 MHz 0x1f 0xee
1 MHz 0x2f 0xee
800 kHz 0x3b 0xee
750 kHz 0x3f 0xee
600 kHz 0x4f 0xee
500 kHz 0x5f 0xee
400 kHz 0x77 0xee
300 kHz 0x9f 0xee
250 kHz 0xbf 0xee
200 kHz 0xef 0xee
150 kHz 0xc7 0xae
120 kHz 0xf9 0xae

The byte values for sampling with 8 or 16 probes are thus identical, the only difference is that the sampling rates 24/16/15MHz are not available when 16 probes are used.

Sample format

  • 8 bit sampling: Every sample is a byte, bit 0 is the value of probe 0, bit 7 is the value of probe 7.
  • 16 bit sampling: Every sample consists of two bytes.
    • First byte: Bit 0 is the value of probe 0, bit 7 is the value of probe 7.
    • Second byte: Bit 0 is the value of probe 8, bit 7 is the value of probe 15.

Buffer size

Not relevant to the protocol, happens purely in software, on the PC side (by sending the "stop acquisition" command at the correct point in time).

The original software allows setting a buffer size to 1-2433 MB, in 1MB steps. This is simply the amount of data streamed from the device to the PC (there is no device-internal buffer/memory).

Pre-Trigger value

Not relevant to the protocol, happens purely in software, on the PC side.

The original software has a pretrigger setting (a scrollbar); it's unclear whether this is an absolute value or a percentage or something else.

Trigger settings

Not relevant to the protocol, happens purely in software, on the PC side.

The original software allows setting per-probe triggers (4 levels deep). At each level the trigger for that probe can be low, high, or dont-care.