Author Topic: Need answer Sigrok several protocol decoder  (Read 2499 times)

0 Members and 1 Guest are viewing this topic.

Offline SigrokLoverTopic starter

  • Newbie
  • Posts: 6
  • Country: fr
Need answer Sigrok several protocol decoder
« on: February 11, 2019, 01:57:41 pm »
Hi,

For a project, I will purchase a logic analyzer that is compatible with sigrok. The idea would be to have a SPI sniffer (9 slaves + MISO+MOSI+ CLK) and an I2C sniffer.

To do this, I chose a 16-channel logic analyzer (12 for SPI, 2 for I2C). I searched for two days on the internet but I couldn't find an answer to my questions.

So I have two questions:

1) Can sigrok decode an SPI communication with 9 slaves (CS0, CS1,... CS8)? I have only seen examples where only one slave was involved.

2) Can sigrok independently decode I2C and SPI at the same time if the channels dedicated to both protocols are specified?

Thank you for your time.
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Need answer Sigrok several protocol decoder
« Reply #1 on: February 11, 2019, 03:11:54 pm »
Install the Sigrok software. PulseView has a virtual demo device so you can play about with the interface without having any hardware connected.

1) Can sigrok decode an SPI communication with 9 slaves (CS0, CS1,... CS8)? I have only seen examples where only one slave was involved.
Yes. You can have add SPI decoders sharing CLK/MISO/MOSI but separate CS in the Sigrok PulseView software.

2) Can sigrok independently decode I2C and SPI at the same time if the channels dedicated to both protocols are specified?
Yes.
« Last Edit: February 11, 2019, 03:14:37 pm by tsman »
 
The following users thanked this post: SigrokLover

Offline SigrokLoverTopic starter

  • Newbie
  • Posts: 6
  • Country: fr
Re: Need answer Sigrok several protocol decoder
« Reply #2 on: February 11, 2019, 08:03:12 pm »
Thank you very much tsman, your answer really helps me!

I intend to use sigrok-cli to study the collected data (using a python script for example). Can you confirm that what you told me about pulseview also applies to sigrok-cli?

Thank you again in advance, you're helping me a lot!
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Need answer Sigrok several protocol decoder
« Reply #3 on: February 11, 2019, 08:43:22 pm »
Sorry. I'm not sure about sigrok-cli as I've never used it. Just playing about with it now and it doesn't seem to like it but the docs say it should be possible?
 
The following users thanked this post: SigrokLover

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3857
  • Country: nl
Re: Need answer Sigrok several protocol decoder
« Reply #4 on: February 11, 2019, 11:24:19 pm »
Some 45 minutes into this video you get some examples on working with sigrok-cli:


Manpage of sigrok-cli says:
Code: [Select]
    -P, --protocol-decoders <list>
              This option allows the user to specify a comma-separated list of
              protocol  decoders  to be used in this session. The decoders are
              specified by their ID, as shown  in  the  -L  (--list-supported)
              output.

              Example:

               $ sigrok-cli -i <file.sr> -P i2c

              Each protocol decoder can optionally be followed by a colon-sep‐
              arated list  of  options,  where  each  option  takes  the  form
              key=value.

              Example:

               $ sigrok-cli -i <file.sr>
                            -P uart:baudrate=115200:parity_type=odd

              The  list  of supported options depends entirely on the protocol
              decoder. Every protocol decoder has different  options  it  sup‐
              ports.
This reeks very stronly of being able to add as many instances of the protocol decoders as you need.

I have not checked, nor used it in this way, but it seems logical that Pulseview exchanges data & commands with sigrok-cli in the background, and if so, this means that anything you can do with Pulseview can also be done with sigrok-cli.
But if you have doubts, then use the magic words "24MHz 8ch" and get yourself an EUR 5 box from Ali / Ebay / Banggood / China and start experimenting.
 
The following users thanked this post: SigrokLover

Offline SigrokLoverTopic starter

  • Newbie
  • Posts: 6
  • Country: fr
Re: Need answer Sigrok several protocol decoder
« Reply #5 on: February 12, 2019, 12:09:06 pm »
To tsman:
It doesn't say explicitly that it's possible, but I just assumed like in Pulseview, if the channels are specified it could be possible to decode and export data according to the protocols used (SPI and I2C in my case). For example, Channel 0 to 11 for SPI and channel 12 to 13 for I2C. But once again, I couldn't find a similar case in the Internet, so I'm just assuming.


To Doctorandus_P :
Thank you for your answer! I hope so. I had already seen the video (many times :p) and read the doc. I have the same feeling as you but couldn't find a proof of that while searching for a similar case as mine.
Otherwise, worst case scenario, I could decode the SPI communication and for the I2C communication, I would still be able to export raw data and proccess it using a script.

I thought about buying a super cheap logic analyser but the shipping time is super long in Europe and I won't finish the project on time if wait for it. That why, I was super glad to find this community !

Anyway, thanks again both of you for your time. If you have any supports (known similar application, example of sigrok-cli + script,...) you think may be interesting for me, don't hesitate to share it with me.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf