Logic Shrimp and Pulseview (-> Firmware Update needed)

The Logic Pirate is a medium speed, low-cost logic analyzer with a USB interface. It can capture up to 256K samples at 20MHz (80MHz with overclock), and is compatible with SUMP logic analyzer client. Get one for $30 at Seeed Studio. Logic Shrimp support available here.

Logic Shrimp and Pulseview (-> Firmware Update needed)

Postby mcskof » Fri Jan 26, 2018 7:38 am

Hello,

I tried to run Logic Shrimp V1.3 together with Sigrok Pulseview (OLS Driver) as GUI frontend. Both would be a very powerful combo for decoding protocols. However Pulseview shuts down when the device is selected because of incomplete metadata inside the Logic Shrimp ( no. channels, etc.).

To fix the issue, the metadata needs to be updated including some extra space for future use like this:
Code: Select all
main.c:
static const char id_string[4] = { "1ALS" };

// see also http://dangerousprototypes.com/docs/The_Logic_Sniffer%27s_extended_SUMP_protocol#Metadata_command
static const char meta_info[] = {
    "\x01" "Shrimp1.0" "\x00"
    "\x02" "" "\x00"                // no FPGA Firmware
    "\x03" "2018-01-26" "\x00"      // PIC firmware version
    "\x20" "\x00\x00\x00\x04"       // 4 probes
    "\x21" "\x00\x03\xe8\x00"       // 256k sample memory
//  "\x22" "\x00\x00\x00\x00"       // no dynamic memory
    "\x23" "\x01\x21\x2D\x00"       // 20 MHz maximum sample rate
    "\x24" "\x00\x00\x00\x02"       // protocol version 2
    "\x40" "\x04"                   // 4 probes
    "\x41" "\x02"                   // protocol version 2
                                           
    "\x00 \x00\x00\x00\x00"         // padding for future use
    "\x00 \x00\x00\x00\x00"       
    "\x00 \x00\x00\x00\x00"       
    "\x00 \x00\x00\x00\x00"                                                   
    "\x00" };                       // End of record

static const int meta_info_size = sizeof(meta_info) - 20;                // metadata size w/o padding

void main()
{
...
case SUMP_ID://SLA0 or 1 backwards: 1ALS
    if( mUSBUSARTIsTxTrfReady() )
    {
        putUnsignedCharArrayUsbUsart( id_string, sizeof(id_string) );
    }
...
case SUMP_META:
    if( mUSBUSARTIsTxTrfReady() )
    {
        putUnsignedCharArrayUsbUsart( meta_info, meta_info_size );
    }

The padding and meta_info_size constant allows patching the meta info with a hex editor.

As I don't have a CC18 compiler and no information about the used Microchip USB stack, it is very difficult to fix the firmware myself.

Perhaps somebody can give a hand on the firmware or already has updated the metadata (and is willing to share his efforts).

Regards
Marko
mcskof
Newbie
Newbie
 
Posts: 1
Joined: Fri Jan 26, 2018 4:10 am

Return to Logic Pirate